1

Perhaps I'm not fully understanding a difference between logic level and the function of the TX and RX pins? I'm just wondering if an ESP can send, one-way, data to an Arduino. (I found that two-way communication would need a logic level converter.)

ESP32 Datasheet enter image description here https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf#page=42


Arduino datasheets do not appear to specify logic level tolerances. It appears from this Arduino Forum post, it would work.

Is it universally assumed that 3v3 will be in tolerance for logic high? enter image description here https://learn.sparkfun.com/tutorials/logic-levels/all

2

Yes, it will work, but only just. It's borderline.

The ESP32 gives out at most 3.3V as a HIGH signal. The Arduino accepts "above 0.6Vcc" as a HIGH signal. That means that it needs to see a voltage that is at least 60% of the voltage on the Vcc pin (5V pin) of the Arduino.

If the Arduino has exactly 5V then 60% of that is 3V. Since 3.3V is higher than 3V it sees it has a HIGH.

However if the Arduino is being powered by a slightly higher voltage than 5V (some USB ports can give out 5.2V and it's still in spec) and if the ESP32 is being powered slightly below 3.3V, then that 0.3v margin of error gets narrower and narrower. Eventually it disappears and HIGH can no longer be detected.

For example if the Arduino has 5.2V and the ESP32 has 3.1V then the Arduino expects at least 3.12V and the ESP32 gives out no more than 3.1V.

So in most circumstances it does work, but there are factors that can stop it from working. Those factors can be mitigated by using logic level translation.

3
  • The factor 0.6 itself is chosen to be on the safe side, too. Nobody assures that 2.6V is never interpreted as HIGH. Your final statement is very correct, though. – DataFiddler Dec 27 '20 at 18:35
  • 1
    @DataFiddler It's not safe to second-guess the datasheet. The values given are the guaranteed values. Sure, it may be lower, but it's not safe to assume that. Different chips from different batches could be different, but they are all guaranteed to be no more than 0.6Vcc. 90% of the time it's fine though and for Arduino usage fine is usually good enough. Personally I only usually work with 3.3V microcontrollers anyway (who really uses 5V these days?!) – Majenko Dec 27 '20 at 19:01
  • 1
    Additionally, partly contradicting my yesterday's opinion, the 0.6 is part of a well defined hysteresis functionality: An input pin is either LOW or HIGH: It switches LOW->HIGH @0.6 Vcc, and switches back HIGH->LOW @ 0.3 Vcc This is a feature one can rely on as well. – DataFiddler Dec 28 '20 at 21:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.