Stop draining a rechargeable coin cell?

I'm using a LIR2450 3.6v rechargeable coin cell to power my project. The battery could be damaged if it drains too much. How would you have it stop when the voltage gets down to about 2.8v?

Sparkfun sells a battery level indicator that turns on when the voltage is below a given threshold. You would tune the resistors so it fires on 2.8 volts or whatever you feel is safe, and hook this to one of the pins attached to interrupts on your microprocessor (2 & 3 if memory serves on the Uno). If you get an interrupt, you shut down the processor.

I could imagine you might hook a relay between the pin and the Arduino power, that would immediately turn off the power if it is too low, but then you might not have time to save any state that is needed.

If you are free to set the analog reference to the internal 1.1V reference you can measure the battery voltage (divided down
to a suitable value) directly with analogRead(). You would need to power the resistor-divider from another pin so it
can be powered down when the processor is powered down - this also means you can power it down unless taking a
battery voltage reading (which doesn't need to be very often I suspect).

There are 'battery' protector circuits sold on Ebay that are designed to do just that and they are only a few dollars.. cheaper than you can build one.. they are in that yellow tape or on top of the battery on a round PCB. Look for Li-Po battery protectors.

Bob

Check whether the protector includes under-voltage - most probably do, but its worth double checking.

If you are using a standalone atmega processor, and your peripherals can all be powered down on command from the micrcontroller, then it's straightforward. Use the ADC to measure the voltage of the internal bandgap reference (about 1.1V), with Vref being Vcc (the Arduino default). This will give you the ratio of the bandgap voltage to the power supply voltage, from which you can calculate the power supply voltage. If the power supply voltage drops too low, put the mcu into power down sleep mode, with all peripherals turned off and interrupts disabled.

This won't work if you are using an Arduino board with built-in USB-to-serial converter, because the converter will still draw current.

There are Li-Po battery protective circuit ready made. These are used to protect over voltage during charge and under voltage during discharge. It could help and they are tiny for a 500mah battery.

mjkzz:
There are Li-Po battery protective circuit ready made. These are used to protect over voltage during charge and under voltage during discharge. It could help and they are tiny for a 500mah battery.

Sure, but we've got a microcontroller which can measure its own Vcc and shut everything down when it's too low. At most you need a MOSFET in the wire that powers the peripheral devices.