Skip to main content
ACS Omega logoLink to ACS Omega
. 2026 Mar 12;11(11):17892–17899. doi: 10.1021/acsomega.5c12291

Low-Cost IoT-Based Computational System for Real-Time Biogas Monitoring in UASB Reactors Using NDIR Sensors and ESP32

Flávio César Brito Nunes †,*, Precival Victor Andrade Alves , Allan Bruno Dantas Gonçalves , Ricardo Cabral Lemos Filho , Joabesson Gonçalves Leandro da Silva , Vynicius Alves Calábria , Maria Gorethe de Sousa Lima Brito , Francisco José de Paula Filho
PMCID: PMC13019255  PMID: 41908431

Abstract

UASB reactors are widely employed in wastewater treatment due to their operational simplicity and the potential for energy recovery from biogas, although continuous, low-cost monitoring of CH4 and flow rate remains challenging. This work presents the development and validation of an IoT system for remote, real-time monitoring, integrating NDIR sensors for CH4/CO2, a temperature sensor, a pressure sensor, a thermal mass flow meter, and an ESP32 platform with web/mobile interfaces. Deployment was carried out in a bench-scale UASB reactor treating an industrial slaughterhouse effluent. Over 30 days of continuous operation, stable data transmission was recorded with an average latency of ∼1.77 s; measurements covered 42.84–76.16 NL·d–1 (flow) and 53.31–88.0% (CH4), with temperature within a narrow mesophilic range (22.25–27.80 °C) and near-zero sensor drift. Estimates based on removed chemical oxygen demand (COD), normalized to STP, yielded 45.18–74.72 NL·d–1 (flow). Temporal agreement with the measured series was observed (MAE = 6.58 NL·d–1 and 4.69 percentage points; MAPE = 9.88% and 6.69% for flow and composition, respectively). This modular, fault-tolerant architecture demonstrates feasibility for supporting operational control and assessing the methane energy potential in decentralized applications.


graphic file with name ao5c12291_0007.jpg


graphic file with name ao5c12291_0005.jpg

1. Introduction

Upflow anaerobic sludge blanket (UASB) reactors are a well-established technology for wastewater treatment, combining operational simplicity, high organic matter removal, and biogas generation with energy recovery potential. In decentralized contexts, however, continuous, low-cost monitoring of biogas production (flow rate) and composition (CH4/CO2) remains limited by the cost, infrastructure needs, and robustness of commercial solutionsespecially for small units or facilities located in areas with intermittent connectivity. , These limitations hinder the early detection of operational deviations, quantification of energy potential, and real-time decision-making.

The convergence of the Internet of Things (IoT), low-cost microcontrollers, and NDIR sensors has enabled accessible field-validated instrumentation. In particular, platforms such as the ESP32 integrate acquisition, processing, and wireless telemetry at costs substantially lower than proprietary analyzers while maintaining appropriate sampling cadence and fault tolerance. When combined with thermal flow meters and routines for temperature compensation and normalization to STP, such architectures provide operational estimates of biogas production and methane content with controlled error and good temporal adherence to process variations, meeting control and energy assessment requirements in wastewater treatment plants (WWTPs).

This article addresses these gaps and presents a low-cost IoT system for remote, real-time monitoring of the biogas composition (CH4/CO2) and production (flow rate) in UASB reactors. The solution integrates NDIR sensors and flow measurement into an ESP32 node, with resilient firmware (watchdog, local buffering, and OTA), open-protocol communications, and a web/mobile backend for visualization and alerts. , The system was validated in-plant, demonstrating communication stability, representative operating ranges, and temporal agreement between measured series and estimates derived from removed COD, with error metrics reported transparently. ,

The main contributions are (i) a modular, scalable, and fault-tolerant architecture suitable for decentralized WWTPs, with stable telemetry and latency compatible with operational monitoring; (ii) operational validation with statistical analysis, covering CH4 and flow ranges typical of UASB reactors and demonstrating temporal adherence to process variations; (iii) integration with industrial sensors and protocols (NDIR via serial interface; flow via RS-485/Modbus), supported by embedded hardware implementation guidelines; and (iv) reproducible procedures for normalization to STP, calibration, and evaluation, facilitating comparability and replicability. ,

By simultaneously addressing cost, connectivity, robustness, and field validation, the proposed approach brings low-cost IoT solutions closer to the level required to support operational control and energy valorization of biogas in real-world sanitation scenarios. ,

2. Materials and Methods

