Next Article in Journal
Hamming Distance-Based Intuitionistic Fuzzy Artificial Neural Network with Novel Back Propagation Method
Previous Article in Journal
Phytosomes-Based Nanocarriers Enhanced with Seaweed Extracts: Overcoming the Blood–Brain Barrier
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Proceeding Paper

Internet of Things and Predictive Artificial Intelligence for SmartComposting Process in the Context of Circular Economy †

1
OSIL Team Laboratory of Advanced Research and Logistic Engineering LARILE, National High School of Electricity and Mechanical Engineering, University Hassan II, G8RV+C57, N1, Casablanca 21100, Morocco
2
Laboratory of Environmental Sciences and Sustainable Development LASED, Preparatory Institute for Engineering Studies of Sfax, University of Sfax, BP 1173, Sfax 3038, Tunisia
*
Author to whom correspondence should be addressed.
Presented at the 1st International Conference on Smart Management in Industrial and Logistics Engineering (SMILE 2025), 16–19 April 2025, Casablanca, Morocco.
Eng. Proc. 2025, 97(1), 16; https://doi.org/10.3390/engproc2025097016
Published: 10 June 2025

Abstract

:
To promote sustainable development, adopting circular economy principles is crucial for preserving natural resources and ensuring environmental continuity. Among solid waste management strategies, composting plays a significant role by converting biodegradable waste into eco-friendly biofertilizers. Traditional composting methods, which rely on open-window techniques, face challenges in controlling critical physico-chemical parameters such as temperature, humidity, and gaseous emissions. Additionally, these methods require significant labor and over 100 days to achieve compost maturity. To address these issues, we propose an intelligent, automated composting system leveraging the Internet of Things (IoT) and wireless sensor networks (WSNs). This system integrates sensors for real-time monitoring of key parameters: DS18b20 for waste temperature, HD-38 for humidity, DHT11 for ambient conditions, and MQ sensors for detecting CO2, NH3, and CH4. Controlled by an ESP32 microcontroller unit (MCU), the system employs a mixer and heating elements to optimize waste degradation based on sensor feedback. Data transmission is managed using the MQTT protocol, allowing real-time monitoring via a cloud-based platform (ThingSpeak). Furthermore, the degradation process was analyzed during the first 24 h, and a recurrent neural network (RNN) algorithm was employed to predict the time required for reaching optimal compost maturity, ensuring an efficient and sustainable solution.

1. Introduction

Growing urban populations and the resulting increase in organic waste pose significant environmental and health challenges. Despite being biodegradable, such waste is often disposed of in regular garbage bins, leading to unsanitary conditions due to the attraction of disease-carrying insects and rodents. Simultaneously, organic agriculture emphasizes sustainable farming practices by promoting balanced soil and water management, conserving biodiversity, and preserving ecosystems [1,2,3]. One key aspect of sustainable organic farming is soil quality, which can be enhanced by composting, which is a practice that replenishes organic matter and nutrients and promotes organic waste management [2,3,4]. Composting, when properly managed, mitigates soil degradation caused by intensive chemical-based farming. However, efficient composting requires continuous monitoring of key parameters such as temperature, humidity, and gaseous emissions, which influence the biological processes that drive decomposition.
Effective composting follows a process-oriented approach, involving two distinct main phases: decomposition and maturation. Each phase is characterized by specific temperature ranges and microbial activity. For instance, the first subphase (mesophilic) occurs at 25–40 °C, while the second subphase (thermophilic) requires temperatures between 40 and 70 °C [4]. Maintaining optimal conditions during these phases is crucial to ensuring the metabolic activity of the microbes and accelerating decomposition.
Given the complexity of composting, an automated monitoring system based on Internet of Things (IoT) technology has been proposed. This system uses sensors to monitor data relating to temperature, humidity, and CH4, NH3, and CO2 emissions in real time. The data collected is transmitted wirelessly to a cloud-based monitoring platform, enabling remote supervision and a reduction in manual work. By integrating IoT into the composting process, farmers can intervene quickly when needed, ensuring better control of the composting environment. Ultimately, this approach improves the efficiency and quality of compost production, contributing to a more sustainable organic farming landscape, and reducing production time by up to 80%, from three months to one week at the latest. This approach offers a fully automated and supervised composting solution, setting a new standard for municipal and agricultural composting practices. To ensure that the system operated efficiently, we monitored the degradation of organic matter for 24 h, with periodic checks every 3 h.
The new concept of the intelligent city has inspired several research initiatives aimed at tackling the centralized management of urban resources and waste. The integration of artificial intelligence has become essential for tackling environmental and industrial challenges [5,6,7].
Mhaned et al. have exploited the Internet of Things (IoT) and artificial intelligence to propose an effective solution for managing water resources used for irrigation [8].
Similarly, in recent decades, particularly in the XXIe century, the rise of machine learning has made it possible to introduce innovative approaches to deal with the complexity of certain processes with mechanisms that are still poorly understood, such as composting [6]. This technological advance reduces the need to understand the dynamics of composting in detail, while improving the efficiency of loop control of the process.
The results obtained for organic matter were processed using a recurrent neural network (RNN) predictive algorithm to predict the time needed to reach a value of 40, which corresponds to the maximum value that mature compost should have according to standard [3].

