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 monitor battery level that is running the PIC itself?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
capfelix



Joined: 02 Dec 2005
Posts: 9

View user's profile Send private message

How to monitor battery level that is running the PIC itself?
PostPosted: Sun May 21, 2006 10:22 am     Reply with quote

Hi,

Did anyone have any experience with designing a battery monitoring system that monitor the PIC controller battery level?

I have a PIC controller running on 2 AA size battery (3V in total). Is there a way for the controller itself to monitor its battery level? Code and circuit will be very much appreciated.

Thanks!
Ttelmah
Guest







PostPosted: Sun May 21, 2006 10:34 am     Reply with quote

This has been answered only a day or so ago, in the thread:
"ADC Vref and ISCP-CLK on PIC16F68x need some input"

The 'key' is to have some known reference voltage feeding into an analog input, use the supply as Vref, and read this. As the supply drops, the reading will rise. So if (for instance), you had a 2.5v reference, and 3.3v supply the reading would be (for a 10bit ADC), 776. If the supply fell to 3.1v, the reading would rise to 826.
The supply, is (2.5*1024)/reading.

Best Wishes
ljbeng



Joined: 10 Feb 2004
Posts: 205

View user's profile Send private message

PostPosted: Mon May 22, 2006 7:01 am     Reply with quote

I have used the MCP100-xxx (normally holds micro in reset) to indicate when the battery level falls below a certain level. Connect the MCP100 to supply and it's output to a micro input pin. You can even use an output pin to turn on the device for low current consumption, then check the input pin after .3s or so to see if the battery is above or below the voltage of the device.

see:http://www.electronicdesign.com/Articles/ArticleID/11609/11609.html
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: Fri May 26, 2006 1:55 am     Reply with quote

ljbeng wrote:
Connect the MCP100 [reference] to supply and it's output to a micro input pin. You can even use an output pin to turn on the device for low current consumption, then check the input pin after .3s or so to see if the battery is above or below the voltage of the device.

see:http://www.electronicdesign.com/Articles/ArticleID/11609/11609.html


There's another schematic in this thread.
http://www.ccsinfo.com/forum/viewtopic.php?t=24842&highlight=battery+voltage+reference
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
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