2.1. General System Description

The monitoring system was developed using a low-cost embedded architecture composed of two ESP32 microcontrollers, NDIR gas sensors (for CH4 and CO2), environmental sensors (temperature and pressure), and a thermal mass flow meter. It is worth noting that differential pressure was monitored for operational diagnostics, but it was not used for data normalization or calculations in the analyses reported here, because the flow meter output was already provided as dry gas normalized to STP. The collected data are transmitted via Wi-Fi to a remote server and can be accessed in real time through a mobile application and a web interface. Figure presents the flowchart of the system’s overall architecture.

1.

1

Flowchart of the overall architecture of the computational monitoring system.

2.2. Experimental Setup

The system was tested in a bench-scale UASB reactor with a working volume of 24 L, continuously fed with an industrial slaughterhouse effluent pretreated by screening, and a grit chamber. The flow rate was controlled by a peristaltic pump at 1.0 mL·s–1, and the operating temperature ranged from 23.3 to 26.0 °C.

2.3. Hardware and Sensors Used

The sensors and main devices employed are listed in Table , including the operating range and output type.

1. Sensors Used in the Monitoring System.

sensor parameter measurement range output type
Gascard NG CH4 0–100% v/v RS-232/4–20 mA
Gascard NG CO2 0–50% v/v RS-232/4–20 mA
thermal mass flow meter biogas mass flow rate 0–500 L·h–1 RS-485/4–20 mA
DS18B20 internal temperature –55 to 125 °C digital (single-wire proprietary protocol)
MPX5100DP differential pressure 0–100 kPa analog (0–5 V)
DHT22 ambient temperature –40 to 80 °C digital (single-wire proprietary protocol)

2.4. Data Acquisition and Operational Validation

The data acquisition system was implemented by using two ESP32 microcontrollers. The first was responsible for acquiring data from the thermal mass flow meter and the NDIR sensor and transmitting them via the I2C protocol to a second ESP32, which, in turn, acquired the remaining data from the environmental sensors and then sent the complete data set to the cloud server through a Wi-Fi connection. Readings were programmed to occur automatically every 30 min.

The temperature sensors were periodically compared with a reference instrument; when necessary, small offset adjustments were applied via the firmware.

The NDIR sensors (CH4/CO2) and the thermal mass flow meter were operated with factory calibration, and their validation was conducted at the operational level through two complementary approaches: (i) verification of the integrity and stability of data acquisition and transmission and (ii) comparison of the measured time series with theoretical estimates of biogas production derived from the removed organic load. The acquisition architecture employed dedicated serial communication for each instrument, with the flow meter integrated via Modbus RTU over RS-485, enabling the reading of instantaneous and accumulated flow registers, and the NDIR analyzer integrated via RS-232 serial stream. This configuration ensured continuous data acquisition and allowed assessment of the temporal and internal consistency of the signals.

For validation against theoretical estimates, methane production was estimated from the removed COD load, adopting a stoichiometric yield under standard conditions of 0.35 L CH4 per g of COD removed. The removed COD was obtained from BOD5 and influent flow rate, with BOD-to-COD conversion based on the factor defined in the study. From the estimated CH4 production, total biogas production was calculated using a methane volumetric fraction (K) adopted from the literature, thus maintaining independence between (i) the estimation of CH4 production from organic load removal and (ii) the assumed biogas composition.

These procedures supported the operational validation of the system based on coherence among measurement channels, stability of the data flow, and compatibility between measured values and theoretical estimates derived from organic load removal.

2.5. Mobile Application and Web Interface

An Android application was developed using the Flutter framework, featuring real-time readings, historical graphs, operational alarms, and data export in.csv format. Communication latency between data transmission by the ESP32 and server acknowledgment was monitored throughout the reliability and robustness tests (Section ).

Additionally, a responsive web interface was developed (Figure ), enabling data visualization in modern web browsers with a consolidated dashboard for real-time monitoring.

2.

2

Monitoring interface.

2.6. Reliability and Robustness Tests

To validate communication and data storage, the system was subjected to different operating conditions. Long-duration trials (30 days) were conducted to verify the consistency of transmitted information and the successful sampling rate. A continuous seven-day experimental test was also carried out, with the sampling rate set to every 30 min (a total of 336 transmissions). In addition, Wi-Fi disconnections and router shutdowns were simulated, as well as power supply interruptions, in order to assess fault tolerance. Communication latency between data dispatch by ESP32 and server acknowledgment was monitored throughout the tests.

