logo elektroda
logo elektroda
X
logo elektroda

Why connect DHT22 directly to ESP8266 NodeMCU V3 3.3V pins without level shifter?

labo 5196 18
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 17567301
    labo
    Level 13  
    Hi,
    I found that the ESP8266 nodemcu v3 has a voltage on the data pins of 3.3V. In various places you can find info that the pins tolerate 5.8V, although I don't see this in the official materials.
    Now the question is, why are virtually all devices even the DHT22 connected without a level converter when the ESP8266 has 3.3V pins?
  • ADVERTISEMENT
  • #2 17567319
    piterek-23
    Level 33  
    And doesn't the DHT sometimes run on a 3V3 supply?
  • ADVERTISEMENT
  • #3 17567337
    Anonymous
    Anonymous  
  • ADVERTISEMENT
  • #4 17567389
    labo
    Level 13  
    piterek-23 wrote:
    And doesn't the DHT sometimes run on a 3V3 supply?
    .
    Depending on the specification it has a 3.3-5V, 3.3-6V supply.
    However, with a 5V supply people feed the output directly to the ESP8266 nodemcu pins. This doesn't just apply to the DHT22 but to other circuits with 5V output, hence my question about the tolerance of the ESP8266 nodemcu inputs and the possible need for a level converter.
  • #5 17567432
    Anonymous
    Anonymous  
  • #6 17567496
    labo
    Level 13  
    Maybe lame, but what's the difference? An acceptable pin voltage is an acceptable pin voltage. It doesn't matter which one, or what signal is flying with it.
  • #7 17567527
    Anonymous
    Anonymous  
  • #8 17567687
    labo
    Level 13  
    Er2lub wrote:
    So write what buses you are talking about.
    .
    I have a device giving TX, RX 3.3V so no such problem here.
    The thing is, I was looking through various examples on the net looking for an answer to my question about pin voltages.
  • #9 17567756
    Anonymous
    Anonymous  
  • #10 17567899
    labo
    Level 13  
    Er2lub wrote:
    * 3.3V input 5V output.
    Here it can vary.
    .
    This was the essence of my question.

    [/quote]* I2C, 1-Wire and others with OC(OD) you pull up to +3.3V and there is no problem. [/quote]
    Unless you have a module on 5V and there is already a pull-up resistor there, which brings it to a higher point.

    Er2lub wrote:
    I guess you can count what and what will be the max allowable rate of voltage change?
    .
    No. You know, when you're retired, you don't always want to know everything or investigate everything anymore. Well, unless it turns out to be needed. ;)
    Which isn't to say you can't explain, this is an open forum after all, and it can be read by people who could use the knowledge as much as possible.
    Greetings
  • #11 17567919
    Anonymous
    Anonymous  
  • ADVERTISEMENT
  • #12 17568259
    Anonymous
    Level 1  
  • #13 17568280
    Anonymous
    Anonymous  
  • #14 17568304
    Anonymous
    Level 1  
  • #15 17568333
    kaczakat
    Level 34  
    Officially, the ESP8266 is allowed 3.3V+10% on the pins. The CEO of Expressive has admitted that it tolerates 5V, which is in line with user observations. Does this affect the circuit well? Probably not, which is why it is better to use logic level converters. However, in most cases nothing will happen if you make a mistake and apply 5V to the pins (even if you supply the ESP with 5V). I wired it that way myself once by accident. But you can damage the processor by supplying even 3.3V, so it is better to use a converter. I have provided links to CEO statements here: https://www.elektroda.pl/rtvforum/topic3509270.html ( and this is the manufacturer, contrary to the answer in the comment). The converter not only lowers the voltage for the ESP, but will also raise the voltage for the 5V device, so it's harder to have a communication error - something that is a 1 can be considered a 0 and vice versa.
    Helpful post? Buy me a coffee.
  • #16 17568339
    Anonymous
    Anonymous  
  • #17 17568347
    Anonymous
    Level 1  
  • #18 17568351
    Anonymous
    Anonymous  
  • #19 17568466
    Anonymous
    Level 1  

Topic summary

The discussion addresses why the DHT22 sensor is commonly connected directly to the ESP8266 NodeMCU V3 3.3V pins without a level shifter, despite the sensor often being powered at 5V. The ESP8266 pins officially tolerate a maximum of about 3.6V (3.3V + 10%), but many users report that the inputs can withstand 5V signals without immediate damage. The key technical point is that communication protocols like 1-Wire, I2C, and similar use open-drain/open-collector outputs with pull-up resistors, typically to 3.3V, which prevents the input voltage from exceeding safe levels. When a 5V device has its own pull-up resistor, it can raise the line voltage above 3.3V, potentially risking damage. The current flowing through the input protection diodes limits the risk, and if the series resistor is chosen correctly (e.g., 4.7kΩ), the current remains within safe bounds. However, this is not guaranteed for all ESP8266 chips or setups, and using a logic level converter is the safest approach to prevent damage and ensure signal integrity. The ESP8266 datasheet specifies 3.3V tolerance, and while some users and even the ESP manufacturer acknowledge that 5V tolerance is often observed, it is not officially recommended. The level converter also helps maintain proper voltage levels in both directions, reducing communication errors. Overall, the absence of a level shifter in many DHT22-ESP8266 circuits is due to the nature of the sensor's communication protocol, the use of pull-up resistors, and practical tolerance observed in ESP8266 inputs, but it carries some risk and is not strictly compliant with official specifications.
Summary generated by the language model.
ADVERTISEMENT