Sign in

username:

password:



Not a member?

Search lpc2000



Search tips

Subscribe to lpc2000



lpc2000 by Keywords

2106 | ADC | ARM7 | Atmel | Bootloader | CAN | CrossStudio | CrossWorks | DDS | ECos | Ethernet | ETM | FIFO | FLASH | FPGA | GCC | GDB | GNU | GNUARM | GPIO | I2C | IAP | IAR | JTAG | Kickstart | LCD | Linux | LPC | LPC-E2294 | LPC2000 | LPC2100 | LPC2104 | Lpc2106 | Lpc210x | LPC2114 | LPC2119 | LPC2124 | LPC2129 | Lpc2138 | LPC213x | LPC21xx | LPC2210 | LPC2212 | LPC2214 | LPC2292 | LPC2294 | LPC2xxx | LPC3128 | MCB2100 | Olimex | Philips | PWM | Rowley | RTC | RTOS | SPI | SSP | UART | UART0 | UART1 | ULINK | USB | Watchdog | Wiggler

Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | LPC2000 | LPC2132/01 ADC issue

Discussion group dedicated to the Philips LPC2000 family of ARM MCUs

LPC2132/01 ADC issue - gmpundlik - Oct 21 10:40:16 2009

Hello all,

I am using the LPC2132 (with enhanced ADC) for reading a hall-effect potentiometer, operated on 5V. I have used a instrumentation amplifier AD8226 to amplify and shift the output so that the usable range comes within 0.5~3V

The digital value varies each time I read the same potentiometer output. The variation is random and spans over 100~125 counts of the ADC output. That is more than 10%, as much as 7 LSBs in a 10-bit ADC!

I suspect the signal conditioning circuit could be the culprit. But the signal at its output looks clean on oscilloscope. Could it be forming some sort of oscillator along with the internal resistor-capacitor network in the LPC2132?

Are there any pointers specific to LPC2132/01 ADC for designing the signal conditioning block?

Thanks

Girish

------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )


RE: LPC2132/01 ADC issue - Tim Mitchell - Oct 21 11:34:06 2009

----Original Message----
From: l...@yahoogroups.com
[mailto:l...@yahoogroups.com] On Behalf Of gmpundlik
Sent: 21 October 2009 15:40 To: l...@yahoogroups.com
Subject: [lpc2000] LPC2132/01 ADC issue

> Hello all,
>
> I am using the LPC2132 (with enhanced ADC) for reading a
> hall-effect potentiometer, operated on 5V. I have used a
> instrumentation amplifier AD8226 to amplify and shift the
> output so that the usable range comes within 0.5~3V
>
> The digital value varies each time I read the same
> potentiometer output. The variation is random and spans
> over 100~125 counts of the ADC output. That is more than
> 10%, as much as 7 LSBs in a 10-bit ADC!
>
> I suspect the signal conditioning circuit could be the
> culprit. But the signal at its output looks clean on
> oscilloscope. Could it be forming some sort of oscillator
> along with the internal resistor-capacitor network in the
> LPC2132?
>
> Are there any pointers specific to LPC2132/01 ADC for
> designing the signal conditioning block?
>

If it looks clean on the scope it probably is.

What is going on with the VREF pin of the micro? You don't mention this
at all. I would be looking here for the problem.
--
Tim Mitchell

------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: LPC2132/01 ADC issue - Chris - Oct 21 12:46:44 2009

Everything is critical. Grounding paths, power supply noise, adjacent digital noise, etc. The truth is to get down to 10b precision on a common mixed dig/ana ground ADC like these in MCUs requires very careful circuit layout, and clean power supplies. I've had to use static trace shields/guarding around input areas to ADCs, extra R/C filtering on VCC/VREG lines, etc. I don't think you will ever see much on a scope that illuminates problems at 10b resolution depths. You can loose a couple bits precision real quick just due to some of these very tricky little issues.

Chris.
[Non-text portions of this message have been removed]

------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: LPC2132/01 ADC issue - gmpundlik - Oct 21 12:52:00 2009



