Table of Contents
In this article, we’ll know how to make our own DIY Arduino weather station using the DHT11 sensor in a step-by-step guide.
Components Required
- Arduino UNO
- DHT-11 Sensor
- 16×2 LCD Display
- 10K Potentiometer
- Connecting Wires
- Head Pins
- Breadboard
- USB Cable to connect Arduino UNO with the Computer
What is Arduino Weather Station?
The weather station is a device used to sense the climatic conditions of a place such as temperatures, humidity, wind speed, etc. This can be customized on the need at a specific place. Here, we made a weather station for our small-scale application using Arduino and DHT11 Temperature and Humidity Sensor. Also, One can add a pressure sensor to determine the atmospheric pressure.
How Does It Work?
So we’ve got this ultra-low-cost sensor called the DHT11. It uses a capacitive humidity sensor and a thermistor to measure the surrounding air and spits out a digital signal on the data pin. Since the output data isn’t analog, it requires some coding to get the data, but don’t sweat it. It’s got its own library that takes care of the hard parts. It’s fairly simple to use but requires careful timing to grab data. You can only get new data from it once every 2 seconds, but that’s more than enough for our Arduino weather station.
Connecting the Headers for the Arduino Weather Station
Since you’re going to be using an LCD display for your Arduino weather station, you’ll need to solder the pin headers onto the LCD. The best way to do this is to affix header pins onto the Arduino and use jumpers to connect it to the LCD display.
- Place the header pins onto the ports of the Arduino, and make sure that there’s contact and that the header pins are not loose.
- Carefully, using a glue gun, glue the header pins onto the Arduino, keeping sure that it doesn’t get loose while you’re doing it.
- Now solder the LCD display onto the header pins after aligning it on top of the LCD display.
Wiring the Circuit for the Arduino Weather Station
Connect the Arduino, LCD display, DHT11 sensor, and potentiometer as shown in the connection diagram below.

LCD Connections for Arduino Weather Station
LCD connection are as follows
LCD D7 –>DIGITAL PIN 2 LCD D6 –> 3 LCD D5 –> 4 LCD D4 –> 5 LCD E – > 11 LCD RS –> 12 LCD VDD –> (+) RAIL BREADBOARD LCD A –> (+) RAIL BREADBOARD LCD VSS –> (-)RAIL BREADBOARD LCD K –>(-)RAIL BREADBOARD LCD RW –> (-)RAIL BREADBOARD LCD VO –> Potentiometer Middle Pin
Installing the DHT11 Library for Arduino
Download the Arduino DHT11 library.
Next, open Arduino IDE, Go to Sketch –> Include Library –> Add Zip File and then close the Arduino IDE and open it again. After doing this, you will find the library included.
For more info on how to add libraries, visit the Arduino website.
Uploading the Code for the Arduino Weather Station
Copy and paste the code below into your Arduino IDE and save the sketch. Next, upload the code to your Arduino.
#define dht_dpin A1 //no ; here. Set equal to channel sensor is on
dht DHT;
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup(){
lcd.begin(16, 2);
lcd.print("TEMP HUMIDITY");
Serial.begin(57600);
}
void loop(){
lcd.setCursor(1,3);
DHT.read11(dht_dpin);
//lcd.print(abs(moisture));
//Serial.println(moisture);
lcd.print(round(DHT.temperature));
lcd.print("C ");
lcd.print(round(DHT.humidity));
lcd.print("% ");
}
Once the code is uploaded into the Arduino UNO, The LCD Module will start to display the sensor read temperature and humidity values. I hope you found this article helpful. If you have any doubts and queries, you can ask them in the comment section below.
This can also be used as an alarm such as to turn on the home appliances such as Air Conditioners and fans when a certain temperature is detected. We can also make a tabletop weather station for our home.
Thanks IoT Lovers!