Danh sách sản phẩm

Cảm biến độ ẩm, nhiệt độ DHT22 Chưa ra chân

Mã sản phẩm: IMA143   |   Tình trạng: Còn 10 sản phẩm có sẵn
115.000₫
  • Nhập IMA-90 giảm 90%, tối đa 2K
  • Nhập IMA-5K giảm 5k, đơn từ 199K
  • Nhập IMA-35K giảm 35k, đơn từ 499K

Mô tả sản phẩm

Cảm biến độ ẩm nhiệt độ DHT22 là cảm biến thông dụng tích hợp vừa đo được nhiệt độ và độ ẩm, độ chính xác khá cao. Giao tiếp với vi điều khiển qua chuẩn giao tiếp 1 dây.

Thông số kỹ thuật:

  • Nguồn sử dụng: 3~5 VDC.
  • Dòng sử dụng: 2.5mA max (khi truyền dữ liệu).
  • Đo tốt ở độ ẩm 0100%RH với sai số 2-5%.
  • Đo tốt ở nhiệt độ -40 to 80°C sai số ±0.5°C.
  • Tần số lấy mẫu tối đa 0.5Hz (2 giây 1 lần)
  • Kích thước 27mm x 59mm x 13.5mm (1.05" x 2.32" x 0.53")
  • Chân tín hiệu: 5VDC(+) | OUT | GND (-) (chân out nối trực tiếp với chân giao tiếp của VĐK không cần trở kéo vì đã có sẵn trên mạch).

Sơ đồ chân:


Code tham khảo Arduino: 

#include "DHT.h"

#define DHTPIN 2     // what digital pin we're connected to

// Chọn loại cảm biến cho phù hợp ---------------------------------------------------------------------------------------
//#define DHTTYPE DHT11   // DHT 11
#define DHTTYPE DHT22   // DHT 22  (AM2302), AM2321
//#define DHTTYPE DHT21   // DHT 21 (AM2301)


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");
}


Tài liệu tham khảo:

Video tham khảo:

Khách hàng nhận xét