logologo
Contact

HOMEABOUTSERVICESBLOGSBOOKSSHOPCONTACT

+977 9803661701support@nepatronix.orgLokanthali, Bhaktapur

© 2025 NepaTronix all rigths reserved

TEMPERATURE HUMIDITY READER ON MOBILE (IoT Project)

  Back To Blogs

The Temperature Humidity Reader project utilizes an ESP32 microcontroller in conjunction with a DHT11 sensor to monitor temperature and humidity levels. The collected data is displayed on an LCD and transmitted to a mobile application using the Blynk platform. This project provides an efficient way to remotely monitor environmental conditions in real time, making it useful for applications such as home automation, weather stations, and greenhouse monitoring.

Project : 43


If you want to post your project ,research or any document related to Ai,Ml,IoT,Robotics then please email us with your image ,details and your project at blog@nepatronix.org

Introduction

The Temperature Humidity Reader project utilizes an ESP32 microcontroller in conjunction with a DHT11 sensor to monitor temperature and humidity levels. The collected data is displayed on an LCD and transmitted to a mobile application using the Blynk platform. This project provides an efficient way to remotely monitor environmental conditions in real time, making it useful for applications such as home automation, weather stations, and greenhouse monitoring.

Components Required

1.      ESP32: A microcontroller with integrated WiFi capabilities.

2.      DHT11 Sensor: For measuring temperature and humidity.

3.      LiquidCrystal_I2C Display: To locally display temperature and humidity data.

4.      Power Supply: Typically a USB power source or battery pack.

5.      Connecting Wires: For establishing connections between components.

Pin Configuration

•        DHT11 Sensor:

                       o    Data Pin: GPIO 4 (DHTPIN 4)

•        LCD Pins: Connected via I2C

Libraries Used

•        DHT: For interfacing with the DHT11 sensor.

•        BlynkSimpleEsp32: For interfacing with the Blynk platform.

•        Wire: For I2C communication.

•        WiFi: For WiFi connectivity.

•        LiquidCrystal_I2C: For interfacing with the LCD display.

Circuit Diagram: 



 Coding:

 

//Copy the blynk credential from your acoount device and paset it here

#define BLYNK_TEMPLATE_ID "TMPL670BbO1Nl"

#define BLYNK_TEMPLATE_NAME "Data Monitoring"

#define BLYNK_AUTH_TOKEN "4Q5w-qYfY3jO82qXBaL3O0E3irLFfDwb"

 

#include <DHT.h>

#define BLYNK_PRINT Serial

#include <BlynkSimpleEsp32.h>

#include <Wire.h>

#include <WiFi.h>

#include <LiquidCrystal_I2C.h>

#define DHTTYPE DHT11  // DHT 11

#define DHTPIN 4

DHT dht(DHTPIN, DHTTYPE);

 

LiquidCrystal_I2C lcd(0x27, 16, 2);

char auth[] = BLYNK_AUTH_TOKEN; char ssid[] = "nepatronix_2.4";  //Enter your WIFI SSID name char pass[] = "CLB269DA03";      //Enter your WIFI password

BlynkTimer timer;

 

void notify() {   float t = dht.readTemperature();   float h = dht.readHumidity();   display(0, 0, "Temp :" + String(t));   display(0, 1, "Humidity :" + String(h));

  Serial.println("Temperature: " + String(t) + ", " + "Humidity : " + String(h));

  Blynk.virtualWrite(V1, h);

  Blynk.virtualWrite(V2, t);

 

  delay(100);

}

 

void setup() {

  Serial.begin(9600);   Wire.begin();   dht.begin();

  lcd.init();   lcd.clear();   lcd.backlight();   lcd.setCursor(1, 0);   lcd.print("**NEPATRONIX**");   delay(2000);   lcd.clear();

  Blynk.begin(auth, ssid, pass); //Connecting to Blynk Server with ssid and password   delay(500);

  Serial.println(WiFi.localIP());

 

  timer.setInterval(100L, notify);

 

}

 

void loop() {

  Blynk.run(); //run the blynk function in loop   timer.run();

}

 

void display(int col, int row, String msg) {   lcd.clear();   lcd.setCursor(col, row);   lcd.print(msg);

}


If you want to post your project ,research or any document related to Ai,Ml,IoT,Robotics then please email us with your image ,details and your project at blog@nepatronix.org


Working

1.      Initialization:

o   The ESP32 initializes serial communication at 9600 baud rate.

o   The DHT11 sensor and the I2C LCD display are initialized.

o   A welcome message is displayed on the LCD.

o   The ESP32 connects to the Blynk server using the provided credentials (auth token, WiFi SSID, and password).

2.      Main Loop:

o   The main loop continuously runs the Blynk and timer functions.

o   The notify function is periodically called to read the temperature and humidity from the DHT11 sensor, display the data on the LCD, and send it to the Blynk app.

3.      Sensor Data Monitoring:

o   The notify function reads the temperature and humidity values using dht.readTemperature() and dht.readHumidity().

o   The values are printed to the serial monitor, displayed on the LCD, and sent to the Blynk virtual pins V1 (humidity) and V2 (temperature).

o   The LCD displays the temperature and humidity values continuously.

Testing

1.      Setup: Assemble the components and connect them as per the pin configuration.

2.      Power Up: Power the ESP32 and ensure the DHT11 sensor is receiving power.

3.      WiFi Connection: Ensure the ESP32 is connected to the specified WiFi network.

4.      Blynk App: Configure the Blynk app with the provided template ID and auth token.

5.      Sensor Data: Verify the sensor data is correctly displayed on the LCD and transmitted to the Blynk app.

6.      Display: Ensure the LCD shows accurate temperature and humidity values.

7.      Alerts: Test the alert functionality by simulating different temperature and humidity levels if applicable.

Conclusion

The Temperature Humidity Reader project successfully integrates WiFi communication, sensor data monitoring, and remote control using the Blynk platform. By leveraging the ESP32 microcontroller and various components, this project provides a practical solution for real-time environmental monitoring. It enhances safety and convenience by providing timely notifications of temperature and humidity changes, demonstrating the importance of IoT in modern monitoring systems. Users gain hands-on experience in IoT, mobile app interfacing, and sensor data visualization, forming a foundation for more advanced projects

If you want to post your project ,research or any document related to Ai,Ml,IoT,Robotics then please email us with your image ,details and your project at blog@nepatronix.org





Total likes : 3

Comments







Read More Blogs!

Electromagnetic Property(STEAM Education)

To understand the basic principles of electromagnetism and electromagnetic property in this project by building a electromagnet.


1.6k04

Controlling LED Intensity with Variable Resistance Potentiometer(STEAM Education)

To understand the concept of variable resistance using a potentiometer and demonstrate its application in controlling the intensity of light.


1.8k03

Play Buzzer with Solar Panel Power(STEAM Education)

To understand and demonstrate the utilization of solar energy to power and play Buzzer.


1.9k04

Development of a Library Noise Alert System Using Arduino(Automation Project)

This proposal outlines the development of a library noise alert system using an Arduino microcontroller. This system will monitor noise levels and alert users when the noise exceeds a predefined threshold, promoting a quiet and conducive environment for study and research.


1.4k08