Shop OBEX P1 Docs P2 Docs Learn Events
ADC question — Parallax Forums

ADC question

CenlasoftCenlasoft Posts: 265
edited 2010-06-09 19:35 in Propeller 1
Hello,
I am using the 12 bit 2 channel ADC (3202-B) IC and the object for it. I have a circuit that delivering a 3.3 VDC from a voltage divider to Channel 0 of the ADC chip. Since this IC is 12 bits, the full range should be 0-4095. I am getting about 2900 or so for 3.3 volts from the output. I tied the Vdd (3.3 V) from the power supply to channel 1 of the IC and got 4095. Can anyone tell me why the different reading? The multimeter reads 3.3 from the voltage divider going into channel 0.
Thanks,
Curtis

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-06-09 14:39
    How about more information? What's the voltage divider and how's it connected? How about a link to the datasheet for the ADC? There's some kind of assumption you're making that just isn't so.
  • CenlasoftCenlasoft Posts: 265
    edited 2010-06-09 15:03
    Sorry about that. The IC I bought from Parallax (3202-B 12 bit ADC) (ww1.microchip.com/downloads/en/DeviceDoc/21034e.pdf). The circuit is attached (PCB). It is a LRC circuit similar to Beau's inductive proximity project.
    Thanks,
    Curtis
    555 x 499 - 71K
  • BeanBean Posts: 8,129
    edited 2010-06-09 15:13
    A schematic would be more helpful...

    Bean

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Use BASIC on the Propeller with the speed of assembly language.
    PropBASIC thread http://forums.parallax.com/showthread.php?p=867134

    March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    There are two rules in life:
    · 1) Never divulge all information
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    If you choose not to decide, you still have made a choice. [noparse][[/noparse]RUSH - Freewill]
  • edited 2010-06-09 15:45
    are your pcb gnds connected ok?
  • CenlasoftCenlasoft Posts: 265
    edited 2010-06-09 16:35
    Hello,
    Here is my schematic.
    Curtis
    718 x 308 - 22K
    ECA.JPG 21.8K
  • SeariderSearider Posts: 290
    edited 2010-06-09 16:49
    I have a few questions about your circuit.

    1. on the part of the cuircute attached to Pin 2 of the 3202 I would expect there to be a connection to 3.3v somewhere before the 1M resistor.· Pin 0 (from the Prop I guess) is issolated by a capacitor so it could not be providing any current flow through the voltage divider.
    2. Lets assume that you did connect a 3.3 v source to the 1M resistor at the juntion with the Diode. Then by adjusting the 1M variable resistor, you would be able to present 0 to 1.65 volts to Pin 2 of the 3202.· Instead of 0 - 4096 you should see 0 to 2048· or similar based on the accuracy of the two 1m resistors.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    Searider
  • CenlasoftCenlasoft Posts: 265
    edited 2010-06-09 17:09
    Searider,
    Thanks for helping. The circuit from Pin 0 is the RLC circuit. Pin 0 excites this circuit at resonance and provides about 21 volts to the diode and capacitor (peak detector). The voltage divider brings down the voltage to about 3.3 v with adjustment of the 1 meg pot.

    Your second point is interesting. I measured 3.28 vdc at the point where pin two of the ADC. Maybe I am dividing this voltage and the ADC is seeing this because I get about half of what it should be. If I connect a 3.3 v (Vdd) to pin 3 of the adc (channel 1), I get 4095. I also made this circuit on the propeller professional board with the same results. Thanks I'll keep trying to solve this problem.
    Curtis
  • train nuttrain nut Posts: 70
    edited 2010-06-09 17:32
    Cenlasoft

    Go back and check the data sheet for the ADC. I think you will find your input source resistance is too high for accurate readings. If you must use 1 Megohm input resistance I would suggest using a source follower operational amp before the ADC. If you check the max sampling rate vs input resistance for various supply voltages you will find the rate goes way down for input resistances over about 10K.

    I'm using a mcp3208 and I am driving the ADC with the output of an operational amp. I have had no problems with accuracy.

    Hope this was some help.

    Ben
  • AribaAriba Posts: 2,690
    edited 2010-06-09 17:36
    Cenlasoft

    I think the 1M resistors in the voltage dividers are to high. The source impedance at an ADC channel input should be as low as possible.
    When dividing 21V to 3.3V with your curcuit, you have a source impedance of ~100 kOhm.
    I would try to replace the 1M with a 100kOhm resistor (Poti can stay as it is just turned to a lower resistor value).

    Andy

    Edit: OK, Ben was a little bit faster [noparse];)[/noparse]
  • CenlasoftCenlasoft Posts: 265
    edited 2010-06-09 18:03
    Thanks everyone, I'll try using a 100 k resistor with a 1 meg pot. I'll post when I finish.
    Thanks,
    Curtis
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2010-06-09 18:14
    Ariba & train nut,

    The high input impedance off of the resonant circuit is required or else you kill the resonance.

    That said...

    Cenlasoft,

    You could probably help yourself out quite a bit by lowering the 100 Ohm resistor or eliminating it.

    Also, what is the resonant frequency? about 286 Hz? ... the 470uF in an LC?
    This capacitor should probably be bi-polar if it needs to be that high, and I'm not sure they make a bi-polar caps that large.


    I'm curious how your measuring with the meter... is it while the output of the divider is connected to CH0 or with it not connected to CH0?


    If the later, the datasheet indicates a leakage current of .001uA ... at 3.3V that equates to a 3.3Meg resistor in parallel with the adjustable 1 Meg resistor in your schematic.

    That by itself would bring down the voltage to 2.87V ... which out of 4095 for 3.3V would give you about 3561

    The reason a DMM might not pull the voltage down as much, is because they usually have a leakage current making it closer to 10 Meg or higher.


    I would go with the Op-Amp Buffer suggestion, but I'm willing to bet that this is an issue with a miss matched impedance from the LC circuit to the ADC. The fixed 1 Meg resistor should actually be closer to 10 Meg allowing the resonant circuit to 'climb' higher and work more effectively.

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

    IC Layout Engineer
    Parallax, Inc.
  • CenlasoftCenlasoft Posts: 265
    edited 2010-06-09 19:35
    Thanks Beau,
    The capacitor is 470 pF. My mistake. Your right about the resonant frequency. I am using both the scope and a multimeter with these connected and not connected.
    I try your suggestions. Thanks,
    Curtis
Sign In or Register to comment.