Cool weather station on screen

Published Jul 24, 2020
 1 hours to build
 Beginner

We can easily get the weather data of the city we live in with the help of smartphones. But what if we can know the temperature and humidity in our room and can visualise it as a graph? This project tells the temperature and humidity using a DHT11 sensor.

display image

Components Used

DHT11
DHT11 is a single wire digital humidity and temperature sensor, which gives relative humidity in percentage and temperature in degree Celsius.
1
ESP8266 WiFi Module
ESP8266 is a system on chip (SoC) which provides WIFI capability for embedded applications. This enables internet connectivity to embedded applications. ESP8266 modules are mostly used in Internet of Things(IoT) applications.
1
Connecting Wire Jumper Wires
Connecting Wire Breadboard wires
1
Micro USB Cable
USB Cables / IEEE 1394 Cables 3FT STRONG MCROUSB-B/USBACBL
1
Description

The weather station project uses an esp8266 Nodemcu microcontroller board and a DHT11 temperature and relative humidity sensor module. The microcontroller receives the data from the DHT11 sensor and acts as a bridge in sending the data to the Thingspeak website, which I have used to plot the temperature and relative humidity as a graph and also on a gauge.

Visualisation of the results

The connections are easy as well. The wires go as follows:

  1. The VCC pin of DHT11 goes to the 3V pin of the Nodemcu.
  2. The GND pin of DHT11 goes to the GND pin of Nodemcu.
  3. The data pin goes to GPIO0 (D3) of NVisualizationodemcu.

The connections are done. Connect the microcontroller to the laptop or PC and then the microcontroller is programmed.

 

The DHT11 sensor gives the relative humidity and temperature data. The Nodemcu is programmed using the Arduino IDE so as to receive the data. Then the Nodemcu uses the HTTP POST request method to communicate with the Thingspeak website. The Thingspeak account has unique API keys which is used to communicate with the website.

The channel settings of the website.

The HyperText Transfer Protocol acts works as a request-response protocol between the client and the server. Understanding how the HTTP protocol can be programmed will be very helpful in building the project. Generally, when using esp8266 Nodemcu board:

  • The esp8266 Nodemcu acts as the client and submits an HTTP request to the server. In this project, the server corresponds to the Thingspeak website.
  • The server returns a response to the client.
  • finally, the response will contain the status information about the request and also might contain the content. Here the result is the graphs we see on Thingspeak.

The code has been added to the upcoming page.

ESP8266 Nodemcu Microcontroller

 

DHT11 sensor
Codes

Downloads

weather station project schematic Download
Comments
Ad