2.7. Estimation of Biogas Production and Methane Percentage

Methane production was estimated by applying the stoichiometric yield k = 0.35 L CH4·g COD–1(0 °C, 1 atm) to the removed COD load, with flow rates normalized to STP. , The estimate of removed COD was derived from BOD5 (20 °C) and the influent flow rate, converting BOD to COD using a calibrated ratio f = 0.65 (±0.05) for the slaughterhouse effluent with high fat content, in order to prioritize the biodegradable fraction relevant to methanogenesis and reduce biases associated with using total COD in lipid-rich matrices; this choice showed better adherence to the measured biogas data. ,,

Total biogas was determined as the quotient between the estimated methane and the volumetric fraction of CH4 (K) adopted from the literature for high-fat effluents (45–75%). To avoid validation bias, K from the literature (or from an independent submodel) was used, keeping the production (CH4) and composition (%CH4) stages independent. , Thus, the %CH4 estimated in this study derives exclusively from the compositional assumption represented by K rather than from an inference based on COD/BOD removal. From a physicochemical standpoint, the stoichiometry of the removed load allows estimation of the volume of CH4 generated; however, the volumetric fraction of CH4 in biogas depends on multiple factors, such as CO2 partitioning and solubility in the liquid phase, alkalinity and carbonate/bicarbonate equilibrium, stripping, water vapor presence, and hydrodynamic conditions, and therefore cannot be uniquely determined solely from the removed organic load. Accordingly, K was treated as an independent compositional parameter (dimensionless, 0 ≤ K ≤ 1), adopted within the typical range reported for this type of effluent, and used to (i) convert the estimated methane production into total biogas flow rate (eq ) and (ii) directly express the estimated methane content on a volumetric basis (eq ). ,

In this context, the conversion from BOD5 to COD was performed according to eq :

CODin/out[mg·L1]=BODin/out[mg·L1]f 1

where CODin/out is the influent/effluent COD, BOD5 in/out is the influent/effluent BOD5, and f is the BOD-to-COD conversion factor.

The removed COD load (L COD, rem) was calculated using eq :

LCOD,rem[g·d1]=(CODinCODout)[mg·L1]·Ql[m3·d1]·103[g·m3] 2

where Ql is the influent flow rate and 103 converts mg·L–1 to g·m–3.

The daily methane production (Q CH4 ) was estimated from the removed COD load and the stoichiometric yield, as given by eq :

QCH4[NL·d1]=k[NLCH4gCOD1]·LCOD,rem[gd1] 3

where k is the stoichiometric yield.

Total biogas was obtained by dividing methane production by the methane volumetric fraction K, according to eq :

Qbiogas[NL·d1]=QCH4K 4

where Q biogas is the total daily biogas flow rate and K is the volumetric fraction of CH4 (typically 0.45–0.75).

K=yCH4biogas 5

where K is the methane volumetric (or molar) fraction and y CH4 is the methane fraction in biogas.

To avoid any ambiguity, K is defined as the volumetric (or molar) fraction of methane in the biogas (eq ). Because biogas is treated here as an ideal gas mixture, the volumetric (or molar) fractions of its main constituents satisfy the closure condition in eq (where y tr represents trace gases). Consequently, the methane content expressed as % v/v follows directly from K, as shown in eq . Thus, in the present study, the estimated %CH4 corresponds to the percentage expression of the compositional assumption K adopted from the literature rather than to a value obtained by regression fitting or derived from the stoichiometry of the removed organic load. For the composition error metrics, a representative fixed value of K (K = 0.60; central within the literature range 0.45–0.75 for this type of effluent) was adopted to generate a reference %CH4 est time series (eq ); MAE and MAPE were then computed by comparing %CH4 measured versus %CH4 est across all paired timestamps, avoiding circularity (i.e., without tuning K based on the measured %CH4). This choice preserves the independence between (i) the calculation of CH4 production from the removed load (eq ) and (ii) the biogas composition assumption used to convert CH4 into total biogas (eq ) and to express the estimated methane content (eq ).

yCH4+yCO2+ytr=1 6

where y CH4 is the methane fraction, y CO2 is the carbon dioxide fraction, and y tr is the trace-gas fraction.

%CH4(v/v)=100K 7

where %CH4 is the methane content in percentage points and K is the methane volumetric fraction (0–1).

When necessary, gas volumes were normalized to STP considering pressure, temperature, and relative humidity, as given by eq :

VN=VmPP0T0T(1ϕPws(T)P) 8

