0
\$\begingroup\$

I want to build a level shifter circuit for the RX pin of my ESP-12S. The goal is to convert any level between 3.3V and 5V to 3.3V as I might use many USB to UART breakout boards with different output pin level. I tried the divider solution:

schematic

simulate this circuit – Schematic created using CircuitLab

But it won't work for 3.3V input as the voltage will drop to a value that's below the minimum acceptable voltage for a logic "1". I want to keep the solution as simple as I can, and I do not want to use level shifter chips. What can I do? Thanks for suggestion.

\$\endgroup\$
2
\$\begingroup\$

One way of doing it is like this:

The resistor limits the current through the diode. The diode clamps the node after the resistor to 3V3 + its forward voltage.

Ideally, you would use a diode with a very low Vf (most ICs down the line will already have internal clamp diodes and you want the external discrete one to conduct, not the internal ones) and fast enough for your data rates.

schematic

simulate this circuit – Schematic created using CircuitLab

Another way is like this:

You want to pick a resistor high enough to limit the current through the zener and low enough to guarantee a Vzener within your expectations.

schematic

simulate this circuit

\$\endgroup\$
  • 1
    \$\begingroup\$ Any diode will work for this? \$\endgroup\$ – whc2001 May 10 at 12:05
  • \$\begingroup\$ Any general purpose, you can use Schottkies for lower voltage drop. But common 1N4148 or 1N400X will work also. \$\endgroup\$ – Wesley Lee May 10 at 12:15
  • \$\begingroup\$ Thanks. Seems like that is the most suitable solution for my situation. \$\endgroup\$ – whc2001 May 10 at 12:28
  • 2
    \$\begingroup\$ No, this is not a good approach because there is nothing to make the external diode necessarily conduct before the internal one you are trying not to stress. If you are going to do this you need to choose a low Vf diode. \$\endgroup\$ – Chris Stratton May 10 at 12:38
  • \$\begingroup\$ Don't use a 1N400x diode because the (anything up to 30 us) reverse recovery time may wreck the data integrity. A zener would be better. \$\endgroup\$ – Andy aka May 10 at 12:39

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.