Low-cost automatic station for compost temperature monitoring

Estação automática de baixo custo para monitoramento de temperatura da compostagem R E S U M O Em uma unidade de compostagem, o monitoramento da temperatura é fundamental para o controle do processo de compostagem. Devido à limitação de custo, o monitoramento da temperatura é manual e com resolução amostral diária. O objetivo do estudo foi desenvolver uma estação automática de US$ 150 dólares capaz de monitorar, a cada cinco minutos, a temperatura do ar em dois pontos diferentes de uma leira de compostagem. No teste de calibração, os sensores apresentaram uma incerteza estimada entre ± 1 a ± 1,9 oC. No teste de validação de campo, a estação garantiu autonomia segura por sete dias e suportou condições de temperatura extremas (> 70 oC).


Introduction
Temperature measurement guides some of the most important interventions in the composting, such as turning, wetting, porosity and passage to maturation (Leton & Stentiford, 1990).Temperature is especially relevant as environmental requirement for the reduction of pathogens (Epstein, 2011).Inácio & Miller (2009) suggest hourly samplings; however, for cost and benefit issues, the monitoring is performed with daily frequency and in few points.The models with automatic storage are expensive, especially considering the socioeconomic reality of the city halls of small cities, villages, family farmers and small companies (Westerman & Bicudo, 2005).
The publication of the National Plan of Solid Residues (PNRS), in 2012, has stimulated the research and development of low-cost social technologies (MMA, 2012).The expected measures include especially the control of parameters, such as temperature, that can be an indicator of the quality and sanitary safety of the compost (Epstein, 2011).
Since 2005, electronic prototyping platforms such as Arduino ® have been employed in various areas of knowledge that require low-cost electronic projects, combining in the same prototyping platform: easily used hardware and free, open software (Arduino, 2016).Recently, a series of automatic storage projects using Arduino or similar brands appeared in the area of environmental monitoring, encompassing hydrological, meteorological and pedological processes, among others (Thalheimer, 2013;Fisher & Sui, 2013;Fuentes et al., 2014;Bakri et al., 2015;Kato et al., 2015;Abraham & Li, 2016;Odli et al., 2016).
In this context, this study aims to develop a low-cost automatic system for temperature monitoring applied to the composting.