where V N is the normalized volume (STP); V m is the measured volume; P, T are the pressure/temperature at measurement, respectively; P 0, T 0 are 1 atm and 273.15 K, respectively; ϕ is the relative humidity (0–1); and P ws(T) is the water vapor pressure at temperature T. If the system already reports dry gas normalized to STP, eq is not applied.

2.8. Statistical Analysis

To describe data dispersion, an unpaired analysis was performed for each variable using all valid measurements within the observed ranges (flow rate: NL·d–1; CH4: v/v). The boxplots followed the Tukey convention (median; IQR = Q1–Q3; whiskers = 1.5 × IQR; outliers beyond the whiskers). We report n, median, IQR, mean, standard deviation (SD), and coefficient of variation (CV%).

To evaluate the performance of the stoichiometric–empirical model for biogas production and composition, the main metrics used were the mean absolute error (MAE) and the mean absolute percentage error (MAPE), according to eqs and .

MAE=1ni=1n|ŷiyi| 9
MAPE=100ni=1n|ŷiyiyi| 10

For the biogas flow rate, MAE (NL·d–1) was prioritized in order to preserve the physical unit and avoid distortions at very low observed values, while MAPE was used only as a complementary metric. For the CH4 fraction, MAE in percentage points (p.p.) was emphasized, with MAPE maintained as an additional summary indicator.

Temperature results were subjected to descriptive statistics (n, mean, SD, CV%, median, and IQR). Stability or drift was estimated by regression analysis, expressed as slope (°C·day–1) with a 95% confidence interval and p-value, and residual autocorrelation was assessed using the Durbin–Watson statistic and the autocorrelation function (ACF). For method agreement based on ex situ measurements, strict temporal pairing was performed (±5–10 min window), followed by calculation of mean bias (±95% CI) and limits of agreement according to Bland–Altman.

Metrological acceptance considered the DS18B20 specification (nominal accuracy ±0.5 °C between −10 and +85 °C; configurable resolution up to 0.0625 °C, 12 bits), while operational interpretation was anchored in the typical mesophilic range of anaerobic reactors and their expected effects on microbial metabolism. ,

2.9. Hardware Development: Pressure and Temperature Data Acquisition Board

Using the MPX5100DP pressure sensors, the DHT22 temperature sensor, and the DS18B20 sensor for measuring the reactor’s internal temperature, an electronic board was builtbased on an ESP32 microcontrollerfor acquiring the reactor’s internal differential pressure as well as its internal temperature.

After preliminary laboratory tests, it was found that a single ESP32 microcontroller was insufficient to simultaneously read all sensors and continuously transmit data to the cloud storage platform via Wi-Fi. Given this limitation, a second ESP32 microcontroller was incorporated, dedicated exclusively to reading data from the thermal mass flow meter and the infrared gas characterization sensor board (Gascard NG). These data were then transferred to the first microcontroller via the I2C serial communication protocol, as illustrated in Figure a, b.

3.

3

(a) Data acquisition board routing; (b) front view of the data acquisition board.

Given that the physicochemical characteristics of the UASB reactor require a significant interval to exhibit meaningful variations, a 30 min sampling rate was defined for reading all sensors, totaling 48 records per day. After reading the sensors, the ESP32 microcontroller connects to the server and transmits the data, which are stored and made available for viewing via a web page and a mobile application developed specifically for real-time graphical tracking of the monitored parameters.

2.10. Real-Time Data Acquisition from the Thermal Mass Flow Meter

The thermal mass flow meter provides a connection option via the Modbus protocol with RS-485 communication. Typically, register addresses are pre-established by the manufacturer and detailed in its datasheet, allowing access to the operating variables available in the meter.

The protocol can be implemented over different types of physical media such as RS-232, RS-485, and Ethernet. In the case of Modbus RTU (Remote Terminal Unit), communication is carried out via RS-485, a serial communication standard that enables data transmission over long distances and in noisy industrial environments.

For this work, the focus was on using a Modbus RTU to communicate with the mass flow meter. The meter’s configuration allows connection via Modbus, where process variables such as instantaneous flow rate, totalized flow, and pressure values can be stored in registers. When requested by a master devicesuch as a microcontroller, PLC (Programmable Logic Controller), or IoT (Internet of Things) devicethese values can be transmitted and stored in databases. This enables real-time analysis through SCADA (Supervisory Control and Data Acquisition) or HMI (Human–Machine Interface) systems. To establish connectivity between the flow meter and the ESP32 microcontroller, a TTL-to-RS-485 data converter was used.

