SciELO - Scientific Electronic Library Online

vol.21 issue11Quality of second-crop corn according to the period between harvest and drying author indexsubject indexarticles search
Home Pagealphabetic serial listing  

Services on Demand




Related links


Revista Brasileira de Engenharia Agrícola e Ambiental

Print version ISSN 1415-4366On-line version ISSN 1807-1929

Rev. bras. eng. agríc. ambient. vol.21 no.11 Campina Grande Nov. 2017 


Low-cost automatic station for compost temperature monitoring

Estação automática de baixo custo para monitoramento de temperatura da compostagem

Marcelo D. L. Jordão1 

Kary de Paiva2 

Heloisa T. Firmo3 

Caio T. Inácio4 

Otto C. Rotunno Filho2 

Tomé de A. e Lima5 

1Universidade Federal do Rio de Janeiro/Centro de Tecnologia/Programa de Engenharia Naval e Oceânica. Rio de Janeiro, RJ. E-mail: (Corresponding author)

2Universidade Federal do Rio de Janeiro/Centro de Tecnologia/Programa de Engenharia Civil. Rio de Janeiro, RJ. E-mail:;

3Universidade Federal do Rio de Janeiro/Centro de Tecnologia/Núcleo Interdisciplinar para o Desenvolvimento Social e Escola Politécnica. Rio de Janeiro, RJ. E-mail:

4Empresa Brasileira de Pesquisa Agropecuária/Embrapa Solos/Núcleo de Pesquisa em Intensificação Sustentável da Agricultura. Rio de Janeiro, RJ. E-mail:

5Universidade Federal do Rio de Janeiro/Centro de Tecnologia/Programa de Engenharia Ambiental. Rio de Janeiro, RJ. E-mail:


Temperature monitoring is an important procedure to control the composting process. Due to cost limitation, temperature monitoring is manual and with daily sampling resolution. The objective of this study was to develop an automatic station with US$ 150 dollars, able to monitor air temperature at two different points in a compost pile, with a 5-min time resolution. In the calibration test, the sensors showed an estimated uncertainty from ± 1 to ± 1.9 ºC. In the field validation test, the station guaranteed secure autonomy for seven days and endured high humidity and extreme temperature (> 70 °C).

Key words: organic waste; automation; social technology; Arduino


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 ºC. No teste de validação de campo, a estação garantiu autonomia segura por sete dias e suportou condições de temperatura extremas (> 70 ºC).

Palavras-chave: resíduos orgânicos; automação; tecnologia social; Arduino


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 UNOTM equipped with an 8-bit microcontroller Atmel Atemga328, one power input of 5 to 12 VDC, one serial or USB communication port, fourteen digital outputs and six analog inputs (Figure 1A) (Arduino, 2016).

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

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-RobotTM (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).

Figure 2 (A) Top view of the compost pile: 1 - external temperature sensor; 2 - leachate collecting box; (B) Temperature sensor; (C) Interior of the hermetic box of the CMS: 3 - data logger; 4 - battery 

The data logger was placed in an IP 67 hermetic box along with a rechargeable 12-A 6-VDC sealed battery and with silica desiccants (Figure 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 IDETM 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:

\[ \sigma_{xi} = \pm t_{95, n - 1} \frac{\sigma_{x}}{\sqrt{n}} \] (1)


σx - standard deviation of n measurements (n = 25) of temperature of the sensor i (i = 1, 2, 3); and,

t95,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:

\[ \varepsilon_{y} = \pm t_{95, N - 2} \sqrt{\sum_{t = 1}^{N} \frac{[y_{t} - (ax_{si} + b)]^{2}}{N - 2}} \] (2)


yt - temperature of the mercury thermometer (reference);

xsi - 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.

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

The field test consisted in placing one sensor to monitor the external air temperature and other two to monitor the pile, 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-VDC 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 (

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 VAC 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).

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 

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.

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) 

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 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), proliferation of flies (Inácio & 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.


  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.

  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.


To the Experimental Center of Environmental Sanitation - CESA, for providing the space for the experiment; to the members of the ‘Mutirão de Agroecologia’ - MUDA and PIBEX fellows for the construction and management of the compost pile. The authors would like to recognize the support offered by Fundação de Amparo à Pesquisa do Estado do Rio de Janeiro (FAPERJ), Conselho Nacional de Desenvolvimento Científico e Tecnológico (CNPq) and Coordenação de Aperfeiçoamento de Pessoal de Nível Superior (CAPES). In addition, the authors would also like to express gratitude to the reviewers who provided suggestions for improvement to this paper.

Literature Cited

Abraham, S.; Li, X. Design of a low-cost wireless indoor air quality sensor network system. International Journal of Wireless Information Networks, v.23, p.57-65, 2016. ]

Arduino. Arduino UNO. Documentation. Available on: <>. Access on: 10 Set. 2016. [ Links ]

Bakri, N. A. M.; Al Junid, S. A. M.; Razak, A. H. A.; Idros, M. F. M.; Halim, A. K. Mobile carbon monoxibe monitoring system based on Arduino-Matlab for environmental monitoring application. IOP Conference Series: Materials Sciences and Engineering, v.99, p.1-10, 2015. [ Links ]

