Go Down

Topic: 5V to 3.3V logic, signal diodes to drop voltage? (Read 2691 times) previous topic - next topic

Aethelstan

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 :)

ieee488

Voltage divider?
Bi-directional level-converter boards?

Aethelstan

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 :)

septillion

You should be fine with a resistor divider. Better then misusing a diode ;)
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

MarkT

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.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Aethelstan

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?

septillion

Zener is slow => useless
Schottky => already in the ATmega so fixed that problem as well ;)
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

CrossRoads

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Paul__B

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

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


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.

MarkT

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.
Quote
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.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

septillion

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 :(

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.
Use fricking code tags!!!!
I want x => I would like x, I need help => I would like help, Need fast => Go and pay someone to do the job...

NEW Library to make fading leds a piece of cake
https://github.com/septillion-git/FadeLed

Go Up