Shop OBEX P1 Docs P2 Docs Learn Events
Checking the battery voltage level on a prop system — Parallax Forums

Checking the battery voltage level on a prop system

StickySticky Posts: 42
edited 2011-04-10 14:42 in Propeller 1
Is it possible to use the rctime function from the basic stamp object to measure the voltage of a battery attached to the propeller I'm using? I have the chip on a breadboard and the connection would be straight through to a pin to check a 7.2 volt battery pack. I know propellers like a 3.3 volt input and will take 5 volt with enough resistance, I am wondering if the same can be done with 7.2 volt with enough resistance?

Comments

  • LeonLeon Posts: 7,620
    edited 2011-04-10 08:45
    Use a voltage divider giving, say, 3V, and measure that.
  • Mike GreenMike Green Posts: 23,101
    edited 2011-04-10 08:47
    Yes, the same thing can be done with the Propeller and it's done the same way, just respecting the 3.3V limit of the Propeller vs. the 5V limit of the Stamps. To measure voltages higher than the supply voltage of the processor, just use a voltage divider. If you haven't, read the notes on using RCTIME for measuring battery voltage at this. Use the "app-notes" link.
  • StickySticky Posts: 42
    edited 2011-04-10 09:10
    I'll actually trying to catch the voltage before it gets too low and the prop stops functioning. Should I put a higher voltage regulator like 5 volts
  • StickySticky Posts: 42
    edited 2011-04-10 09:12
    I cut off my post. I wanted to add that I catch a 5 volt from a ping, can i do the same here
  • LeonLeon Posts: 7,620
    edited 2011-04-10 09:20
    What does "catch a 5 volt from a ping" mean?
  • Mike GreenMike Green Posts: 23,101
    edited 2011-04-10 09:51
    I assume you've got some kind of rechargeable battery pack. No matter what chemistry they use, the output voltage tends to fall off pretty rapidly once they're exhausted. The trick is to have an estimate of how much is left in the battery. Most manufacturers have graphs that show the battery voltage vs. remaining capacity. This is usually under no-load or a light load. You want to briefly stop using the motors, measure the battery voltage, and compare it to useful points on the graphs to give you an estimate of how much time is left. You might decide to have the robot look for its charger at 25% or 10% remaining capacity, depending on how far it is to the charger and how close you want to cut it. You might consider using a switching regulator for the 3.3V (and 5V) supplies. Dimension Engineering makes "drop-in" equivalents of the 78xx series of regulators. These would allow you to run the battery down to exhaustion levels (not great for the battery, but sometimes necessary).
  • RaymanRayman Posts: 14,877
    edited 2011-04-10 14:42
    With a 1k or 10k series resistor, I think you could read even 12 Volts just fine using RC time.

    The Prop has overvoltage protection on every pin.

    If you are really worried about it just but a LED from the Prop pin to ground...
Sign In or Register to comment.