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

ADC Chip

PhilldapillPhilldapill Posts: 1,283
edited 2008-03-15 14:02 in Propeller 1
Hey, I have a TI ADS1211P ADC chip that I'm trying to learn to use. It seems to be a fairly complicated little ADC with programable features. I've attached the datasheet for easy reference.

My first question, is about the Xin pin. The datasheet says the minimum frequency should be 500khz, 10mhz maximum. I need a data rate of about 10hz. If possible, and if it even matters, I'd like to drive the Xin with a pin from the prop. If I understand correctly, the Xin is usually connected to a crystal or resonator, along with Xout as feedback. Couldn't I just use a pin from the prop, oscillating at 500khz, to drive the clock(Xin) of the ADC? If so, would that take an entire cog? I mean, even if done in assembly, the prop would have to toggle the pin on/off at 1mhz. I'm not that familiar with assembly, but it seems this should be doable...

Second question. This datasheet is pretty extensive and to be honest, I don't have much time at the moment with midterms. Would anyone like a few of these chips? I'll be happy to send a couple(or more) for free, if you'll whip up some code to control one. These are 24bit, Delta-Sigma ADC's with a datarate of about 21bits at 100hz. PM me if interested, or just post.

Thanks guys for all the help(And in some cases, repeated help [noparse]:)[/noparse])

Post Edited (Philldapill) : 3/15/2008 3:28:27 AM GMT

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-15 03:35
    You could probably do the whole thing just using Spin if you use a cog counter from Spin to generate the clock.
    Check the application note for the counters (AN001) for details.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2008-03-15 04:16
    Mike's right, just use a cog counter (not the cog) to generate the clock. But, and it's a big but, what are you doing with a 24-bit ADC? It's very difficult to get anywhere near full resolution from this chip due to the sensitive nature of it. Good ground planes are essential. If you were converting 0 to 3.3V it should be capable of resolving 0.2uV at unity gain but that as I said is a bit hard to achieve, even 20-bits is pushing it. Yep, somebody could write the code for you (free chips are not much of an incentive) but who does your pcb layout?

    Do it the way all of us do it, by doing it yourself and I'm sure that we would pitch in to "assist".

    It's many years since I worked with this chip but maybe somebody else has a different experience.

    *Peter*
  • PhilldapillPhilldapill Posts: 1,283
    edited 2008-03-15 05:17
    I'm thinking the ADC should be in a fairly noise free environment. I will have a good capacitor literally soldered next to the pins to cut out noise. As for the grounding, well, I'm hoping the capacitor will take care of noise. This thing is going to be used to measure the voltage across a shunt to determine power consumption in a large solar battery charger(50A+ @ 12V). I plan on having all the high-freq switching components far away and opto-isolated to prevent noise. Any other suggestions on how to get rid of excess noise? Some kind of Farady cage around the ADC area perhaps? I know I probably won't get 20bits, but 16 would really work well.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2008-03-15 05:29
    Sorry, I meant the noise is mainly from your own circuit, not external. The ground plane for the cpu and the analog ground plane have to be separate for starters, a multi-layer pcb is desirable (some think mandatory). Have you analyzed how many bits of resolution you really need? Even a twelve bit converter will still give you 12ma resolution over a 50A range and these chips are a lot easier to work with.

    *Peter*
  • PhilldapillPhilldapill Posts: 1,283
    edited 2008-03-15 05:40
    Peter, that is true for the 12bit chips in regards to the 12ma resolution. I was actually using some and ran into an anomally with them...

    With the chip, I had a known 1V source. I read it with the ADC, and it was a little high. I was actually using a 10K pot to step down 30V to a 5V range, so I suppose the actual voltage was 6V, but 1V at the ADC. Anyway, the ADC was reading it high. I then increased the voltage up to about 4V, and now the ADC read it low. Any idea what is going on? When i say low, I mean like around 50mv-100mV. Any ideas?
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2008-03-15 05:57
    Yes, it's called linearity (or lack thereof), what chip were you using? Anyway, it's usually only around 1 or 2 lsbs.

    Your test method may be flawed anyway, using a pot unbuffered into the chip is not the way to do it. Did you add a small capacitor to the A/D pin to provide the low-impedance that some sampling circuits require? For instance on the MCP3208 12-bit ADC there in the datasheet is figure 4-1 which gives details of the analog input model. There is a 1K switch resistance into 20pF, not much, but enough to upset your readings perhaps. I use a 4.096V external voltage reference with these chips, what do you use?

    *Peter*
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2008-03-15 14:02
    ·Maybe you have already read this.

    ww1.microchip.com/downloads/en/AppNotes/00688b.pdf
    ·
Sign In or Register to comment.