Properller ADC0831 Voltmeter
Trevor
Posts: 8
Hello,
As part of a larger product I am using 7.4V LiPo packs to power a unmanned ground vehicle. Part of the requirements of this project is that the battery voltage be monitored, due to the volatile nature of LiPo's when they drop under voltage. Because of this, I need to be able to read the Voltage level from the batteries and broadcast this information back to a ground station, the communications side however is already complete.
My goal is to employ an ADC0831 A/D converter to read the voltage levels, likely using a voltage divider to scale the voltages going to the Prop down to the correct levels (0-3.3V).
Searching around a bit, I found several examples of this being accomplished on the BS2 platform, employing the BS2 SHIFTIN functionality. Fortunately, thanks to the object exchange and Martin Hebel's BS2 Functions object I am fairly sure I can replicate the BS2 functionality on the Propeller, my goal being to model my voltmeter off of the attached BS2-orginated schematic.
In either case as I continue to tinker I figured I would see if anyone else out there has done this already using the Propeller and could offer any hints or suggestions.
As part of a larger product I am using 7.4V LiPo packs to power a unmanned ground vehicle. Part of the requirements of this project is that the battery voltage be monitored, due to the volatile nature of LiPo's when they drop under voltage. Because of this, I need to be able to read the Voltage level from the batteries and broadcast this information back to a ground station, the communications side however is already complete.
My goal is to employ an ADC0831 A/D converter to read the voltage levels, likely using a voltage divider to scale the voltages going to the Prop down to the correct levels (0-3.3V).
Searching around a bit, I found several examples of this being accomplished on the BS2 platform, employing the BS2 SHIFTIN functionality. Fortunately, thanks to the object exchange and Martin Hebel's BS2 Functions object I am fairly sure I can replicate the BS2 functionality on the Propeller, my goal being to model my voltmeter off of the attached BS2-orginated schematic.
In either case as I continue to tinker I figured I would see if anyone else out there has done this already using the Propeller and could offer any hints or suggestions.
Comments
I just read the AN001 - Propeller Counters v1.0
There, on page 17 - 18, is a breathtaking design showing how to build a Sigma/Delta A/D converter using a Cog's internal counter, two I/O pins and a few resistors/capacitors. I would try that before anything else. And the code is there. Not much work. Sigma/Deltas used to have lousy DC performance and I have not seen any specs on this one, but I would definitely test it to see if it can be used in your application.
It's a heck of a lot simpler, though, just to get a cheap ADC chip and let it handle all the messy details.
The beauty of the Propeller is (in my eyes) that it contains a set of peripheral controllers that can be made to function as anything you want it to be. Well, almost. The resource most likely to be scarce in a Propeller is the I/O and the three pins used by the ADC0831 is 50 % more than the two pins used by the Sigma/Delta. And the code is there, just to download. Couldn't be simpler or better.
Speed is not needed, right. But it doesn't hurt either. Especially if it comes for free. Noise filtering can be handled in SW.
I have only recently been exposed to the Propeller arcitecture and I have no experience using it. But cluttering such a fine design with unnecessary peripherals seems to be a bad choice.
Post Edited (originator) : 3/13/2007 7:45:21 AM GMT
Reading the book says a lot about the Propeller. And I have done quite a lot of reading.
My first experience with micros was the intel 4004, that has made me very sensitive to bad solutions or, to see it the other way, happy when I see good solutions. Like the Propeller.
Post Edited (Skogsgurra) : 3/13/2007 11:19:31 AM GMT
One other thing, since when are they volatile when undervoltage? You can damage them yes but you make it sound like over discharging endagers life and limb.
Graham
The reason that I had intended to use the ADC0831 ADC is because I already have a few of them from using them with LM34 temperature probes. In regards to the danger of the LiPos, the danger is primarily to the battery which is considerable since I am working with a tight budget and can not afford to replace the batteries.
In either case, the project contains safeguards that will shut down the batteries before they reach a critical voltage, however part of the orginal requirements was that the battery voltage be able to be monitored from the vehicles control station, so even though it is not entirely necessary from a practical standpoint, we have to fulfill the requirement (it's a school project) so it has to be done one way or another.
In either case, thanks for the tips, I'll definately look into the Sigma/Delta method.
i didnt one time ( test,rewire , test,rewire snarl) and blew the prop... intirely my fault, but easy to do if you breadboard as i did.
now the prop will just blink leds, no extra cogs or difficult functions allowed
fourtunately i have several
dan
/John