2.11. Real-Time Data Acquisition from the Gascard Characterization Board

For the connection between the ESP32 microcontroller and the biogas characterization board (Gascard NG sensor), RS-232 communication was implemented. To this end, a MAX3232 mini RS-232-to-TTL converter module was used.

The Gascard NG infrared gas sensor transmits acquired data continuously while powered, at a baud rate of 57,600 bits per second, and the MAX3232 converter proved effective as an interface with the Gascard NG infrared gas sensor in laboratory tests, delivering consistent high-frequency readings.

2.12. Power Board Design and Assembly

As the power supply for the entire system, a 24 V DC source was implemented to provide the necessary power to the sensors and microcontrollers. The supply was installed in an enclosure, and together with it, a board was designed containing two step-down voltage regulator modules responsible for reducing 24 to 5 V. This enables powering the sensors and microcontrollers used in this work, as well as the biogas flow meter and the methane characterization board, ensuring that all components operate within their technical specifications.

2.13. Web Server

Due to the need for greater flexibility and control, a custom web server was developed in Node.js and MongoDB, replacing third-party services such as Firebase. The architecture enables centralized processing and storage, simultaneously serving multiple sources (mobile app, web platform, and data acquisition board) and applying business rules to ensure operational integrity.

Security was implemented with JSON Web Tokens (JWT). For communication with the monitoring board (ESP32, dual-core Tensilica LX6, 240 MHz), ES256 (ECDSA with P-256 and SHA-256) is used, which is more efficient than RSA (Rivest–Shamir–Adleman) on resource-constrained devices. For server ↔ web platforms and server ↔ apps, RS256 (RSA with SHA-256) is employed, which is widely adopted in the industry and therefore offers greater compatibility. All traffic is carried over HTTPS (HTTP over TLS/SSL), and tokens use Base64URL encoding per the JWT standard, ensuring integrity and authenticity via digital signatures and confidentiality in transit.

The server operates in a dual role, serving static content (HTML, CSS, JavaScript) and handling API requests, with centralized access via the domain uasb.com.br, protected by SSL/TLS, which ensures security, consistency, and unified management of interactions with different clients.

3. Results and Discussion

To support the operational validation of the IoT system under continuous operation, data transmission reliability to the cloud server, communication latency, and self-recovery behavior under connectivity and power disturbances were evaluated. The 30-day operational tests confirmed the integrity of data transmitted via Wi-Fi, with no losses attributable to communication failures. In a seven-day continuous trial, comprising 336 packet transmissions at 30 min intervals, a 100% success rate was achieved. The observed average latency was approximately 1.77 s, which is suitable for real-time monitoring applications. Although higher than benchmark values reported for critical IoT applications, such as emergency response (<450 ms) or latency-sensitive industrial networks (<300 ms), the performance remains within the acceptable range for environmental monitoring (1–10 s), as discussed by Dangana et al. Recent studies also indicate that edge computing architectures can measurably reduce latency, with reductions of up to 60–70% in certain scenarios.

The system demonstrated high fault robustness: following intentional network disconnections and router shutdowns, reconnection occurred autonomously; power interruptions did not compromise the operation, as the microcontroller restarted correctly and resumed data transmission. This behavior is consistent with self-recovery mechanisms described in resilient IoT architectures by Almohri et al. In contrast, low-cost academic solutions, such as those described by Trevathan and Schmidtke, although affordable, exhibit lower fault tolerance and still lack large-scale field validation. The proposed modular architecturelow-cost (<USD 5000) and based on open hardwaretherefore represents a technical advancement for decentralized applications, especially in regions with limited connectivity.

3.1. Validation

Operational validation in the bench-scale UASB reactor indicated that the proposed architecture supports continuous monitoring, with reliable acquisition and transmission of key variables (biogas flow rate; CH4/CO2; internal temperature), in addition to tolerance to connectivity and power disturbances. The instrumentation operated stably both in Wi-Fi communication and in the dedicated serial links, maintaining continuity of readings and temporal and internal coherence among channels, which is a necessary condition for real-time monitoring applications.

Beyond the robustness of data acquisition and communication, validation was corroborated by the agreement between the measured time series and independent estimates based on the removed organic load (COD removed, normalized to STP), as evidenced by the error indicators (MAE and MAPE) and by the distribution of valid measurements presented in the following section. In this context, the system demonstrates operational fitness for purpose, namely, continuous monitoring and decision support, with potential for decentralized application at costs lower than those of commercial solutions.

