4
\$\begingroup\$

I was looking for a "quick and dirty" solution in order to work with MAX487 (5V) and my ESP32 MCU.

I know that Maxim integrated produces the MAX3485 and MAX3483 that are specifically designed to work with 3.3V, but I have a bunch of MAX487 (almost 100 pieces) and I don't want to throw them in the garbage.

Buried in a old thread of TI support forum, I've seen this image:

img-sch

It seems that adding a Schottky diode (BAS40SL) on R line it will "clamp" the 5V signal to 3.3V and the MCU can work without any issue with the 5V MAX487.

The only "issue" I can see is that the diode will add some capacitance, and then at high baudrates it can generate some timing issue. This is not a real problem if you have "slow" devices like 115200 baud.

  • Will this really work?
  • Has anyone tried out this solution?
  • Does it have any drawbacks or can I use it without any issues?
\$\endgroup\$

2 Answers 2

3
\$\begingroup\$

It should work, but depends on exactly what the ESP defines as a "valid low."

The MAX487 states a \$V_{OL}\$ of 0.4V @4mA. So when driving a 4mA load, the pin will be 0.4V. But you have 3.3V/1.8k = 1.8mA instead of 4mA, so this will be lower, perhaps 0.2V or so.

The BAS40SL states a \$V_F\$ of 0.38V @1mA, so this will be a little higher (due to 1.8mA.) So say, 0.45V + 0.2V = 0.65V, that's about what the ESP32 will "see" when R goes low.

Check your particular ESP32 datasheet for "maximum low input" or similar and as long as this value is over 0.65V, a low will be read properly. If it is 0.5V, then this low (0.65V) will not be read at all, or read intermittently and unreliably.

Note, that the 1.8k pull-up essentially becomes the "high" to the ESP32. This will limit the rise-time of that input (since it can only supply 3.3V/1.8k = 1.833mA) to pull the line high. This will also fight against the (small, 5pF) junction capacitance of the Schottky. For low speeds this won't matter at all. But at the highest serial speeds, the diode capacitance (even parasitic trace capacitance) will delay the transition of this pin slightly. If this is a concern (must support 115.2kbaud) then keep this trace short and run it well clear of others to reduce it's parasitic capacitance.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ For the Low-level input voltage (VIL), the datasheet reports: -0.3 to 0.25×VDD1. So, if VDD is 3.3V, the VIL will be 0.25x3.3=0.825V. If i'm not wrong there will be no issues at all. \$\endgroup\$
    – VirtApp
    Apr 15, 2022 at 14:15
  • \$\begingroup\$ Sounds good, please let us know your results. If these answers have been helpful (or not), remember to vote using the arrows and select the one (flag icon) which was most helpful. \$\endgroup\$
    – rdtsc
    Apr 17, 2022 at 23:31
3
\$\begingroup\$

I see no reason why this shouldn't work, at least for a "dirty solution". The inputs (driver input, driver/receiver enable) are recommended to be below 0.8V for a logic low and above 2V for a logic high - those are fulfilled in your circuit.

The purpose of the Schottky diode at the receiver output is to block harmful 5V. Instead of using the direct pin output (which would be 5V), a HIGH level is created using the 4k7 Ohm pullup, while the driver is still able to pull the signal to ground for a LOW level (note the orientation of the Schottky diode). So, the Schottky does not clamp the signal. A normal silicon diode would also do the job, though a (fast) Schottky diode might be recommended.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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