PDA

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.

kwinn
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.

Leon
04-01-2012, 10:05 AM

rwgast_logicdesign
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
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:

-Phil

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

By far the simplest AtoD is this RC circuit.
91248

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