--- In l...@yahoogroups.com, "Tim Mitchell" wrote:
>
> ----Original Message----
> From: l...@yahoogroups.com
> [mailto:l...@yahoogroups.com] On Behalf Of gmpundlik
> Sent: 21 October 2009 15:40 To: l...@yahoogroups.com
> Subject: [lpc2000] LPC2132/01 ADC issue
>
> > Hello all,
> >
> > I am using the LPC2132 (with enhanced ADC) for reading a
> > hall-effect potentiometer, operated on 5V. I have used a
> > instrumentation amplifier AD8226 to amplify and shift the
> > output so that the usable range comes within 0.5~3V
> >
> > The digital value varies each time I read the same
> > potentiometer output. The variation is random and spans
> > over 100~125 counts of the ADC output. That is more than
> > 10%, as much as 7 LSBs in a 10-bit ADC!
> >
> > I suspect the signal conditioning circuit could be the
> > culprit. But the signal at its output looks clean on
> > oscilloscope. Could it be forming some sort of oscillator
> > along with the internal resistor-capacitor network in the
> > LPC2132?
> >
> > Are there any pointers specific to LPC2132/01 ADC for
> > designing the signal conditioning block?
> > If it looks clean on the scope it probably is.
>
> What is going on with the VREF pin of the micro? You don't mention this
> at all. I would be looking here for the problem.
> --
> Tim Mitchell
>

Vref is connected to VDD with proper LC filtering, it is clean as well.

The scope output does show some ripple when zoomed to 0.5 uS scale on X-axis but its is very low in magnitude, just a few millivolts. That should not affect the readings by 7 LSBs.

Do you have any example implementation of LPC213x ADC input conditioning, or any data on consistent repeatability of reading a given sample?

Thanks,

Girish

------------------------------------

______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

RE: Re: LPC2132/01 ADC issue - Tim Mitchell - Oct 22 4:16:41 2009

----Original Message----
From: l...@yahoogroups.com
[mailto:l...@yahoogroups.com] On Behalf Of gmpundlik
Sent: 21 October 2009 17:52 To: l...@yahoogroups.com
Subject: [lpc2000] Re: LPC2132/01 ADC issue
> Vref is connected to VDD with proper LC filtering, it is
> clean as well.
>
> The scope output does show some ripple when zoomed to 0.5
> uS scale on X-axis but its is very low in magnitude, just
> a few millivolts. That should not affect the readings by
> 7 LSBs.
>
> Do you have any example implementation of LPC213x ADC
> input conditioning, or any data on consistent
> repeatability of reading a given sample?

I was just reading a 10K potentiometer on my circuit and it went
straight into the ADC input, no additional circuit, however at most I
was getting 2 or 3 counts of variation.

How does VDDA look, is that clean and properly connected?

You have got the multiplexer input set right?
Sometimes if the ADC is set to read an adjacent channel by mistake you
just get a noisy version of the signal you were expecting.

Perhaps post your ADC setup and reading code and we can have a look at
it.

--
Tim Mitchell

------------------------------------



