IoT Weather Station Project using Nodemcu ESP8266 and Arduino Uno

(Last Updated On: July 22, 2019)

IoT Weather Station

Description:

IoT Weather Station Project- Few month’s back I posted a tutorial on Arduino based weather station, in which I displayed the humidity and temperature values on gauges.

IoT Weather Station

The software which you can see was designed in vb.net 2010 Express Edition. This project needs a computer system to display the temperature and humidity values in real time. We can make the same exact project without using the Computer or Laptop. So I decided to make another version of the same weather station using Arduino, dht11, Nodemcu ESP8266 Wifi Module, and blynk application. So, that we can monitor the temperature and humidity values in real time from anywhere around the world using our cell phone.



I will also explain why we are using Arduino and Nodemcu ESP8266 together, while we can do this by only using the Nodemcu module. In this tutorial I will cover the maximum things. If in case you find any difficulty you can watch video Tutorial given at the end of this article.

Without any further delay, let’s get started

The components and tools used in this project can be purchased from Amazon, the components Purchase links are given below:

Arduino Uno: https://amzn.to/2tVz1vu
Mega 2560: https://amzn.to/2ze1kdu
Nodemcu esp8266 wifi module: Best price https://amzn.to/2NAvmiB
Dht11 sensor: https://amzn.to/2KxfifT
Potentiometer: https://amzn.to/2JSLbfg
330 ohm resistors pack: https://amzn.to/2NtlAeh
5v 2A adaptor: https://amzn.to/2GsNfcw
2n2222 npn transistors: https://amzn.to/2EmXsIb
10k Resistor: https://amzn.to/2KTd6OW
lm7805 Voltage Regulator: https://amzn.to/2IZEl5x
330-ohm resistors pack: https://amzn.to/2NtlAeh
female DC power jack socket: https://amzn.to/2KEo1gt
470 uf capacitors: https://amzn.to/2xDCOzf
5×7 cm vero board: https://amzn.to/2OHGbvn
female headers: https://amzn.to/2zqmtiJ
connection wires: https://amzn.to/2DpBuW7
Super Starter kit for Beginners: https://amzn.to/2KJvmKG
Jumper Wires: https://amzn.to/2KMoVXs
Bread Board: https://amzn.to/2MS4q8X
12v Adaptor: https://amzn.to/2Ntr6h1
PCB plate: https://amzn.to/2IUwpCt
Variable Supply: https://amzn.to/2MT4Qfj
Digital Multimeter: https://amzn.to/2Nvft9i
Vero Board / strip board: https://amzn.to/2MTf9jD
Soldering iron kit: “best” You guys should definitely purchase this: https://amzn.to/2zfoNuJ
Solder wire: https://amzn.to/2ufUMWf
Wire Stripper: https://amzn.to/2KOqxfU
wire cutter: https://amzn.to/2ucIq14
PCB small portable drill machine: https://amzn.to/2Nu62XF


Arduino and Nodemcu ESP8266 together:

I know we can make the same project using only the Nodemcu ESP8266 Wifi module, and we can reduce the project size, power and building time, etc. You know very well Nodemcu ESP8266 Wifi module has a very limited number of the IO pins, and there is only 1 analog Pin. I have been frequently asked by my followers on YouTube Channel “Electronic Clinic” that how to connect multiple analog sensors or how to increase the IO pins of the Nodemcu Module. My replay is always use Arduino or Mega with the Nodemcu Module. We can also use a multiplexer, but that need wiring, and complicated programming which we really don’t want. So the easiest option is to use the Arduino Uno or Mega with the Nodemcu ESP8266 Wifi module.


So, that’s the reason I am using Arduino Uno with the Nodemcu Module. In this Project you will learn completely how to connect Nodemcu module with the Arduino and how to establish the Serial Communication. The Arduino does all the processing, reads the DHT11 sensor, make a String message and send it to the Nodemcu Module. Then in the Nodemcu Module we split the entire message and send the desired data to the Blynk Application. Now let’s have a look at the DHT11 Temperature and Humidity sensor.

This Project is based on my Previous two tutorials.

 

In this tutorial you will learn how to install the Nodemcu esp8266 wifi board and how to download and use the blynk library and how to fix the USB UART driver error.

https://www.youtube.com/edit?o=U&video_id=3TlzoF0YpH8

While in this tutorial you will learn how to make a power supply for Nodemcu esp8266 wifi module so that it can be easily powered up using a 12v adaptor or battery.


DHT11 Temperature and Humidity Datasheet:

First of all let’s start with the datasheet of DHT11 Temperature and Humidity module.

IoT Weather Station

This is the dht11 sensor that we will be using today, this datasheet consists of all the necessary information that you want to know about dht11, like for example.

IoT Weather Station

It’s product overview.

Applications, which clearly explains; where you can use this particular sensor.


IoT Weather Station

The features

Dimensions

And product parameters, which is the most important part and you should definitely read this.

The electrical characteristics, which tells you how much voltage it needs.

IoT Weather Station

As it needs 3.5 to 5.5volts so this sensor can be easily powered up using the Arduino’s 5v.

Pin description, the dht11 sensor has four pins, the left most pin which is the pin number1 can be connected with Arduino’s 5v… Pin number2 is the data pin…pin number3 is not connected…while pin number4 is the ground.


Circuit Diagram:

IoT Weather Station

So my friends this is the basic circuit diagram which shows that how the DHT11 sensor and Nodemcu ESP8266 Wifi module will be connected with the Arduino. As you know DHT11 has four pins. Pin1 will be connected with Arduino’s 5v…pin number 2 will be connected with pin number 12 of the Arduino…A 10k resistor is connected with pin number 1 and pin number 2 of the sensor…pin number 3 is not connected while pin number 4 is connected with the ground..

J1 is the DC Female Power Jack and this is where we connect a 12v Adaptor, A Battery or a Solar Panel. Two 470UF capacitors are connected at the input and output sides of the LM7805 voltage Regulator. In the circuit diagram above you can see the Arduino’s 5v pin is connected with the Nodemcu Vin pin, sometimes it works but usually it fails and keep reseting, So don’t power up the Nodemcu module from Arduino. Connect the output of the 5v regulated Power Supply with the Vin Pin of the Nodemcu ESP8266 Wifi module. and also connect the ground of the Power Supply with the Arduino’s Ground. Connect the Tx and Rx pins of the Nodemcu module with Pins 2 and 3 of the Arduino Uno.

IoT Weather Station Blynk Application Designing:

Watch video Tutorial give at the end or follow the following instructions:

  • First of all open the blynk application.
  • Set the project name as weather station.
  • Click on the choose device and select Nodemcu.
  • Make sure you set the connection type to wifi.
  • then click on the create button, an authentication token will be sent on your email id, which will be then used in programming, simply copy and paste it in programming.
  • Click on the screen and add two gauges.
  • Click on the first gauge and change its name to Humidity.
  • Click on the pin and select virtual and also select v2.
  • Set the maximum value to 100.
  • Change font size.
  • Click on push and select 1 second.
  • Now repeat the same steps for the other gauge.


IoT Weather Station

basic application setup is completed; now let’s discuss the Arduino and Nodemcu programs.

IoT Weather Station Programming:

This Project is based on two programs. One program is written for the Arduino Uno while the other program is written for the Nodemcu ESP8266 WIFI module. For the step by step programs explanation watch video tutorial given at the end.


IoT Weather Station Arduino Programming:


IoT Weather Station Nodemcu Programming:

Watch Video Tutorial:

Recommended For You

About the Author: Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

Leave a Reply