![453d4a2422f56947772a913b23ed9b00.png](https://img-blog.csdnimg.cn/img_convert/453d4a2422f56947772a913b23ed9b00.png)
DHT11和DHT21是学习单总线通信中常见的传感器,在毕业设计中也常常用来测量环境的温湿度数据。
下面对DHT11和DHT21进行简单的对比:
DHT11:
测量范围:20-90% RH 0-50℃
测湿精度:±5% RH
测温精度:±2℃
分辨力:1
![62e65af0386d66e49882cba87dc1487b.png](https://img-blog.csdnimg.cn/img_convert/62e65af0386d66e49882cba87dc1487b.png)
DHT11引脚说明(正面观看,左边的为1脚):
![09febcfc08189a1fd0a9ee6b0b676564.png](https://img-blog.csdnimg.cn/img_convert/09febcfc08189a1fd0a9ee6b0b676564.png)
![99b9e2e1854fc4f5700702404bb7d417.png](https://img-blog.csdnimg.cn/img_convert/99b9e2e1854fc4f5700702404bb7d417.png)
DHT21(AM2301):
测量范围:0-99.9% RH -40~+80℃
测湿精度:±3% RH
测温精度:±0.5℃
分辨力:0.1%RH/0.1℃
![9f23caf42ded28da863e552ee4695eae.png](https://img-blog.csdnimg.cn/img_convert/9f23caf42ded28da863e552ee4695eae.png)
![64ec637fea37485f461ad389a6a67b57.png](https://img-blog.csdnimg.cn/img_convert/64ec637fea37485f461ad389a6a67b57.png)
典型应用电路:
![7e78efd983e177e448b174cea3319674.png](https://img-blog.csdnimg.cn/img_convert/7e78efd983e177e448b174cea3319674.png)
说明:
(1)