Yes, the problem is a combination of the multiplexor and the S&H. Let’s say 
ADC0 is 3.5V and ADC1 is 0.2V and ADC2 is 2V. The S&H must first charge the 
capacitor to 3.5V for ADC0 and then the multiplexor changes to ADC1 and 
discharges the cap to 0.2V and then the mux changes to ADC2 and charges the cap 
to 2V. Now, if the source impedance of the circuits that feed ADC0, ADC1 and 
ADC2 are not low impedance, then the S&H cap will not charge/discharge fully 
before the ADC does the conversion. The time constant T=RC where T is the S&H 
window, R is the source impedance and C is the S&H cap. So if R is not low 
enough, you will see the accuracy of your conversion affected by the voltage of 
the previous channel. Alternatively, you can slow the sample rate and 
conversion time in the device tree and that will improve your accuracy. 

Regards,
John




> On Jan 21, 2018, at 7:37 AM, Mateus Lucas <mateuslucas.l7...@gmail.com> wrote:
> 
> Thanks, John.
> 
> But I didn't understand yet how the high impedance on the input may cause 
> this error. The ADC input usually have a high impedance and the S&H have a 
> capacitor, the problem is related with the time to charge the capacitor? 
> 
> Em domingo, 21 de janeiro de 2018 04:31:36 UTC-3, john3909 escreveu:
> Yes, you use the opamp as a low impedance buffer and you can also use it to 
> scale the input to a range suitable for the ADC. Have a look at Analog 
> Devices, (www.analog.com <http://www.analog.com/>), they have many 
> application notes on how to use an opamp as a signal conditioner suitable for 
> an ADC.
> 
> Regards,
> John
> 
> 
> 
> 
>> On Jan 20, 2018, at 3:13 PM, Mateus Lucas <mateuslu...@gmail.com <>> wrote:
>> 
>> Oh, thank you for the explanation.
>> Are you talking about opamp as buffer or other circuit?
>> 
>> Em sábado, 20 de janeiro de 2018 19:43:31 UTC-3, john3909 escreveu:
>> The problem you are experiencing is due to the sample and hold of of the ADC 
>> input which is multiplexed to all analog inputs. If you don’t use a low 
>> impedance source, you will see bleed through from one ADC channel to the 
>> next. What you need is a opamp connected between the circuits you are 
>> measuring and the ADC input. The opamp will provide a low impedance source 
>> for the sample and hole (S&H) and prevent the bleed through from one channel 
>> to the next.
>> 
>> Regards,
>> John
>> 
>> 
>> 
>> 
>>> On Jan 18, 2018, at 7:34 PM, mateuslu...@gmail.com <> wrote:
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> I'm using two analog inputs, the first with a LDR and a resistor of 10k 
>>> Ohm, connected at P9_39 (AIN0), and the second connected at P9_38 (AIN3).
>>> When the lights are down, the measure of LM35 works very well, with a low 
>>> distorction, +/- 0.2 ºC.
>>> But when the lights are on, the measure of LM35 starts to float, about +/- 
>>> 1 ºC.
>>> I have tried to put a 4.7nF between GNDA_ADC and AIN3, but the distorction 
>>> continues.
>>> 
>>> I asking for help to diminish this distorction when the lights are on.
>>> 
>>> 
>>> -- 
>>> For more options, visit http://beagleboard.org/discuss 
>>> <http://beagleboard.org/discuss>
>>> --- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "BeagleBoard" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to beagleboard...@googlegroups.com <>.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/beagleboard/d5353977-2025-4aa3-b6a0-361742ae9c96%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/beagleboard/d5353977-2025-4aa3-b6a0-361742ae9c96%40googlegroups.com?utm_medium=email&utm_source=footer>.
>>> For more options, visit https://groups.google.com/d/optout 
>>> <https://groups.google.com/d/optout>.
>> 
>> 
>> -- 
>> For more options, visit http://beagleboard.org/discuss 
>> <http://beagleboard.org/discuss>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "BeagleBoard" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to beagleboard...@googlegroups.com <>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/beagleboard/5024589e-3e59-43be-b293-98cd5e6c6f6e%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/beagleboard/5024589e-3e59-43be-b293-98cd5e6c6f6e%40googlegroups.com?utm_medium=email&utm_source=footer>.
>> For more options, visit https://groups.google.com/d/optout 
>> <https://groups.google.com/d/optout>.
> 
> 
> -- 
> For more options, visit http://beagleboard.org/discuss 
> <http://beagleboard.org/discuss>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "BeagleBoard" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to beagleboard+unsubscr...@googlegroups.com 
> <mailto:beagleboard+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/beagleboard/21e867c3-717d-4d7b-87c2-2f96862d47b4%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/beagleboard/21e867c3-717d-4d7b-87c2-2f96862d47b4%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/6AB54A31-E3B1-4CB7-96C7-330E86FE96B9%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to