Temperature And Humidity Monitoring System Using NodeMCU And Blynk

In this project, we will build a cool temperature and humidity monitoring system using the NodeMCU development board. This project contains an ESP8266 NodeMCU, a DHT11 temperature and humidity sensor and an LCD display for showing real-time values of surroundings.

Also, we include Blynk software for monitoring real-time data through Android phones. Being IoT-based devices, we can discover and operate this from anywhere in the world through an internet connection.

Must Read IoT-Based Projects

Principle Behind Temperature And Humidity Monitoring System

The principle behind this project is simple. NodeMCU works here as a server. It connects with the Blynk cloud through an internet connection. While ambient temperature is sensed by the DHT11 temperature sensor, it sends the data to the server. Then the LCD display shows the real-time temperature and humidity after processing in the server.

Project

Temperature And Humidity Monitoring System
Temperature And Humidity Monitoring System

Circuit Diagram

Temperature And Humidity Monitoring System Circuit Diagram
Temperature And Humidity Monitoring System Circuit Diagram

Components Required

  • ESP8266 NodeMCU Board
  • DHT11 Sensor
  • 16×2 LCD Display
  • I2C Module
  • Wires
  • 5V Power Supply

Preparing Blynk for Temperature And Humidity Monitoring System

For creating a project on the Blynk platform, you first need to sign up on Blynk. In case if you already have an account on Blynk, sign in using your user id and password. For creating your account, go to www.blynk.com. I used the Blynk app for easy setup.

Click on sign-up if you don’t have an account and if you already have an account, click on sign in. After clicking on sign-up, fill up your details. After this verify your E-mail id and then continue.

Then click on “New Project”, enter the name of the project and choose the connection type and click on “Create”.

Once sign-in after successful account verification, create a new project by clicking the “New Project” button and confirm. Now click on the “+” icon in the right corner and add the Gauge and LCD widgets.

Let’s click the widgets one after another and set up the widget’s settings. First, click on the LCD widget and change its virtual pins to V0 and V1 (values from 0 to 100). Next, click on the Gauge widgets and name them. Set the temperature Gauge as A0 and the humidity Gauge as A1. Also, change the values from 0 to 100. That’s it.

Arduino Code for Temperature And Humidity Monitoring System

Go to File and select Preferences and paste the link “https://arduino.esp8266.com/stable/package_esp8266com_index.json” in Additional Board Manager URLs to add the ESP8266 board. Open Boards Manager from the Tools menu and type ESP8266 to install the ESP8266 platform.

The library files that are needed to compile this code; are Adafruit Sensor Library, Blynk Library, DHT11 Library, and I2C Library.

Code Explanation

These include library files that are helping to compile the program.

The I2C module and DHT11 temperature sensor are defined here.

Now check your mailbox for Blynk auth token for creating the server. Also, put down your WiFi name and password here.

This is the main function of this project. This code will operate the whole process of the system.

Now come to the setup function. Setting up an LCD display through the I2C module is vital to show the result. So this code is for setting up the LCD and serial monitor.

The Blynk library will run in this loop function.

1 thought on “Temperature And Humidity Monitoring System Using NodeMCU And Blynk”

Leave a Comment