Analog inputs interfering with each other?


I am building a controller to dim LEDs with very precise timing control, for a movie prop.

I just soldered the control board, using 6x 100k potentiometers as control knobs. But I feel like they are interfering with each other, as I am getting some strange results. At first, I thought I might have shorted something, but on second glance, I think it might be Ohm's Law creeping up on me...

The default positions for the pots are four at 0% (100k[ch937]) and two at 100% (0[ch937]). I tried doing ohm's law for this, but I got caught up with the two 0[ch937] pots, as that creates a division by zero problem; i.e. they might be shorting the whole +5v supply and messing up the other, high resistance pots.

My first thought was I shorted something while soldering, so I metered for shorts, and found a few. But I realized that it was actually pots set at the same extreme (0% or 100%) shorting to each other via the ground or +5v busses. If all the pots are set at roughly 50%, there are no shorts.

Any ideas?

I just thought of adding resistors in series with each of the analog inputs, so that the resistance never goes to zero, but then I'd have to account for that by scaling the input somehow in the software... but I'm really only concerned about 0-255 resolution so that might not be such a bad thing... though it would require a LOT of re-soldering :(

Also, if anyone can point me to a good analog input smoothing function, I would be greatly appreciative.


PS - Schematic of the problem area and more notes on the project here:

You might be better using 10k pots, as they won't be as prone to interference from other sources. The higher the impedance, the greater the problems with electrical noise.

I couldn't find a schematic at the URL you posted, but if the pots are interacting with each other (particularly if you're worried about them shorting out the supply!) it sounds like you don't have them connected correctly.

You have 6, so is your intention to have each one connected to a separate analog input on your Arduino? If so they should all act totally independently and there should be no danger of shorting or requirement for series resistors.

For each pot you should connect one end to GND, the other end to 5V, and the center (wiper) to the appropriate analog input. To save you some wiring it would be easiest to run a 5V line and a GND line around to each of your pots, then just run a single wire for each center connection. Saves you a bunch of 5V and GND connections all ending up on the Arduino.

Jon Freetronics: Practical Arduino:

Thanks for the fast replies. I will definitely order 10k pots next time, but these are all I have to work with right now.

Just posted the schematic, it should be up now.

On second glance I think you're right about not worrying about shorting thru the pots... the +5v and GND are indeed always separated by the full 100k resistance... Maybe I should check for shorts again in the morning...

Good, having that schematic makes it much easier to follow what you're doing!

It looks like you've done exactly what I was describing, so you were already on the right track. If you've connected it up as shown in the schematic then the pots should operate totally independently: imagine removing any one of them from the circuit, and you should see that the bias on the other pots doesn't change at all. The bias on the center pin is based only on the position of the wiper relative to the 5V and GND rails, nothing to do with the other pots.

If you're seeing interference between them then maybe it's what @pluggy is suggesting, and 100K pots aren't providing a strong enough bias to the analog inputs to overcome noise from other inputs. 10K is definitely a good value to go for in situations like this. It's high enough to provide minimal current drain (only 0.5mA at 5V) but low enough to provide a strong bias to the input.


You shouldn’t have any trouble but 100K is a bit of a large value to use. What happens is that the input sample and hold capacitor on the actual A/D input could be taking time to charge. One simple solution is to read each pot twice in succession and disregard the first sample. If that improves things but doesn’t fix it then put a small delay between the first and second read.

Just a point on the voltage difference you are seeing on the full wave rectifier you are worrying about on your blog:- You are measuring the peak voltage, where as the 16.2v is the RMS voltage. To convert RMS to peak multiply by 1.414 so 16.3 * 1.414 = 22.9V which is slightly larger than what you are getting. So it looks like you are fine.