IOT Live Weather Station Monitoring Using NodeMCU ESP8266

Weather Station NodeMCU (Last Updated On: May 21, 2019)

IOT Live Weather Station Monitoring Using NodemCU ESP8266

This post is all about IOT based Live Weather Station Monitoring Using NodemCU ESP8266. We will interface DHT11 Humidity & Temperature Sensor, BMP180 Barometric Pressure Sensor and FC37 Rain Sensor with NodeMCU ESP8266-12E Wifi Module. We will measure humidity, temperature, Barometric pressure, and rainfall and upload the data to a web server.

Once the code is uploaded you can find the IP address of NodeMCU in the serial monitor. With the same IP, you can go to any web browser and display the data in a beautiful widget format. The project is very interesting and can be used in remote areas or in a freezer where the data is to be monitored.

What is a Weather Station?

A weather station is a device that collects data related to the weather & environment using different sensors. There are two types of weather station, one which is having own sensors and the second type of weather station is where we pull data from the weather station servers. In this tutorial, we will go for the first one, i.e. we will design our own weather station.

Weather station sensors may include a thermometer to take temperature readings, a barometer to measure the atmospheric pressure, Hygrometer to measure humidity, rain sensor to measure rainfall, anemometer to measure wind speed and more. Weather stations are also called weather centers, personal weather stations, professional weather stations, home weather station, weather forecaster and forecasters.

Components Required

The components needed for this project, i.e.,IOT Live Weather Station Monitoring Using NodemCU ESP8266 are given below. All these components can be purchased from amazon. The purchase link is given below.

1. Nodemcu ESP8266 12E Board (Buy Online from Amazon)
2. BMP180 Pressure Sensor (Buy Online from Amazon)
3. DHT11 Humidity Temperature Sensor (Buy Online from Amazon)
4. Rain Sensor FC37 (Buy Online from Amazon)
5. 4.7K Resistors - 2
6. Breadboard
7. Connecting Jumper Wires

DHT11 Humidity & Temperature Sensor:

About DHT11

The DHT11 is a basic, ultra low-cost digital temperature and humidity sensor. It uses a capacitive humidity sensor and a thermistor to measure the surrounding air and spits out a digital signal on the data pin. Its fairly simple to use, but requires careful timing to grab data. The digital signal is fairly easy to read using any microcontroller.

DHT11 Temperature Humidity Module

Features of DHT11

– Ultra low cost
– 3 to 5V power and I/O
– 2.5mA max current use during conversion (while requesting data)
– Good for 20-80% humidity readings with 5% accuracy
– Good for 0-50°C temperature readings ±2°C accuracy
– No more than 1 Hz sampling rate (once every second)
– Body size 15.5mm x 12mm x 5.5mm
– 4 pins with 0.1″ spacing

BMP180 Barometric Presure Sensor:

About BMP180

The BMP180 is the new digital barometric pressure sensor of Bosch Sensortec, with a very high performance, which enables applications in advanced devices such as smartphones, tablet PCs and sports devices. It follows the BMP085 and brings many improvements, like the smaller size and the expansion of digital interfaces.


The ultra-low power consumption down to 3 μA makes the BMP180 the leader in power saving for your devices. BMP180 is also distinguished by its very stable behavior (performance) with regard to the independence of the supply voltage.

Features of BMP180

– Vin: 3 to 5VDC
– Logic: 3 to 5V compliant
– Pressure sensing range: 300-1100 hPa (9000m to -500m above sea level)
– Up to 0.03hPa / 0.25m resolution
– -40 to +85°C operational range, +-2°C temperature accuracy
– This board/chip uses I2C 7-bit address 0x77.

Rain Sensor:

Rain sensors are used in the detection of water beyond what a humidity sensor can detect.

Rain Sensor

The rain sensor detects water that completes the circuits on its sensor boards’ printed leads. The sensor board acts as a variable resistor that will change from 100k ohms when wet to 2M ohms when dry. In short, the wetter the board the more current that will be conducted.

Circuit Diagram & Connections

Below is the circuit diagram for making Live weather Sation Monitoring Using NodeMCU. Assemble the circuit as shown in the figure below.

Circuit Diagram for Weather Station NodeMCU

Source Code/Programs

The program for Live Weather Station Monitoring Using NodeMCU ESP8266 is divided in two parts, i.e 1. Main Arduino code and 2. index.h HTML file.

But before that add these two libraries:
1. BMP180 Library: Download
2. DHT11 ESP Library: Download

index.h Code

Copy this code and paste it on text document. Then save this file by name index.h, so you will get a file in the form of .h as a code.

Now move this file to the folder where the main ino code is located.

Weather Station Main Code

Working of the Live Weather Station

Weather Station NodeMCU

First Assemble the circuit as shown above in the circuit diagram and upload the main ino file to NodeMCU board.

Once code is uploaded, get ESP8266 IP address from serial monitor.
Serial monitor code

Now copy this ip address and paste it in any web browser like google chrome and hit enter. You will get a beautiful widget with weather information as shown below.

Weather Station Widget

Video Preview & Tutorial

You can watch the video below if you have any problem regarding coding section and circuit assembling.

Recommended For You

Ask A Question .......