Project tutorial
Temperature Monitor with DHT22 and I2C 16x2 LCD

Temperature Monitor with DHT22 and I2C 16x2 LCD

It might be the simplest room temperature and humidity - no breadboard attached.

  • 67 respects

Components and supplies

Ph a000066 iso (1) ztbmubhmho
Arduino UNO
10167 01
DHT22 Temperature Sensor
i'm using the three pin ,but it doesn't matter
Adafruit industries ada80 image 75px
9V to Barrel Jack Connector
Cover 450x300
DFRobot I2C 16x2 Arduino LCD Display Module
11026 02
Jumper wires (generic)
actually it depend on how you connect i2c backpack and LCD. In my case. i'm soldering those two item,

Apps and online services

About this project

This is my first arduino project (not counting blink tutorial etc from arduino) so please bear with me..

I'm working on this after my 19MO months get coughs from our vacation, she's become very sensitive to air conditioning temperature and humidity.

The idea is creating very portable temperature and humidity sensing without making me abandon this project and carry on with finish product of temperature and humidity gadget.

In this project, I abandon breadboard because it Arduino still capable to powering sensor and LCD directly (and I don't get strangled by wires)

Hardware Introduction

Arduino Uno R3

The board that i'm using is Arduino Uno R3 because it the only arduino I owned.

Uno R3 have a capabilities to powering 5v module/shield with 3v3 module/shield simultaneously so you can get rid of the breadboard for this project. Right now i'm thinking abut using Arduino Nano, I will update this project and report it.

DHT22 Temperature and Humidity Sensor

Actually there are two alternative for sensor for the first time, the DHT-22 and DHT-11 but I choose the DHT22 because it larger range for humidity and temperature, also better accuracy 0, 5% versus DHT11 1%-2%.

the DHT-22 also comes with two version, one with 4pin and the other with 3 pin. If you found yourself with the 4 pin version, you can leave the third pin from the left unused because it mean to be NC pin (not Connected)

16x2 Liquid Cristal Display with i2c Backpack

The different between i2c version with basic version is you can cut the wiring necessity to only for cable because the other was soldered to the backpack.

many store sell the i2c LCD without you need for soldering manually LCD with the backpack. the tricky parts is you need to find the port used for i2c display.

9V battery clip /holder

I also found two variant for battery holder, actually it doesn't matter which one you choose. just make sure it will fit if you make a box for this temperature monitoring.

Let's Start

Start your configuration with lcd first before using the DHT-22, because this LCD is a bit tricky we need to make sure it running smoothly.

  • connect SCL to A5
  • connect CDA to A4
  • GND to GND
  • VCC to 5v

after you connect the LCD to Arduino you need to find out the address i2c using for this module. in my case the address is 0x27, some reported their address is 0x3f etc but you really test it yourself because it might different between the address i'm currently using with the one you'll be using.

I'm not gonna explain it deeper about this thing, you'll find more detailed tutorial here and don't forget to download the library because in this tutorial we're gonna using the library from that sites.

At my first attempt i've got my LCD glow without the text, If you get yourself in same situation try to rotate the contrast potentiometer first in back of your i2c (using screwdriver) if not working check also the solder between i2c to lcd especially if you solder it your self or bought from china.

Make really sure the LCD works first so it will be easier to troubleshoot the next step.

After it working we can start to the sensor part

  • Connect Data Signal to D2 Arduino
  • Connect VCC to 3v3 Arduino
  • Connect GND to GND

Because the working voltage is 3~5v there is no reason to using higher voltage that will need to use a breadboard.

Next step is to verify, upload the sketch pull the usb, and plug the battery

If you got a problem please discuss it here, like I said before this is my first project, I hope it works for you too..


Note for the library: make sure the namefile you declare in sketch same with the namefile in the library.


/* DHT-22 sensor with 12c 16x2 LCD with Arduino uno
   Temperature and humidity sensor displayed in LCD
   based on: and for the i2c LCD library by Michalis Vasilakis
   Recompile by adhitadhitadhit
   Notes: use LCD i2c Library from link above, i'm not sure why but new Liquidcristal library from Francisco Malpartida  isn't working for me
   other thing, check your */

#include <dht.h> // sensor library using lib from
#include <LiquidCrystal_I2C.h> // LCD library using from for the i2c LCD library 
#include <Wire.h> 
dht DHT;

#define DHT22_PIN 2     // DHT 22  (AM2302) - pin used for DHT22 
LiquidCrystal_I2C lcd(0x27,16,2);  // set the LCD address to 0x27 after finding it from serial monitor (see comment above) for a 16 chars and 2 line display

float hum;  //Stores humidity value
float temp; //Stores temperature value

void setup()
    lcd.init();                      // initialize the lcd 
  // Print a message to the LCD.

void loop()
    int chk = DHT.read22(DHT22_PIN);
    //Read data and store it to variables hum and temp
    hum = DHT.humidity;
    temp= DHT.temperature;
    //Print temp and humidity values to LCD
    lcd.print("Humidity: ");
    lcd.print("Temp: "); 
    delay(2000); //Delay 2 sec between temperature/humidity check.


dht22 i2c Backpack
Dht22 i2clcd cicmjf8gcf


Similar projects you might like

Arduino DTH22 Humidity Temperature With LCD I2C 16x2 Display

Project tutorial by Team GiftedMedia

  • 87 respects

DHT11 Humidity + Temperature Sensor with 16x2 LCD display

Project showcase by onatto22

  • 58 respects

Temperature and Humidity Data Logger

Project tutorial by Wimpie van den Berg

  • 37 respects

Temperature Monitoring With DHT22 & Arduino

by Muhammad Afzal

  • 151 respects

Temperature and Humidity Logger (Using Arduino)

Project showcase by lmsousa

  • 47 respects

Temperature and Humidity Logger Per Hour

Project tutorial by lefteris1993

  • 17 respects
Add projectSign up / Login