CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

How to design low battery indicator?
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Chicky



Joined: 04 Aug 2005
Posts: 21

View user's profile Send private message

How to design low battery indicator?
PostPosted: Tue Sep 27, 2005 7:40 pm     Reply with quote

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?~~ Smile

Thanx a zillion!
kender



Joined: 09 Aug 2004
Posts: 768
Location: Silicon Valley

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

PostPosted: Tue Sep 27, 2005 8:04 pm     Reply with quote

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... Sad 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

View user's profile Send private message

Re: How to design low battery indicator?
PostPosted: Wed Sep 28, 2005 12:39 am     Reply with quote

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?
PostPosted: Wed Sep 28, 2005 2:07 am     Reply with quote

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

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

Re: How to design low battery indicator?
PostPosted: Wed Sep 28, 2005 7:35 pm     Reply with quote

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?
PostPosted: Wed Sep 28, 2005 9:24 pm     Reply with quote

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

View user's profile Send private message Send e-mail

PostPosted: Wed Sep 28, 2005 9:31 pm     Reply with quote

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

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

PostPosted: Wed Sep 28, 2005 9:48 pm     Reply with quote

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

View user's profile Send private message Send e-mail

PostPosted: Wed Sep 28, 2005 10:06 pm     Reply with quote

Example of low dropout regulator? Low dropout equal to wasting less battery?
kender



Joined: 09 Aug 2004
Posts: 768
Location: Silicon Valley

View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger

PostPosted: Wed Sep 28, 2005 10:17 pm     Reply with quote

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







PostPosted: Wed Sep 28, 2005 10:47 pm     Reply with quote

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! Cool
jecottrell



Joined: 16 Jan 2005
Posts: 559
Location: Tucson, AZ

View user's profile Send private message

PostPosted: Wed Sep 28, 2005 11:15 pm     Reply with quote

Try Microchip MCP1701 in the 5V flavor.

http://ww1.microchip.com/downloads/en/DeviceDoc/21874b.pdf

250mV dropout

2 uA Iq

When you start to feel adventurous you can try a Step-Up/Step-Down converter that will take you through the supply voltage. In other words, a 9V battery can continue to generate the 5V output even after the battery drops below 5V. Read about it here:

http://www.maxim-ic.com/appnotes.cfm/appnote_number/661

Good luck,

John
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Thu Sep 29, 2005 11:46 am     Reply with quote

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

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Thu Sep 29, 2005 12:35 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Sep 29, 2005 1:05 pm     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group