2. Materials and Methods

2.1. Automated Composting Unit

All sensors were validated using reference instruments before deployment. The DS18b20 temperature sensor offers ±0.5 °C accuracy, while the HD-38 humidity sensor maintains ±3% RH accuracy. Gas sensors (MQ4, MQ135, MQ137) were calibrated using certified gas mixtures. Despite inherent variability in compost composition, repeated measurements and averaging techniques ensured data reliability. Outliers were filtered using a median-based smoothing algorithm.
The proposed composting system has a processing capacity of 100 kg and is designed to facilitate efficient decomposition of organic matter. It consists of a machine equipped with an agitator for periodic mixing of the compost, ensuring uniform aeration and preventing the formation of anaerobic zones. To maintain the optimal temperature range for microbial activity, heating resistors are used for controlled heating. An air extractor is integrated into the system to provide proper ventilation and remove excess gases produced during the process. The control system is based on an ESP32 microcontroller, which manages the agitator, heating resistors, and air extractor. Several sensors are integrated for real-time monitoring of key parameters: a temperature sensor, a soil moisture sensor, and gas sensors (MQ4 for methane (CH4), MQ135 for carbon dioxide (CO2), and MQ137 for ammonia (NH3)). The measured data are displayed on an LCD screen, providing a comprehensive and real-time view of the composting process to ensure optimal control (Figure 1).

2.2. Real-Time Data Transmission and Remote Monitoring via MQTT and ThingSpeak

The composting system ensures real-time monitoring and data supervision using MQTT (Message Queuing Telemetry Transport) protocol. The ESP32 microcontroller collects data from various sensors, including temperature, soil moisture, and gas sensors (MQ4 for methane, MQ135 for carbon dioxide, and MQ137 for ammonia), and sends the data wirelessly to the ThingSpeak cloud platform. MQTT is employed for efficient and reliable data transmission, ensuring low-latency communication. On the ThingSpeak platform, the data is visualized through customizable dashboards, enabling remote supervision of key composting parameters [9]. This setup allows users to monitor and analyze the composting process in real time from any location, facilitating better decision making and process optimization, as shown in Figure 2 for temperature and humidity.

2.3. Composting Mixture

The composted substrates were GW, OMW, EOC, and PM, used according to our previous study [2]:
The studied compost was composed of 49% of OMW, 19.5% of EOC, 15.5% of PM, and 16% of GW. During the first 12 h, the OMW was used to humidify the mixtures when the humidity was below 40%; this was fixed between 40% and 60% for 24 h.

2.4. Organic Matter Degradation Analysis

The analysis of organic matter degradation was carried out by monitoring its content at regular 3 h intervals throughout the first 24 h of the process. At each interval, samples were collected, and the percentage of organic matter was determined using the loss-on-ignition (LOI) method, which involves drying the samples at 105 °C to remove moisture, followed by combustion at 550 °C to oxidize and eliminate the organic material [10]. The weight difference before and after combustion represents the organic matter content. This systematic monitoring ensured precise tracking of the composting process and allowed for calculating the degradation rate of organic matter. The primary objective of this analysis was to assess the efficiency of the proposed composting system and to compare its speed with existing systems. By evaluating the organic matter reduction rate, the performance of the system as well as its potential advantages over conventional composting methods were determined.

