Analog to digital conversion
AppCogSys
Posts: 9
It looks like it is possible to do analog to digital conversion, and D to A, with some coding on the Propeller chip. My question is... Is there any benefit to allowing the chip to do the conversion or would it be better to include dedicated A to D hardware in my design. In this particular instance I have several (call it 7) analog sensors (IR proximity, etc.) that I need to keep tabs on. Any insight, opionions or WAGs appreciated.
Comments
Thanks again...
D'
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
I agree with Chip, but I'd like to suggest further that by not using the internal CTRs, and having the virtual A/Ds timed under software control (very simple with the Propeller), a single Cog could run as many as 16 A/Ds; limited by port bit availability..... 2 per A/D.
And if you're willing to give up a bit of speed performance, one could reconfigure the software driven A/Ds to use only a single port bit, so the limit would then be 32 channels.
And the software to implement the virtual A/D is simpler than the software one would need to communicate serially to an external A/D.
Furthermore, the cost of a virtual A/D is two resistors, one capacitor and severl lines of code. A whopping total of 5 cents per A/D.
Cheers,
Peter (pjv)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
dan
Chip Gracey
Parallax, Inc.
thanks
dan
I have use the virtual A/D to measure the positive phase of 110 VAC line with no problem at all!
Just go to the examples and app note on the Parallax site, and study how it works. It's quite simple really.
Although if you really need 12 bits you do need to be quite careful in your layout and software approach. I have managed 14 bits, but it was somewhat of a stretch!
Cheers,
Peter (pjv)
Thanks for the tip on virtual A-D. However, pretend like you're talking to a complete simpleton (me) and flesh out the concept a wee bit more so that I have a little to ruminate on. I hate to be cliche' but "I'm new to Propeller" and need a little more in the way of basic theory and implementation. You don't need to spell it all out. That would deprive me of all of the joy of discovery. Just the general outline. My specific instance would be a Sharp IR proximity sensor. Typical analog with power ground and signal.
D'
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"If you want more fiber, eat the package.· Not enough?· Eat the manual."········
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Life is one giant teacup ride.
i've set up my system using the voltage divider that pj had, then into your diagram.. correct ? dont want to let the smoke out...
dont see any app notes for the prop, but am studying example 20, even thou that appears to be a measure of resistance...
dan
ps thanks for the patience
Post Edited (Sawmiller) : 6/21/2006 3:04:00 PM GMT
Currently using the MAX1270 for the StampPLC!
Isn't that what's used to dertermin what frequencies are in a digitized sample of audio?
...I'm nearly bald as it is, and here I am scratchin my head tryin to figure this out.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Just tossing my two bits worth into the bit bucket
KK
·
Like reversing the leads on a DMM (one way it's NEG, the other it's POS.)
Chip's schematic shows a voltage divider included before the propeller pins.
The -8V to 10V analog signal gets divided up so 10V will never reach a pin.
PJ's voltage divider can be left out.
thanks
dan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Life is one giant teacup ride.
Post Edited (Paul Baker) : 6/22/2006 3:03:37 PM GMT
Thanks again,
It will be awhile More because they are isolated!
The signal comes from a 27volt circuit with a virtual GND at 11Volts. Without the virtual gnd I doubt an A2D will read anything, and with it I'm just not brave enough yet. The max1270 does a great job, I'm just looking to make the device smaller in the future and taking it out would help if I didn't lose performance.
When I do·have a disposable model I think I'll try moveing GND though. Thanks again.
Many thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ian Mitchell
www.research.utas.edu.au
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Definetly a E3 (Electronics Engineer Extrodinare!)
"I laugh in the face of imposible,... not because i know it all, ... but because I don't know well enough!"
Ok, maybe I'm thinking about pushing this thing a little too hard. I saw the Propeller for the first time this past weekend (cool! [noparse]:D[/noparse]). I'm curious if you think it might be possible to build a software defined radio at around 13.5Mhz without using an external A to D converter. I'm thinking two options. The first is everything but the antenna and matching would be done in software - all downconverting and demodulation. Second option would be to build the first IF in analog to downcovert to around 1Mhz, then do the rest in the Propeller.
It appears that all of the A/D you have discussed in you software implementations have been in the sub-megahertz range (most appears to be in the single digit kilohertz or sub-kilohertz range). So, how far up do you think it could be pushed?
Thanks,
Robert (rp)