EmbeddedRelated.com
Forums

ADC Issue

Started by Jerry January 29, 2012
Il 16/02/2012 12:01, Olivier Gautherot ha scritto:
> Jerry,
>
> 350mV of noise mean that only the top 3 bits of the ADC are significant,
May you explain better? Jerry has a 1.65V fix input voltage that is 50%
of the Vref that is 3.3V so in my opinion he in best condition always
loose about 10% of full scale voltage dynamics (350mV/3300mV). But he
said to have 350mV over input signal at every time so a real fix 1.65V
input voltage may be read as a value between 1.65V and 2.0V so in this
situation he loose about 20% of dynamics but over the measured voltage
(based on what he told).
> the rest is unpredictable. If you have this level of noise (which is quite
> abnormal), it can be that you have fine spikes that do not appear on a
> scope, meaning that you can have more noise at some points.
>
> Try to feed the board on its own with a battery and see what happens. Also,
> I have an LPCXpresso board so I can try your code here if you wish, just
> zip the project and send it to me.
>
> Cheers
> --
> Olivier Gautherot
> o...@gautherot.net
> Cel:+56 98 730 9361
> www.gautherot.net
> http://www.linkedin.com/in/ogautherot
> On Thu, Feb 16, 2012 at 12:47 AM, Jerry wrote:
>
>> **
>> --- In l..., "dandebeer" wrote:
>>> I think you should remove L2 and L4 from the bottom of the board and
>> replace them with solder bridges. With the inductors in place the micro
>> does not have a solid ground and this will cause problems for the analog
>> circuits. The inductors allow the ground pins of the analog and digital
>> sections of the chip to differ due to switching current spikes. As a bare
>> minimum, Vssa and Vref- MUST be tied together.
>>
>> Dan,
>>
>> I tried removing L2 and L4 replacing them with solder bridges. It makes no
>> difference to the results.
>>
>> There is approx. 350 mV of noise on Vref- and Vssa, but no glitches larger
>> than that.
>>
>>
>>
>
>

An Engineer's Guide to the LPC2100 Series

--- In l..., "John S" wrote:

> What size caps have you tried between Vref and Vssa

1uF and 10nF.

Il 16/02/2012 17:20, Jerry ha scritto:
>
>
> --- In l... ,
> "John S" wrote:
>
> > What size caps have you tried between Vref and Vssa
>
> 1uF and 10nF.
>
Change to 10uF tantalum and 100nF ceramic.
>



--- In l..., "Jerry" wrote:
>
> --- In l..., "M. Manca" wrote:
> > Just to understand: you have 350mV of noise as an AC component measured
> > between Vref and Vssa? Or you have 350mV of noise on the adc pin when it
> > is tied to Vssa?
>
> 350mV of AC noise between the ground leg of the voltage divider I'm using as the 1.65V input to the ADC and either Vref- or Vssa.
>

That is a ridiculous amount of noise. For the ADC to have any chance at working correctly the noise should be in the single digit mV range when measured with an oscilloscope with a 20MHz bandwidth filter. Maybe you PC is injecting noise onto the boards. Try using a different PC to connect to the boards when taking the measurements.

I will measure the noise between the ground pins on a LPC1768 board, a LPC2148 and a LPC2136 board and post the results later today. They have different layouts and all the ADC's are OK (for on-chip ADC's) with no wild fluctuations in measurements.

Dan

I replaced my ADC driver with the ADC driver from the NXP LPC1700 code bundle (http://ics.nxp.com/support/software/code.bundle.lpc17xx.keil/). I see the exact same bad conversion results I see with my own driver, so at this point I'm certain that it's not my code, but some kind of board issue.

Time to start looking at other things, like noise caused by the JTAG interface or adding more filtering to the reference voltages to the ARM.

--- In l..., "dandebeer" wrote:
>
> --- In l..., "Jerry" wrote:
> >
> > --- In l..., "M. Manca" wrote:
> > > Just to understand: you have 350mV of noise as an AC component measured
> > > between Vref and Vssa? Or you have 350mV of noise on the adc pin when it
> > > is tied to Vssa?
> >
> > 350mV of AC noise between the ground leg of the voltage divider I'm using as the 1.65V input to the ADC and either Vref- or Vssa.
> > That is a ridiculous amount of noise. For the ADC to have any chance at working correctly the noise should be in the single digit mV range when measured with an oscilloscope with a 20MHz bandwidth filter. Maybe you PC is injecting noise onto the boards. Try using a different PC to connect to the boards when taking the measurements.
>
> I will measure the noise between the ground pins on a LPC1768 board, a LPC2148 and a LPC2136 board and post the results later today. They have different layouts and all the ADC's are OK (for on-chip ADC's) with no wild fluctuations in measurements.
>
> Dan
>

I looked at the three boards I mentioned yesterday. The noise between Vss and Vssa and Vref- is too small to measure reliably with a scope. If I attach the ground clip to Vss and measure Vssa or Vref- with the probe tip and jack up the gain I see 10mV peaks (20mV peak to peak) with my trusty TDS644B. If I probe the same Vss node with the probe tip, the signal stays the same. This is due to the fact that the scope has finite common mode rejection and the Vss signal has some noise on it and the scope produces vertical deflection even when both ends of the probe are tied to the same node.
(It can also be due to inductive coupling into the loop made by the ground clip to probe tip.)

