30156| 6
|
SHT10与DHT22的精度比较 |
本帖最后由 lijw2014 于 2014-4-1 12:12 编辑 到手DHT22温湿度传感器,网上号称可替代SHT1x,遂简单地做了一下对比实验 主要器件: DFROBOT DHT22 2个 DFROBOT SHT1x 1个 DFROBOT Nano 3.0 1个 DFROBOT Nano扩展板 1个 天津凤洋 温湿度计 1个 Arduino程序如下: #include <DHT22.h> #include <SHT1x.h> SHT1x SHT(7, 8); DHT22 DHT1(2); DHT22 DHT2(4); void setup() { Serial.begin(9600); } void loop() { Serial.print("SHT: "); Serial.print(SHT.readTemperatureC(),2); Serial.print("C "); Serial.print(SHT.readHumidity(),2); Serial.print("%"); DHT22_ERROR_t errorCode; Serial.print(" DHT1: "); errorCode = DHT1.readData(); if(errorCode==DHT_ERROR_NONE){ Serial.print(DHT1.getTemperatureC(),2); Serial.print("C "); Serial.print(DHT1.getHumidity(),2); Serial.print("%"); } else { Serial.print("Error"); } Serial.print(" DHT2: "); errorCode = DHT2.readData(); if(errorCode==DHT_ERROR_NONE){ Serial.print(DHT2.getTemperatureC(),2); Serial.print("C "); Serial.print(DHT2.getHumidity(),2); Serial.print("%"); } else { Serial.print("Error"); } Serial.println(""); delay(3000); } 程序运行输出如下: 就温度读数来看,SHT1x和DHT22相差不大,两者与机械温湿度计的温度测量值也差不多,故在温度测量的准确性,SHT1x和DHT22差不多 但湿度方面,SHT1x和DHT22就相差很大了,有超过10%RH的差距,而SHT1x与机械温湿度计的湿度测量值较接近,故判断DHT22的湿度测量准确性很低,若要在项目上应用须对读数进行修正。 稳定性或灵敏度方面,相对地,SHT1x较灵敏,DHT22较稳定 |
© 2013-2024 Comsenz Inc. Powered by Discuz! X3.4 Licensed