Measuring Battery voltage


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Location
    UK-Midlands
    Posts
    84

    Default Measuring Battery voltage

    Hi all,

    I want my cake and eat it too!

    I need to monitor the battery voltage powering a Pic (16F876) circuit. The voltage swing is around 4.5v to 3.3v. The problem is the batteries are small "AAA" size and the PIC 'sleeps for 99.9% of the time. What is the best way (if any) for the PIC to periodically monitor the battery without the measuring circuit draining the battery all the time?

    I thought of switching the battery voltage to a circuit but not sure how the switching transistors voltage drop would affect the measurment, for example with temprature?

    Thanks,
    Bob

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    use a timer (watchdog) interrupt + resistive voltage divider. one side of your voltage divider go to the battery, the other side (wich is suppose to go to GND) will go on a extra I/O. When your PIC wake up of the timer interrupt or sleep, or WDT or whatever else, you configure this i/o as output and send this PIN to GND, then take the battery reading. Once done, you turn this i/o to input and go back to sleep.

    Another method is to use high value resistors (few hundreds Kohms) and use analog comparator interrupt.

    16F876 is probably not the best choice for a battery opeated system. a LF serie could be better. 18F even better.
    Last edited by mister_e; - 3rd December 2006 at 21:34.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Mar 2004
    Location
    UK-Midlands
    Posts
    84


    Did you find this post helpful? Yes | No

    Default

    Thanks Mister e,

    I was thinking of switching the 5v to it but your solution is better. The Pic I was intending to use was the LF version.

    But any pointers on a better 18F part with similar ports and pinouts would be appreciated. I now get confused by the seemingly massive choice of parts.
    Is there a group of 18F parts that are commonly used?

    Thanks,
    Bob

Similar Threads

  1. Voltage monitor for car battery
    By passion1 in forum mel PIC BASIC Pro
    Replies: 50
    Last Post: - 23rd April 2008, 21:47
  2. Expanded Scale Voltmeter
    By Pic_User in forum Schematics
    Replies: 6
    Last Post: - 8th February 2008, 20:32
  3. Help with final project
    By OvERKiLL in forum General
    Replies: 4
    Last Post: - 15th December 2006, 20:35
  4. Help with setting adcon1 for 16f877
    By jessey in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 16th August 2005, 11:13
  5. measuring input voltage
    By thon in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 11th August 2004, 16:03

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts