Skip to main content

Read temperature and humidity from DHT 22 Sensor using Arduino

DHT 22 is low cost temperature and humidity sensor. This sensor has more accuracy compared to previous version (DHT 11). See the comparison here. My DHT 22 comes with in breakout board, so there is no need to add additional resistor to drop the voltage. This sensor has 3 pins.




Above photo shows DHT 22 compared to GY BMP 280. The pins out is easy.

DHT 22 (From left to right)
  • VCC
  • Output
  • GND


Connecting sensor to Arduino also easy.
  • VCC <-----> Arduino 5V
  • Output <-----> Digital Pin 2
  • GND <------> Arduino GND
Connect Arduino with computer and run Arduino IDE. Install Adafruit DHT sensor library from Libraries Manager.

Install Adafruit Unified Sensor.



Install DHT Sensor Library.


Download test sketch from my github : https://github.com/satujamsaja/Arduino/tree/master/dht22
and run the sketch.

Here is the result:


Good luck.


Comments

Popular posts from this blog

Read temperature and barometric pressure from GY BMP 280 using Arduino

This sensor based on BMP 280 digital pressure sensor made by Bosch. You can find the complete datasheet here . This small sensor is quite impressive with it's accuracy. It claimed to be ±1 hPa in measuring barometric pressure, ±1.0°C in temperature measurement and ±1 meter in altitude accuracy. Pretty impressive right ?

Using LCD 2004a I2C on project with Arduino

On previous post measurement sensor results displayed on serial monitor. This is good when we are on development stage. When we want something more independent we need external display. I have purchased a few type of display. For now we will use LCD 2004 for external display.

RDA5807M FM radio module for Arduino

I was surprised with it's ability to receive FM radio broadcast without any problem in such a small module. The size is not bigger than a coin, really small. It may a bit difficult for wiring but it can be done. You can also add small power audio amplifier and use small speaker directly. Here is the module chip, small power amplifier in prototyping pcb.