ESPHome Temp & Humidity Sensor Glitch

I’m getting some weird readings after setting up a few d1-mini’s with DHT22’s sensors. while plugged into the usb ports on my PC they report correct temps and humidity readings, however as soon as I plug them into a wall wart or even the usb-c port on my APC UPS they start spitting out bad readings. Bad as in -10c/14f and 17% vs 23/73 and 42%. I’ve tried different cables, different wall warts, and I even tried swapping the sensors between the boards.

Please tell me I’m missing something simple here? :S

Are you using a pull-up resistor?

These aren’t naked dht22 sensors, they came soldered onto a small circuit board. I believe there is a resistor built on it it.

Perhaps your cables from ESP to DHT22 are too long and are acting as an antenna for the EMI given off by the power supplies. Some power supplies can be very noisy. A picture of your setup may spark more interest.

That is a resistor correct? Currently have it connected to my PC via the USB hub on the keyboard, also using a USB c to a adapter on the one end. Works fine like this. Move the cord to the USB c brick at the back of my desk and it’s bad.

It seems I have stumbled upon the solution, on reddit of all places. Updating this so a solution is on the topic. Now I just have to calibrate the humidity, it’s about 5-7% higher than all my other sensors, temps seem to be spot on tho.

Had to add “model: DHT22” to the sensor platform to make it:

  - platform: dht
    model: DHT22
    pin: D2
      name: "Temperature"
      name: "Humidity"
    update_interval: 30s

Ive had some that do and some that dont. It looks like yours does though.
I found this if its of any use to you.

It’s that 4.7k resistor between VCC and Out. Thats what your looking for.

1 Like

Looks to have a 4.7k resistor. I have a dht22, not a dht11 however they are similar.

OH! is that what the 11 and 22 signify? Well I just had no idea