Shop OBEX P1 Docs P2 Docs Learn Events
get battery power status — Parallax Forums

get battery power status

chris joneschris jones Posts: 391
edited 2009-10-02 16:33 in BASIC Stamp
Hello

i have a bs2 board of education and i wante dto know if there is a way to check the battery to see how much power is left. i have the bs2 board wit hthe 9V battery.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-10-02 15:26
    There's some discussion, circuits, and sample code for this on Tracy Allen's website (www.emesystems.com). Click on the "app-notes" link.
  • chris joneschris jones Posts: 391
    edited 2009-10-02 15:36
    Hello

    i dont see anything that talks about battery managemenet the only thing that is close is

    PIN, the new type declaration in PBASIC 2.5 section
  • Mike GreenMike Green Posts: 23,101
    edited 2009-10-02 15:46
    Look under "RCTIME command". It shows how to monitor battery voltage.

    The major battery manufacturers all publish curves showing the voltage vs. time at specific discharge rates and you can use that to estimate the remaining battery capacity. Remember that 9V batteries are not designed for high current drains (> 50mA).
  • chris joneschris jones Posts: 391
    edited 2009-10-02 15:56
    Hello can you explain this so i will connect the circut right

    681 kohm 470 ohm
    Vx ----/ \/\/\---o
    /\/\/\----P0 to stamp
    unknown |
    voltage ===== 0.01 uF film
    |
    Vss
    What will i need?
    1. resistor
    2. capacitor What size ?
  • Mike GreenMike Green Posts: 23,101
    edited 2009-10-02 16:33
    Here's one example of a film capacitor: www.mouser.com/ProductDetail/WIMA/MKP2-01-100-5/?qs=sGAEpiMZZMvCt%252bwg%252braTuiEXhpIo3SenUD%252bkwVsAtxo%3d. The polypropylene film is much more stable with temperature than a typical ceramic insulator. Any voltage rating from about 50VDC up will work. Lower voltage ratings make for a smaller capacitor.

    The resistors can be 1/10W, 1/8W, or 1/4W ratings. One as mentioned is a 681K 1% value and the other is 470 Ohm and could be 10% (or 5%). Lower power ratings make for a smaller capacitor. You could go with a 10% or 5% 680K resistor as a more readily available alternative. You'll just get RCTIME values that may vary more widely than the ones Tracy shows in his discussion.

    Post Edited (Mike Green) : 10/2/2009 4:39:29 PM GMT
Sign In or Register to comment.