Skip to content

Measure Temperature / Humidity and Heat Index using DHT 21 (AM 2301) + Arduino + LCD

 

Hello, today we have another Temperature and Humidity sensor to test it’s from the DHT serie, I already did a tutorial about DHT 11 DHT 22 and AM 2320 sensors, wiring and simple reading and also using LCD i²c screen.

capteur-de-temperature-et-humidite-arduino-raspberry-dht21-en-boitier-cable

It’s a digital sensor with capacitive humidity sensing and already calibrated, the module is said to have a high performance 8 bit chip to ensure the correct reading and transmitting the data, but as you can see in the video my module doesn’t have good humidity reading, as I said it takes very long time to comeback from 99% to normal reading which is 50%-60% here where I live, I may have a bad sensor, although it shows correct values before I blow on it to test it…

 

A

Range: According to the datasheet

B.png

Wiring:

W1.png

The module can be powered by both 3.3V or 5V and the data pins goes to a digital pin here I choosed 2, the module can already have 3 wires (RED/BLACK/YELLOW) for (Vcc/GND/Signal) or you can open it inside to check the wiring.

W2.png

And here’s the wiring in case you want to add an LCD i2c screen, you can power the module by 3.3V and the LCD with 5V if you want or power them both from 5V.

Libraries:

Install the libraries and here you go !!

Codes:

  • The first code I tried is just the example from the library it works with various DHTs
  • The second code works with LCD i2c screen : –Download Celsius code here

Download Fahrenheit code here

That’s it, If you have any problem contact me.

 

Yassine View All

Automation and Electrical Engineer, Electronics amateur trying to share my little projects.

4 thoughts on “Measure Temperature / Humidity and Heat Index using DHT 21 (AM 2301) + Arduino + LCD Leave a comment

Leave a Reply

%d bloggers like this: