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.


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

PCB Design

For removing messy wiring and giving a clean look, I designed a PCB prototype for this project. It is also helpful for troubleshooting that runs great without any errors. To design this PCB board, I used EasyEDA as it is too easy to use. For ordering PCB for this, I personally prefer PCBWay.

Gerber file for Temperature And Humidity Monitoring System Using Blynk And ESP8266.

PCB View

Temperature And Humidity Monitoring System 2D View
Temperature And Humidity Monitoring System 3D View

Order PCB From PCBWay

This project is sponsored by PCBWay.com. PCBs are required everywhere in the electronics industry. So it needs to be good enough and have to serve the purpose for which they are needed without costing exorbitant amounts. PCBway offers all your needs come true. PCBWay is one of the largest PCB (Printed Circuit Board) manufacturing companies in China. It offers PCB prototype, PCB Assembly, SMD Stencil, and Flexible PCB.

They ship to more than 170 countries worldwide and process more than 2100 PCB orders a day. It feels like PCBWay gives an excellent price and customer service factor in one single serving. I personally ordered PCBs from PCBWay for my projects for just 5 dollars. I’ve used other PCB manufacturers too, but PCBWay has been offering the most reliable and consistent that I have tried. What is also spectacular about PCBWay to me, as a maker and customer, is their service. From their friendly support staff to their intuitive, user-friendly website features, it all counts towards what makes PCBWay an ideal company and brand for any electronics hobbyist.

Standard quality for any product needs to be maintained using some parameters. PCBWay gives that opportunity through quality control in designing and manufacturing. At first, they ensure the accuracy, clarity, and validity of the PCB files that we sent to them.

Then all the boards will go through the most stringent tests other than the basic visual check. They adopt most of the testing and inspecting equipment used in the industry, such as Flying Probe Testers, X-Ray Inspection machines, and Automated Optical Inspection (AOI) Machines. They are having 50+ new engineers on a daily basis around the world using PCBs for their work, who trust their reliable quality.

Features of PCBWay

PCB Prototyping & Manufacturing: PCBWay produces FR-4 and Aluminum boards and advanced PCBs like Rogers, HDI, and Flexible and Rigid-Flex boards, at a very reasonable price. Just check this Instant Quote to order premium PCBs for your hobby projects.

PCB Assembly: It not only offers PCB Prototyping but also offers PCB Assembly service. You can order a full PCB board with attached components by uploading your file. SMT & THT assembly starts from only 30$ including free stencil and worldwide shipping. The components can be sourced and provided by PCBWay, or by the clients themselves.

Open Source Community: It not only offers PCB Prototype & Assembly services but also gives opportunities to students for sponsorships. I think this is so great. They feature their projects on the website also.

3D Printing & CNC: It also produces Rapid Prototyping like 3D printing, CNC Machining, Sheet Metal Fabrication, and Injection Molding. The quality of the product is too premium and reliable. And also the best part is that you will receive your order within a minimum of 3 days.

Services: PCBWay offers great servicing of its products. It takes only 3 to 15 days according to the courier service to deliver your products. Also, it has a live support facility. Whenever you have any problems, you can always reach a live customer service person to respond to your emails or messages. They have the “Return and Refund” principle, for every unusable board caused by PCBWay, they will rebuild and refund the order soon.

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