DHT 22
DHT 22
Apparatus:
1. Arduino UNO & programming cable
2. DHT22 sensor
3. 16x2 LCD module
4. 10k ohms trimmer
5. 220 ohms resistor
6. Breadboard
7. Connecting wires
Pinouts:
1. DHT22
The DHT22 is a basic, low-cost digital temperature and humidity
sensor. It uses a capacitive humidity sensor and a thermistor to measure
the surrounding air, and spits out a digital signal on the data pin (no
analog input pins needed). It's fairly simple to use, but requires careful
timing to grab data. The only real downside of this sensor is you can only
get new data from it once every 2 seconds, so when using our library,
sensor readings can be up to 2 seconds old.
2. 16x2 LCD
A 16x2 LCD means it can display 16 characters per line and there are
2 such lines. In this LCD each character is displayed in 5x7 pixel matrix. The
16 x 2 intelligent alphanumeric dot matrix display is capable of displaying
224 different characters and symbols. This LCD has two registers, namely,
Command and Data.
3. Arduino UNO
Arduino Uno is a microcontroller board based on the ATmega328P. It
has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6
analog inputs, a 16 MHz ceramic resonator, a USB connection, a power jack,
an ICSP header and a reset button. It contains everything needed to support
the microcontroller; simply connect it to a computer with a USB cable or
power it with a AC-to-DC adapter or battery to get started.
Circuit:
DHT22
10k
220 R
trimmer
16x2 LCD
Procedure:
a) Connect the circuit as shown.
Connect the DHT22 data pin to pin 7 of Arduino.
Connect the LCD as shown. The 10k trimmer is used to adjust the contrast of LCD.
We use the 5V power supply from Arduino
Program:
Upload the following program to Arduino
void setup()
{
//start communication with DHT22 & LCD
dht.begin();
lcd.begin(16, 2);
}
void loop()
{
//Read temprature & humidity from DHT22
humi = dht.readHumidity();
temp= dht.readTemperature();