Arduino Weather Monitoring Device Using OLED Display

Humidity and temperature are the common parameters to measure the environmental conditions of surroundings. This time we are going to build an Arduino based Weather Monitoring Device Using OLED Display where you can measure temperature and humidity in your surroundings. The value will show in the OLED display after sensing via a humidity sensor. DHT11 is used here as the purpose to sense the temperature and humidity level. The sensitivity of DHT11 is very good than others. This project is very cost-efficient and accurate working.

Must Read Temperature And Humidity Monitoring System Using ESP8266 NodeMCU

Principle Behind Weather Monitoring Device

Basically, the Arduino weather monitoring device has three parts. The first part senses the humidity and temperature of the surrounding by the DHT11 sensor. The second part is the time or delay when the DHT11 sensor’s output is read by the Arduino. Also, the data get extracted into temperature and humidity values in percentage form. We can measure the value on the Celsius scale as well as on the Fahrenheit scale. At last, the third part, where the Arduino displays humidity and temperature in the OLED display.

Project

Arduino Weather Monitoring Device
Arduino Weather Monitoring Device

Circuit Diagram

Arduino Weather Monitoring Device Circuit Diagram
Weather Monitoring Device Circuit Diagram

Components Required

  • Arduino
  • DHT11 Module
  • 1KΩ Resistor
  • OLED Display
  • Breadboard
  • Wires
  • 9V Battery

About Parts

Arduino

arduino-nano

For the compact build, I choose Arduino Nano despite Arduino UNO. Arduino Nano is a small, flexible microcontroller board using an Atmega328p chip. It can also use as a substitute for UNO. All the functions are the same in these two boards. The size of its PCB is 18×45 mm. The clock speed is 16Mhz. Its input voltage is 5-12V. There are 30 pins including power pins, data pins, analog pins, and serial pins on this board.

DHT11 Module

DHT11 Module

The DHT11 is a low-cost temperature and humidity sensor based on a capacitive humidity sensor and a thermistor. It can measure the surrounding air quality and take the data on the data pin. The use of this sensor is very easy but needs proper care when data is captured.

As we already explain, we use the DHT11 sensor because this module has a feature humidity and temperature complex with a digital signal. This module also gives us a precise value. So we can ensure the reliability and stability of the values. This sensor uses a resistive type humidity measurement and NTC type temperature measurement. DHT11 has an inbuilt 8-bit microcontroller that gives a very fast response. There is also a 4-pin single-row package available in this module.

DHT11 module works with single-wire communication. Data is sent in a specific time period in the form of a pulse. Before sending data to the Arduino, it needs some commands and a time delay. The time required for it is approx 4ms. 40-bit data transmission happens in this process. For example, 8-bit integral RH data + 8-bit decimal RH data + 8-bit integral T data + 8-bit decimal T data + 8-bit checksum.

OLED Display

oled display

The OLED is known as an organic light-emitting diode or Organic electroluminescent diode. This type of display is made of many layers. It is sealed on the top or bottom with plastic or glass. There are four pins in an OLED module. Those are GND, VCC, SDA, and SCL.

Circuit Connection

An OLED display is used here to show temperature and humidity which is connected to Arduino. The pin of the OLED display SDA and SCL is connected to pins A4, and A5 respectively. This display works on 5V so we connect the 5V pin of Arduino with it. The DHT11 sensor is also connected to digital pin 12 of Arduino with a 5K pull-up resistor (exceptional).

Arduino NanoDHT11 Module
+5VVCC
GNDGND
D2OUT
Arduino NanoOLED Display
+5VVCC
GNDGND
A4SDA
A5SCL

Working Principle of Weather Monitoring Device

There are three main components used in this project that are Arduino (for processing) and the DHT11 sensor module (for sensing temperature and humidity), and the last is OLED display (for showing the output result). This project is processed with serial communication.

First, Arduino sends a signal to the DHT11 module and DHT11 gives the response. The DHT11 already contains humidity and temperature data with it in analog form.

Then Arduino collects the data from the DHT11 module and extracts it into two parts. The first one is humidity and the second is temperature. After extracting, Arduino sends the digital value to the OLED display for showing the result.

After sending a high or low signal to the DHT11 sensor, Arduino ensured that module detection works. This process happens with an 18 μs delay. Then it pulls the data line and holds for 30μs until the module responds. Then DHT11 sends a low voltage as a response after 80μs. Now the microcontroller of DHT11 pulls up the data and waits for 80μs until DHT11 arrange to send data.

A low voltage level indicates that DHT11 is sending a response signal. The data sent by the module starts with a 50μs voltage level. The data bit is 0 or 1. The last important thing is the resistor value. If we place the DHT sensor at a less than 20-meter distance, a 5KΩ pull-up resistor should be needed. If you use more than 20 meters of distance the resistor value must be correct according to the distance.

Advantages of Weather Monitoring Device

  • This project can be used in heating, cooling, ventilation and air conditioning system.
  • It can also be used as medical equipment.
  • In-home automation system this system is very useful.

Disadvantages of Weather Monitoring Device

  • The uses of this weather monitoring device are limited.
  • It may not work for big areas.
  • There is no detection of sudden changes in the environment sometimes.

Arduino Code

Frequently Asked Questions

  • How do I connect the DHT11 humidity and temperature sensor?
  • DHT11 sensor has 4 pins VCC, GND, NC, and DATA. You can connect VCC with 5V of Arduino. Data pin with any of the 12 pins of the Arduino. There is no need to connect the NC pin. GND pin should be connected to the ground. And for the DHT11 module, this process is the same as what I said above.

    How accurate is DHT11?

    The temperature measuring range of the DHT11 module is 0-50°C with +-2 degrees.

    Why is the DHT11 sensor used?

    Because it is less costly and easy to use. Also, it provides humidity and temperature in both measurement systems in it.

    What type of humidity sensor is used in DHT11?

    It is a capacitive humidity sensor.

    Which is better than DHT11 and DHT22?

    DHT22 is better than DHT11 because it has a greater range of measuring temperature. But it is quite expensive.

    How to add the DHT11 library in Arduino?

    Firstly open Arduino IDE and go to sketch. Then click on include library and then manage the library. Now search for DHT. From there you can install the DHT library from Adafruit. After installation, you can search for Adafruit unified sensor and add it.

    Do you use an LCD display in place of OLED?

    Yes. You just need to connect Arduino with LCD pins with the I2C module or manually.

    Is DHT11 a waterproof sensor?

    No. You can use DS18B20.

    What is a capacitive humidity sensor?

    A hygroscopic dielectric material is placed in between two electrodes forming a capacitor.

    1 thought on “Arduino Weather Monitoring Device Using OLED Display”

    Leave a Comment