I looked at the LPC1768 board in more detail. I made a voltage divider from Vref+ to Vref- with two 10k resistors on an unused input and low and behold, measurements all over the map on the high side. On the input that I use, no such events. My used input is driven directly by the output of an instrumentation amplifier. Using an active probe I measured the voltage on the divider where it touches the ADC pin and I notice that I can trigger on excursions above the expected 1.6V all the way to around 2V when the firmware is running. When I halt the code with a debugger the excursions go away (or become so infrequent that I can't trigger on them)

I came to the conclusion that something in the ADC or analog mux is coupling noise from the core to the IO pins. It seems to be positive going only. I experimented by adding a capacitor from adc in to Vref- and 2.2nF ceramic 0805 close to the pins cure the problem.

Hope this helps
Dan

Il 17/02/2012 19:00, dandebeer ha scritto:
>
>
> --- In l... ,
> "dandebeer" wrote:
> >
> >
> >
> > --- In l... ,
> "Jerry" wrote:
> > >
> > > --- In l... ,
> "M. Manca" wrote:
> > > > Just to understand: you have 350mV of noise as an AC component
> measured
> > > > between Vref and Vssa? Or you have 350mV of noise on the adc pin
> when it
> > > > is tied to Vssa?
> > >
> > > 350mV of AC noise between the ground leg of the voltage divider
> I'm using as the 1.65V input to the ADC and either Vref- or Vssa.
> > >
> >
> > That is a ridiculous amount of noise. For the ADC to have any chance
> at working correctly the noise should be in the single digit mV range
> when measured with an oscilloscope with a 20MHz bandwidth filter.
> Maybe you PC is injecting noise onto the boards. Try using a different
> PC to connect to the boards when taking the measurements.
> >
> > I will measure the noise between the ground pins on a LPC1768 board,
> a LPC2148 and a LPC2136 board and post the results later today. They
> have different layouts and all the ADC's are OK (for on-chip ADC's)
> with no wild fluctuations in measurements.
> >
> > Dan
> > I looked at the three boards I mentioned yesterday. The noise between
> Vss and Vssa and Vref- is too small to measure reliably with a scope.
> If I attach the ground clip to Vss and measure Vssa or Vref- with the
> probe tip and jack up the gain I see 10mV peaks (20mV peak to peak)
> with my trusty TDS644B. If I probe the same Vss node with the probe
> tip, the signal stays the same. This is due to the fact that the scope
> has finite common mode rejection and the Vss signal has some noise on
> it and the scope produces vertical deflection even when both ends of
> the probe are tied to the same node.
> (It can also be due to inductive coupling into the loop made by the
> ground clip to probe tip.)
>
> I looked at the LPC1768 board in more detail. I made a voltage divider
> from Vref+ to Vref- with two 10k resistors on an unused input and low
> and behold, measurements all over the map on the high side. On the
> input that I use, no such events. My used input is driven directly by
> the output of an instrumentation amplifier. Using an active probe I
> measured the voltage on the divider where it touches the ADC pin and I
> notice that I can trigger on excursions above the expected 1.6V all
> the way to around 2V when the firmware is running. When I halt the
> code with a debugger the excursions go away (or become so infrequent
> that I can't trigger on them)
>
You could try to disable jtag interface and the debug mode if you used a
debugger.
> I came to the conclusion that something in the ADC or analog mux is
> coupling noise from the core to the IO pins. It seems to be positive
> going only. I experimented by adding a capacitor from adc in to Vref-
> and 2.2nF ceramic 0805 close to the pins cure the problem.
>
> Hope this helps
> Dan



--- In l..., "M. Manca" wrote:
> You could try to disable jtag interface and the debug mode if you used a debugger.

Here are my results with the JTAG interface connected and disconnected:

JTAG Connected: 362 miscompares in 500,000 conversions

JTAG Disconnected: 292 miscompares in 500,000 conversions
Disconnecting the JTAG helps, but not much.

Zebax.com offers Samtec FCI Molex TE ( Mictor ) FMC VITA 57.1 FPGA HSMC Xilinx Altera Mezzanine breakout adapters along with HDMI. Perhaps your bringup board supports any of the high speed connectors for portability & ease of use. Excellent breakout adapters for bringup, emulation, testing QSH/QTH BSH/BTH QTS/QSS QTE/QSS SEARAY MegArray Meg-Array 045970 045971 84520 74390 SAEAM SEAF Mictor 38 76 Statix Cyclone Arria Sparatan Virtex Kintex Atrix break out

Matthew



--- In l..., "Jerry" wrote:
> My frustration level just went up another few notches. I just tried my LCPXpresso 1769 board and I'm seeing the exact same issue as with the NGX board.
>
> The code is so simple, especially in polled mode, it's difficult to look at it any closer. I've verified all I can. Perhaps I can find some known-working code and try that.
>
How are you driving the ADC input? You may be having issues due to the switched capacitance of the sample and hold circuit of the ADC.

I'd suggest an OpAmp buffer with a series resistor and a cap between the output of the OpAmp and the ADC input of the LPC1769. The cap is between the ADC input and the series R (not between the series R and the OpAmp output).

I recently had this issue on an LPC1765. The circuit I suggested cured the problem. You can experiment with the R and C values but try starting with something like 100 ohms and 470pf.