Under-powering a digital device can sometimes have pretty nasty consequences. Brown-out conditions can cause memory to get written or overwritten in odd ways, can cause unexpected behavior in connected systems and just generally screw up your day. One way to avoid this is to keep an eye on your battery voltage and turn off the system before it gets too low (or plug it in). We've whipped up a little board to help you out with this situation: the "Uh-oh" battery level indicator.
At the heart of the "Uh-oh" board is the TL431ACLPG shunt regulator diode. The reference voltage can be adjusted by using the trimpot on board. When the battery connected to the board reaches that voltage, the shunt allows current to flow through the LED, alerting you to a low battery situation. In order to set the appropriate reference voltage, you can use the formula found in the schematic to calculate your desired resistance and set it using the trimpot and a multimeter measuring resistance across the provided test points.
This board comes as a "bag of parts" kit. All of the parts are through-hole and it shouldn't take long to solder together. The footprint of each part is clearly marked on the PCB to help you throw it together.
Note: It turns out you can replace the LED with the digital input of a 5V microcontroller. This allows you to write interrupts for low battery management. The output hovers just below 2V at "low" so it may work better on some micros than others. There is a picture in the documents below of this system implemented on an Arduino Uno.
- 'Uh-oh' Through-hole PCB
- 10mm Diffused Green LED
- JST Wire Assembly
- TL431ACLPG IC
- JST Right-Angle Connector
- 10K Trimpot
- 330 Ohm Resistor