In the process of data acquisition, a real-world physical phenomenon is received, transformed into an electrical signal, which is measured and converted to a digital format through processing, analyzed and stored by a computer. In the vast majority of applications, data acquisition systems are designed not only to acquire data, but also to act controlling for later visualization, storage, processing and analysis      .
Commonly, the data acquisition system used is called Datalogger  , in industrial and agricultural automation processes. This is designed for the acquisition and recording of data over a period without human intervention in this collection. The data are passed to the Datalogger in analog or digital quantities from sensors. These data in analog magnitude are converted to digital, in order to allow them to be measured in mathematical quantities and then processed by a controller and stored  .
On the other hand, studies focused on industrial automation are very limited due to the high cost and time demand. In this context, the development of low cost data acquisition systems is seen as a promising alternative for the refinement and consolidation of this technology. Therefore, the objective of this work is to develop a low cost data acquisition system, which aims to optimize the anaerobic biodigestion process in an Indian model biodigester prototype, by monitoring the main parameters of the process.
In this development, we decided to create a system from scratch, including the entire measure-process-show procedure using hardware tools and free software as means of reducing costs. This platform must be capable of obtaining analog data from the sensors arranged in the biodigester in long periods for the creation of more accurate reports. The system must be able to send this information to a Web server, so these values can be continuously tracked anywhere with access to the internet. The monitoring must be done in a hybrid application for Android, iOS and web browser.
2. Organization of the Work
This paper is organized as follows: the general and specific objectives of the project will be described in Section 2, the sensors and the technology used, which will be necessary for the execution of the project, are discussed in Section 3, whereas the results will be described in Section 4 and, finally, the conclusions of the paper in Section 5.
The objectives of this work are presented in the form of general and specific objectives.
3.1. General Objectives
Develop a system for low-cost data acquisition, which aims to monitor the process of anaerobic biodigestion in biodigesters.
3.2. Specific Objectives
・ Study programming tools and software development;
・ Understand the operation of temperature, pressure, pH and methane gas sensors;
・ Implement a system of data acquisition of sensors and its storage;
・ Present data read from sensors arranged in a multiplatform biodigester from the internet.
4. System Architecture
The operation of the system is described in Figure 1, from the data acquisition
Figure 1. Definition of the phases for data acquisition (Source: the author).
until its monitoring by the user through the application.
Temperature, pressure, pH and methane gas sensors are arranged in the monitored Biodigestor, according to the specification of where the data must be read.
The sensor information is acquired by Rapberry Pi (RPI) that follows its particular forms of communication. All processing and control of these read data is RPI’s responsibility. In it, the data is treated, converted, filtered and stored in a local database. It also runs a RESTful service, which makes available the data stored in the database in JSON format, for use in a Web Service. We created a web application to receive this data and show in real-time the sensor readings in the biodigester acquisition system. Additionally, it can be used to generate reports and graphs according to previously read values.
This way, there is a real time monitoring of the application with all the data that were and will be acquired over time, thus allowing better monitoring and management of the read data.
4.1.1. Digital Temperature Sensor DS18B20
The temperature sensor used is the DS18B20 from Maxim Integrated Products, a digital thermometer that has a resolution for its measurements between 9 and 12 bits. It communicates on a 1-wire bus, which by definition requires only one communication line (and ground) to send the data to a controller. Each sensor has a serial number of 64 bits recorded, which allows the use of multiple sensors in a same data bus. It has a scale from −55˚C to +125˚C, its accuracy is ±0.5˚C in the range between 10˚C to 85˚C  .
This sensor converts the direct temperature to digital with up to 12 bits of resolution. This allows the read temperature to receive increments or decrements of up to 0.0625˚C at intervals of up to 750 ms. The input voltage of this sensor can be between 3 and 5.5 V directly at the power supply terminals, VDD and GND. However, it can be configured as a parasite in the network. This is an available configuration from its 1-wire communication protocol that allows the use of the communication path, the DQ, also as a power supply, requiring only 2 wires to communicate with the RPI.
The sensor used in this project is an encapsulated version with wire exit and waterproof for use in distant environments and in wet conditions.
The sensor operates at temperatures up to 125˚C, and the PVC cable that covers the wires supports up to 100˚C without degradation of the digital signal with the sensor information. Due to these characteristics, this encapsulated model is suitable for the prerequisites of use in the system and it can be seen in Figure 2.
4.1.2. Digital Pressure Sensor BMP180
The BMP180, shown in Figure 3, is a digital pressure sensor that came to succeed the BMP085 in a new generation of sensors with high digital accuracy. This
Figure 2. DS18B20 encapsulated and waterproof  .
Figure 3. BMP180 sensor used in the project  .
sensor produced by BOSCH has been optimized for applications in mobile systems such as PDAs and GPS navigation. It uses the I2 C communication protocol for easy integration with microcontrolling systems as well as computational ones. It is based on piezoresistive technology that gives it high robustness, accuracy and great time of use  .
This sensor takes readings between 950 and 1050 hpa working at a temperature of 25˚C, giving it an accuracy of 0.12 hpa. This read pressure is internally converted to altitude by using an international formula described in Equation (1), where p is the pressure read and po is the base pressure for the calculation.
BMP180 operates with voltages between 1.8 and 3.6 V, but it can be powered by a voltage of 5 V, however it is recommended to use a regulated voltage of 3.3 V. It also has an internal temperature sensor and it is fully calibrated. It has a high speed of reading and conversion, which can take 4.5 ms between samples. The BMP180 was designed to be connected directly to a controller and to communicate on an I2C bus. This is made up of a piezoresistive sensor, an analog to digital converter, a control unit, an E2PROM and a serial I2C interface. The E2 PROM has stored 176 bits of data for individual calibration. It is used for temperature and pressure compensation  .
4.1.3. MQ-4 Gas Sensor
The MQ-4 gas sensor was created for use in the detection of gas leaks in equipment and in industry. Its greatest suitability and sensitivity is to detect methane (CH4) and natural gas (LPG), but it can also be used in the detection of alcohol and smoke. It works with voltages of 5 V and detects concentrations between 200 and 10,000 ppm (particles per million)  . In the context of the application it is necessary only to read methane gas in ppm to calculate the concentration of gas in the biodigester, in order to monitor the process and the amount of gas production. The output of this sensor is analogous in nature following a sensitivity curve, characteristic that can be observed in Figure 4.
4.1.4. pH Sensor
We used a pH sensor kit from Atlas Scientifc composed of a pH sensor, Figure 5(a), and an EZOTM circuit, seen in Figure 5(b), to read the pH values. The sensor performs pH readings between 0.001 to 14.000 with resolution of ±0.002 and it communicates directly with a microcontroller or computer system via an asynchronous serial UART connection or via I2C. It works with input voltages between 3.3 V to 5 V with an average consumption of 0.995 mA in 3.3 V  .
The pH Probe directly connected to the EZO circuit provides, directly to the protocol being used, the pH value at its set value without the need to manipulate the read data, since the sensor is pre-calibrated.
4.1.5. MCP3008 Analog-to-Digital Converter
Analog-to-digital converters are devices that convert analog input voltages into
Figure 4. Characteristic sensitivity of MQ4  .
Figure 5. Sensor modules used with the pH sensor and controller circuit).
digital codes as output. This generated code can be used directly by digital devices as in microcontrollers and computers. The use of analog-digital converters has its application in the reception of values coming from analog nature, such as temperature sensors, for the use of this data in digital systems.
The MCP3008 has a 10-bit resolution digital-analog converter, which can receive up to 8 separate and parallel analog inputs with an SPI communication interface. It can receive and treat the 8 analog inputs digitally  using a communication language from this interface. The MCP3008 is used in applications when the digital system that will process analog level information does not have an internal A/D converter. Another use for it is when the system already has A/D converter, but not enough for the application   .
4.1.6. Raspberry Pi
Raspberry Pi, shown in Figure 6, is a small computer developed by the Raspberry Pi Foundation, a British charity organization, in order to stimulate the study of computer science. The computer components were selected in order to optimize the cost. It is a very simple instrument, but capable of performing several specific tasks.
Raspberry Pi’s great advantage is that there is not only one way to use it. The user defines how it will be used and has the ability to perform several functions, such as just watching videos and browsing the internet or using them to control a home automation system. This hardware platform is extremely flexible, which enables a multitude of applications  .
Launched in 2011, this small computer has established itself as a great low- cost alternative to Linux-based systems. More than 2 million devices have been sold since its launch and they have been worked on in many areas, especially educational and professional ones  .
The RPI does not use hard disk, having an SD card with capacity greater than or equal to 8 GB as secondary memory. The operating system, as well as the user files, are stored in this card. It has a network interface controller (NIC) with a standard RJ-45 ethernet connection, enabling a connection to the Internet or just a local area network. It has two video outputs, one HDMI output and a second RCA video output. It even has two USB ports and one audio output. It
Figure 6. Raspberry Pi 1 Model B  .
has eight programmable general purpose input/output (GPIO) pins, which can be connected, for instance, to sensors, motors or relays (switches controlled by electricity) to control other equipments. The model 2 of the device in its version B is used in this project, which has the following specifications:
・ Architecture: Quad-core ARM Cortex-7;
・ CPU: 900 MHz;
・ RAM: 1 GB;
・ GPU Broadcom VideoCore IV;
・ Chip: Broadcom BCM2836 SoC;
・ Connector for GPIOS with 2 × 20 pins;
・ Camera connector;
・ Display connector.
There are several ways to store data, for using it in applications or after them, such as organizing in text files, in .csv formats for direct processing in spreadsheets, as well as in relational or non-relational databases. This choice must be taken into account according to the needs of the application developed.
Databases have been used since the beginning of computing and undergo a constant evolution, always changing, updating and evolving according to the needs. In this update context, relational databases have emerged in a data collection stored and interconnected with multiusers needs in different sessions, while maintaining data reliability, integrity, and availability of these data. Broader access, data integration, ease of access and reduced data redundancy lead to a constant use of these databases. It is necessary a software which allows the management of this information. This is the Database Manager System. This is responsible for all input, output, and logic interactions involved in data management  .
The MySQL database management system (DBMS) is used in this application. This is a free tool created and maintained in the base of free software, with great benefits in use, such as: quality, robustness and security. This is the most famous DBMS in the world and widely used in web applications for being fast and efficient.
4.1.8. Web Server
The data received from the sensors and processed by Raspberry Pi are sent directly to a web server, which was used to make the data acquisition available in a distributed and immediate way. Web server is a specific software for displaying files to clients connected on the same network. These data are in HTML and use protocols such as HTTP in most contexts. These are responsible for making websites and content available on the internet. Some examples are Apache, Tomcat and Nginx servers  .
Apache Server is used in this application. It receives the information directly from the Raspberry PI, it is stored in database and made available to applications later.
4.2. Development and Implementation
4.2.1. Location of Tests
The system was put into operation for the data acquisition in a greenhouse at the Federal University of Ceará (UFC) Pici campus with the coordinates of latitude −3.7452231 and longitude −38.5816339. We performed the experiments between May 31st and June 19th, 2016, with data acquisition at defined intervals of 30 minutes.
The information acquired from the sensors was saved in a local and remote database, both of them used MySQL as DBMS. The wireless internet network available on the campus was used to send this information to the remote database.
The search for efficient alternative means of production has become commonplace in scientific and industrial production with the imminent cessation of fossil fuels. Means of obtaining energy from, for instance, wind, the sun and the water movement were created in this context. Ways of using biomass for the energy generation were created in this environment as well. It can be found in the most diverse forms in nature such as firewood, residues generated by agricultural crops, animal husbandry and municipal solid waste  .
In the use of residues, such as those produced by animal husbandry, anaerobic biodigestion has been gaining strength in the use of this biomass in the implementation of biodigesters for energy generation, as well as biofertilizers  . There are two extremes in the use of biodigesters, they are the Indian and Chinese models. The Chinese model seeks the creation of biofertilizers for use in food production. The Indian model is used, in the best form, for the production of biogas  .
The monitored biodigester is a prototype constructed from PVC pipes (polyvinyl chloride) following the Indian model that exalts a higher production of biogas. It could be constructed at a low cost due to the ease of finding the materials and it allows the use of the study of the variables in a bench-level for the continuous improvement of the anaerobic digestion process  .
The built prototype is based on the Indian model, because this type of model has an extraordinary capacity in the waste treatment, as well as in the production of biogas and biofertilizer. The measures adopted in the construction of the prototype can be visualized in Figure 7.
・ H: height of the substrate level (biomass) = 45 cm
・ Dg: gasometer diameter = 14 cm
・ Ds: diameter of the digestion chamber = 15 cm
・ h1: idle height (biogas reservoir) = 47 cm
・ h2: useful height of the gasometer = 27 cm-height of the inlet box = 2 cm-height of the entrance of the pipe with the inflow = 5 cm
Figure 7. Indian biodigestor proposed (Source: the author).
・ M: length of inlet pipe whose diameter is 32 mm = 46 cm
・ M: length of the outlet pipe whose diameter is 32 mm = 42 cm
・ P: partition wall height = 20 cm
Figure 8 shows the biodigestor constructed and instrumented with the sensors for data acquisition.
4.2.3. Hardware Specification
・ For the proper functioning of the system for data acquisition, a determining factor is the type of hardware to be developed in detriment of the environmental factors of its place of operation. In anaerobic biodigesters, the places for monitoring are generally in open environments and at high temperatures, unprotected against rainfall and away from the power grid and the internet. These factors must be taken into account when specifying the hardware components used. Taking into account the objectives of the work to the detriment of environmental issues of application, the hardware to be developed must have some prerequisites:
・ Robustness: Inherent characteristics to the environment, such as the ability to withstand high temperatures and humidity, must be supported by the hardware, as well as restoration capacity in cases of failures, such as a momentary power interruption.
・ Self-management of data: The hardware must allow the acquisition of information from the sensor at defined intervals, so it can be acquired, processed and stored without human interference, and in the event of a failure, reorganize itself in a way that will not lose information, which are the most important assets of the application.
・ Storage: Information must be stored over long periods, which requires sufficient storage capacity to supply this demand for information according to the time defined.
Figure 8. Biodigester constructed and instrumented with the sensors for data acquisition in which: 1―Raspberry Pi; 2―Pressure Sensor BMP180 and Methane MQ-4; 3―Campanula temperature sensor; 4―Temperature sensor of the digestion chamber; 5―pH sensor.
・ Interoperability of protocols: The hardware must allow communication with peripherals (in this case, sensors) in various communication protocols to receive and process the information coming from them.
・ Internet communication: In order to access the information acquired in the biodigester in continuous monitoring, the hardware must allow this information to be sent over the internet, so that it can be made available to the application once the reading is carried out in the field.
・ To solve this problem in relation to the established points, there are several platforms and means to solve them, we could use a microcontroller, such as Arduino. However, some peripherals should be used to obtain all the proposals. It would be necessary to use Shields, as a Real Timer Clock (RTC) to determine the time, a GPRS, for internet connection, and a SD, to record information. We use a small computer, Raspberry Pi, in order to needs to be satisfied and still with some additional means, which give greater capacity to construction.
・ The RPI does not have an internal analog-to-digital converter, which is required for the application. For this, we include the MCP3008 analog-digital converter of the microchip.
・ All sensors were connected to the RPI, as shown in the electrical scheme defined in Figure 9. The DS18B20 temperature sensors communicate via the 1-wire bus with the RPI, each one of them has a specific address defined by the protocol for different readings of temperature values. The BMP180 pressure sensor communicates with the RPI via the I2 C protocol, and the analogue pH and methane gas sensors (MQ-4) are connected to the analog-to- digital converter MCP3008, which in turn communicates with the RPI via SPI, passing the information in digital values for treatment in the control system.
Figure 9. Scheme of connection of the peripherals to the RPI (Source: the author).
4.2.4. Software Specifications
We take into consideration the construction of two platforms in the development of the software logic for this data acquisition system. One to acquire, process and deliver the data and another one to receive these data and to show in a customized interface to the user.
We used the python programming language for its development in the acquisition application. This is a high-level, object-oriented, dynamic typing, strong, interpreted, and interactive language. It favors readability and makes itself more productive with clear and concise syntax. It is open source and used in the creation of systems and also as a scripting language in various software  .
We have built a hybrid application from the mobile application framework, Ionic, to develop an agile, intuitive and efficient interface for monitoring the data by the user. It has an interface layout built to fit the devices natively and responsively.
Having a clean and efficient design when we run the application as a fundamental feature. Currently, there is a high demand for the creation of compatible applications with at least most of the various existing software platforms. In this context, platforms were created for hybrid application development, such as Phonegap. On these platforms, web applications that run within a browser on the device are created. The browser is included in the application, and it is adapted to each platform at the time of compilation. In this way, a single application can run on several platforms. This is how the Ionic Framework was created, in 2013  .
The framework includes a set of visual elements that are identical to the native ones. Ionic is responsible for the interface and the way the data is shown. We used the AngulaJS language to receive data from the sensor, its treatment, interaction with the user and all the logic involved. This is a framework maintained by Google and works as an extension to the HTML document, which adds new parameters and interacts dynamically with various elements. This language makes use of directives to change the standard HTML behavior, it makes the connection between the visual created in Ionic and the logic that must be developed in the application  .
The monitoring of the parameters of anaerobic biodigestion is of fundamental importance, both for the process and to improve the results achieved, according to the literature. These parameters include: temperature, pressure and pH.
According to  , the monitoring and accompaniment of the data provide optimum conditions of activity, help in a better use of the organic residues and, consequently, improve the production of its by-products, biogas and biofertilizers, besides contributing in the fermentation process of the bacteria.
The temperature is the most relevant among the several factors that interfere with anaerobic biodigestion, as shown previously, due to the different ranges of microbial growth. According to Bischofsberger et al. (2005), fermentative bacteria reach a maximum growth rate of 100% in the mesophilic conditions, between 20˚C and 45˚C, considering 36.5˚C as the ideal temperature. On the other hand, thermophiles reach maximum growth at temperatures higher than 45˚C, being ideal around 56˚C.
In Figure 10 an initial screen of the application was shown being run on an Android operating system tablet. It shows the location where the User must enter the address of the server where an application is hosted. After entering the information, the application receives the data that was acquired as representation in Figure 11.
Analyzing the data obtained during the temperature monitoring both in the campanula and in the digestion chamber (Table 1 and Table 2), it is noticeable that temperatures remained within the expected throughout the experiment, creating optimal conditions for the development of bacterial activities, contributing to the production of biogas and biofertilizer.
Given the data collected, we sketched a graphic with the minimum, average
Figure 10. Application home screen (Source: the author).
Figure 11. Summary of the received data (Source: the author).
Table 1. Temperature sensor values.
Table 2. Temperature sensor values.
and maximum values of temperature, during the 20 days of reading of the system. This graph is shown in Figure 12. It is possible to perceive the temperature variation in the two sensed locations in the biodigester throughout the day.
In Table 1 and Table 2, we have the temperature values read by the sensors located in the campanula and digestion chamber, respectively, between June 9th and 15th, at 9:00 PM, 3:00 PM and 9:00 PM, according to Brasilia time and following the specifications of the WMO (World Meteorological Organization) of the ONU. Below the temperature readings, we have the average temperature in the day, taking into account the three times read.
These changes did not affect the capacity of methanogenic bacteria to produce biogas, although there is variation in temperature, as can be seen in Figure 12. We can observe that methane production already occurred at the beginning of the data collection, with its higher production in the fourth week of analysis, due to favorable weather conditions.
In Figure 13, we have data on the temperature in the campanula of the monitored biodigestor, demonstrating the maximum, minimum and average values , as well as a graph of the temperature as a function of time.
In Figure 14, we have the data on atmospheric pressure in the monitored biodigestor, which shows the maximum, minimum and average values, as well as a graph of temperature as a function of time.
The values read from the pressure in the campanula are shown in Figure 15, with the maximum, average and minimum values during the 20th day of acquisition.
Figure 16 shows a graph generated from the application and saved locally
Figure 12. Graph with the maximum, minimum and average values of the temperature sensors (Source: the author).
Figure 13. Application screen showing the acquired temperature data (Source: the author).
from the weekly methane gas production summary. We can note that the production had a growth since the beginning of the data collection and that had its
Figure 14. Application screen showing the acquired pressure data (Source: the author).
Figure 15. Graphic with the maximum, minimum and average values of the pressure sensor (Source: the author).
greater production in the fourth week of production and monitoring of the biodigester.
Figure 17 also shows a summary of the pH values in the monitoring period, which proved to be very stable, favoring the bacteria that perform the digestion of the biomass for biogas production.
Another factor that affects the bacteria involved in the process drastically is the pH. According to the literature, its value ranges from 6.0 to 8.0, with pH 7.0 as the optimum point. Analyzing the data obtained during the analyzes (Figure 17), we can conclude that the pH remained within a range expected in the literature throughout the experiment. It is important to highlight that biogas production was very significant in the fourth week, in which the pH was closer to 7, as we can see in Figure 16.
Figure 16. Weekly summary of methane production (Source: the author).
Figure 17. Summary of weekly pH values (Source: the author).
Analyzing all the graphs, we realized that it is possible to make an optimization of the system, due to the existence of a peak of biogas production in the fourth week of experiments. We believe that we would be able to further improve production if there was better control in the reactor under study (what the acquisition system allows), which enables us to study reactor control systems in future works.
On the other hand, the system showed an appropriate behavior in relation to the objectives set out in the development of the application, which was to monitor the data coming from a biodigester in a simple and efficient way. By sending this information to the internet, the continuous and uninterrupted monitoring of the information received from the RPI by the sensors installed in the biodigester became possible. We can have direct and momentary information with this continuous monitoring, according to the application interactions of the biomass and environmental factors, such as temperature.
The hardware presented efficient behavior when it comes to sensor data acquisition and restoration of normal functions, even in the face of power outages. The monitoring system built on a hybrid platform allowed the tracking of information, both in the web browser and on the Android mobile platform installed, making it easier for users to receive information. For the improvement of the system in future works, we must let it self-sufficient energetically by using batteries in order to avoid losing data in the event of a power outage.
In general, we can say that all the objectives were achieved. Through this study, we built a functional data acquisition system with low cost materials and they are easy to acquire in the local market. Thus, we see the system as a feasible and easily implementable alternative for the experimental research on monitoring the anaerobic biodigestion process for the production of biogas from biomass, reducing the temporal and material cost of the research.
 Alves, M.C.S., Lima, T.F.O., Gonçalves, M.T.T., Varasquim, F.M.F.A., Santiago, L.F.F., Varanda, L.D. and Bianchi, E.C. (2010) Desenvolvimento de um Sistema de Aquisiç ão de dados a distanciaparaprocessos de usinagem. IV CongressoNacional de EngenhariaMecanica.
 Mcphillips, T.M., Mcphillips, S.E., Chiu, H.-J., Cohen, A.E., Deacon, A.M., Ellis, P.J., Garman, E., Gonzalez, A., Sauter, N.K., Phizackerley, R.P., et al. (2002) Blu-Ice and the Distributed Control System: Software for Data Acquisition and Instrument Control at Macromolecular Crystallography Beamlines. Journal of Synchrotron Radiation, International Union of Crystallography, 9, 401-406.
 Abbasi, R., Ackermann, M., Adams, J., Ahlers, M., Ahrens, J., Andeen, K., Auffenberg, J., Bai, X., Baker, M., Barwick, S., et al. (2009) The Icecube Data Acquisition System: Signal Capture, Digitization, and Time Stamping. Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment, 601, 294-316.
 Chase, A.O., Sampaio, M.H.K., Almeida, J.F. and Brito-De-Souza, J.R. (2012) Data Acquisition System: An Approach to the Amazonian Environment. IEEE Latin America Transactions, 10, 1616-1621.
 Electronics, H. (2002) Technical Data Mq-4 Gas Sensor. Hanwei Electronics.
 Palhares, J.C.P. (2008) Biodigestão anaeróbia de dejetos de suinos: Aprendendo com o passado para entender o presente e garantir o futuro. Embrapa Suinnos e Aves, I Curso sobre Uso de Biodigestores no Tratamento de Dejetos de Suinnos. Concórdia, Sc, v. 20.
 Silva, F.F.M., Bertini, L.M., Alves, L.A., Barbosa, P.T.,Moura, L.F. and Macêdo, C.S. (2015) Implicações e possibilidades para o ensino a partir da construção de biodigestor no ifrn-campus apodi. HOLOS, 6, 315-327.
 Arruda, Cesar Alessandro Oliveira, et al. (2010) Aplicação de dejetosuíno e estrutura de um LatossoloVermelho sob semeaduradireta. Ci. Agrotec, 34, 804-809.