Electronic – Level shifting 5V to 3.3V – can I just use a zener diode

level-shifting

schematic

simulate this circuit – Schematic created using CircuitLab

My problem is the ATmega328 is running at 5V. I know I need a bidirectional level shifter. However don't really want to spend much more money on this if I can. I don't want to blow up an expensive amplifier as well. Most expensive IC I've ever bought.

The D2 pin would output 5V but I thought zener diodes are commonly used for over voltage protection. So why I can't just use this diode to clamp it down to 3.3v? I know I need bidirectional level shifting but wouldn't the voltage be clamped to 3.3v either way?

Best Answer

Upon looking at the data sheet for the max31850, it looks like you want to connect an open-drain 3.3V output (or input) to a 5V input (or output when low).

I don't think this is a good idea to use a zener- the knee is too soft, and the output driver of the max31850 is too wimpy (4mA) to make this work reliably. Also the minimum voltage to be recognized as a 1 is 0.6 Vdd, which is 3.0V, a bit too close to 3.3V for comfort when working in the reverse direction- the zener will be conducting significantly at that voltage. Further, the datasheet typical capacitance for the zener is 450pF at 0V (more when forward biased) so you may not get the speed.

The Zener would draw excessive current from the micro if the port pin was driven high accidentally (and would likely exceed the maximum voltage spec), and the 4.7K plus the zener soft knee would likely lead to 'high' voltages that were not enough to guarantee operation. Generally all bad news.

enter image description here

Powering the ATMega from 3.3V would make these problems go away.