Skip to content
Advertisements

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.

 

Advertisements

Yassine View All

Electronics, Automation engineering student... I try to share my little experience with other electronics amateur.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: