5V to 3.3V logic, signal diodes to drop voltage?

Can I use some signal diodes in series to drop 5V serial to approximately 3.3V at 115Kbs? Would they be fast enough and reliable enough? This would only be in the short term (a couple of days experimenting on a bread board) as I have some 3.3V zeners in the post.

Thanks :slight_smile:

Voltage divider? Bi-directional level-converter boards?

I could do it with a voltage divider temporarily, I wasn't sure if that would be good for serial data. I don't have a converter board to hand, I shall see if I can find a schematic and build one during the week :)

You should be fine with a resistor divider. Better then misusing a diode ;)

Use 1k series and 2.2k to ground, that will handle upto perhaps 1Mbaud with only short cabling, should be good to 115200 with moderate length cables I would hope.

For more demanding situations use 100 and 220 ohms if the driving end can handle 15mA. You should consider schottky protection diodes on the receiving end if long cables to prevent over- and under-shoot stressing the receiving chip's internal protection diodes.

As a data-point I've used 1k + 2.2k dividers for SPI driving an SDcard, which is a bit borderline but that was 4MHz or similar IIRC.

Thanks for the suggestions. I will use the resistor dividers, there wont really be any cabling to speak of other than connecting an AVR to a wifi module. Is using a potential divider preferable to connecting a zener between the signal and ground?

Zener is slow => useless Schottky => already in the ATmega so fixed that problem as well ;)

cd74HC4050, designed to do just that. http://www.digikey.com/product-search/en/integrated-circuits-ics/logic-buffers-drivers-receivers-transceivers/2556308?k=cd74hc4050&pv16=6512&mnonly=0&newproducts=0&ColumnSort=0&page=1&stock=1&quantity=0&ptm=0&fid=0&pageSize=25

There is an important trick to be learned from the Adafruit Huzzah ESP8266 breakout.

The level converter is a single diode. That's it!

|500x344 Clearly, the ESP8266 contains an internal pull-up, so you might need to add a pull-up to your 3.3 V device. You are driving it with an Arduino, so pick your value - 1k, 3k3 - whatever. This will in any case be faster than a resistive divider.

It turns out to be a quite brilliant solution!

When the input from the Arduino (or other device) is pulled LOW, the diode pulls the output LOW within 0.7 V. The diode impedance is very low (tens of Ohms) and 0.7 V will be well within the tolerance of any 3.3 V device as a logic LOW, so delay at this point is negligible.

Correspondingly, when the input from the Arduino (or other device) is pulled HIGH, either the built-in pull-up of the 3.3 V device (as in the ESP8266) will itself pull the input up to its own HIGH level, or in case this is not sufficiently fast, a pull-up to the 3.3 V supply can be added. Given that it is an Arduino pin driving the circuit, the pull-up can be as low as necessary to achieve the required speed, down to 330 Ohms or so.

The arrangement is both simple, and immediately fills all requirements for level shifting.

septillion: Zener is slow => useless

Really? What makes you think quantum tunneling is slow? (Low voltage zener's use tunneling breakdown) In fact the high junction capacitance actually helps in a protection role.

However low voltage zener's have a soft knee, which is the show-stopper here.

Schottky => already in the ATmega so fixed that problem as well ;)

No, the internal protection diodes are pn-junction diodes, and capable of handling only tiny currents (1mA or similar), so external schottkys will conduct first and can carry amps without issue.

The datasheet specifies absolute maximum voltages on pins of -0.5V to Vcc+0.5V, beyond which the internal diodes are at risk. External schottkys will keep the signal pin within the safe range.

MarkT:
Really? What makes you think quantum tunneling is slow? (Low voltage zener’s use
tunneling breakdown) In fact the high junction capacitance actually helps in a protection role.

You’re right! I remembered it incorrectly :frowning:

MarkT:
However low voltage zener’s have a soft knee, which is the show-stopper here.No, the internal protection diodes are pn-junction diodes, and capable of handling only tiny
currents (1mA or similar), so external schottkys will conduct first and can carry amps without issue.

Yes, they can handle more current but then you’re already on the edge of letting the internal diodes conduct. But yeah, if you can’t limit the current because of speed a beefier diode is a good idea.