# How to use a Bzx55c zener diode with PTH resistor to protect analog inputs of the ADS1115 module?

I've been trying for a long time to build a circuit that serves as protection against voltage surges on the ESP32's analog ports or an analog port expansion module.

I'm developing a personal automation project using a 30-pin ESP32 WROM and using an ADS1115 IO expansion module:

This module works with a 5V power supply and uses the ESP32's i2C bus and has 4 analog inputs that must receive voltages between 0 and 5V. My objective is to protect these inputs against any possible voltage surge that could reach the ports and burn the module. For this I bought some BZX55C 5V1 0.5W zener diodes like this one:

I set up some scenarios testing in practice simulating voltages of 5V and surges of 24V as shown in the image below:

As you can see in the schematic image itself, I don't understand how to correctly drain the excess voltage. In this case, the resistors I have available are the traditional 1/4W PTH.

This is the objective:

I would be very grateful if someone from the community could explain to me where I am going wrong and help me with this.

• How come 24V can enter the ADS1115? Sep 13, 2023 at 8:01
• @MiNiMe That's the point of the matter. If the sensor goes off at 24V, the zener must protect it and only allow 5V to reach the ADS1115. Sep 13, 2023 at 11:54
• Well I still wonder, how does 24 V enter the calculation, and not 9, or 50 for example? What does the adc sample? Sep 13, 2023 at 12:38
• @MiNiMe, I added a new image describing the objective more clearly with graphics. Sep 13, 2023 at 21:51
• It's good practice to protect certain circuitry, but you still haven't explained why you picked 24 V in the first place? Is it a random value, or a voltage that the sensor works in? If the sensor breaks down and passes 24 V to the ADC, how much current and for how long are your estimates? Sep 14, 2023 at 1:39

The problem is the Zener, it's rated 5V1 but max ZV 5.4, which is more than the ADS1115 can take, max Analog input is Vcc + 0.3 V, and your Vcc is 5 V = 5.3 V.

In order to use this Zener, you would have to increase Vcc, which will create other challenges.

Instead you could go for BZX55B4V7 which have max ZV 4V8, and tune the ADC readings etc for that.

Or use Schottky diodes

There are Schottkys that have a very low forward voltage, so a diode @ 300 mV will pass everything above 5.3 V to the Vcc rail. The lower diode is there in case there will be negative voltage, if you know it never will be, you can skip it.

All these circuits must have a current limiting resistor, or you will end up with a blown diode + ADC. Pick a proper one after how much current the diode can take.

• Sorry to ask you this but my knowledge of electronics is very limited, I'm mostly into software development for the internet. I tried using two SS34 diodes following your explanation but it didn't work and I think I burned them. In my situation, what would be the ideal diode and resistor? Sep 20, 2023 at 22:40
• Well that diodes Vf is too high, so you end up without protection, just like with the Zener. One more thing is to choose the correct resistor. If resistance is high your ADC will show a value lower than the real voltage, and if resistance is low, something in the circuit will probably fry if there's an over voltage situation. Sep 21, 2023 at 7:10
• I have two thoughts about your circuit, that 1) having OVP is fine, but 2) the first line of that OVP is to make sure people can't accidentally connect 24 V to your ADC. What I would do is to have different connectors for the voltages, so it's physically impossible to mate 5 and 24 V connectors. Sep 21, 2023 at 7:11