View Full Version : Propeller to measure voltage

03-31-2012, 09:37 PM
I have a robot that I'd like to be able to monitor the 12v battery voltage on. The motor controller has all this built in, but I want redundancy built into my telemetry.

I have a couple pins left on the Prop, is there an analog circuit I can build to monitor the battery? It could even be as simple as a High/Low indicator with .5v accuracy.

04-01-2012, 12:02 AM
You could use a comparator to indicate good/bad, a dual comparator for good/marginal/bad, or use 2 pins as a sigma/delta adc to get an actual voltage reading.

04-01-2012, 10:05 AM
Or, interface an I2C ADC.

04-01-2012, 10:21 AM
funny i just found this blog yesterday...
http://embeddederic.blogspot.com/ The 3rd and 2nd
post are about building a battery monitor
based on.... Ardunio yuck. Amyways i know
its not analog and maybe a bit overkill, but
maybe itll inspire you. if you go this route
you could just build a quick atmel dev board
to program the chip and then add the chip to your
propboars and communicate via i2c which would save
your prop pins.... let me know if this was helpfull
or if its to much.

Phil Pilgrim (PhiPi)
04-01-2012, 02:45 PM
You could easily do this with a few passives to make sigma-delta ADC. See AN008, the section on extended voltage ranges:



Duane C. Johnson
04-01-2012, 03:06 PM
Hi xanadu;

By far the simplest AtoD is this RC circuit.

1. Set the Pin to output a LOW which discharges the capacitor to near 0 volts.
2. Reset a counter variable.
3. Set the Pin to input which allows the capacitor to start charging up.
4. Watch and count the variable until the Pin reads HI
5. The value in the variable represents the measured input voltage.

OK, this is not linear but using a small look up table you can convert the value into battery voltage.

Keep the resister fairly large to protect the Prop pin from damage due to over voltage.
Almost any small capacitor will do. The smaller the value the quicker the conversion time.

This is a fairly low resolution AtoD converter but quite adequate for battery voltage monitoring.

Duane J

04-01-2012, 05:17 PM
Thanks guys, it looks like I'm going to try the Sigma-delta Analog to Digital Conversion (great PDF btw!). I really couldn't see spending $20 on a couple resistors in a pre-made solution, so as always you saved me time and money ;)

I'll probably also build that comparator and the RC circuit since I have the parts. Should be a good learning experience. Now all I need to do is stop the phone from ringing hehehe.