Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 30th September 2007, 07:20 PM   (permalink)
Default Low battery indicator

Is there a simple way/circuit to detect that the battery powering a PIC is running low and needs to be changed before its too late?
quickrik is offline  
Old 30th September 2007, 07:26 PM   (permalink)
Default

Use a PIC with LV detect, (built into some modern PICs)
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now  
Old 30th September 2007, 07:53 PM   (permalink)
Default

Use a PIC with A/D converter, (built into most of the PICs)
jankop is offline  
Old 30th September 2007, 11:00 PM   (permalink)
Default

Excuse my ignorance but doesn't the A/D converter need a reference which in this case would be the supply voltage, which would be dropping at the same rate as the analogue signal of the battery supply.

I'm using a 16F876a
quickrik is offline  
Old 30th September 2007, 11:45 PM   (permalink)
Default

If you use a constant voltage source and measure that with the ADC, as the battery voltage falls, the ADC reference falls but the voltage you are measuring doesn't.

Therefore the value you read back from the ADC will increase as the battery voltage drops and you can work out what the battery voltage is.
__________________
Pete
picprojects.org.uk
geko is offline  
Old 1st October 2007, 12:35 AM   (permalink)
Default

Quote:
Originally Posted by geko
If you use a constant voltage source and measure that with the ADC, as the battery voltage falls, the ADC reference falls but the voltage you are measuring doesn't.

Therefore the value you read back from the ADC will increase as the battery voltage drops and you can work out what the battery voltage is.
Yes battery powers regulator, regulator powers PIC, so measure raw battery voltage before the regulator by using a two resistor divider and measureing 1/2 battery voltage with the PICs A/D function. In your software you can compare A/D value with a constant value you select and do something meaningful when the battery goes below your setpoint value.

Lefty
__________________
Measurement changes behavior
Leftyretro is offline  
Old 1st October 2007, 12:46 AM   (permalink)
Default

The PLVD module requires no I/O. It can be set for different voltage levels and will generate an interrupt.

The PIC16F917 has one. 7 programmable trip points from 1.9V to 4.5V page 125 of the datasheet.
__________________
Bill
Smart Kits build Smart People

http://www.blueroomelectronics.com
blueroomelectronics is online now  
Old 1st October 2007, 07:59 AM   (permalink)
Default

Quote:
Yes battery powers regulator, regulator powers PIC,
Actually that's not what I meant.

You power the PIC from the battery and use a micro power voltage reference IC, for example an LM385 to present a constant voltage at the AD input of the PIC.
__________________
Pete
picprojects.org.uk
geko is offline  
Old 1st October 2007, 08:47 AM   (permalink)
Default

Quote:
Originally Posted by quickrik
Excuse my ignorance but doesn't the A/D converter need a reference which in this case would be the supply voltage, which would be dropping at the same rate as the analogue signal of the battery supply.

I'm using a 16F876a
hi,
Have a look at the +Vref options in the datasheet, the setting I have in mind is +2.5V. Buy a 2V5 reference ic.[ or a 2.7V zener]
__________________
Eric
"Good enough is Perfect"

PIC tutorials:
Gramo's: www.digital-diy.net/
Bill's: www.blueroomelectronics.com/
ericgibbs is online now  
Old 1st October 2007, 09:43 AM   (permalink)
Default

Wow, thanks for all the replies these are all some really good ideas.

I'm going to try leftys voltage divider on the battery to start with because thats simple and I've already got the components

Thank Rik
quickrik is offline  
Old 1st October 2007, 10:20 AM   (permalink)
Default

Quote:
Originally Posted by quickrik
Wow, thanks for all the replies these are all some really good ideas.

I'm going to try leftys voltage divider on the battery to start with because thats simple and I've already got the components
If you're using a voltage regulator it's the method that makes the most sense - and it's cheap!.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Old 2nd October 2007, 10:55 AM   (permalink)
Default

Thanks for the help on this. I tried it last night and it worked a treat! I put a pot inseries with the battery to simulate it running down and fine tune my alarm. Came out supprised how little voltage a PIC can run on, don't know how reliably though.
quickrik is offline  
Reply

Bookmarks

Thread Tools
Display Modes



Similar Threads
Title Starter Forum Replies Latest
12V battery indicator George L. Electronic Projects Design/Ideas/Reviews 7 15th March 2006 01:28 AM
Low battery indicator DarkImpy04 General Electronics Chat 1 27th July 2005 05:16 AM
Battery indicator consuming batteries 2camjohn General Electronics Chat 3 18th February 2005 07:00 PM
Dc battery level indicator Ryan Harding General Electronics Chat 1 13th July 2004 07:00 PM
Making battery pack, need help with LED battery indicator kloan Electronic Projects Design/Ideas/Reviews 7 7th April 2004 12:19 AM



All times are GMT. The time now is 06:43 PM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker