Low Voltage Sensing with Arduino Mini

I’m pretty new to Arduino. I have an Arduino Mini and want to be able to detect when my source voltage goes below 5V. If it does I want to light an LED. Someone told me to look into Zener Diodes. Is that the easiest way to do this?


You could just use one of the build in analog inputs, it will convert a voltage in the 0 - 5 Volt range to a number in the 0 - 1023 range.

You do a periodic read of the analog pin and when it goes below a limit (you decide) you light the LED.

You would need to use the internal voltage reference for the ADC rather than the default 5v line, so don’t forget to use voltage dividing resistors to drop the voltage down to the level suitable for the internal reference.

If you want to use an external devic, a zener may work but an LM431 would be even better because it will switch the LED on harder when the voltage starts to drop below your threshold. There is an application note and link to the datasheet here: http://www.reuk.co.uk/TL431-Battery-Voltage-Monitor.htm