View previous topic :: View next topic |
Author |
Message |
ljbeng
Joined: 10 Feb 2004 Posts: 205
|
Check Battery Level |
Posted: Wed Feb 09, 2005 9:07 am |
|
|
Any ideas how a guy could check the battery level of 2 AA batteries from the A/D port of a 16F628? The 2 AA's are the only power supply in the circuit. No regulator. I want to flash an LED if they are low. (Even though this means faster battery drain.) |
|
|
Guest
|
|
Posted: Wed Feb 09, 2005 9:21 am |
|
|
rt(f)m |
|
|
Guest
|
|
Posted: Wed Feb 09, 2005 9:22 am |
|
|
and maybe use a resistor divider to lower the voltage to a measurable value. |
|
|
Humberto
Joined: 08 Sep 2003 Posts: 1215 Location: Buenos Aires, La Reina del Plata
|
|
Posted: Wed Feb 09, 2005 9:35 am |
|
|
I would use a Micro-Power Rail-to-Rail CMOS Comparators with Open-Drain/Push-Pull
Outputs like National LMC7215 ($0.54) or similar wich will run down to 2V of power supply,
detect the minimum allowable voltage, switch-off the microcontroller and slow blink a LED
until batt is completelly die. My $0.02 contribution.
Humberto |
|
|
ljbeng
Joined: 10 Feb 2004 Posts: 205
|
|
Posted: Wed Feb 09, 2005 10:26 am |
|
|
I will try the MCP100-270DI/TO-ND from Digikey. It goes low <2.7V. Adds 45ua to supply. |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1934 Location: Norman, OK
|
|
Posted: Wed Feb 09, 2005 10:41 am |
|
|
In answer to your original question: Yes it can be done.
Two AA cells would be a max of about 3.2 volts which could be monitored directly by the PIC ADC. You will need to have some kind of circuit isolation due to the low impedence of the battery. A low cost op-amp and a few resistors would be what you need in that case.
To learn how to code for using ADCs to monitor voltage, search for ADC in this forum. There is a huge amount of info here.
That being said, the most cost (and time) effective approach is the one being suggested above using a battery monitor chip. |
|
|
valemike Guest
|
|
Posted: Wed Feb 09, 2005 11:32 am |
|
|
I had a 9V battery which i wanted to monitor if it got to 7V (low batt).
I went with someone's advice of using a MAX666 voltage regulator with lowbatt detector (the lowbat level was configured using an xMohm resistor voltage divider). This method is costly, but saves a lot of current (standby of 5uA or something like that).
As for your 2AA method, then i really don't see how a MAX666 could apply. Might want to check the lowest possible Vout of the MAX666 and the lowest possible Vdd of the PIC. This would be overkill because you then wouldn't need a voltage regulator. |
|
|
SherpaDoug
Joined: 07 Sep 2003 Posts: 1640 Location: Cape Cod Mass USA
|
|
Posted: Wed Feb 09, 2005 3:24 pm |
|
|
Is the problem that your batteries are also the reference for the A/D? If so then as the batteries drop both the reference and the divider output drop together so the A/D reading doesn't change.
If you can power a 1.25V reference chip from a port pin that will give you something to compare to. Look at a MAX6190 or simillar. As the batteries fail and the A/D Vref drops the 1.25V will look like it is getting bigger. _________________ The search for better is endless. Instead simply find very good and get the job done. |
|
|
|