Shop OBEX P1 Docs P2 Docs Learn Events
Sigma Delta ADC or Dedicated ADC Chip — Parallax Forums

Sigma Delta ADC or Dedicated ADC Chip

william chanwilliam chan Posts: 1,326
edited 2008-03-13 15:15 in Propeller 1
This may seem like a stupid question....

Which is better, more accurate, faster, more flexible, less noise and uses less code?

1. Sigma Delta ADC using 2 pins on the Propeller or
2. Using a dedicated ADC chip connected to the Propeller.

I am very surprised with the flexibility of the Sigma Delta ADC code to change the sample bits easily.
Will the feedback pulses from the Sigma Delta ADC add noise to the source signal? ( Mic )

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-12 01:34
    The Sigma-Delta ADC using 2 pins on a Propeller works pretty well, but is not optimized.
    A dedicated ADC will always be better, can be faster, probably has less noise. More flexible
    depends on what you're comparing. Some external ADCs may not be very flexible at all.

    Neither the Propeller-based ADC nor most external ADCs will take much code to implement.
    It's hard to compare them on this.

    The feedback pulses will add noise to the signal source. How much noise and whether that
    will make much difference will depend as much on layout and care in filtering and shielding
    as it does on the method used for ADC.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-03-12 01:53
    For AC coupled signals such as a microphone (ac coupled means there is a capacitor between the pin and signal), Sigma Delta pretty well. But for signals which don't change or change slowly the sigma delta is quite noisy and really only suitible for ballpark measurments such as reading a pot. It's a little hard to measure bit accuracy in ac since the signal is always changing, but as you've noted you have control over the speed vs bits with sigma delta. If you have a demo board you can take a look at the actual data generated in one of the microphone_to_... examples on the object exchange.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.

    Post Edited (Paul Baker (Parallax)) : 3/12/2008 1:58:29 AM GMT
  • william chanwilliam chan Posts: 1,326
    edited 2008-03-12 02:54
    I would think that using I2C or SPI to read samples from a dedicated ADC chip would be slower than doing the Sigma Delta ADC itself.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.fd.com.my
    www.mercedes.com.my
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2008-03-12 03:04
    I have use an 8 channel 12-bit ADC in one application where I wrote a driver in assembler to scan the inputs and write the results to a buffer. I have some extra delays in there but if I take them out it can run at about 100,000 samples/second spread over the number of channels selected. There are some other tricks to make it go faster but the A/D chip max's out at 100ksps and is certainly needs to be slower at 3.3V. So for 8 channels this requires only 3 I/O pins and also has the advantage that it is DC accurate.

    *Peter*
  • RaymanRayman Posts: 14,162
    edited 2008-03-12 14:58
    I just want to point out that many dedicated ADC chips use the sigma-delta technique...· So, it's really a question of a homemade DIY circuit with discrete components versus a monolithic commercial product...
  • mynet43mynet43 Posts: 644
    edited 2008-03-12 15:04
    I need a simple adc input to sample a volume control pot.

    I'd rather not use a dedicated chip like the MCP3208.

    Would someone please point me to the simplest circuit and supporting code?

    Thanks for your help.

    Jim
  • Robot FreakRobot Freak Posts: 168
    edited 2008-03-12 15:39
    A while ago, I wanted the same thing with a Javelin Stamp.
    Peter Verkaik then posted the following circuit:
                        +---------------o Javelin ADC in
                        |
    Vin o-----[noparse][[/noparse]10k]-----+-----[noparse][[/noparse]10k]-----o Javelin ADC out
                        |
                     [noparse][[/noparse]0.1uF]
                        |
                       -+- GND
    


    So somebody with knowledge of the Propeller could write code to generate a PWM signal on the ADC out, and then read the state of ADC in.

    Kind regards,
    Robot Freak
  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-12 15:46
    mynet43,
    Have you looked at the AN001 application note? This describes the sigma-delta ADC we've been talking about including code to make it work. You can find this off Parallax's Propeller page. Go to that, then Downloads, then you'll see the link.

    Robot Freak,
    william chan also posted a slow simple ADC that works much the same way: http://forums.parallax.com/showthread.php?p=714954.

    Post Edited (Mike Green) : 3/12/2008 3:53:59 PM GMT
  • RaymanRayman Posts: 14,162
    edited 2008-03-12 16:14
    I think you want 2 caps where the resistors meet. One to Vdd and one to Gnd. This reduces effects of noise on power supply rail...
  • Beau SchwabeBeau Schwabe Posts: 6,559
    edited 2008-03-12 16:42
    "I think you want 2 caps where the resistors meet. One to Vdd and one to Gnd. This reduces effects of noise on power supply rail..."

    It also has a way of balancing out any leakage effects within the capacitors when you use two·that are identical.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2008-03-12 21:59
    mynet43 said...
    I need a simple adc input to sample a volume control pot.

    I'd rather not use a dedicated chip like the MCP3208.

    Would someone please point me to the simplest circuit and supporting code?

    Thanks for your help.

    Jim

    Although you could use an ADC to read a pot there is another way and that is simply to add a capacitor and treat the circuit as an RC timing circuit. There are numerous examples of doing this on the prop but simply it's a matter of either charging/discharging the cap and measuring the time it takes to switch levels. So your pot would be a two terminal device variable resistor in this instance instead of a three terminal voltage divider. BTW, only one I/O pin is required.

    *Peter*

    P.S. mynet43, you should ask this on a new thread as this thread was started by William and you could end up "hijacking" the thread which is a big no-no.

    Post Edited (Peter Jakacki) : 3/12/2008 10:54:07 PM GMT
  • RinksCustomsRinksCustoms Posts: 531
    edited 2008-03-13 05:38
    Peter Jakacki said...
    mynet43 said...
    I need a simple adc input to sample a volume control pot.

    I'd rather not use a dedicated chip like the MCP3208.

    Would someone please point me to the simplest circuit and supporting code?

    Thanks for your help.

    Jim

    Although you could use an ADC to read a pot there is another way and that is simply to add a capacitor and treat the circuit as an RC timing circuit. There are numerous examples of doing this on the prop but simply it's a matter of either charging/discharging the cap and measuring the time it takes to switch levels. So your pot would be a two terminal device variable resistor in this instance instead of a three terminal voltage divider. BTW, only one I/O pin is required.

    *Peter*

    P.S. mynet43, you should ask this on a new thread as this thread was started by William and you could end up "hijacking" the thread which is a big no-no.
    idea.gif
    look for the·labs sticky in the main prop forum, then go down to the counters lab. One experiment goes into detail about using the counters for sigma delta in an RC/Time sort of way, minimal coding, good results.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    E3 = Thought

    http://folding.stanford.edu/·- Donating some CPU/GPU downtime just might lead to a cure for cancer! My team stats.
  • william chanwilliam chan Posts: 1,326
    edited 2008-03-13 06:46
    Quote :
    P.S. mynet43, you should ask this on a new thread as this thread was started by William and you could end up "hijacking" the thread which is a big no-no.

    Don't worry, any topics about ADC is fine on this thread.


    Does anyone know what happens if the capacitor value is too small?
    Answer : The sampled value will hover around 0.5 of max value.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.fd.com.my
    www.mercedes.com.my
  • mynet43mynet43 Posts: 644
    edited 2008-03-13 15:15
    I certainly didn't mean to hijack the thread. This thread seemed pretty close to what I needed.

    Mike's answer pointed me to the answer I was asking for. Other answers pointed me to even simpler solutions.

    Thanks all for the great support!

    Jim
Sign In or Register to comment.