null

AM2302 (DHT22) Temp & Humidity Sensor

(No reviews yet) Write a Review
SKU:
PEDTH48
Weight:
0.02 KGS
Shipping:
Calculated at Checkout
  • AM2302 (DHT22) Temp & Humidity Sensor
  • AM2302 (DHT22) Temp & Humidity Sensor
  • AM2302 (DHT22) Temp & Humidity Sensor
KES700.00

Description

Overview 
AM2302 humidity sensor digital temperature and humidity module is a calibration with digital signal output temperature and humidity composite sensor. It uses a dedicated digital module acquisition technology and temperature and humidity sensing technology to ensure that the product has a very high reliability and excellent long-term stability. The sensor includes a capacitive wetting element and a high-precision temperature measuring element and is connected to a high-performance 8-bit microcontroller. So the product has excellent quality, ultra-fast response, anti-interference ability, cost-effective and so on. Each sensor is calibrated in an extremely accurate humidity calibration room. The calibration coefficients are stored in the form of a program in the microcontroller, and these calibration coefficients are called internally during the processing of the detection signal. Standard single bus interface, the system integration has become simple and quick. Ultra-small size, very low power consumption, signal transmission distance of up to 20 meters or more, making it the most demanding applications for all types of applications. The product is 3-lead (single bus interface) for easy connection. Special package can be provided according to user needs. 
 
Applications 
HVAC, dehumidifier, testing and testing equipment, consumer goods, automotive, automatic control, data loggers, home appliances, humidity regulators, medical, weather stations, and other related humidity detection control. 
 
Highlights 
ultra-low energy consumption, transmission distance, all automated calibration, the use of capacitive humidity components, fully interchangeable, standard digital single bus output, excellent long-term stability, the use of high-precision temperature measurement components.
 
Parameters 
Size: 40 x 23mm 
Weight: 4g 
Voltage: 5V 
port: digital two-way single bus 
Temperature range: -40-80 ℃ ± 0.5 ℃ 
Humidity range: 20-90% RH ± 2% RH

Wiring Diagram for connecting Keyes AM2302 DHT-22 Module to a Arduino Board

 

The breakout board already has the pullup resistor installed so we do not need to connect a resistor to our circuit.

This sensor will run from 3.3V. So if you are using an Arduino Board that only has 3.3V then connect the power pin to the 3.3V output on the Arduino instead of 5V. This would be the red wire that is shown in the diagrams below.

Software

To test this sensor we can use sample sketch shown below. You can download the sketch file and the cactus.io DHT22 library to communicate with the sensor. It reads the DHT22 every 2 seconds and prints the results to the console on the computer connected to the USB port on the Arduino.

We are using digital pin 2 to connect to the data pin on the sensor. If you are using a different digital pin then you will need to change the pin number defined on line 6 in the sketch code.

Keyes AM2302 DHT22 Sample Sketch
 
// Example sketch for DHT22 humidity - temperature sensor
 
// Written by cactus.io, with thanks to Adafruit for bits of their library. public domain
 
#include "cactus_io_DHT22.h"
 
#define DHT22_PIN 2 // what pin on the arduino is the DHT22 data line connected to
 
// For details on how to hookup the DHT22 sensor to the Arduino then checkout this page
 
// http://cactus.io/hookups/sensors/temperature-humidity/dht22/hookup-arduino-to-dht22-temp-humidity-sensor
 
// Initialize DHT sensor for normal 16mhz Arduino.
 
DHT22 dht(DHT22_PIN);
 
// Note: If you are using a board with a faster processor than 16MHz then you need
 
// to declare an instance of the DHT22 using
 
// DHT22 dht(DHT22_DATA_PIN, 30);
 
// The additional parameter, in this case here is 30 is used to increase the number of
 
// cycles transitioning between bits on the data and clock lines. For the
 
// Arduino boards that run at 84MHz the value of 30 should be about right.
 
void setup(){
 
Serial.begin(9600);
 
Serial.println("DHT22 Humidity - Temperature Sensor");
 
Serial.println("RH\tTemp (C)\tTemp (F)\tHeat Index (C)\tHeat Index (F)");
 
dht.begin();
 
}
 
void loop(){
 
// Reading temperature or humidity takes about 250 milliseconds!
 
// Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
 
dht.readHumidity();
 
dht.readTemperature();
 
// Check if any reads failed and exit early (to try again).
 
if (isnan(dht.humidity) || isnan(dht.temperature_C)) {
 
Serial.println("DHT sensor read failure!");
 
return;
 
}
 
Serial.print(dht.humidity); Serial.print(" %\t\t");
 
Serial.print(dht.temperature_C); Serial.print(" *C\t");
 
Serial.print(dht.temperature_F); Serial.print(" *F\t");
 
Serial.print(dht.computeHeatIndex_C()); Serial.print(" *C\t");
 
Serial.print(dht.computeHeatIndex_F()); Serial.println(" *F");
 
// Wait a few seconds between measurements. The DHT22 should not be read at a higher frequency of
 
// about once every 2 seconds. So we add a 3 second delay to cover this.
 
delay(3000);
 
}

Sketch Output

 
View AllClose