Low-cost IoT real-time environmental monitoring and one-hour LSTM forecasting for small-scale agricultural applications
Abstract Standard equipment is too expensive and complex, frequently limiting continuous environmental monitoring in small-scale farming. To overcome this, a low-cost seven-channel IoT monitoring and forecasting system was developed and deployed, utilizing an Arduino Uno R3 and ESP8266 NodeMCU Wi-Fi module. The system acquired temperature, humidity, precipitation, soil moisture, methane, carbon monoxide, and air quality, transmitting data to the ThingSpeak cloud platform at an average interval of approximately one minute. The DHT22 temperature and humidity sensor carries a manufacturer-rated accuracy of ± 0.5 °C and ± 2–5% RH; the remaining sensors report uncalibrated raw output, as no reference-instrument validation was performed. The device was deployed for 21 days at a residential garden site in the Nile Delta region of Egypt. A total of 30,981 of 31,460 exported observations, 98.48% of the exported record were retained after the application of the preprocessing pipeline, which consisted of time-aware interpolation and Augmented Dickey-Fuller (ADF)-guided stationarity conditioning. A 70/15/15 chronological train/validation/test split was used to prevent temporal leakage. The analysis revealed distinct environmental patterns, including a rising trend of 0.296 °C/day, an anti-phase coupling between temperature and humidity, and an increase in raw gas sensor output overnight. To make use of this data for predictive insights, seven different univariate LSTM models were trained to forecast one hour ahead. When evaluated against persistence and seasonal-naive baselines on the same test set, the LSTM held a modest edge over persistence for methane (Mean Absolute Percentage Error, MAPE: 0.81%) and air quality (MAPE: 0.31%), while a simple persistence forecast matched or outperformed the LSTM for the remaining five channels. This field deployment demonstrates the technical feasibility of pairing affordable hardware with deep learning forecasting for continuous environmental monitoring, providing a foundation for future irrigation-support applications in resource-constrained settings.
Authors
- Mohamed S. Saraya (ORCID: https://orcid.org/0000-0001-5682-8243)
- Samaa F. Osman
- Ahmed K. Hassan
- Ganna H. Hebishy
Institutions
- Mansoura University (EG)
Publication Details
- Journal
- Scientific Reports
- Published
- 2026-09-15
- DOI
- https://doi.org/10.1038/s41598-026-69489-0
- Primary Topic
- Air Quality Monitoring and Forecasting
- Type
- article
- Field-Weighted Citation Impact
- 0.00