ADC channels interfere each other

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ADC channels interfere each other

1,217 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Andrew24 on Thu May 06 13:29:32 MST 2010
Hello, i have a problem acquiring data from two ADC channels.
I have a timer to switch adc channels and start ADC every 1ms.
I also have connected two potentiometers , one to AD0, other to AD1.
I've disabled ADC interrupt. In the main program i'm polling ADC.
.AD0 and AD1 are selected as analog pins in IOCONFIG.
Heres the problem:
when i increase voltage in channel AD1, the voltage in AD0 alsos increases a bit.
I have tested it with multimeter. For example if i disconnect the second potenciometer from AD1, and measure the voltage at AD0 pin, from the firstpotenciometer, it shows for e.g 1.5V. If i connect second pot. i can control the voltage on AD0 pin! it seems that the channels are linked somehow in the lpc
Could you try to guess what's wrong?
0 Kudos
6 Replies

933 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Andrew24 on Tue May 18 12:15:17 MST 2010
thank you all for helping me! Yes, the voltage source was unbuffered, that was the problem.It works ok when you use low impedance source.
0 Kudos

933 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by curtvm on Tue May 11 14:03:58 MST 2010
I'm curious- what are your 'pin mode' settings for these a/d pins?

This may not be relevant, but-

I have bee playing around with the lpc1114, and noticed I was getting an extra 8 counts on my adc readings (only one channel used, simple polling). The user manual says ' If A/D mode is selected, Hysteresis and Pin mode settings have no effect.', but if I turn off the default pull-up (pin mode 00), it works ok.  So either I read the manual incorrectly, or the manual is incorrect.
0 Kudos

933 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_USA on Tue May 11 14:02:33 MST 2010

Quote: Andrew24
Heres the problem:
when i increase voltage in channel AD1, the voltage in AD0 alsos increases a bit.
...
it seems that the channels are linked somehow in the lpc
Could you try to guess what's wrong?



If you are not using a low-impedance voltage input (op-amp output or buffered sensor) you may need a capacitance on each analog input to lower the impedance. Try 0.001 uF. Another option is to increase the acquisition time by lowering the ADC sample rate to give the channel more time to sample the input. You could also get more time to charge the ADC after the mux switches by doing a throwaway conversion to select a new channel in the mux and then do conversion to keep. If you need the best ADC speed and accuracy, you will need to have low impedance analog inputs.
0 Kudos

933 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mcu_programmer on Tue May 11 13:35:22 MST 2010
Your observations seem to be valid.

I did a test to verify what you wrote. I made a potential divider of 50k - 50k. I had three AD channels. I read the AD values by polling and reported the values over a serial rs232 line, and whatched the result on Hyper Terminal.

When all three where connected to the potential divider they all showed approx the same reading. When I connected one of the channels to 3.3 V, the reading right after showed a aprox. 4% increase in value. The next reading was ok, reading what it should.

I changed the source code so that I read each channel twice. The first reading after the switch from reading the 3.3 V channel showed a 4% increase, the next reading showed normal value.

The solution seems to be reading each A/D channel twice!
0 Kudos

933 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Luis Digital on Mon May 10 19:25:43 MST 2010
That is worrying.

Just curious, try putting  a shorter time, a second for example.
0 Kudos

933 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Andrew24 on Mon May 10 14:29:16 MST 2010
Nobody knows?..
0 Kudos