Go Down

Topic: opinions sought on level-shifter design - nasty or nice. (Read 911 times) previous topic - next topic

oric_dan

The following shield uses a MOSFET level-shifter design to interface 3.3V and 5V signals.
I've also seen this same design used on several other boards.

https://www.sparkfun.com/products/10854
http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Dev/Arduino/Shields/xbeeshield-v14.pdf

My question is, do you blow the chips if you accidentally wire the 5V output to the 3.3V
output via the shifter? Obviously wiring input to input won't hurt. More than a simple yes
or no would be nice.

be80be

There are some 5 volt tolerant pins On some chips but if it's not 5 volt tolerant then it's a good chance you'll blow the pin.

MarkT

Another thing that can happen if you put 5V on a 3V3 chip's input pin(s) is what is termed "CMOS latch-up" - this will cause
the whole chip to conduct heavily and get very hot, and can only be stopped by removing the supply.   It is cause by over current
flowing through the input protection diodes and causing a parasitic (unintended) bipolar transistor action.

You'll often see "latch-up immunity" specified in datasheets, and many chips (especially nowadays) are designed to prevent
this happening unless extreme currents are present on the inputs (latch-up usually destroys the chip and can melt nearby components!).
These days it is a rare thing to experience (although I have triggered it once in the last few years with an ADC chip without
any apparent permanent damage - its surprising when a chip with 10mA current drain rating to get too hot to touch!)

You have to be careful to avoid significant currents due to over-voltage (or under voltage) on inputs  - a 10k resistor will typically serve to prevent ill-effects (the poor-man's level shifter?).  The best solution is a proper level shifter though

http://en.wikipedia.org/wiki/Latchup

BTW when you do have a 3V3 chip with 5V-tolerant inputs this means there might be no protection diodes on those inputs, so they may
be more sensitive to electrostatic discharge.
[ I won't respond to messages, use the forum please ]

Krodal

There is a page for this : http://playground.arduino.cc/Main/I2CBi-directionalLevelShifter

oric_dan

Quote
Another thing that can happen if you put 5V on a 3V3 chip's input pin(s) is what is termed "CMOS latch-up"

There is a page for this : http://playground.arduino.cc/Main/I2CBi-directionalLevelShifter


Neither of those comments answers the question that I can see. You use levels-shifters specifically
to protect input pins from overvoltage, but the question was concerning possible damage when
"output" pins are accidentally wired together through the shifter ckt.

winner10920

It would matter which can handle more current,  i imagine neither are current limited so the 5v will source current to the 3.3v until one gave out

oric_dan

Quote
It would matter which can handle more current,  i imagine neither are current limited so the 5v will source current to the 3.3v until one gave out


Well, output pins are always current-limited, but you wouldn't want to try connecting 5V high
output to 3.3V low output, or vice versa.

I suspect a better designed [ie, non-lethal] level-shifter will have a 1K series resistor in the data
path.

winner10920

In a sense they ate current limited but not to the point where the short circuit current is limited to a safe value, and with no short circuit detection something is bound to pop first,

oric_dan

Sure seems to be difficult to come up with a bulletproof level-shifter ckt.

winner10920

Thats not hard, its coming up with one that is simple, easy, effective, and cheap that is difficult

oric_dan

Actually, my choice for simplest is as follows, shifts the signals and limits the currents

                +5V
                  |
                 4.7K
                  |
3.3V out --- 1K --+-- 5V input

5V out --- 2.4K --+-- 3.3V input
                  |
                 4.7K
                  |
                 gnd

Go Up