How to safely connect a 1.8v push-pull output to a 3v MCU input

microcontroller

I have a fuel gauge which has a push-pull interrupt pin working at 1.8v. I need to connect this pin to a MCU working at 3v. Theoretically I don't need a level shifter since the 1.8v are above the high level threshold of the MCU.

My concern is that the absolute maximum input rating of the fuel gauge pin is 2.75v so if I accidentally program the MCU pin as an output and I set it to high it might burn the fuel gauge, yes, I know that it sounds crazy but these kind of things happen sometimes.

So the question is, how I can connect this pin keeping the fuel gauge safe?

Best Answer

You could use a zener diode and resistor.

schematic

simulate this circuit – Schematic created using CircuitLab

Pick a Zener voltage between 1.8V and 2.75V. Pay attention to the tolerances to make sure it won't sink current simply from the 1.8V output of the gauge. Also make sure it has a low enough Zener voltage to keep the gauge's pin at a safe level.

For example, pick a diode with a 2.2V Zener voltage. If you want to keep current less than 10mA, you'd need 110 ohm resistor. This assumes the MCU high output is 3.3V, and it can safely drive 10mA of course.

\$\ {3.3V-2.2V\over 10mA}= 110\Omega \$

EDIT: This assumes the gauge has some reasonable source impedance. You may want to add another resistor of the same value between the diode and the gauge A schematic/datasheet would be helpful. However, at that point, you're at the same component count as a simple, MOSFET level shifter.