1
\$\begingroup\$

In my design I need to level shift 5V signals to 1.8V, for now I'm planning to use AND gates with the same 5V signal on both inputs and 1.8V as the power source. I got the idea from this document.

Previously I would have used a voltage divider to do the same task. enter image description here

I can identify a few pro/cons about each approach:

Voltage divider:

  • lower cost
  • more difficult to tune, I need to solve a 2-equation system to get the resistors values: the voltage divider equation to do the actual level shift and Ohm's Law to get the total resistance needed for needed current draw, for example switches/relays have minimum current rating, see wetting current

AND gate:

  • higher cost
  • bigger footprint, unless we go to small packages which could increase PCB cost due to small pads

Questions:

Is my analysis correct? Can you think of other pro/cons I should consider?

Also, considering the internal structure of an AND gate, shouldn't I place a low or high side resistor to not burn the logic gate and more in particular to account for the minimum current rating discussed above?

enter image description here

\$\endgroup\$
6
  • 1
    \$\begingroup\$ How many signals do you intend to level shift? What is driving the divider? A voltage divider may work only if your signals are relatively low speed (a handful of kHz) and you are going from one logic gate to another (or from one microcontroller to another, etc). If you are driving a low impedance signal, or going over a long wire, or your signal is high speed, you should use a level shifter or an appropriate buffer chip. The AND gate you're showing would work. Don't put a resistor between GND and pin 3 though. I would put a 100nF cap between pins 8 and 3 on that AND gate. \$\endgroup\$
    – drkntz
    Commented Aug 17, 2023 at 14:12
  • 2
    \$\begingroup\$ A series resistor on the gate inputs would prevent your 5V signal from driving your 1.8V bus through the protection diodes. I agree the ground resistor should be eliminated. \$\endgroup\$ Commented Aug 17, 2023 at 14:17
  • 1
    \$\begingroup\$ @drkntz I have 5 signals coming from different directions towards the MCU, so using a single shifting IC is not an option, also the trace lenght after the AND gates are < 50 mm, 0.2mm width. I'll add the 100nF capacitor, and remove the resistor. \$\endgroup\$
    – StefanoN
    Commented Aug 17, 2023 at 16:16
  • 2
    \$\begingroup\$ It's common for most. Sometimes you can find one with 5V-tolerant inputs, but generic gates usually expect no more than Vcc on their inputs and have a protection diode to Vcc accordingly. \$\endgroup\$ Commented Aug 17, 2023 at 16:48
  • 1
    \$\begingroup\$ @StefanoN See my answer below. There are a fair amount of 5V tolerant logic gates that can do what you want. 74LVC244 would work, without needing external circuitry. Unless you're really pressed for board space. \$\endgroup\$
    – drkntz
    Commented Aug 18, 2023 at 13:17

2 Answers 2

2
\$\begingroup\$

You should also take into account the fact that the resistor divider will draw continuous current from the 5V signal when the logic level is High whereas the CMOS logic gate does not draw any static current.

Normally we want the SIGNAL_1V8 to be at the same voltage level as the 1.8V supply but, that is difficult in the resistor divider case because there are many variables that can affect the SIGNAL_1V8 voltage: load current, 5V supply variation & 1.8V supply variation. This issue is not there in the logic gate solution.

Lastly, the drive strength & speed of a logic gate is much better than the resistor divider (as already mentioned by others in the comments).

The resistor you added at the logic gate's ground is a bad idea. To not burn the logic gate, you need to make sure that you are using a 5V tolerant logic gate.

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

another option may be some variant of SN74LVC244A. It is an 8-bit non-inverting buffer, and can run at a Vcc of 1.8V. The inputs are 5V tolerant, so no need to worry about protecting inputs from over-voltage. The chip is available at decent quantities in DIP and surface-mount packages.

One thing to note is the input threshold "Low" for 1.8V supply has to be under 0.63V, so make sure your 5V logic signal switches well below that when it goes low.

You would configure the chip something like this: 74LVC244

\$\endgroup\$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.