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.
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…
Range: According to the datasheet
Wiring:
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.
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:
- LCD i2c NewLiquid library Download here
- DHT Adafruit sensor Download here
- Don’t forget you should already have the Adafruit sensor library Download here
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.
Categories
Yassine View All
Automation and Electrical Engineer, Electronics amateur trying to share my little projects.
how do you find the am2301 on fritzing ? i have to do a scheme with it and i cant find it
thanks a lot
https://github.com/adafruit/Fritzing-Library/blob/master/parts/AM2302%20Humidity%20and%20Temperature%20Sensor.fzpz
how can i add a buzzer and message to smartphone to warn for high heat index?