Monitoring Temperature and Humidity in Chicken Coops Using NodeMCU ESP32 and Telegram Bot
Monitoring temperature and humidity in chicken coops is a critical aspect to ensure the well-being and health of livestock. In this context, the use of NodeMCU ESP32 as a sensor and wireless data transmitter becomes an effective solution. NodeMCU ESP32 can be integrated with temperature and humidity sensors to real-time measure the micro-environmental conditions inside the chicken coop. By connecting NodeMCU ESP32 to the Telegram Bot platform, farmers can easily monitor these critical parameters through their smartphones. Information received from NodeMCU ESP32 can provide valuable insights into the chicken coop conditions, enabling farmers to take necessary steps to maintain the health and productivity of their chickens. Overall, the integration of this technology presents a modern solution for efficiently and practically monitoring and managing the chicken coop environment.
The following are the experimental steps for monitoring temperature and humidity in chicken coops based on IoT using NodeMCU, Telegram Bot, LCD, and LED:
Materials Needed:
1. NodeMCU ESP32
2. Temperature and Humidity Sensor (e.g., DHT11 or DHT22)
3. LCD Display (16x2 characters)
4. LED with I2C
5. Jumper Cables
6. Project Board
7. Internet Access (Wi-Fi)
Steps:
1. Prepare Hardware:
- Connect NodeMCU ESP32 to the project board.
- Connect the temperature and humidity sensor to NodeMCU using jumper cables.
- Connect the LCD display to NodeMCU using jumper cables.
- Connect the LED to NodeMCU using I2C and jumper cables.
2. Install Libraries and Tools:
- Open Arduino IDE.
- Install the "DHT" library for the temperature and humidity sensor.
- Install the "LiquidCrystal_I2C" library for the LCD.
- Ensure that the Board Manager is installed for NodeMCU ESP32.
3. Programming:
- Write the program code using Arduino IDE. The program should be able to read temperature and humidity data from the sensor, display information on the LCD ("Monitoring Chicken Coops"), control the LED based on a specific temperature limit, and send data to the Telegram Bot.
- Use WiFi and the Telegram Bot Library for connecting to Telegram.
4. Configure Telegram Bot:
- Obtain the Bot token from BotFather on Telegram.
- Get the user ID by sending the `/start` command to the "userinfobot" on Telegram.
5. Integration with Telegram:
- Insert the Bot token and user ID into the NodeMCU program code.
6. Testing:
- Upload the program to NodeMCU using Arduino IDE.
- Ensure that NodeMCU is connected to Wi-Fi.
- Monitor the results through the Serial Monitor in Arduino IDE.
- Ensure that the LCD displays the appropriate program title.
- Test the LED to see if it lights up according to the set temperature limit.
- Send commands via Telegram to check if the system responds.
7. Adjustment and Maintenance:
- Adjust temperature and humidity limits as needed.
- Fix the code or connections if there are any issues.
- Perform routine maintenance to ensure the availability and reliability of the system.
The working mechanism of "Monitoring Temperature and Humidity in Chicken Coops Using NodeMCU ESP32 and Telegram Bot" when users want to know the temperature and humidity:
1. User Access via Telegram:
Users send commands or requests through the Telegram Bot to obtain information about the temperature and humidity in the chicken coop.
2. NodeMCU ESP32 Receives Commands:
NodeMCU ESP32 receives commands from the Telegram Bot to retrieve temperature and humidity data.
3. Sensor Measures Temperature and Humidity:
NodeMCU ESP32 activates temperature and humidity sensors to measure the microenvironmental conditions inside the chicken coop.
4. Data Sent to Telegram:
The measured temperature and humidity data are sent to the Telegram Bot via messages. Users receive this information in the form of text messages.
5. Display on LCD Screen:
NodeMCU ESP32 also displays the title of the project, "Monitoring Chicken Coops, " on the installed LCD.
6. Temperature Checking:
NodeMCU ESP32 compares the measured temperature with a specific limit, for example, 30 degrees Celsius.
7. LED Control:
If the temperature exceeds the set limit (for example, above 30 degrees Celsius), NodeMCU ESP32 controls the LED to illuminate as an indicator that the temperature has reached a higher level.
8.
Additional Notifications:
If the temperature exceeds the limit, NodeMCU ESP32 can send additional notifications via the Telegram Bot to farmers, providing early warnings regarding the chicken coop conditions that need attention.
This way, the system provides comprehensive monitoring of temperature and humidity and offers visual feedback through the LCD screen and LED indicator to assist farmers in maintaining optimal conditions for their chickens.
Project photo results
Comments