描述
DHT22 單總線數字溫濕度感測器模組 AM2302 溫度濕度 傳感器
DHT22 單總線數字溫濕度感測器模組 AM2302 溫溼度傳感器 是一款含有已校準數位信號輸出的溫濕度複合 感測器。它應用專用的數位模組採集技術和溫濕度傳感技術,確保產品具有極 高的可靠性與卓越的長期穩定性。感測器包括一個電容式感濕元件和一個NTC 測溫元件,並與一個高性能8位單片機相連接。因此該產品具有品質卓越、超 快回應、抗干擾能力強、性價比極高等優點。每個AM2302 感測器都在極為精確 的濕度校驗室中進行校準。校準係數以程式的形式儲存在OTP記憶體中,感測器 內部在檢測信號的處理過程中要調用這些校準係數。單線制序列介面,使系統 集成變得簡易快捷。超小的體積、極低的功耗,信號傳輸距離可達20米以上, 使其成為各類應用甚至最為苛刻的應用場合的最佳選則。產品為 4 針單排引 腳封裝。連接方便,特殊封裝形式可根據使用者需求而提供。
- 1.工作電壓:3V–5.5V
- 2.傳感器型號:奧松AM2302溫濕度傳感器
- 3.信號輸出形式:數字信號
- 4.溫度測量範圍:-40℃–80℃
- 5.測量精度:0.5℃
- 6.濕度測量範圍:0–100%RH
- 7.測量精度:2%RH
- 8.分辨率:16位
- 9.帶固定螺絲孔,方便安裝及固定。孔徑2.6mm
二、接線說明:
“+”:接電源正極
“-“:接電源負極
NC:空腳
“out”:接單片機IO口
技術文件與資源
// Example testing sketch for various DHT humidity/temperature sensors // Written by ladyada, public domain #include "DHT.h" #define DHTPIN 2 // what digital pin we're connected to // Uncomment whatever type you're using! //#define DHTTYPE DHT11 // DHT 11 #define DHTTYPE DHT22 // DHT 22 (AM2302), AM2321 //#define DHTTYPE DHT21 // DHT 21 (AM2301) // Connect pin 1 (on the left) of the sensor to +5V // NOTE: If using a board with 3.3V logic like an Arduino Due connect pin 1 // to 3.3V instead of 5V! // Connect pin 2 of the sensor to whatever your DHTPIN is // Connect pin 4 (on the right) of the sensor to GROUND // Connect a 10K resistor from pin 2 (data) to pin 1 (power) of the sensor // Initialize DHT sensor. // Note that older versions of this library took an optional third parameter to // tweak the timings for faster processors. This parameter is no longer needed // as the current DHT reading algorithm adjusts itself to work on faster procs. DHT dht(DHTPIN, DHTTYPE); void setup() { Serial.begin(9600); Serial.println("DHTxx test!"); dht.begin(); } void loop() { // Wait a few seconds between measurements. delay(2000); // Reading temperature or humidity takes about 250 milliseconds! // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor) float h = dht.readHumidity(); // Read temperature as Celsius (the default) float t = dht.readTemperature(); // Read temperature as Fahrenheit (isFahrenheit = true) float f = dht.readTemperature(true); // Check if any reads failed and exit early (to try again). if (isnan(h) || isnan(t) || isnan(f)) { Serial.println("Failed to read from DHT sensor!"); return; } // Compute heat index in Fahrenheit (the default) float hif = dht.computeHeatIndex(f, h); // Compute heat index in Celsius (isFahreheit = false) float hic = dht.computeHeatIndex(t, h, false); Serial.print("Humidity: "); Serial.print(h); Serial.print(" %t"); Serial.print("Temperature: "); Serial.print(t); Serial.print(" *C "); Serial.print(f); Serial.print(" *Ft"); Serial.print("Heat index: "); Serial.print(hic); Serial.print(" *C "); Serial.print(hif); Serial.println(" *F"); }
DHT22 Single Bus Digital Temperature And Humidity Sensor 2302 Module
1. Size: 28.2 mm (length) * 13.1 mm (width) * 10 mm (high).
2. Weight: 6 g.
3. Working voltage: 3 V – 5.5 V.
4. The sensor models: the loose AM2302 temperature and humidity sensor.
5. Signal output form: digital signal.
6. Temperature measurement range: – 40c to 80c.
7. Measuring accuracy: 0.5c.
8. The humidity measuring range: 0-100% RH.
9. Measuring accuracy: 2% RH.
10. Resolution: 16.
11. With fixed screw holes, convenient installation and fixation. Diameter of 2.6 mm.
Package Contents:
1 x DHT22 Single Bus Digital Temperature And Humidity Sensor 2302 Module.