3.2. Biogas Flow/Composition and NDIR Sensor Performance

Measurements with the biogas thermal mass flow meter indicated 42.84–76.16 NL·d–1 (flow), while the characterization module recorded 53.31–88.0% (%CH4). The estimates corresponded to 45.18–74.72 NL·d–1 (flow). For methane content, the comparison focused on the measured %CH4 time series against the assumed compositional range (K) used in the stoichiometric conversion, and agreement was summarized by MAE (p.p.) and MAPE. The unpaired dispersion of measurements within the observed ranges is summarized in Figure : for flow, n = 939, median ≈ 59 NL·d–1, and IQR = 8.41 NL·d–1; for %CH4, n = 676, median ≈ 70% v/v, and IQR = 13.93 percentage points. These values support operational variability consistent with UASB systems treating high-fat effluents with measured methane contents within the range reported in the literature. In parallel, temporal agreement was observed between estimated and measured series, with MAE = 6.58 NL·d–1 (flow) and 4.69 p.p. (composition), and MAPE = 9.88% (flow) and 6.69% (composition). Taken together, the findings constitute an operational validation of the arrangement (field responsiveness), while the NDIR instrumentation exhibited sensitivity/stability suitable for continuous use, in line with previous studies ,, and with plausible %CH4 ranges.

4.

4

Dispersion of all valid (unpaired) measurements within the observed ranges: flow 42.84–76.16 NL·d–1 and CH4 53.31–88.0% (dry gas, STP). Boxplots show the median (line), IQR (Q1–Q3, box), and whiskers = 1.5 × IQR; points beyond these limits are displayed as outliers.

3.3. Operational Performance of the Temperature Sensor

The in situ internal temperature of the UASB remained within a narrow mesophilic range throughout the campaign: 22.25 to 27.80 °C (n = 321; mean = 25.15 °C; SD = 1.67 °C; CV = 6.65%), consistent with the operational stability typically observed in this range. From a metrological standpoint, the DS18B20 sensor exhibited stable performance, with virtually zero drift (≈ +0.00003 °C·day–1) and low short-term variability consistent with the sensor’s 12-bit quantization (0.0625 °C) and the applied sampling procedure. These findings align with the device specifications (nominal accuracy ±0.5 °C between −10 and +85 °C; configurable resolution up to 0.0625 °C, 12-bit) and support the use of in situ readings as the primary reference for screening and statistical analyses of anaerobic metabolism. Ex situ readings were used only as traceable spot checks; when cross-comparisons were required, strict temporal pairing was adopted (±5–10 min window) with quantification of bias (95% CI) and limits of agreement. Under these conditions, the series maintained temporal and internal coherence (across measurement points) and yielded physically and biologically plausible relationships with flow and %CH4i.e., they did not indicate spurious temperature effects where the literature predicts a reduced impact. ,

3.4. Comparative Analysis with the Literature and Commercial Systems

Table summarizes the comparison among commercial systems, reported academic solutions, and the system developed in this study. The results indicate that while commercial systems exhibit high robustness, their high cost and proprietary nature limit deployment in decentralized contexts. Academic solutions, although lower-cost, lack practical field validation and show robustness constraints. The proposed system, in turn, combines low cost, fault tolerance, and a modular architecture based on open hardware, favoring its replicability in decentralized facilities, including in regions with limited connectivity.

2. Comparison of Commercial Systems, Academic Solutions, and the Proposed System .

system cost robustness technical capabilities replicability
commercial high (USD 10,000–50,000) high, dependent on stable infrastructure flow rate, CH4, CO2; wired/GSM connectivity low (proprietary solutions)
academic low to medium limited; little field validation CH4, CO2, T°; spotty GSM/Wi-Fi medium (laboratory prototypes)
proposed system low(<USD 5000) high; autonomous reconnection and postfailure restart flow rate, CH4, CO2, T°, pressure; Wi-Fi + dedicated server high (modular, open-source)
a

Data for the proposed system are from this study. Information on commercial systems was based on manufacturers’ technical literature, and the reported academic solutions were adapted from Acharya et al.

4. Final Considerations

