DHT11/The first reading/04. 3.3 V or 5 V
The first reading · 04 of 9

3.3 V or 5 V

R1, the 10 kΩ pull-up on the TK38, runs from VCC to DATA, and you cannot take it off from outside. So whatever you feed the supply pin is what the signal wire idles at, which makes VCC the one wire on this board that can cost you something.

The resistor decides

Pick a supply and a board and watch what the data pin sees.

What VCC does to DATA
3.3 V supply · 3.3 V logic
What you feed VCC
What your board's pins are rated for
DATA idles at
3.3 V
Pin is rated
3.3 V
Sensor wants
3–5.5 V
This one is safe. VCC at 3.3 V puts the data line at 3.3 V, which is exactly what your 3.3 V pins expect, and it is inside the DHT11’s 35.5 V range. There is nothing else to decide: no series resistor, no pull-up to add, no level shifting.

R1 runs from VCC to DATA. When nothing is pulling the wire down, which is nearly all the time because a reading lasts about 24 ms and comes once every two seconds, R1 holds DATA at the supply voltage. Exactly the supply voltage: there is no divider and no series resistor anywhere on the board.

So the supply pin and the signal pin are one decision, not two.

The rule

Your boardVCC goes toBecause
ESP32, ESP32-S3, Pico3V3the pins are rated for 3.3 V, and DATA idles at VCC
Arduino Uno5Vthe pins run at 5 V and expect a 5 V high

The DHT11 runs anywhere from 3 to 5.5 V (datasheet §4), so both rails suit the sensor. Your board decides which one.

What goes wrong

Feed the TK38 5 V next to a 3.3 V processor and it works. It reads correctly, it answers every time, and nothing on screen suggests a problem. Meanwhile the input pin sits 1.7 V over its rating whenever the line is idle.

ESP32 inputs have protection diodes to the 3.3 V rail, so what happens is a small current flowing through the pin into the rail, all day. Boards do survive it. Some fail months later for no visible reason, which is worse than a part that dies at once and tells you why.

The fix is one wire moved: VCC to 3V3.

Room underneath

On 3V3 the DHT11 has 0.3 V to spare above its 3 V minimum. A board whose 3V3 rail dips during Wi-Fi transmits can eat into that. The datasheet suggests a 100 nF capacitor between VCC and GND for filtering; the TK38 does not fit one, so add it across the pins if readings fail only while the radio is busy.

The current is never the issue: 0.5 to 2.5 mA while measuring and 100 to 150 µA between readings.

When it does not work

It works from 5 V on my ESP32, so what is the problem?

It usually does work, which is the problem. The pull-up holds DATA at 5 V against a pin rated for 3.3 V, and the harm builds up rather than showing at once. The board keeps working until one day it does not, and by then the cause is months old.

Can I put a resistor in the data line to drop it?

Not usefully. A series resistor into an input drops almost nothing, because almost no current flows. Run the DHT11 from 3V3 instead: it is specified from 3 V. If something else forces 5 V, use a bidirectional level converter in the data line.

My 3V3 rail sags when Wi-Fi transmits

The DHT11 is specified down to 3 V, so a 3.3 V rail has 0.3 V to spare. A dip below that during a transmit burst is out of specification. The datasheet suggests a 100 nF capacitor across VCC and GND; taking the reading between transmissions helps too.

Does the sensor draw enough to matter?

No. The datasheet gives 0.5 to 2.5 mA while measuring and 100 to 150 µA on standby, which any dev board's 3V3 regulator supplies without noticing. It is the voltage that matters here, not the current.

Where this goes next

What happens on the wire in the milliseconds after you call readTemperature.

The start and the answer

Edit this page — content/books/dht11/three-volts-or-five.mdx

Community

Questions about this product

See what other owners have asked, and read their solutions.

Ask a question ↗

DHT11 Temperature and Humidity Sensor

Loading discussions…

Discuss this article

Ask about this page. The answer stays here, on the page it belongs to, for whoever hits the same wall next.

Browse Modules and blocks on the forum