(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: LPC2132/01 ADC issue - sergezloto - Oct 22 4:59:32 2009

For what it's worth, I also observed that the the reading on a given channel is affected when turning other channel(s) on/off on the same ADC, in burst (repeated) mode
I've seen up to 5 adc units variations (1/1024) on LPC21[34]8.

Are you changing other channels while undergoing repeated adc conversions?
--
Serge

--- In l...@yahoogroups.com, "Tim Mitchell" wrote:
>
> ----Original Message----
> From: l...@yahoogroups.com
> [mailto:l...@yahoogroups.com] On Behalf Of gmpundlik
> Sent: 21 October 2009 17:52 To: l...@yahoogroups.com
> Subject: [lpc2000] Re: LPC2132/01 ADC issue
> > Vref is connected to VDD with proper LC filtering, it is
> > clean as well.
> >
> > The scope output does show some ripple when zoomed to 0.5
> > uS scale on X-axis but its is very low in magnitude, just
> > a few millivolts. That should not affect the readings by
> > 7 LSBs.
> >
> > Do you have any example implementation of LPC213x ADC
> > input conditioning, or any data on consistent
> > repeatability of reading a given sample?
>
> I was just reading a 10K potentiometer on my circuit and it went
> straight into the ADC input, no additional circuit, however at most I
> was getting 2 or 3 counts of variation.
>
> How does VDDA look, is that clean and properly connected?
>
> You have got the multiplexer input set right?
> Sometimes if the ADC is set to read an adjacent channel by mistake you
> just get a noisy version of the signal you were expecting.
>
> Perhaps post your ADC setup and reading code and we can have a look at
> it.
>
> --
> Tim Mitchell
>

------------------------------------

______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: LPC2132/01 ADC issue - cm296pip - Oct 22 6:06:38 2009


Unless the inputs to the ADC's are well screened from other noisy lines (digital or otherwise) and good grounding is used you will get noise on the first couple or so LS-Bits (I've learn't from experience over the last xx years).

Most (if not all) of the 'ready made' development boards you can buy are quite noisy on the ADC lines. I have various LPC dev boards from a couple of different companies and they are both quite noisy on the ADC lines. These dev boards do tend to be general purpose though so they tend not to pay to much attention to noise levels.

You need to design and build your own pcb's really if minimum noise level is required.

To get the noise levels down as much as possible you tend to have to have to go for multi-layer pcb's and make sure you keep all the sensitive lines sandwiched between 2 grounds etc (isolating them from the noisy digital lines), and pay good attention to ground paths.

------------------------------------

______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )

Re: LPC2132/01 ADC issue SOLVED - gmpundlik - Oct 22 14:15:54 2009

Finally, I managed to solve the issue.

The ADC had a long wire coming into the connector, so I had a simple load resistor and RC filter placed there. I also had the same RC filter placed at the output of the signal conditioner.

I must admit the problem was too trivial. Basically the RC filters had to be simple first order low-pass filters, and somehow I was reducing the value of C, from 0.1 to 1nF to 100pF and even 33pF! Even the resistor was only 100E initially, that gave it a very high cut-off frequency that probably passed the noise through.

I changed R to 10K and C to 0.47uF and I started getting variations within 4 counts, that is mere 2 bits!

Tim, I had earlier experimented with putting potentiometer output directly to ADC. I placed the potentiometer output on a via closer to the ADC input, and the readings improved by one bit, that error reduced to 3 bits. Even this error I presume was due to rest of the dangling trace that picked up some noise. Then updated RC filters improved it further by 1 bit.

Serge, I am using only one ADC input, all other ADC pins are being used as GPIOs.

Chris and cmoss are right, PCB layout is definitely crucial. I guess I should not allow the ADC input trace to run across sides and add up vias on the way. The board is 4-layer, so the ADC trace can be routed on the GND layer. Cleaning the layout will get me at least one more bit, that is adequate.

Thanks all!

Girish

--- In l...@yahoogroups.com, "Tim Mitchell" wrote:
>
> ----Original Message----
> From: l...@yahoogroups.com
> [mailto:l...@yahoogroups.com] On Behalf Of gmpundlik
> Sent: 21 October 2009 17:52 To: l...@yahoogroups.com
> Subject: [lpc2000] Re: LPC2132/01 ADC issue
> > Vref is connected to VDD with proper LC filtering, it is
> > clean as well.
> >
> > The scope output does show some ripple when zoomed to 0.5
> > uS scale on X-axis but its is very low in magnitude, just
> > a few millivolts. That should not affect the readings by
> > 7 LSBs.
> >
> > Do you have any example implementation of LPC213x ADC
> > input conditioning, or any data on consistent
> > repeatability of reading a given sample?
>
> I was just reading a 10K potentiometer on my circuit and it went
> straight into the ADC input, no additional circuit, however at most I
> was getting 2 or 3 counts of variation.
>
> How does VDDA look, is that clean and properly connected?
>
> You have got the multiplexer input set right?
> Sometimes if the ADC is set to read an adjacent channel by mistake you
> just get a noisy version of the signal you were expecting.
>
> Perhaps post your ADC setup and reading code and we can have a look at
> it.
>
> --
> Tim Mitchell
>

------------------------------------

______________________________
Stellaris® MCU Family: New Parts, New Package, New Price.


(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )