Shop OBEX P1 Docs P2 Docs Learn Events
Battery Status Monitor — Parallax Forums

Battery Status Monitor

RNA LabsRNA Labs Posts: 4
edited 2008-02-25 23:49 in BASIC Stamp
Our idea is to use the Basic 2 stamp, to monitor our remaining battery life on our robot, and report back to a laptop, when the batteries need recharge,·this will then invoke a find power routine.

Our particular senario, is that we have 2, 12 volt lead acid batteries wired in series to produce 24 volts. Since 12 volt lead acid batteries should be operated between about 10 and 13.5 volts (min charge/max charge) the·value of two of them in· series should equal out to 20 and 27 respectfully. If we build a power supply for the BOE using an LM350 voltage regulator and necessary resistors, and filter capacitors, this would successfully tie the common of the stamp and the batteries being monitored together. We would then like to use·a simple voltage divider, to regulate the battery supply voltage from the batteries, to something that the basic 2 stamp, can look at as either high or low. Using a voltage divider, with an R1 of 47K, and an R2 of 3.5K, we can calculate the voltage that we would be supplying to the I/O pin of the stamp. According to what I have read, the Basic 2 stamp, considers any voltage between 1.4Volts and 0 as low, and anything above 1.4 as high. using the voltage divider above, this would set our threshold voltages for triggering an input of low, as the need to seek recharge. the value presented to the pic at 20 volts, would be 1.39 volts, as compared to a fully charged battery array of 27 volts being reported to the stamp at 1.87 volts. Does this system of thinking seem that we are moving in the right direction, or are we making this harder than it should be? Any ideas or errors in our calculations, in this area would be greatly appreciated.

Comments

  • Tracy AllenTracy Allen Posts: 6,666
    edited 2008-02-20 16:44
    I prefer to use a resistor/capacitor combination for this kind of measurement. That way the Stamp can track the analog voltage of the battery as it discharges, not just the end point. The resistor would be

    I think your calculations are correct, and the voltage divider you propose should work. However, the switching points will not be not as clean as you would like. The threshold has a temperature dependence and the trigger level fluctuates in response to electrical noise. Also, when an input hovers near the ~1.4 volt threshold, the Stamp draws excess current internally. That amounts to a milliamp or two extra, and that may or may not be an issue in your system.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • RNA LabsRNA Labs Posts: 4
    edited 2008-02-20 23:52
    Tracy,

    Fantastic idea, (and was considered at first but seemed much more of a task, before your page) and implementation notes! I must say that your page is also fantastic! I love your work! Appreciate the ideas, and will incorporate them soon, and let you know how everything works from there...

    However one question remains with the diagram, and notes that you have provided... Do the stamp, and the batteries being tested need to have any other common, other than the tap from the capacitor to the Vss, or can they be seperate voltage sources, with the only common being the Vss tap?

    Thanks for the excellent reply!!
  • Tracy AllenTracy Allen Posts: 6,666
    edited 2008-02-21 07:13
    Thanks for the kind words!

    In answer to your question, everything has to be common to Vss. That is the reference point for the Stamp, the capacitor, and the batteries to be measured. Am I understanding your question about, "have any other common"?

    The resistor from the battery to the RCtime circuit should be quite a large value, around 1 megaohm, and both the resistor and capacitor should be located near the Stamp and the wiring should be neat and short there to avoid noise pickup for best results. Take care not to touch any Stamp pins directly with 24 volts!!!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • RNA LabsRNA Labs Posts: 4
    edited 2008-02-21 12:08
    I actually meant anything else common, but yes I understand the Vss being common to everything. The resistor, I will use will be the same as in your example, and be 681K, with a .01uF cap. it looks as though that should work fine, and I think that I only have a .5 watt, so it may be overkill, but I shouldn't need to worry about smoking it. In all reality, I will not be back in the Lab for a week or so, but am eager to check this out!

    Appreciate your input!
  • RNA LabsRNA Labs Posts: 4
    edited 2008-02-25 23:49
    Tracy,

    This works BRILLIANT! I appreciate the idea, and the appropriate instruction!

    *On another note, I left you a PM on another issue that I am trying to work through, and thought that maybe you might help.

    Thanks again!
Sign In or Register to comment.