Go Down

Topic: Interference in a multiplexer (Read 1 time) previous topic - next topic

alkopop79

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

All pins are connected to the ground. Any other ideas?

Graynomad

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

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

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

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

I've been trying to add a picture with no success. I draw a diagram:

https://picasaweb.google.com/lh/photo/W6GJ_fHJjIJ09PtOB-bj6g?feat=directlink

retrolefty


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

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:

https://picasaweb.google.com/lh/photo/PuxLYScMxY5Xacmd9q0RzQ?feat=directlink

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

retrolefty

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

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!

Graynomad

#11
Aug 22, 2011, 02:54 am Last 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

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

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

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