 # Crowbar vs. Zener

Hello all,

I have an analogue system supplying 0-28V which I intend to reduce to 0-5V with a voltage divider (3.9K and 18K in this case).

Assuming an absolute maximum allowable input of 5.5V to an Uno pin, this means the supply is allowed to get to ~30.9V but "just in case" I want to put a bit of added protection in the circuit.

To me, the easiest way to do this would just be to put a 5.1V zener in parallel with the 3.9K resistor. That lets the input voltage drift a fair way with the 18K resistor still providing a limit on the current.

People on here seem to really be against doing this though and always suggest a crowbar circuit instead. So, please, I would like to learn why is the added complexity of the crowbar is so much more advantageous in a situation like this?

A power supply for an arduino shouldn't be based the output voltage of a voltage divider, right? You probably want to go for a switching power supply that converts your 20+ Volt DC to 5 V DC.

I would put a 15k R in series with analog in pin, that would limit current to < 1mA if the 3.9k R failed. That’s still cutting it close though.

Southpark: A power supply for an arduino shouldn't be based the output voltage of a voltage divider, right? You probably want to go for a switching power supply that converts your 20+ Volt DC to 5 V DC.

Sorry I should have been clearer. I'll be reading the voltage not powering the Arduino from it.

saximus:
Assuming an absolute maximum allowable input of 5.5V to an Uno pin, …

No, it’s VCC +0.5volt.
So 0.5volt max when the Arduino is off.
That makes a zener useless.

Better make the “top” resistor 33k (<1mA fault current), and calculate the “bottom” resistor to suit.
Consider using the internal 1.1volt Aref for voltage measurements.
Then a 33k/1k2 divider would work.
Leo…

Wawa:
No, it’s VCC +0.5volt.
So 0.5volt max when the Arduino is off.
That makes a zener useless.

Better make the “top” resistor 33k (<1mA fault current), and calculate the “bottom” resistor to suit.
Consider using the internal 1.1volt Aref for voltage measurements.
Then a 33k/1k2 divider would work.
Leo…

Luckily the analogue signal will never be on if the Arduino is off but thank you for the addition.

So, for clarification, the answer to why a crowbar circuit is better than a zener is “neither in this case”?

I’m still interested to know why it is preferred in the cases where it would actually be appropriate.

The 0.5V difference in the absolute max specs is a way of saying there must not
be too much current density in the protection diodes. Every input/output pin has internal
protection diodes to the ground and Vcc rails internally, whose function is to limit the risk
of damage due to electrostatic discharge onto the pin from your fingers (the gate oxide on
the MOSFETs in a CMOS chip is extremely thin and readily damaged by such discharge).

So while the absolute max is usually quoted as a voltage it is really saying there is a limit
to the current that those diodes can handle. (To make them really robust would use up
a large proportion of the chip area, so they are a compromise)

So a series resistor can protect against overload, limiting the current (which will also
mean the voltage doesn’t go too far above Vcc or below GND).

Another way you can protect a pin is with external shottky diodes which have a smaller
forward voltage than silicon pn diodes.

According to the Datasheet the ADC is optimized for signal with low output impedance - around 10k. But if your signal is slowly changing AND you are measuring only one channel you can measure signal with much higher impedance (many MOhms on my Arduino). If voltage of the analogue source is nearly constatnt and it is the only thing you are measuring you may safely use hundreds of kOhms for the resistor and let internal protection diodes handle possible overcurrent.

If the signal is changing quickly the external resistor and internal ADC capacitor will form low pass filter - it is up to you to decide how precisely you want to measure the signal. If you are using other channels the ADC's multiplexer switching may cause noise in the measuring if signal's impedance is too high. (As well as any other source of noice nearby ofc.)

In your application if your can afford large resistors in the divider (1mA into the pin at worst worst-case conditions) you can let the internal diodes to handle it. If you are sure the Arduino will have 5V longer than the signal the Zener is good but the Schottky to 5V is even better (but you need to ensure it's forward voltage is less than 0.5V). I have no idea why someone suggested Crowbar curcuit - looks like overkill with no advantage.

Using 1.1volt Aref for voltage measurements has several advantages.

1. Independent of MCU supply voltage variations.

2. The divider outputs <=1volt at the maximum input voltage.

A divider calculated for 28volt, e.g. with a 27k/1k divider, stays under 5.5volt with an input voltage of more than 150volt. Without even using the pin protection diodes.
1mA pin protection diode current is reached at 41volt (positive and negative) when the Arduino happens to be off.
Leo…

Variation between devices is large (+/-10% or something like that).

You have to store a calibration value (in EEPROM) if you want reasonable accuracy.

Your voltage noise immunity is 5 times worse.

You can't read ratiometrically (many sensors are ratiometric).

Choose a divider where the bottom leg is 10k rather than 1k and you have a low-enough impedance for the ADC to read reliably, but less current wasted and larger over-voltage tolerance.

We do not know the safe limit on input protection diode continuous current, it is not in the datasheet. 1mA might be safe, it might not. Err on the side of safety if possible.

Sure, there must be.

All my Arduinos (five) are ~1.075volt, +/- 0.02volt.

I assume you're building a voltmeter for the Arduino you're actually going to use. You should calibrate anyway. There is also a voltage divider (5% or 1% resistors) in the equation.

Hash on the 5volt rail is probably the worst of the problems. Try PWM-ing an LCD backlight while on USB power. Your voltmeter becomes almost useless.

Ratiometric is a must for certain sensors, but a bad thing for voltmeters.

Agreed. 270k/10k could also work, especially if that 28volt is a battery. I would also add a 100n cap from input to ground.

Agreed. Try to avoid. With 1.1volt Aref and a 1:27 divider, the diodes are not used until input voltage reaches 154volt. Leo..