DHT11 and DHT22 only work without resistor

Did some searching but couldn’t find anyone experiencing the same weird issue I’ve found with DHT11 and DHT22 sensors, so figured I’d ask the question. Most folks are adding resistors.

I have several DHT11 and DHT22 sensors that I wired according to the recommendation including a 4.7 K ohm resistor. Hooked them up to a NodeMCU for testing using the default config HERE and neither would work.

Here’s the DHT11 sensor I used… DHT11

After quite some time I cut out the resistors on the DHT11 and DHT22 and they started working perfectly?? I am really confused why that would be the case?? Thoughts?

Was the resistor between data and vcc? If so it should have worked. All i can think is to test the resistance of the resistor and check its not been labled wrong.

4.7 ohm? Is that a typo or did you really use 4.7 ohm? It should be 4.7 KILOohm…
But, if sensor already have resistor onboard external is generally not needed, if wires are not too long. Adding it might lower resistance value to a point when it’s too low and then doesn’t work anymore.

Didn’t spot the 4.7 ohm bit. Probably the issue.

Sorry to ruin the konspiracy theory… it’s K ohm :stuck_out_tongue:

Thanks @Arh… double, triple, checked :slight_smile:

Why not show us your wiring?

Doesn’t tell us where you placed it.

Hey @nickrout here you go… The wiring and placement is identical to below… as per the standard setup, and way I have been doing it for years.

Wiring-Fritzing-Connecting-DHT11-Temperature-Humidity-Sensor-with-ESP8266-NodeMCU

The DHT 11’s I’ve been using include the resistor. I’ve never had to add one. Could the issue be having (possibly) two 4.7k’s in series?

Hi @phillipzx3 thought that to, so measured resistance across connectors vcc and data and not showing 4.7K resistance. Blew my mind, so no idea. I had heard some GPIO ports on NodeMCU have built in resistors… but I’ve never seen it, so figure it is not true.

They do. Not sure where you heard otherwise.

What board are you using, and what pins? I can’t even tell from this thread whether it is an 8266 or 32.

See below from my first post @nickrout Nick…

Default config… note reference to D2

# Example configuration entry
sensor:
  - platform: dht
    pin: D2
    temperature:
      name: "Living Room Temperature"
    humidity:
      name: "Living Room Humidity"
    update_interval: 60s

I saw that, but many many devices are branded as nodemcu, including some esp32 devices. D2 does point to it being a esp8266.

As far as internal resistors is concerned, this https://www.espressif.com/sites/default/files/documentation/esp8266-technical_reference_en.pdf manual says

ESP8266EX has 17 GPIO pins which can be assigned to various functions by programming
the appropriate registers.
Each GPIO can be configured with internal pull-up or pull-down, or set to high impedance

I’ll also add that NodeMCU is firmware, not the hardware :slight_smile:

Hi @nickrout

To answer your question… yes, it is an ESP8266, and thanks for the explanation of the NodeMCU, I wasn’t aware that was firmware.

I think you might be on to something re the internal pull-up or pull-down, maybe that is what is going on here. I will do some research and see if I can figure out how to turn the internal pull-up or pull-down on/off.

I see there is a way for esphome to change the pullup, but have never used it before. Wondering what the default setting is?

# Advanced:
  pin:
    number: D0
    inverted: true
    mode:
      input: true
      pullup: true

I have some devkit v1 ESP32 units, so do they have the internal pull-up or pull-down as well? I am thinking I might try an ESP32 instead of the ESP8266.

Thanks, Mark