1

enter image description here

I have some pots (100K) on my Arduino board. When I raise the value of one those resistance other pots are being changed (Not too much but it's significant). I have no idea what's going on. I tried to use a capacitor at the beginning of the circuit but didn't work.

These fluctuations change the value of my sensors too. When I raise the value of something other quantities change.

I'm powering up my Arduino using a USB cable.

Any ideas?

5
  • Please show a wiring diagram
    – chrisl
    Commented Jul 1, 2019 at 10:55
  • This is usually because there is only one ADC in the chip. That ADC is multiplexed between inputs. You should do multiple reads of each input. Discard the first few readings, and then take an average of a few readings.
    – Majenko
    Commented Jul 1, 2019 at 11:06
  • @Majenko Don't you think it takes too much time to do? Besides I need other pins too. Of course, there may be no other choices!
    – X4748
    Commented Jul 1, 2019 at 11:27
  • This is expected if the resistances of the pots is above 10 kΩ. Is this the case in your circuit? Commented Jul 1, 2019 at 11:40
  • @EdgarBonet Yeap. It's 100K!!
    – X4748
    Commented Jul 1, 2019 at 11:42

1 Answer 1

3

You seem to be experiencing cross-talk between the analog channels. This happens because all the channels are funneled by an analog multiplexer into the same sample-and-hold capacitor. If the source resistance is too high, then the capacitor does not have enough time to charge to the voltage of every channel.

Here is what the datasheet of the ATmega328P says about the issue:

The ADC is optimized for analog signals with an output impedance of approximately 10 kΩ or less. [...] The user is recommended to only use low impedance sources with slowly varying signals, since this minimizes the required charge transfer to the S/H capacitor.

The problem can be mitigated by reducing the source impedance using a capacitor at every pot wiper, or by giving more time to the sample-and-hold circuit: make many dummy readings before the one reading you want to keep. The proper solution would of course be to replace the pots with 10 kΩ pots.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.