View previous topic :: View next topic |
Author |
Message |
Chicky
Joined: 04 Aug 2005 Posts: 21
|
How to design low battery indicator? |
Posted: Tue Sep 27, 2005 7:40 pm |
|
|
Hi all...
I need to include a low battery indicator in my project..
But i dont really know where to start...
FYI i'm using 9V battery with LM7805 to generate 5 Volts...
And i used 16x2 alphanumeric LCD Display...
Could anyone help me?~~
Thanx a zillion! |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Tue Sep 27, 2005 8:04 pm |
|
|
Method 1. The battery voltage drops as the battery is discharging, so you can measure it with PIC's an A/D. You can't sense the battery voltage by the PIC's A/D directly, bcause the battery voltage will always be higher then PIC's supply rail. To overcome this obstacle you need to add a voltage divider to divide +9V down to +5V, and then sample the voltage by the A/D. However, you will have a leakage through the voltage divider.
See also this thread: http://www.ccsinfo.com/forum/viewtopic.php?p=49830&highlight=#49830
Method 2. The battery voltage is a nonlinear function of everything: temperature, discharge history, output current, phase of the moon... While one can detect the low voltage just fine, it's very difficult to predict the remaining capacity of the battery using it's terminal voltage alone. A more accurate way of measuring battery capacity is to integrate the current out of (and into, if it's rechargeable) the battery. Since you are using a linear regulator, you are limited by both battery capacity and voltage, so Method 1 will probably work better for you. Although, you could use both methods. |
|
|
Eugeneo
Joined: 30 Aug 2005 Posts: 155 Location: Calgary, AB
|
Re: How to design low battery indicator? |
Posted: Wed Sep 28, 2005 12:39 am |
|
|
Chicky wrote: | Hi all...
FYI i'm using 9V battery with LM7805 to generate 5 Volts...
Thanx a zillion! |
Your wasting about 45 % of the battery by using a 7805. I used a 4.5 (3 cell) volt system with a pin that would pulse a zener diode then read it as vref for the ad converter. use another pin as a voltage divider. You can get surprisingly accurate results using a 10 bit ad and the power consumption depends on the sampling frequency. |
|
|
ChickyMeal Guest
|
Re: How to design low battery indicator? |
Posted: Wed Sep 28, 2005 2:07 am |
|
|
Eugeneo wrote: |
Your wasting about 45 % of the battery by using a 7805. I used a 4.5 (3 cell) volt system with a pin that would pulse a zener diode then read it as vref for the ad converter. use another pin as a voltage divider. You can get surprisingly accurate results using a 10 bit ad and the power consumption depends on the sampling frequency. |
Thanx Kender.. Right now i used the 1st method solution.
But it still need a few adjustments..
Eugeneo... will the 4.5V and zener system reliable if my current is around 0.03A? which zener diode do u use? i'll be glad to try this if it can optimized the power supply... |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
Re: How to design low battery indicator? |
Posted: Wed Sep 28, 2005 7:35 pm |
|
|
Eugeneo wrote: | Your wasting about 45 % of the battery by using a 7805. ... |
It also depends on chemistry. V-DoD (voltage vs. depth of discharge) curves are different for different chemistries. And they are always nonlinear. For example with Li chemistry the curve falls sharply at high DoD, which makes the LDO systems more efficient.
Chicky, what battery chemistry are you using?
Chicky wrote: | ...if it can optimized the power supply... |
If you want to really optimize the power supply efficiency, you should use a switching regulator. In the simpliest case you would take a single- or dual-cell Li-ion battery pack and use s step-up converter. That way you win in two (2) ways. 1. The efficiency of your regulator is on the order or 85-90%. 2. You can go the DoD on the order of 90%. Granted, switch-mode power supplies are more complex then linear, they take more boards space and at times generate noise. But, if your current requirements are fairly low (say, 1A or less), you can buy highly integrated chips, that require just a pair of big fat caps (BFC) and an inductor. If your system doesn't have rf and doesn't make low noise measurements, and if the board layout was done well, then the noise from the switcher is not a huge problem either. |
|
|
ChickyMeal Guest
|
Re: How to design low battery indicator? |
Posted: Wed Sep 28, 2005 9:24 pm |
|
|
kender wrote: |
Chicky, what battery chemistry are you using?
|
Kender... im thinking of using Li battery but right now i just use alkaline battery. Still a lot more to improve my project i guess...
Right now im consentrating on the Low Batt indicator..
I've managed to read the battery voltage, and now i need to define, how low is low... |
|
|
Joshua Lai
Joined: 19 Jul 2004 Posts: 42 Location: Malaysia, PJ
|
|
Posted: Wed Sep 28, 2005 9:31 pm |
|
|
I tried this on 7805 using 12V 500mA adaptor,
Load, input current, output current,
1k 10mA 5mA
500 15mA 10mA
nothing 5mA 0mA
Really wasting 45% energy? |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Wed Sep 28, 2005 9:48 pm |
|
|
ChickyMeal wrote: | I've managed to read the battery voltage, and now i need to define, how low is low... |
Good question! I have looked up the datasheet for LM7805. It's dropout voltage is 2V, and this is a lot for a battery powered application. A LOT!!! This means that +5V power supply of your PIC will start to droop when your battery voltage reaches +7V. This is your minimal "too low" voltage. You can optimize the battery life a lot if you change your regulator to an LDO (low dropout). LDOs have dropout voltages down to 0.3V, which means that you can utilize your battery more completely. |
|
|
Joshua Lai
Joined: 19 Jul 2004 Posts: 42 Location: Malaysia, PJ
|
|
Posted: Wed Sep 28, 2005 10:06 pm |
|
|
Example of low dropout regulator? Low dropout equal to wasting less battery? |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Wed Sep 28, 2005 10:17 pm |
|
|
Joshua Lai wrote: | Example of low dropout regulator? |
National LM2937 . 500mV dropout. As far as I know, every regulator with a dropout less then 700mV (one Si diode drop) is considered an LDO.
Joshua Lai wrote: | Low dropout equal to wasting less battery? |
Quick answer: yes.
Long answer: low dropout equals to discharging the battery to a bigger depth of discharge (DoD).
Last edited by kender on Thu Sep 29, 2005 12:40 am; edited 1 time in total |
|
|
ChickyMeal Guest
|
|
Posted: Wed Sep 28, 2005 10:47 pm |
|
|
Yupss... ive tried simulating the batt. voltage drop using variable power supply.. My circuit manage to work until around 6.7-6.5 Volts..
Thats a lot of waste right? I'll try to find the Low Dropout IC..
ThanX a lot! |
|
|
jecottrell
Joined: 16 Jan 2005 Posts: 559 Location: Tucson, AZ
|
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Thu Sep 29, 2005 11:46 am |
|
|
In my opinion this discussion on battery power efficiency puts to much emphasis on the voltage drop over the regulator. A low voltage drop (LDO) regulator will help, but only to extend battery life with a few percent. A 9V battery of which the output voltage has dropped to 7V has only about 5% of the original capacity left. An LDO makes it possible to squeeze a few of these last percents out of the battery which is great but most of you are missing the real power waste.
All previously mentioned regulators like LM7805, MCP1701 and LM2937 are lineair regulators. This type of regulators generates the selected output voltage by dissipating the energy from a higher input voltage. In order to get 5V from a 9V battery the energy of the voltage difference will be dissipated into heat. Ever wondered why you need to provide a good cooling element?
No matter if you are using an LDO or not, going from 9V to 5V = (9V - 5V) / 9V = 44% energy loss !!!
The easiest way to save power is to have a power source that matches your electronics as close as possible, for example a lithium battery with a nominal voltage of 3.6V combined with a low voltage PIC at 3.3V. Energy wasted will only be (3.6V - 3.3V)/3.6V = 8%.
Another solution is to use a switching regulator. Switching regulators are more complex but generate almost no heat, realising efficiencies up to 95%.
Whatever regulator you choose, also take note of the current used by the regulator itself (quiescent current, Iq). The ancient LM7805 consumes a typical 8mA just by itself, this is about the same as most PIC processors use! |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1635 Location: Perth, Australia
|
|
Posted: Thu Sep 29, 2005 12:35 pm |
|
|
ckielstra wrote: |
No matter if you are using an LDO or not, going from 9V to 5V = (9V - 5V) / 9V = 44% energy loss !!!
...
Another solution is to use a switching regulator. Switching regulators are more complex but generate almost no heat, realising efficiencies up to 95%. |
The efficiency of switch mode switching regulators are much lower at low I Out current. Based on the little we know of the circuit - it appears to comsume only a few milliamps. Typical efficiency of SMR at 10mA is around 60%. While this is better that the linear regulator its not that attractive. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
MGP
Joined: 11 Sep 2003 Posts: 57
|
|
Posted: Thu Sep 29, 2005 1:05 pm |
|
|
asmallri wrote: |
The efficiency of switch mode switching regulators are much lower at low I Out current. Based on the little we know of the circuit - it appears to comsume only a few milliamps. Typical efficiency of SMR at 10mA is around 60%. While this is better that the linear regulator its not that attractive. |
This isn't necessarily true -- only with crappy switching regulators. There are quite a few switching regulator IC's now made by TI, Maxim, et. al. that are quite efficient (85-90%) down to 1mA or so. They employ techniques like pulse skipping to maintain their efficiency over a large range and are very well suited to low power battery operation. |
|
|
|