The proposed low-cost IoT systemintegrating NDIR sensors, ESP32 nodes, and web/mobile interfacesproved feasible for real-time monitoring of UASB reactors, with a mean latency of 1.77 s, lossless transmissions in a 7-day test (336 sends), and stable operation over 30 days, while costing substantially less than benchmark commercial solutions. Its modular, fault-tolerant architecture (autonomous reconnection and restart) enabled continuous acquisition of biogas flow, CH4/CO2, and temperature; the latter remained within a narrow mesophilic range (22.25–27.80 °C) with virtually zero sensor drift, supporting the reliability of operational interpretations.

Estimates based on COD removed and normalized to STP showed good temporal agreement with the measured series (MAECH4 ≈ 4.69 percentage points; MAPECH4 ≈ 6.69%; MAEflow ≈ 6.58 NL·d–1; MAPEflow ≈ 9.88%), reinforcing the applicability of the setup in decentralized contexts. Taken together, the results point to accessible instrumentation that strengthens process control and biogas energy recovery in sanitation.

Acknowledgments

The authors acknowledge the National Council for Scientific and Technological Development (CNPq) [Process No. 406817/2021-9], the Ceará State Foundation for the Support of Scientific and Technological Development (FUNCAP) [Process Nos. BP6-0241-00328.01.00/25 and UNI-0210-00652.01.00/23], the Federal Institute of Education, Science and Technology of Ceará (IFCE), and the Federal University of Cariri (UFCA) for the financial and institutional support, as well as for the infrastructure provided and the assistance in the development of this research. M.G.d.S.L.B. is a Funcap researcher.

The Article Processing Charge for the publication of this research was funded by the Coordenacao de Aperfeicoamento de Pessoal de Nivel Superior (CAPES), Brazil (ROR identifier: 00x0ma614).

The authors declare no competing financial interest.