Barrena, R.; Vázquez, F.; Sánchez, A. Dehydrogenase activity as a method for monitoring the composting process. Bioresource Technology, v.99, p.905-908, 2008. ]

BIPM/IEC/IFCC/ISO/IUPAC/IUPAP/OIML. Avaliação de dados de medição - Guia para expressão de incerteza de medição. Rio de Janeiro: INMETRO, 2008. 126p. [ Links ]

Casas, O.; López, M.; Quílez, M.; Martinez-Farre, X.; Hornero, G.; Rovira, C.; Pinilla, M. R.; Ramos, P. M.; Borges, B.; Marques, H.; Girão, P. S. Wireless sensor network for smart composting monitoring and control. Measurement, v.47, p.483-495, 2014. ]

Earl, B. Adafruit data logger shield. Adafruit Industries. 77p. Available on: <>. Access on: 10 Set. 2016. [ Links ]

Epstein, E. Industrial composting. Environmental engineering and facilities management. New York: Taylor and Francis Group, 2011. 388p. ]

Fernandes, L.; Sartaj, M. Comparative study of static pile composting using natural, forced and passive aeration methods. Compost Science & Utilization, v.5, p.65-77, 1997. ]

Fisher, D. K.; Sui, R. An inexpensive open-source ultrasonic sensing system for monitoring liquid levels. Agricultural Engineering International: CIGR Journal, v.15, p.328-334, 2013. [ Links ]

Fuentes, M.; Vivar, M.; Burgos, J. M.; Aguilera, J.; Vacas, J. A. Design of an accurate, low-cost autonomous data logger for PV system monitoring using ArduinoTM that complies with IEC standards. Solar Energy Materials and Solar Cells, v.130, p.529-543, 2014. ]

Horiuchi, J.-I.; Ebie, K.; Tada, K.; Kobayashi, M.; Kanno, T. Simplified method for estimation of microbial activity in compost by ATP analysis. Bioresource Technology, v.86, p.95-98, 2003. ]

Inácio, C. T.; Miller, P. R. M. Compostagem: Ciência e prática para a gestão de resíduos orgânicos. Rio de Janeiro: Embrapa Solos, 2009. 154p. [ Links ]

Kato, A.; Sinde, R.; Kaijage, S. Design of an automated river water level monitoring system by using Global System for mobile communications. International Journal of Computer Science and Information Security, v.13, p.106-111, 2015. [ Links ]

Leton, T. G.; Stentiford, E. I. Control of aeration in static pile composting. Waste Management & Research, v.8, p.299-306, 1990. ]

Magalhães, A. M. T.; Shea, P. J.; Jawson, M. D.; Wicklund, E. A.; Nelson, D. W. Practical simulation of composting in the laboratory. Waste Management & Research, v.11, p.143-154, 1993. ]

Martí-Herrero, J.; Flores, T.; Alvarez, R.; Perez, D. How to report biogas production when monitoring small-scale digesters in field. Biomass and Bioenergy, v.84, p.31-36, 2016. ]

Mason, I. G.; Milke, M. W. Physical modelling of the composting environment: A review. Part 1: Reactor systems. Waste Management, v.25, p.481-500, 2005. ]

Maxim Integraded. DS18B20. Pragrammable Resolution 1- wire digital thermometer. Data sheets, 2015. 20p. Available on: <>. Access on: 06 Set. 2016. [ Links ]

MMA - Ministério do Meio Ambiente. Plano Nacional de Resíduos Sólidos. Brasília: Ministério do Meio Ambiente, 2012. 106p. [ Links ]

Odli, Z. S. M.; Izhar, T. N. T.; Razak, A. R. A.; Yusuf, S. Y.; Zakarya, I. A.; Saad, F. N. M.; Nor, M. Z. M. Development of portable water level sensor for flood management system. ARPN Journal of Engineering and Applied Sciences, v.11, p.5352-5357, 2016. [ Links ]

Pagans, E.; Barrena, R.; Font, X.; Sánchez, A. Ammonia emissions from the composting of different organic wastes. Dependency on process temperature. Chemosphere, v.62, p.1534-1542, 2006. ]

Tateda M.; Trung, L. D.; Hung, N. V.; Ike, M.; Fujita, M. Comprehensive temperature monitoring in an in-vessel forced-aeration staticbed composting process. Journal of Material Cycles and Waste Management, v.4, p.62-69, 2002. [ Links ]

Thalheimer, M. A low-cost eletronic tensiometer system for continuous monitoring of soil water potential. Journal of Agricultural Engineering, v.44, p.114-119, 2013. ]

Westerman, P. W.; Bicudo, J. R. Management considerations for organic waste use in agriculture. Bioresource Technology, v.96, p.215-221, 2005. ]

Wiley, B. B.; Westerberg, S. C. Survival of human pathogens in composted sewage. Applied Microbiology, v.18, p.994-1001, 1969. [ Links ]

Received: December 08, 2016; Accepted: April 21, 2017 (Corresponding author)

Creative Commons License This is an Open Access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.