Re: adc reading errors
- From: John Larkin <jjlarkin@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 24 Nov 2007 12:31:16 -0800
On Sat, 24 Nov 2007 12:15:56 -0800 (PST), DAXU@xxxxxxxxxxx wrote:
On 24 Nov, 18:13, John Larkin
<jjlar...@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
On Sat, 24 Nov 2007 09:48:15 -0800 (PST), D...@xxxxxxxxxxx wrote:
Hello! John,
Thanks for your reply.
The amp is the instrument amplifier INA128. And I just put the +1.6V
signal to its in+, and the in- connected to the analog V-. The Ref pin
of INA128 is connected to the +2.5V after a Opamp. The Vout of the
INA128 goes to +4.1V, which I measured via a multimeter to confirm it
too. Gain=1. I did put 10Ohm and 1nF low pass filter for the ADC
input signal.
Lots of variations I see, not just 1-3 LSB variations, even the MSB
too. not sure if the uP read the code correctly or because of the
circuit noise etc.
What do you mean by "The Vref is connected to the Opamp output." ?
--- The Vref of the ADC need a low impedance.
They are plastic breadboards. What should I do? Make a PCB instead of
working on the breadboards?
Would the noise make such big difference on every bits?
Cheers,
B-B claims 3 lsb's p-p noise, which is pretty impressive. The INA128
will add seome of its own, but nothing radical. If you're seeing codes
all over the place, something is bad wrong.
Try grounding the ADC inputs and see what you get. You may have a
clocking problem or something. How are you getting the codes out of
the adc?
I usually lay out a board to do anything complex, but this case is
simple enough that you could still do it by hand. I like to get a
*** of bare copperclad FR4 and build breadboards directly on the
(single!) ground plane, with axial passives, wire, and little
commercial adapter boards to break out surface-mount parts. That can
do very low noise stuff.
John
Thanks, John.
I tried a ground plane on a *** metal, which is actually the base of
one of the breadboard I have. Now what uP got from ADC were almost all
zeros, as I had before.
I got all the ADC input zero when I use the C compiler build in SPI
function, and I thought it might be something wrong on the code, I
then changed the code to something like the following, not using any
built-in function. Afterwards I was able to read in different wrong
ADC input every time. Then I seperate the analog and digital ground,
not much help. Now I added in a metal plane as a ground plane, and the
readings are almost all zero.
Each instruction takes about 0.25usec, i.e., the ADC sampling rate is
about 4M, below its max. 6Mhz.
output_low(ADC_CS); //Enable ADC
for (i=0; i<6; i++){ //ADC conversion time, for 5 clock +
1clock
output_low(SCLK_Pin);
output_high(SCLK_Pin);
}
for (i=0; i<16; i++){ // read in ADC data
output_low(SCLK_Pin);
output_high(SCLK_Pin);
copy(ADCin_pin,buffer[i]);
}
output_high(ADC_CS); //Disable ADC
OK, but what's the electrical setup? Is this a PC or a pic or what?
What sort of electrical port are you using, and how is it physically
wired to the adc? A little clock ringing or such could be bad. Have
you scoped the digital lines?
John
.
- Follow-Ups:
- Re: adc reading errors
- From: DAXU
- Re: adc reading errors
- References:
- adc reading errors
- From: DAXU
- Re: adc reading errors
- From: John Larkin
- Re: adc reading errors
- From: DAXU
- Re: adc reading errors
- From: John Larkin
- Re: adc reading errors
- From: DAXU
- adc reading errors
- Prev by Date: Re: SED Posts in the Wild
- Next by Date: Re: Need engineer for hire
- Previous by thread: Re: adc reading errors
- Next by thread: Re: adc reading errors
- Index(es):