2.5. AI Model Selection and Comparison

In addition to the RNN model, we evaluated other neural network architectures including Long Short-Term Memory (LSTM), Gated Recurrent Unit (GRU), and a hybrid CNN-RNN model. Each model was trained on the same interpolated dataset for compost maturity prediction. While LSTM and GRU demonstrated strong capabilities in capturing long-term dependencies, and the CNN-RNN hybrid showed rapid convergence, the RNN model achieved the best overall performance when considering prediction accuracy, training efficiency, and computational simplicity. Performance metrics including MAE, MSE, and RMSE confirmed the robustness of the RNN model, which outperformed the others in terms of stability and lower computational overhead, making it the most suitable choice for real-time embedded composting systems.

2.6. Predicting Compost Maturity Using Noisy Linear Interpolation and Recurrent Neural Networks

The results obtained from the organic matter content analysis were used to determine the time required to reach a value of 40%, representing compost maturity according to AFNOR NFU 44-051 [11]. Since the data were collected at 3 h intervals, a noisy linear interpolation was performed over a finer 15 min interval to extend the database and provide a more detailed representation of the evolution of the composting process over time. The interpolation method introduced controlled random noise to simulate natural variability, ensuring that the extended dataset accurately reflected real-life conditions [12]. This enriched dataset was then used to train a recurrent neural network (RNN), chosen for its ability to model sequential data and capture temporal dependencies [13]. The RNN model was able to predict the time required to reach the target organic matter content of 40%, thus providing an accurate estimate of the composting duration. This predictive analysis was crucial for evaluating the efficiency of the proposed system and comparing its speed with conventional composting methods.

3. Results

3.1. Organic Matter Degradation

The composting process was carried out under controlled conditions with a temperature set at 50 °C and humidity maintained at 50%. After 24 h, a significant reduction in organic matter was observed, decreasing from 70% to 55%, representing nearly a 21% reduction, with the results shown in Table 1. Notably, this level of degradation, which typically requires more than 70 days for traditional composting methods, was achieved in just 1 day [14,15]. This means that automating the system, as well as monitoring and controlling critical parameters such as process temperature and humidity, helps to stimulate the micro-organisms responsible for degrading organic matter.

3.2. Organic Matter Data Interpolation

The means, variances, and Fa linear interpolation of the C/N dataset for the studied compost exhibited a Fa value of 0.92, confirming that the variances were similar before and after interpolation at 45.602 and 44.203, respectively. In the interpolated data, the dispersion was practically identical to the original data. Consequently, the resulting OM did not show any significant change in the data after the LITE (Figure 3).

3.3. Predicted Results Analysis (Using LITE-RNN)

To predict the time required to reach optimal compost maturity, we developed and trained a recurrent neural network (RNN) model. The model was configured with 50 epochs, a batch size of 32, and 3 time steps, this configuration was obtained using grid search tuning. The RNN achieved a coefficient of determination (R2) of 0.90 against a low significant MAE, MSE, and RMSE of 0.48, 0.35, and 0.59, respectively, indicating a high level of accuracy in predicting organic matter degradation. According to the model’s prediction, the organic matter content reaches 40% after 44 h, demonstrating the efficiency of the proposed intelligent composting system compared to conventional methods. The prediction results for organic matter values and the loss during the training process are illustrated in Figure 4, exhibiting the actual and predicted values that both closely followed a straight line, indicating a strong fit for OM data.
The RNN model performed the best OM data prediction (R2 = 0.90), according to the training prediction process loss for each model shown in Figure 5, proving that it could account for almost all the data variances. Additionally, the RNN has the lowest error metric value (MSE, RMSE, MAE), indicating that it produced predictions that were far more accurate.

4. Conclusions