References

  1. Lettinga G., van Velsen A. F. M., Hobma S. W., de Zeeuw W., Klapwijk A.. Use of the Upflow Sludge Blanket (UASB) Reactor Concept for Biological Wastewater Treatment, Especially for Anaerobic Treatment. Biotechnol. Bioeng. 1980;22(4):699–734. doi: 10.1002/bit.260220402. [DOI] [Google Scholar]
  2. Chernicharo, C. A. L. Reatores Anaeróbios; 2nd ed.; Departamento de Engenharia Sanitária e Ambiental, UFMG: Belo Horizonte, 2016. [Google Scholar]
  3. Silva F. J. A., Lima M. G. S., Mendonça L. A. R., Gomes M. J. T. L.. Septic Tank Combined with Anaerobic Filter and Conventional UASB: Results from Full Scale Plants. Braz. J. Chem. Eng. 2013;30(1):133–140. doi: 10.1590/S0104-66322013000100015. [DOI] [Google Scholar]
  4. International Energy Agency (IEA) Outlook for Biogas and Biomethane: Prospects for Organic Growth; IEA: Paris, 2020. [Google Scholar]
  5. Yan P., Gai M., Wang Y., Gao X.. Review of Soft Sensors in Anaerobic Digestion Process. Processes. 2021;9(8):1434. doi: 10.3390/pr9081434. [DOI] [Google Scholar]
  6. Zulkifli C. Z., Garfan S., Talal M., Alamoodi A. H., Alamleh A., Ahmaro I. Y. Y., Sulaiman S., Ibrahim A. B., Zaidan B. B., Ismail A. R.. et al. IoT-Based Water Monitoring Systems: A Systematic Review. Water. 2022;14(22):3621. doi: 10.3390/w14223621. [DOI] [Google Scholar]
  7. Trevathan J., Schmidtke S.. Open-Source Internet of Things Remote Aquatic Environmental Sensing. HardwareX. 2022;12:e00336. doi: 10.1016/j.ohx.2022.e00336. [DOI] [PMC free article] [PubMed] [Google Scholar]
  8. Espressif Systems ESP32 Series Datasheet. https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf.
  9. Metcalf & Eddy . Tratamento de Efluentes e Recuperação de Recursos; 5th ed.; AMGH: Porto Alegre, 2016. [Google Scholar]
  10. Filer J., Ding H. H., Chang S. W.. Biochemical Methane Potential (BMP) Assay Method for Anaerobic Digestion Research. Water. 2019;11(5):921. doi: 10.3390/w11050921. [DOI] [Google Scholar]
  11. Acharya D. K., Pathak P., Pradhan N., Meena S. S., Ojha S. N.. A Review on Monitoring and Control Systems for Biogas Production. Rev. Anal. Chem. 2017;36(4):20160016. doi: 10.1515/revac-2016-0016. [DOI] [Google Scholar]
  12. Fu B., Sun Y., Jiang Z., Jiang S., Liu H., Xu M., He D., Wang C.. A Novel NDIR-Based Methane Sensor for Monitoring Methane Concentrations in Biogas. Comput. Electron. Agric. 2023;204:107509. doi: 10.1016/j.compag.2022.107509. [DOI] [Google Scholar]
  13. Philipp M., Masmoudi Jabri K., Wellmann J., Akrout H., Bousselmi L., Geißen S. U.. Slaughterhouse Wastewater Treatment: A Review on Recycling and Reuse Possibilities. Water. 2021;13(22):3175. doi: 10.3390/w13223175. [DOI] [Google Scholar]
  14. Gonçalves A. B. D., Freitas L. N., Brito M. G. de S. L., Nunes F. C. B., Silva J. P. da, Mendonça L. A. R., Silva F. J. A. da, Lima A. G. B. de. Three-Dimensional Numerical Modeling and Analysis of Multiphase Distribution in a UASB Reactor with Experimental Validation of Biogas Volumetric Flow Rate. Rev. Bras. Cienc. Ambient. 2025;60:e2300. doi: 10.5327/Z2176-94782300. [DOI] [Google Scholar]
  15. Martin Bland J., Altman D.. Statistical Methods for Assessing Agreement between Two Methods of Clinical Measurement. Lancet. 1986;1(8476):307–310. doi: 10.1016/S0140-6736(86)90837-8. [DOI] [PubMed] [Google Scholar]
  16. Zhang H., Zhang R., Sun J.. Developing Real-Time IoT-Based Public Safety Alert and Emergency Response Systems. Sci. Rep. 2025;15:29056. doi: 10.1038/s41598-025-13465-7. [DOI] [PMC free article] [PubMed] [Google Scholar]
  17. Green M. J., Clark F., Martin P., Sowan N., Atilhan M., Ghosh T.. LoRaWAN and Industrial IoT Based Monitoring System for Poultry Houses. Rev. Anal. Chem. 2021;40(1):82–89. doi: 10.1515/revac-2021-0132. [DOI] [Google Scholar]
  18. Dangana B., Chukwuemeka A., Mustapha B., Sansui L., Dangana N., Junga B., Hozifa P.. Improved Real-Time Observation of Wastewater Quality Parameters in Developing Countries Using an Internet of Things Sensor System. Sensors. 2021;21(20):6739. doi: 10.3390/s21206739. [DOI] [PMC free article] [PubMed] [Google Scholar]
  19. Pierleoni P., Concetti R., Belli A., Palma L., Marzorati S., Esposito M.. et al. A Cloud-IoT Architecture for Latency-Aware Localization in Earthquake Early Warning. Sensors. 2023;23(20):8431. doi: 10.3390/s23208431. [DOI] [PMC free article] [PubMed] [Google Scholar]
  20. Almohri H., Yao D., Kafle B., Liu P.. A Distributed Real-Time IoT Framework for Large-Scale Wearable Health Monitoring. IEEE Internet Things J. 2020;7(6):5548–5561. doi: 10.1109/JIOT.2020.2984878. [DOI] [Google Scholar]
  21. Siemens AG . Biogas Analyzer System SET BGA. https://www.siemens.com/us/en/products/automation/process-analytics/brochures/biogas-analyzer-system.html.
  22. MRU GmbH . SWG 100 Biogas Stationary Gas Analyzer. https://www.mru.eu/en/products/detail/swg-100-biogas/.
  23. QED Environmental Systems . Biogas 5000 Portable Gas Analyzer. https://www.qedenv.com/products/portable-gas-monitor-biogas5000/.
  24. Mendes L. B., Ogink N. W. M., Edouard N., Van Dooren H. J. C., Tinôco I. D. F. F., Mosquera J.. NDIR Gas Sensor for Spatial Monitoring of Carbon Dioxide Concentrations in Naturally Ventilated Livestock Buildings. Sensors. 2015;15(5):11239–11257. doi: 10.3390/s150511239. [DOI] [PMC free article] [PubMed] [Google Scholar]
  25. Nie E., He P., Zhang H., Hao L., Shao L., Lü F.. How Does Temperature Regulate Anaerobic Digestion? Renew. Sustain. Energy Rev. 2021;150:111453. doi: 10.1016/j.rser.2021.111453. [DOI] [Google Scholar]

Articles from ACS Omega are provided here courtesy of American Chemical Society

RESOURCES