The document discusses the DHT11 and DHT22 humidity and temperature sensors. It provides details on their specifications including temperature and humidity ranges, resolution, operating voltage, current supply, and sampling period. It also discusses installing the necessary DHT and Adafruit Unified Sensor libraries to use the sensors with an Arduino.
The document discusses the DHT11 and DHT22 humidity and temperature sensors. It provides details on their specifications including temperature and humidity ranges, resolution, operating voltage, current supply, and sampling period. It also discusses installing the necessary DHT and Adafruit Unified Sensor libraries to use the sensors with an Arduino.
The document discusses the DHT11 and DHT22 humidity and temperature sensors. It provides details on their specifications including temperature and humidity ranges, resolution, operating voltage, current supply, and sampling period. It also discusses installing the necessary DHT and Adafruit Unified Sensor libraries to use the sensors with an Arduino.
The document discusses the DHT11 and DHT22 humidity and temperature sensors. It provides details on their specifications including temperature and humidity ranges, resolution, operating voltage, current supply, and sampling period. It also discusses installing the necessary DHT and Adafruit Unified Sensor libraries to use the sensors with an Arduino.
humidity and temperature sensor. It uses a capacitive humidity sensor and a thermistor to measure the surrounding air. Compared to the DHT22, this sensor is less precise, less accurate and works in a smaller range of temperature and humidity, but its smaller and less expensive. Introducing the DHT11 and DHT22 Sensors • The DHT11 and DHT22 sensors are used to measure temperature and relative humidity. These are very popular among makers and electronics hobbyists. • These sensors contain a chip that does analog to digital conversion and spit out a digital signal with the temperature and humidity. This makes them very easy to use with any microcontroller. DHT11 vs DHT22
DHT11 DHT22
Temperature range 0 to 50 ºC +/-2 ºC -40 to 80 ºC +/-0.5ºC
Humidity range 20 to 90% +/-5% 0 to 100% +/-2% Humidity: 1% Humidity: 0.1% Resolution Temperature: 1ºC Temperature: 0.1ºC Operating voltage 3 – 5.5 V DC 3 – 6 V DC Current supply 0.5 – 2.5 mA 1 – 1.5 mA Sampling period 1 second 2 seconds Price $1 to $5 $4 to $10 What is humidity?
• Humidity is the water vapor around you mixed
with air. It is measured in per cents. So, if the humidity is 60 per cent(which is the average humidity), then 60 per cent of the air around you is water vapor. If it is 100%, then it means either the sensor is not correct, the sensor is broken/damaged, the Arduino crashed, the Arduino can't receive any signal, there's an error in the code or you're underwater. If it's 0%, it means all the reasons above except the last one, you're in space or you're in the middle of a dessert. Type of Sesor • There are two different versions of the DHT11 you might come across. One type has four pins, and the other type has three pins and is mounted to a small PCB. The PCB mounted version is nice because it includes a surface mounted 10K Ohm pull up resistor for the signal line. Here are the pin outs for both versions: DHT Pinout
DHT pin Connect to
1 5V Any digital GPIO; also connect a 2 10k Ohm pull-up resistor 3 Don’t connect 4 GND Installing Libraries
• To read from the DHT sensor, we’ll use the DHT
library from Adafruit. To use this library you also need to install the Adafruit Unified Sensor library. Follow the next steps to install those libraries. • Open your Arduino IDE and go to Sketch > Include Library > Manage Libraries. The Library Manager should open. • Search for “DHT” on the Search box and install the DHT library from Adafruit. • After installing the DHT library from Adafruit, type “Adafruit Unified Sensor” in the search box. Scroll all the way down to find the library and install it.