Monitoring Battery Power Level
joelman
Posts: 10
How would I monitor the power level of my 9V battery using the Basic Stamp? I basically want to keep track of how much more life is in my battery.
Comments
Other than checking the voltage with a voltmeter before you use it, little else makes much practical sense, since 9 volt batteries have such poor power reserve. With larger or different batteries, and/or with rechargables, a battery monitoring system would be worth the investment in money and time.
Just one opinion.
Regards,
Bruce Bates
emesys.com/BS2rct.htm#B_voltage
Bruce, a 9 volt battery at 300 milliamp hour can last quite a long time in a project, especially if the Stamp can SLEEP, perchance dream.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Post Edited (Tracy Allen) : 10/30/2005 7:11:30 PM GMT
Thanks,
Joel
Here's schematic and program...
' {$STAMP BS2}
' {$PBASIC 2.5}
' First started by TronicGR, later modified by Provas.
' For www.Greekbotics.tk
'Variables
coefficient·· VAR·· Word···· 'AD555 math var
adc555······· VAR·· Word···· 'AD555 input values
result······· VAR·· Word···· 'AD555 calculated float-point output
volts········ VAR·· Word···· 'AD555 true integer output
LED·········· CON·· 1
DO
·· PULSIN 2, 1, adc555········
' DEBUG DEC adc555, CR····
coefficient = 27499······
volts = coefficient / adc555
result = volts *100······
volts = adc555 * volts···
coefficient = coefficient - volts * 10
volts = coefficient / adc555
result = volts * 10 + result
volts = adc555 * volts
coefficient = coefficient - volts * 10
volts = coefficient / adc555
result = volts + result
result = result + 250
·····················
·· DEBUG CLS, DEC result," = volts * 100",CR
·· IF (result < 800) THEN blink_Led
·RETURN······································
LOOP
blink_Led:
HIGH LED
PAUSE 100
LOW LED
PAUSE 100
RETURN
Greece, Provas
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rule your Destiny-
--Be Good. Be Bad. Be Provas--
Post Edited (Provas) : 10/30/2005 6:53:00 PM GMT
I didn't try yours, but it sould be as fine as mine...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rule your Destiny-
--Be Good. Be Bad. Be Provas--
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
The orginal use was in a solar panel system, so the user wanted to be sure to isolate the measuring device from the charging system....
They enclosed the lamp and the photocell in a 'dark' box and used a lookup table I think to determine voltage levels.
You could also use an A/D converter or if you just want to know when the voltage drops to a certain amount you could use a voltage divider that equates to a logic level....."many ways to skin a cat"
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·
Steve
"Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
Here is a link to a thread that I posted quite some time ago on the L.O.S.A. (List Of Stamp Applications)
http://forums.parallax.com/showthread.php?p=548418
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
And every one else
Please look at PM· Provas
I have to ask you something
Sam
I've received the pm...
Please check yours, too...
I'll upoad some files, hoping to help you as·much as I can...
Friendly, Provas, Greece
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
-Rule your Destiny-
--Be Good. Be Bad. Be Provas--
Post Edited (Provas) : 10/31/2005 10:17:23 PM GMT