Go Down

### Topic: Interference in a multiplexer (Read 3574 times)previous topic - next topic

#### alkopop79

##### Aug 21, 2011, 06:13 am
I have recently finished a PCB with 16 channel analog multiplexers. When I connect a voltage source (pot as a voltage divider) to any of the mux's pin, they measure the value however other pins nearby show voltage as well. In other words, when pin 0 is connected to a voltage source, other pins like pin 1 and 2 measure voltage (even though nothing's connected to them). is it possible that there's some sort of interference between the pin? If so, how can I stop it?

#### alkopop79

#1
##### Aug 21, 2011, 05:24 pm
All pins are connected to the ground. Any other ideas?

#2
##### Aug 21, 2011, 06:51 pm
Quote
All pins are connected to the ground.

Then how are you measuring a voltage? :~

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

#### alkopop79

#3
##### Aug 21, 2011, 08:27 pm
So basically there's a resistor between every pin and the ground. This way the pins won't measure noise when they are no connected. W

#### retrolefty

#4
##### Aug 21, 2011, 08:36 pm
Quote
So basically there's a resistor between every pin and the ground. This way the pins won't measure noise when they are no connected. W

You haven't yet answered the key question made to you. Why would one read a input that has nothing wired up to it? Please take a sec and respond.

Lefty

#### alkopop79

#5
##### Aug 21, 2011, 09:10 pm
Ok, here's the thing: it's gonna be a modular synth interface. Analog inputs are for actual banana plug inputs of the 'synth'. Every time you plug a jack in the input, it should measure the voltage. When nothing's connected, the analog input should measure 0 volts, meaning that nothing's connected:) Once a connection is made, the arduino prints a serial message.

#### alkopop79

#6
##### Aug 21, 2011, 09:12 pm
I've been trying to add a picture with no success. I draw a diagram:

#### retrolefty

#7
##### Aug 21, 2011, 09:59 pm

Ok, here's the thing: it's gonna be a modular synth interface. Analog inputs are for actual banana plug inputs of the 'synth'. Every time you plug a jack in the input, it should measure the voltage. When nothing's connected, the analog input should measure 0 volts, meaning that nothing's connected:) Once a connection is made, the arduino prints a serial message.

Ok, that's a good reason, your application program doesn't know how many inputs will be active at any given time, so it will read all the inputs and if other then a zero reading it will assume that it's a valid input signal for that channel input. So the easiest solution is to wire a 10k pull-down resistor from each pin to ground. The cavet is that whatever signal that is sending that analog voltage must be able to drive into a 10k ohm load.

Lefty

#### alkopop79

#8
##### Aug 21, 2011, 10:16 pm
Thanks! I've used 1M resistors to ground them and it works fine. Still don't know why the other pins read voltage when only one is connected... Check this pic of the arduino serial monitor:

Here it's only pin 0 connected and measures 685 yet other pins read voltage (they totally shouldn't!). Why? Is it interference?

#### retrolefty

#9
##### Aug 22, 2011, 02:19 am
Quote
Here it's only pin 0 connected and measures 685 yet other pins read voltage (they totally shouldn't!). Why? Is it interference?

No, its the nature of the ADC circuitry inside the AVR, it has just one ADC converter and uses a sample and hold capacitor method. When you select a channel to read the mux connects that channel to the sample cap to charge to the voltage at the pin, and then later disconnects from the pin and lets the ADC hardware 'sample' the voltage on the cap. So when you switch to read a disconnect pin, the cap doesn't get to charge to any valid voltage, but rather just kinds of drifts around depending on the last valid voltage level it read from.

A 1 megohm resistor is kind of a large value to use as a pull-down, but if it solves your problem, so be it.

Lefty

#### alkopop79

#10
##### Aug 22, 2011, 02:30 am
But that's the thing, it does not help. All the pins are connected to the ground through the resistor. Still, any time a single inputs gets voltage and is read, at least four or five other pins show voltage. Please help, if it's impossible to get accurate readings for each pin, I might just give up the project. I need to know if there's a way to sort this out!

#11
##### Aug 22, 2011, 02:54 amLast Edit: Aug 22, 2011, 04:24 am by Graynomad Reason: 1
Quote
any time a single inputs gets voltage and is read, at least four or five other pins show voltage.

By a volt meter or the ADC?

If volt meter I don't know. If ADC I think it's just a case of the resistor being too large and/or you are reading the inputs too rapidly. Either way I suspect the internal capacitor is not getting enough time to discharge.

Try smaller resistors or longer delays between readings.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

#### retrolefty

#12
##### Aug 22, 2011, 02:59 am
Quote
All the pins are connected to the ground through the resistor.

But 1 meg ohm resistors are most likely not appropriate to solve that, have you tried 10k ohm as I suggested?

Lefty

#### Grumpy_Mike

#13
##### Aug 22, 2011, 10:10 am
If you use a 1M pull down then it is the same as not using a pull down at all. It is far too high to do any good.

#### dc42

#14
##### Aug 22, 2011, 04:17 pm
When you make analogRead calls for two different pins in succession, the input to the first pin interferes with the reading you get from the second pin if the resistance of the source supplying the second pin is greater than about 10K. I have suggested that the library be modified to alleviate this and I took some measurements, see http://arduino.cc/forum/index.php/topic,69675.0.html.

The simple workaround is: when reading an analogue pin when the previous analogue pin you read you read from is a different one, take 2 readings in succession and discard the first one. For source resistances greater than about 100K you also need to insert a delay between the two calls.

Therefore, your 1M pulldowns are too large unless you read each pin twice with a delay between the analogRead. I found that 150us delay was the minimum needed when the source resistance is 1M.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Go Up