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

Battery Monitor

dodgerdodger Posts: 37
edited 2011-07-29 05:14 in Propeller 1
I would like to monitor the battery voltage so I can know when to change them. I was thinking about using an RC circuit to do this.· Any other suggestions out there?

Thanks

Comments

  • dodgerdodger Posts: 37
    edited 2009-04-11 01:49
    I will be storing torque and rpm data on SD Card. I would also like to include a voltage reading on the last line of the test. So everytime I remove the sd Card to view the data I can also know what level my batteries are at (batteries will be used to power the propeller Mc, torque sensor and any other associated circuits).
  • Matthew HMatthew H Posts: 23
    edited 2009-04-11 02:27
    I've used the Prop's internal sigma Delta ADC (analog to digital convert) to measure my robot's battery before. You can dowload the Propeller app note 001 from here to learn how to use the Prop's ADC feature. The beginning of the ADC.spin file in that download should help a lot. If your battery is more than 3.3V you will need to scale down the voltage using a Voltage Divider circuit. I found this site very helpful in calculating the resistors needed. I was able to measure my battery with an accuracy of about +/- 0.1V

    -Matthew
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2009-04-11 02:28
    It will be much better to use something like an mcp3208/4/2/1 and use a 2.048 vref. Then use a voltage divider and divide by 10 or so, and there is no guesswork involved.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2009-04-11 06:29
    Just as a side note, there are many A/D converters that can be used but probably the simplest and cheapest has to be an 8-pin PIC12F675 that I have configured to transmit A/D codes in continuous (+gap) asynchronous serial fashion. This means that the Propeller only needs a single line to monitor the 4 A/D 10-bit channels that are continually sampled.

    If you try to use an RC circuit then it is possible but I think you would probably need 2 I/O with one I/O acting as a reference RC. Otherwise you may be happy to discharge the capacitor with only a single I/O, release it and measure the time it takes to reach it's switching threshold. Assuming you have calibrated that particular Prop with a reference voltage than it should be accurate enough.

    *Peter*
  • John ElJohn El Posts: 2
    edited 2011-07-29 05:14
    Hi.
    There are many fine circuit ideas using PIC micros like PIC12F675 and more on:
    http://www.artic-instruments.webs.com
    regards
    John
Sign In or Register to comment.