Shop OBEX P1 Docs P2 Docs Learn Events
About Sigma-delta Analog to Digital Conversion — Parallax Forums

About Sigma-delta Analog to Digital Conversion

caskazcaskaz Posts: 957
edited 2011-11-29 08:43 in Propeller 1
Hi.

I'm going to test "AN008: Sigma-delta Analog to Digital Conversion".
http://www.parallaxsemiconductor.com/an008

I did download "AN008 Sigma-delta ADC Conversion code (zip archive)".
I tested "appnote_adc_list1.spin".

I changed only 2-lines because characters on serial-terminal are no readable.
_clkmode = xtal1 + pll16x <-- _clkmode = xtal1 + pll8x
_xinfreq = 5_000_000 <-- _xinfreq = 10_000_000

I added 10kohmVR(0 - 3.3V) to "Analog Input".
But there is always "0" less than VR=1.45V.
There is always "512" more than VR=1.45V.
This is not converted from analog to digital.

I checked curcuit again and again. It's ok.
What is wrong?

Comments

  • sylvie369sylvie369 Posts: 1,622
    edited 2011-11-29 05:13
    Can I try to clarify what's happening? Tell me if I'm understanding you correctly.

    You set up a circuit for Sigma-Delta A/D conversion. But you get a reading of 0 whenever your voltage is below 1.45V, and of 512 whenever it's above 1.45V. Is that correct?
  • caskazcaskaz Posts: 957
    edited 2011-11-29 05:23
    Hi.

    Yes, I made same curcuit on document"AN008: Sigma-delta Analog to Digital Conversion"..
    Value on terminal screen is "0" when VR-output is under 1.45V.
    Value on terminal screen is "512" when VR-output is 1.45V to 3.3V.
  • max72max72 Posts: 1,155
    edited 2011-11-29 05:46
    Hi,
    I used the dual ADC object available here:
    http://www.rayslogic.com/propeller/programming/adc.htm

    It worked out of the box.

    If it still fails what are the resistor/cap values you used?

    Massimo
  • RaymanRayman Posts: 14,851
    edited 2011-11-29 06:13
    double check that you are using the same pins for the circuit as in your code.
    Also, you need to use small capacitor values, like 10 nF or so.
    Double check that your feedback resistor is connected correctly.
    Also, use values like 150k for the input resistor and 100k for the feedback resistor to start with.
  • caskazcaskaz Posts: 957
    edited 2011-11-29 07:38
    Hi.

    I used INP_PIN=8,FB_PIN=9.
    I tried NP_PIN=8,FB_PIN=10.
    It seems trouble has gone.
    maybe, my schmart-board's pin9 seems broken.

    A/D value is from 140(VR=0v) to 470(VR=3.3V) at ADC_INTERVAL=512.
    This value is normal?
  • tonyp12tonyp12 Posts: 1,951
    edited 2011-11-29 07:48
    The circuit can not be on a separate bread board.
    741 x 737 - 150K
  • Mike GreenMike Green Posts: 23,101
    edited 2011-11-29 08:43
    The feedback resistor and the capacitor must be mounted very close to the I/O pins of the Propeller for this to work. We're talking about well under a centimeter for best results.
Sign In or Register to comment.