EE Problem: Level shifting from 3.3v to 1.8v OR 5v - Page 1
Forum section: electronics / projects

author: Sarcarean
author_rank: Contributor
timestamp: August 04, 2016, 03:41:02 am
content: Hey everyone! I am in a bit of a jam.I have a MCU that runs at 3.3v and I need to connect 5 I/O pins to an external bus that is either 1.8v, 3.3v or 5v (VREF pin etc.). So the problem I have, is that I can not find a unidirectional level shifter IC that can step up and step down. All of the TI solutions seem to be PORTA<=PORTB. The pins are directional, so no need for auto-sensing direction.I have been looking through datasheets for days trying to solve this problem, but have not found a suitable solution. Does anyone know of a way to do this? I have thought about using a CPLD, but maybe that is overkill or won't work? I am thinking that the only way would be to use a large combination of FETs or something like that?Lots of electrons to anyone who can solve this problem!

author: ConKbot
author_rank: Super Contributor
timestamp: August 04, 2016, 03:58:50 am
content: Look at TI's LV1T series logic, I.e. SN74LV1T34. The input pins are 5v tolerant (not just vcc+0.5) and VIH dips low enough to take 1.8V logic when it's running on a 3.0-3.3V supply. But be safe, make sure that your maximum VOL of your 5v signal source is below the minimum VIL of the LV1T chip, and the minimum VOH of the 1.8v source is above the maximum VIH, etc. Don't want a temperature or rail voltage variance between units to make for an intermittent and hard to find problem

author: mstoer
author_rank: Contributor
timestamp: August 04, 2016, 04:06:43 am
content: Quote from: Sarcarean on August 04, 2016, 03:41:02 amYou cannot just use MOSFETs and some pullups? Common for Arduino type shifting is shown here:http://playground.arduino.cc/Main/I2CBi-directionalLevelShifterI use some little boards I bought off ebay for next to nothing and some SMD MOSFETs for when I do something more custom.Marcell

author: Sarcarean
author_rank: Contributor
timestamp: August 04, 2016, 05:11:38 am
content: @ConKbot Thanks for replying. I am looking at SN74LV4T125 for doing 4 I/Os (from MCU to bus) and SN74LV1T34 for 1 I/O (from bus to MCU). This should work? And have you ever used these parts in a design/application before! Thanks in advance for your feedback

author: ConKbot
author_rank: Super Contributor
timestamp: August 04, 2016, 06:00:24 am
content: Like I said, double check the worst case scenario in terms of threshold compatibility. Just to make sure something isn't going to spring a surprise on you if it has a weak cmos output, or bus loading makes VOL creep up, etc.But yes, I have used it in a design before, I have used the LV1T XOR gate as an input buffer for anything from 1.8V-5V, to 2.5v. The inputs are well behaved when powered down too, no parasitic powering of downstream circuits.

author: David Hess
author_rank: Super Contributor
timestamp: August 04, 2016, 01:48:19 pm
content: For simple stuff where power draw is not a problem, single transistors with pull-ups can work but watch out for input noise margins; do not overlook using a common base transistor for non-inverting level shifting. Logic gates with open collector/drain outputs work well also but require pull-up resistors.In extreme cases, analog comparators may be the best option. Differential line receivers can be used when lots of comparators in a single package are desirable.I do not like dedicated level shifters because of price and availability problems but they certainly work. Some logic families have high voltage tolerant inputs which may be a better choice.

author: exmadscientist
author_rank: Frequent Contributor
timestamp: August 04, 2016, 04:45:19 pm
content: You can also use some plain old LVC logic gates. The LVC1G04 and '17 have 5.5V-tolerant inputs and will up- or down-translate just fine within a limited range. 3.3V is generally within the center of their range and so they're great for translation from it. They have the advantage of reducing BOM count if you just need a single-gate buffer or inverter somewhere else in your design. They are also very robust against all sorts of abuse.There are two things you need to check with this approach. First, make sure VIH, VIL, VIH, and VOL are compatible between your input and output drivers. Second, make sure the specific LVC part you've selected is 5V-compatible (if needed). Confusingly, not all LVC logic is created equal! The smaller and simpler parts tend to be more robust, presumably to make them more useful in situations like this.