Air quality in the barn plays a crucial role in maintaining the health, comfort, and productivity of sheep. Poorly monitored barn conditions can lead to increased temperature, humidity, and concentrations of harmful gases such as ammonia and carbon dioxide, potentially degrading livestock health. This study aims to design and evaluate an Internet of Things-based sheep barn air quality monitoring system to support real-time barn management. The developed system uses an ESP32 microcontroller, DHT11 or DHT22 temperature and humidity sensors, an MQ-135 gas sensor, an LCD, and a buzzer as a warning indicator. Testing was conducted for 24 hours with a data collection interval of every 5 minutes, resulting in 288 data samples. Sensor accuracy was evaluated using Mean Absolute Error, Root Mean Square Error, and Mean Absolute Percentage Error. Test results showed that the temperature sensor had an MAE of 0.20°C, an RMSE of 0.21°C, and an MAPE of 0.66%, while the humidity sensor had an MAE of 2.00%, an RMSE of 2.05%, and an MAPE of 2.78%. These results indicate that the system is capable of monitoring barn conditions accurately, stably, and in real time. This system can help farmers make quick decisions in maintaining the quality of the barn environment and supporting sustainable sheep productivity improvements.
Copyrights © 2026