Dual ADC Object & Demo
This "object" uses both counter modules of a cog to do two Sigma-Delta ADCs at the same time!
I've added a VGA GUI so that you can easily tweak parameters...
I've added a VGA GUI so that you can easily tweak parameters...
Comments
Ray,
I don't suppose you'd like to explain this a little bit in English... or Spanish... or Russian...anything but Swedish. My automated interpreter just doesn't get Swedish.
Rich
If you have the "demo" board, you can use the default settings·and ADC#1 to look at the onboard microphone signal.· The demo board already has the resistors and capacitors to use Pin#8 as input and Pin#9 as output for ADC (see circuit here http://www.parallax.com/dl/docs/prod/prop/PropDemoDschem.pdf).
The display continuously updates while running and displays the current sample.· In practice, you probably want to smooth this out by averaging.· That's what the "Average" is for.· You can adjust how many samples are averaged to form the next average value.· Does the same thing for the Min and Max value of the samples...
See the "Microphone2VGA" demo object for additional info on the demo board setup...
·
Test Results:
Well, it works pretty good, except for a·small dead zone, right around 50% (between 48 and 52%).· Not too bad though.· The range is not exactly as full as you might think.· I read 100% with only 2.9 V applied and 13% with 0 V applied.
This dead zone must be due to some Schmitt Trigger or hysteresis at·Vdd/2 (?)
The voltage at the Prop Input and the cap is ALWAYS around 1.65V.
When you set your pot to the same voltage, there is not much headroom for a current to flow through the 100k input resistor.
I think this is one of the cases, where you should lower the Rs (and thus increase the C)! But no, that will not make any difference....
And BTW: Nice work!
Post Edited (deSilva) : 10/17/2007 10:50:42 PM GMT
Still getting a glitch at 50% even with smaller resistances.· It may have something to do with my excessively long leads...· I do have some surface mount components and a board I can bake them on...· May have to up my game here!
Anyway, here's how bad it looks:· (Actually, it doesn't look too bad above 50%.· If I can't fix things, I may try to map my input range to be between 50 and 100%)