piclist 2000\11\30\012742a >
Thread: Low Battery Sensing
www.piclist.com/techref/power/batterys.htm?key=battery
BY : Dan Michaels email (remove spam text)

Brian Gregory wrote:
>Simon Nield <simon.nieldQUANTEL.COM> wrote:
>> if the pic you are using has an adc you could use that.
>
>I would need some kind of voltage reference or some resistors to divide the
>battery voltage if I used the supply (from an LDO regulator I guess) as the
>reference. That's run the battery down.
>

Yes, it would seem that just about anything you connect to the
battery itself is likely to pull it down - except possibly a zener
with high enough voltage and hopefully low leakage [??????]

Here is a variation on some of the other - diode+resistor schemes.
Assuming you aren't running straight off the battery - but are using
an LDO to power the bus - eg, LM2936-5.0 [15 uA]:

battery---+-----LM2936--+----> +5v
|        |    |
|       gnd   |
zener           |
|       +-----+---+
|       |    Vdd  |
+--10K--|RB7      |
|       |         |
+-------|RA0      |
Vsense   |         |
+---------+

Assume battery = 9v, then use 5.1v zener. RB7 = 1 while in sleep
mode. Wake up --> pull RB7 = 0 --> measure voltage on RA0 -->
Vsense = Vbattery-5.1v --> accurate reading, since the A/D Vref=5v
from the LM2936.

At full charge, Vsense ~ 9-5.1v = 3.9v. At low-charge, when
Vsense ~ 0.1v, then Vbatt has dropped to 5.2v, and the LDO is about
to fall out.

If the zener has too much leakage, then assign RB7 as input
during sleep, instead of holding it as output = high.

Who knows, this thing might even work,
- Dan Michaels
Oricom Technologies
http://www.oricomtech.com
=========================

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

seeking: ubicom lib io video
<1.5.4.16.20001129225052.4f3f0cfa@pop.dnvr.uswest.net>