For over a year I would replace the DHT22 (or its small brother the DHT11) outdoors after a few months if I cared to do so.
It’s located in a cutout of a small Tupperware container strapped under my deck roof. No rain can get to it but the roof is no completely opaque and lets a fair amount of sun through.
Although the temperature function works well. The humidity feature completely fails.
I thought it was condensation, thus I removed it from the Tupperware and I added an always on computer fan. This only caused the parts to rust.
I ended up putting it back in the Tupperware but a slightly more sunny location. In direct sunlight in the Tupperware box it sticks out of when the temp reaches 45c the humidity goes down. (Relative humidity?)
Currently I’ve moved the box and sensors onto the house and once again the humidity sensor is stuck at 99%. (Though it is the rainy season in Japan it shouldn’t be at 99 all the time)
- I should take it in and stick it in a bag of selica gel.
- I should let the sensor hang on it’s own.
- Nail polish. Or other coating to protect sensor pcb from elemental damage.
- Replace it with something else BME280 or AHT10 (there are others but I don’t want to test more, only if these are not satisfactory)
As aliexpress will take at least a week to japan I’ve ordered some replacements.
The BME280 (not to be confused with the BMP280) has temperature, humidity and atmospheric pressure.
[not sure about the specs, there is a 3.3v version and a 1.8-5v version]
The AHT10 temperature and humidity. As mentioned about “nail polish” I might lather the pcb with some.