Noteworthy idiosyncracies of the DHT22
These are a few things I learnt that do not fit neatly into any other part of the report.
Reading DHT22 too fast
It is best not to try and read the device faster than about 0.5Hz. See more details here on the speed of sensor response and why going fast may appear to work but be unreliable.
DHT22 returns saved values from memory
It is not mentioned in most versions of the datasheet, but does appear in this one. When you request a value from the DHT22/AM2302 it returns a saved value from the time that you last requested a reading. It then makes a new reading, saves it to memory and goes to sleep. This means that when a reading is requested the response is very fast since there is no delay while the measurement is taken. So long as you poll values every few seconds, this will not be any limitation but if you only take a reading every few hours, you will need to take two readings in quick succession and only use the second one. (Thanks to correspondent Luca Trisciani who pointed this out to me.)
In contrast, the SHT71 takes a new measurement on demand. This can lead to the SHT71 blocking software operation for about 300 millisec while it reads whereas the DHT22 can respond with its cached value in a couple of milliseconds. Neither behaviour is commonly a problem, but worth considering in software design and may be a relevant criterion for certain specialised applications.
If you have comments or suggestions feel free to contact me:
2016-02-12 6:24 PM