In conclusion, this study highlights the potential of integrating IoT, wireless sensor networks, and machine learning models to optimize the composting process. By maintaining controlled conditions and using an RNN model for predictive analysis, we achieved a significant reduction in composting time compared to traditional methods. Specifically, the organic matter content decreased by 21% in just 24 h, a level typically achieved after about 200 days with conventional techniques. The high predictive accuracy of the RNN model, with an R2 value of 0.90, also confirmed the system’s reliability in anticipating compost maturity. Furthermore, the model predicted that the organic matter would reach 40% after just 44 h, highlighting the effectiveness of our approach. This innovative solution not only accelerates the composting process but also ensures better monitoring and control of key parameters, making it a promising alternative for sustainable waste management. Future work could explore further optimization and scalability of the system for broader applications.
Moreover, to assess the scalability of the proposed system, its implementation was considered in the context of municipal and industrial composting facilities. Key factors such as sensor network expansion, waste throughput, power supply, and integration with existing infrastructure were discussed. The modular architecture of the system makes it suitable for scale-up applications, allowing broader adoption in large-scale composting operations.

Author Contributions

S.F. contributed to methodology, software development, and writing—review and editing of the paper; E.A. contributed to project administration, supervision, and writing—review and editing of the paper; M.E.H. contributed to methodology, project administration and resources, writing—review and editing of the paper, and project’s supervision and validation; J.B. contributed to methodology, software development, writing—review and editing of the paper, and project’s supervision and validation. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data will be supplied on request.

Acknowledgments

This work is held in the framework of the Mixed Tuniso-Moroccan Laboratory “Laboratoire Mixte Tuniso-Marocain: Environnement et development Durable (E2D)”. It was supported by the Ministry of National Education, Vocational Training, Higher Education and Scientific Research, Department of Higher Education and Scientific Research in Morocco, and by the Ministry of High Education and Scientific Research in Tunisia.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Jo, R.S.; Lu, M.; Raman, V.; Then, P.H.H. Design and Implementation of IoT-enabled Compost Monitoring System. In Proceedings of the IEEE 9th Symposium on Computer Applications & Industrial Electronics (ISCAIE), Kota Kinabalu, Malaysia, 27–28 April 2019. [Google Scholar] [CrossRef]
  2. Fouguira, S.; Benhra, J.; El Haji, M.; Ammar, E. Optimization of olive oil extraction wastes co composting procedure based on bioprocessing parameters. Heliyon 2023, 181, 107040. [Google Scholar] [CrossRef] [PubMed]
  3. Fouguira, S.; Mhaned, A.; Ben Abbou, M.; Ammar, E.; El Haji, M.; Benhra, J. Effectiveness of compost use in salt-affected soil in an automated greenhouse irrigation system. E3S Web. Conf. 2023, 364, 03002. [Google Scholar] [CrossRef]
  4. Bera, R.; Datta, A.; Bose, S.; Dolui, A.K.; Chatterjee, A.K.; Dey, G.C.; Barik, A.K.; Sarkar, R.K.; Majumdar, D.; Seal, A. Comparative evaluation of compost quality, process convenience and cost under different composting methods to assess their large scale adoptability potential as also complemented by compost quality index. Int. J. Sci. Res. Publ. 2013, 3, 1–11. [Google Scholar]
  5. Haidar, D.; Mouatassim, S.; Benabbou, R.; Benhra, J. Towards a Data-Driven predictive framework. In Practice, Progress, and Proficiency in Sustainability; IGI Global Scientific Publishing: Hershey, PA, USA, 2025; pp. 219–296. [Google Scholar] [CrossRef]
  6. Han, Y.; Du, Z.; Hu, X.; Li, Y.; Cai, D.; Fan, J.; Geng, Z. Production prediction modeling of food waste anaerobic digestion for resources saving based on SMOTE-LSTM. Appl. Energy 2023, 352, 122024. [Google Scholar] [CrossRef]
  7. Nikoloudakis, Y.; Panagiotakis, S.; Manios, T.; Markakis, E.; Pallis, E. Pallis. Composting as a Service: A Real-World IoT Implementation. Future Internet 2018, 10, 107. [Google Scholar] [CrossRef]
  8. Mhaned, A.; Salma, M.; Mounia, E.H.; Jamal, B. Contribution to smart irrigation based on internet of things and artificial intelligence. In Lecture Notes in Networks and Systems; Springer International Publishing: Cham, Switzerland, 2023; pp. 537–549. [Google Scholar] [CrossRef]
  9. Mhaned, A.; Mouatassim, S.; Haji, M.E.; Benhra, J. Low-Cost smart irrigation system based on internet of things and fuzzy logic. In Communications in Computer and Information Science; Springer International Publishing: Cham, Switzerland, 2022; pp. 78–89. [Google Scholar] [CrossRef]
  10. Wojcieszak, D.; Zaborowicz, M.; Przybyl, J.; Boniecki, P.; Jedrus, A. Assessment of the Content of Dry Matter and Dry Organic Matter in Compost with Neural Modelling Methods. Agriculture 2021, 11, 307. [Google Scholar] [CrossRef]
  11. AFNOR. NF U44-051: Amendements Organiques—Définition, Spécifications et Marquage; Association Française de Normalisation: Paris, France, 2006. [Google Scholar]
  12. Lepot, M.; Aubin, J.; Clemens, F. Interpolation in Time Series: An introductive overview of existing methods, their performance criteria and uncertainty assessment. Water 2017, 9, 796. [Google Scholar] [CrossRef]
  13. Alrowais, R.; Said, N.; Al-Otaibi, A.; Hatata, Y.A.; Essa, M.A.; Abdel Daiem, M.M. Comparing the effect of mesophilic and thermophilic anaerobic co-digestion for sustainable biogas production: An experimental and recurrent neural network model study. J. Clean. Prod. 2023, 392, 136248. [Google Scholar] [CrossRef]
  14. Meng, X.; Liu, B.; Zhang, H.; Wu, J.; Yuan, X.; Cui, Z. Co-composting of the biogas residues and spent mushroom substrate: Physicochemical properties and maturity assessment. Bioresour. Technol. 2019, 276, 281–287. [Google Scholar] [CrossRef] [PubMed]
  15. Luo, Y.; Liang, J.; Zeng, G.; Chen, M.; Mo, D.; Li, G.; Zhang, D. Seed germination test for toxicity evaluation of compost: Its roles, problems and prospects. Waste Manag. 2018, 71, 109–114. [Google Scholar] [CrossRef]