Material and Methods
The hardware of the compost monitoring system (CMS) is made up of 4 units, namely: control unit, time counting and data storage unit, measuring unit and supply unit.
The control unit is found on a prototyping platform Arduino/Genuino model UNO TM equipped with an 8-bit microcontroller Atmel Atemga328, one power input of 5 to 12 V DC , one serial or USB communication port, fourteen digital outputs and six analog inputs (Figure 1A) (Arduino, 2016).
The part of the hardware responsible for time counting and data storage is composed of a digital quartz clock DS1307 and a 2-GB SD-Card integrated to the Data Logging Shield of the brand Deek-Robot TM (Figure 1B) (Earl, 2016).
The temperature measuring unit was composed of three thermistors (Figure 1B).The temperature sensor DS18B20 used in the study is waterproof and has a one-wire digital protocol, which allowed to share one digital port with an unlimited number of individually identified sensors (Figures 2A and B).According to the manufacturer, the instrumental uncertainty is ± 0.5 ºC (-10 to + 85 ºC) and the maximum sampling rate is 750 milliseconds (MAXIM INTEGRADED, 2015).
The data logger was placed in an IP 67 hermetic box along with a rechargeable 12-A 6-V DC sealed battery and with silica  2C).The temperature sensors were attached to a metal rod that allowed to place them at different depths inside the pile.The construction cost was US$ 150.00, and 45% of the cost was relative to the autonomous supply system.
The automation algorithm of the system was developed in the free software Arduino IDE TM in language based on C/C++.This algorithm was responsible for controlling the collection and record of date, hour and temperature of the three temperature sensors (Figure 1C).
Prior to the performance test in the compost pile, the temperature sensors were subjected to a calibration test, which used as reference a mercury thermometer of the Cole-Parmer Instrument Co. (-2 to 150 ºC), division of 0.5 ºC and error limit (L) of ± 0.5 ºC.Since the smallest division was on the order of one millimeter, a confidence interval of 95% was assumed, i.e., the expanded uncertainty of a single measurement of the reference thermometer was expressed as σ y = ± L 2 -1 = ± 0.25 ºC (BIPM/IEC/IFCC/ISO/IUPAC/IUPAP/OIML, 2008).
The experiment consisted in measuring with three sensors and with the mercury thermometer, simultaneously, the temperature of the water in a beaker-like container.Seventeen tests were conducted, covering the temperature range expected in a typical composting process, with reference temperatures varying from 11.5 to 73 ºC.In each test, three sensors simultaneously took 25 temperature measurements at a 1-Hz sampling rate, while the operator took five readings using the mercury thermometer every five seconds.The standard uncertainty (σ xi ) associated with n measurements was expressed according to BIPM/IEC/IFCC/ISO/IUPAC/ IUPAP/OIML (2008) as: at depths of 20 and 40 cm, respectively (Figures 2A and 3B).This arrangement allowed to monitor the temperature inside the mixture and on the contact of this mixture with the pile cover.The CMS was configured to collect and record on the memory quasi-simultaneous data of the three sensors every five minutes for seven days.In this configuration, a 6-V DC 12-Ah battery was used, which guaranteed autonomy of seven to eight days, eliminating the need for a local point of power.On this day, the battery was replaced and the used battery was recharged for the next replacement.At the beginning and end of the experiment, hour and battery tension were recorded to evaluate possible time lags and life of the battery.
Climatological data collected every 15 min, such as cumulative rainfall, wind speed and relative air humidity, were obtained from the São Cristóvão station (Nº 32) of the rainfall alert system of the City Hall of Rio de Janeiro (Alerta Rio) located 4 km away from the experimental site (http://alertario.rio.rj.gov.br/download/dados-meteorologicos/).

Results and Discussion
During the assembly, the components were easily found in the national market and the price (US$ 150.00) can be considered as low, compared with similar commercial models, which may cost more than twice as much.The most expensive component of the CMS was the supply system, composed of two batteries and one charger, which cost 45% of the total value.If there is a power source in the site, the overall value can be even lower because, using only one source (127-220 V AC for 9 V 1A), the CMS price can be reduced by 40%.On the other hand, if the site is distant and a longer autonomy is intended, the addition of one solar panel can more than double the overall value.
Since the CMS software is open code and the hardware is mounted by the user, the maintenance, learning and replacement of components were based on both forums on the internet and national market, for the components.
The sensors were calibrated through simple linear regression and the output expanded uncertainties relative to the calibration curves of the sensors 1, 2 and 3 were ± 1.0, ± 1.9 and ± 1.1 ºC (Figure 4).The test met the operating applications of the composting, which requires uncertainty lower than ± 5 ºC (Epstein, 2011).
The field test lasted seven days and all sensors operated without interruptions or generation of spurious data (Figure 5).The sensor monitoring the external environment recorded mean value of 20.6 ± 1.1 ºC, maximum of 32.6 ± 1.1 ºC and minimum of 13.8 ± 1.1 ºC.The rod with sensor at depth of 20 cm recorded mean value of 50.9 ± 1.9 ºC, maximum of 56.9 ± 1.9 ºC and minimum of 45.8 ± 1.9 ºC.The rod with sensor at depth of 40 cm recorded mean value of 68.9 ± 1.0 ºC, maximum of 72.4 ± 1.0 ºC and minimum of 60.0 ± 0.9 ºC.The experiment is marked by a first thermophilic cycle that is subsequently superposed by a second one, resulting from a new entry of fresh material on July 6, 2015.
The weather along the field experiment was marked by the arrival of a cold front between July 4 and 5, 2015, with stronger (8.3 m s -1 ) and more persistent (~ 12 h) winds.The wind gusts where: σ x -standard deviation of n measurements (n = 25) of temperature of the sensor i (i = 1, 2, 3); and, t 95,n-1 -threshold value of probability corresponding to the 95% confidence interval for n-1 degrees of freedom.
The calibration curve was obtained from a linear regression model with coefficients adjusted by the minimum square method.The expanded uncertainty of the regression model output (Ɛ y ) was calculated by the expression: where: y t -temperature of the mercury thermometer (reference); x si -temperature of the sensor i (i = 1, 2, 3); N -number of tests (N = 16); and, a, b -coefficient of the simple linear regression model.
The site of the field test was a compost pile with passive aeration in the Experimental Center of Environmental Sanitation (CESA), located in the University City of the Federal University of Rio de Janeiro (UFRJ), municipality of Rio de Janeiro -RJ (Figure 3A).In this pile, one ton of organic residues is recycled per month, collected twice a week at the University Restaurant.This residue was mixed with wood shavings to promote porosity and adjust carbon proportion in the compost.The mixture was then arranged on a 30-cm-thick porous layer made of pruning material and wood shavings (Figure 3B).Subsequently, the pile was covered with a 15-cm-thick layer of cut grass.The pile was 2 m wide, 2 m long and 1.5 m high.
The field test consisted in placing one sensor to monitor the external air temperature and other two to monitor the pile, (2) Miller, 2009), elimination of pathogens (Wiley & Westerberg, 1969;Esptein, 2011) and microbial activity (Horiuchi et al., 2003;Barrena et al., 2008), which are also directly influenced by the temperature, with adequate monitoring by the CMS.
The number of visits of the operator to the pile was reduced from once a day to once a week with the substitution of manual reading by automatic reading of temperature with the CMS.The visit was limited to the replacement of battery and memory card.The possibility of connecting dozens of temperature sensors allows the CMS to control different points inside the compost pile, providing a spatial and simultaneous resolution of the entire composting yard, which in practice would be expensive using the conventional methods.These visits can be even more reduced if the solution is integrated to solar panels and remote wireless data transmission (Casas et al., 2014).
The CMS can reach a wide range of sectors in the society, from large agricultural producers and urban composting companies to family farmers and traditional communities.This characteristic is very desirable, in the perspective to stimulate good practices and provide technicians and regulatory agencies with a robust and accessible instrument to control the composting process and quality of the produced compost, thus meeting one of the guidelines of the National Plan of Solid Residues of 2012.
This solution also proved to be a potential low-cost alternative for other similar applications in the sector of solid organic residues, such as laboratory experiments with bioreactors (Magalhães et al., 1993;Mason & Milke, 2005) and projects of anaerobic digesters and biogas (Martí-Herrero et al., 2016).
As future expectation, the research started the development of the integration of moisture and oxygen sensors that, along with the temperature sensor, will enable the CMS to automatize the control of forced aeration and irrigation, besides informing the operator the moment for pile turning.

