Propeller to measure voltage
xanadu
Posts: 3,347
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.
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.
Comments
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
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
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.