Figure 1. Block diagram of the wireless sensor node electronic system.
Figure 1. Block diagram of the wireless sensor node electronic system.
Engproc 97 00016 g001
Figure 2. Temperature and humidity supervision on ThingSpeak.
Figure 2. Temperature and humidity supervision on ThingSpeak.
Engproc 97 00016 g002
Figure 3. Interpolated OM data (green) vs. original data (red).
Figure 3. Interpolated OM data (green) vs. original data (red).
Engproc 97 00016 g003
Figure 4. Original vs. predicted OM data using the RNN model.
Figure 4. Original vs. predicted OM data using the RNN model.
Engproc 97 00016 g004
Figure 5. Training prediction process loss of the RNN model.
Figure 5. Training prediction process loss of the RNN model.
Engproc 97 00016 g005
Table 1. Organic matter evolution during the first 24 h of the composting process.
Table 1. Organic matter evolution during the first 24 h of the composting process.
HourOrganic Matter (OM)
070.0 ± 0.2
365.0 ± 0.2
664.0 ± 0.2
966.0 ± 0.2
1263.0 ± 0.2
1563.5 ± 0.2
1860.0 ± 0.2
2157.0 ± 0.2
2455.0 ± 0.2
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Fouguira, S.; Ammar, E.; Haji, M.E.; Benhra, J. Internet of Things and Predictive Artificial Intelligence for SmartComposting Process in the Context of Circular Economy. Eng. Proc. 2025, 97, 16. https://doi.org/10.3390/engproc2025097016

AMA Style

Fouguira S, Ammar E, Haji ME, Benhra J. Internet of Things and Predictive Artificial Intelligence for SmartComposting Process in the Context of Circular Economy. Engineering Proceedings. 2025; 97(1):16. https://doi.org/10.3390/engproc2025097016

Chicago/Turabian Style

Fouguira, Soukaina, Emna Ammar, Mounia Em Haji, and Jamal Benhra. 2025. "Internet of Things and Predictive Artificial Intelligence for SmartComposting Process in the Context of Circular Economy" Engineering Proceedings 97, no. 1: 16. https://doi.org/10.3390/engproc2025097016

APA Style

Fouguira, S., Ammar, E., Haji, M. E., & Benhra, J. (2025). Internet of Things and Predictive Artificial Intelligence for SmartComposting Process in the Context of Circular Economy. Engineering Proceedings, 97(1), 16. https://doi.org/10.3390/engproc2025097016

Article Metrics

Back to TopTop