Conclusions
1.The results of the calibration and test in the pile demonstrated its operational efficiency compared with the conventional options, reducing the number of visits of the operator and increasing the spatial and temporal resolution of temperature measurement.in this event produced high-frequency disturbance in pile temperature and the 12 h persistence resulted in the reduction of pile temperature (Figure 5A).The relative air humidity was equal to 67%, a typical value for July.
In the experiment, the central temperature of the pile increased to values higher than 70 ºC (Figure 5B).The external sensor measuring the external air temperature, in turn, responded to daily oscillations due to the solar radiation and weather.The cover sensor was strongly influenced by the heat from the interior of the pile, but with a clear modulation of the daily oscillation of external temperature (Figure 5B).
In this context, the monitoring can evaluate the impact of the wetting, cooling by the rain and drying and oxygenation by the wind (Inácio & Miller, 2009).Regarding the type and project of the composting, temperature monitoring can evaluate the capacity of the cover to retain heat and adjust the porosity of the mixture between residues and structuring agents and the optimization of the forced aeration (Fernandes & Sartaj, 1997;Tateda et al., 2002;Inácio & Miller, 2009;Epstein, 2011).Furthermore, it is possible to identify the impact by ammonia emission (Pagans et al., 2006) 2. The instrument was also able to endure adverse environmental conditions such as high humidity and extreme temperatures (> 70 ºC).
3. The expanded uncertainties of the measurements of the sensors were satisfactory and compatible with the operational and environmental demand of the composting.
4. The CMS also proved to be of low cost in both construction (US$ 150.00) and maintenance.
5. The free software and free-code hardware allow the user to have total control in the CMS configuration.

Figure 1 .
Figure 1.(A) Photograph of the microcontroller Arduino UNO MT integrated to the data logger shield Deek-Robot MT .(B) Simplified electrical scheme of the compost monitoring system (CMS).(C) Automation algorithm

Figure 3 .
Figure 3. (A) Experimental Center of Environmental Sanitation (CESA) compost pile monitored by the CMS.(B) Experimental scheme in the CESA's compost pile

Figure 4 .
Figure 4. Calibration of the three sensors with a reference thermometer: black circles are the mean values of measurements in each test and the continuous line represents the calibration curves resulting from the tests

Figure 5 .
Figure 5. Temporal series of wind speed of the São Cristóvão weather station (A) and temporal series of temperature recorded by the three temperature sensors in the CESA's compost pile experiment (B)