I'm wondering if anyone has any insight into a problem I'm experiencing with a DHT22 sensor. I'm using it try and take reading from within a Filament Dry Box for 3D printing, meaning I've added silica to this box causing it to get very dry.

My sensor and code work great outside the box, and I can reliably record values frequently. However, after placing the sensor inside the box, after a while it is unable to read. I debugged through my code and it seems it just fails to read from the sensor.

I've tried with different DHT22s and different power sources. I believe it is failing because of how dry it gets in the box (~20% Relative Humidity). I know the sensor should be able to take readings this low, but I'm wondering if additional static is building up in the plastic box because of the dry environment. This is further evidenced by me opening the box, which brings the humidity back up temporarily, and enables the sensor to continue working.

A few other specifics: The specific sensor: https://a.co/d/hEPxIi7 And the sensor is directly hooked up to a Raspberry Pi Zero W, being supplied 5V from the board.

Does anyone have insight into how I may be able to get the sensor to reliably read? I've attempted to "ground" the box in some manner by adding tin foil to jump the lid, and added dryer sheets to reduce the static as well, neither of which seemed to reliably work.

  • \$\begingroup\$ It appears to be a bad sensor. Check with your supplier about a replacement. There add says 0 to 100% so I do not see any way you can get out of that range. \$\endgroup\$
    – Gil
    Jun 11 at 1:55
  • \$\begingroup\$ That makes sense, however that'd mean I got 2 sensors that both fail at 20 percent. I wonder if they just have a different limit? \$\endgroup\$ Jun 11 at 2:42
  • \$\begingroup\$ @Gil this lead me to think about if it could just be a problem with the library I'm using, tried a different set of code and it seems that for whatever reason the library I'm using fails below some percentage (my guess is below 25.5%) \$\endgroup\$ Jun 11 at 4:42


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.