Go Down

Topic: Analog in Cross-Talk in an unusual setup (Read 4805 times) previous topic - next topic

clinton.ross.davis

I'm getting cross-talk between my analog inputs. Here's the setup. I've taken an old, sizeable computer chip from an old cd drive. i've connected lead and ground cables to random spots in the circuit such that electricity can flow through it in some semi-random fashion. i want to have several different wires, each connected to their own analog in, that act as 'probes', showing where the electricity is. so - for example- i should be able to take a wire plugged into an analog in and drag it across the circuit board and see where electrical flow is strong/weak. BUT, even if i only have one wire plugged in, the other analog inputs mimic the readings of the truly incoming signal. what's up with that? how can i fix this so that i have multiple truly independent readings?

PaulS

Quote
BUT, even if i only have one wire plugged in, the other analog inputs mimic the readings of the truly incoming signal. what's up with that? how can i fix this so that i have multiple truly independent readings?

Very simple, really.

Don't read from an analog pin with nothing connected to it.
The art of getting good answers lies in asking good questions.

clinton.ross.davis

well sure, that example was just to better illustrate the cross-talk. but let's say i'm trying to read analog 1 and 4 at the same time. If analog four is connected to a node with no electricity, but analog 1 is, they will both display the reading of analog 1. the point is there's no reliably independence input between analog inputs.

Senso

Really?
Connect the pin 4 to ground, now read it and see what it reads, if you have a floating pin its usual that I will measure anything that it wants to, connect it and no more problems.

clinton.ross.davis

ok, what i said just previously was a little inaccurate. Let's say i have wires in analog pin 0 and pin 3. If neither of them are attached to anything, the values they are outputting are all over the place, but mostly synchronized. if i attach pin 3 to a ground loop, pin 3 is stable at  a '0' reading, meanwhile the pin 0 is still giving wildly varying readings, but now only between 0 and 0.5 - suggesting that its readings are being limited or affected by the pin 3 reading

retrolefty

#5
Nov 04, 2010, 04:00 pm Last Edit: Nov 04, 2010, 04:02 pm by retrolefty Reason: 1
Quote
suggesting that its readings are being limited or affected by the pin 3 reading


You are making it more complicated then it really is. If an analog input pin has nothing wired to it, it will just float and read invalid values, depending on the phase of the moon. The fact that an unconnected analog input pin is effected by other pins is of no consequence. That does not effect other analog input pins that do have valid signals wired to them, they will read accurate values. By the way digital input pins will also read random invalid high and low values if not wired to anything, that is the nature of floating input pins.

clinton.ross.davis

or, for another example, say pin ZERO and pin THREE both have wires coming out, but they're not attached to anything and are producing a wild string of numbers. If i attach pin THREE to a circuit and it produces a stable output value of 1, then pin ZERO (still unattached to the circuit) will also stabilize but at a value around 0.28 perhaps.

retrolefty

Quote
or, for another example, say pin ZERO and pin THREE both have wires coming out, but they're not attached to anything and are producing a wild string of numbers. If i attach pin THREE to a circuit and it produces a stable output value of 1, then pin ZERO (still unattached to the circuit) will also stabilize but at a value around 0.28 perhaps.


Again, just don't perform analog input pin reads on unconnected pins, you seem to be searching for a problem that is not in need of correction.

clinton.ross.davis

#8
Nov 04, 2010, 04:31 pm Last Edit: Nov 04, 2010, 04:41 pm by clinton.ross.davis Reason: 1
I apologize. maybe if i describe my intentions a little more clearly. This is a design for an interactive video installation. I am sending the data from the analog streams into pure data where the readings are used to control qualities of video playback. the idea is to have four wires that anyone can walk up to and drag across this bare circuit. the participant would randomly stumble across areas where current is flowing through the circuit, causing noticeable disturbances in the video. with a few seconds of exploration, the participant might learn where these hotspots are and start exploiting the connections.

But, in order for this to work, i need some way to measure the incoming data such that i can indicate "YES, this wire is connected to the board and is receiving stable levels current." As of now, I can't find a way to distinguish such an observation from "This wire is not connected to the board but is outputting stable numbers based on the other wires"

i need to have several analog inputs running data at all times, and the data streams need to be consistent enough to actually reflect whether or not a cable is connected to the board. Does that clear anything up? Or an I just missing the point?

retrolefty

Well you might try wiring pull-down resistors between the analog input pins and ground (one for each pin), then wire your sensing wire from the same analog pin number to your project. The resistor should supply a 'default' zero value until a valid electrical signal (0-5vdc) is 'sensed' by the wire. 10,000 ohms should be a good value to try.


clinton.ross.davis

I'm afraid I don't know how i would go about wiring a pull-down resistor in this situation...

AWOL

The same as you would wire a pull-down in any other situation.
There's nothing special about wiring one to an analogue input.
"Pete, it's a fool (who) looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.
I speak for myself, not Arduino.

Grumpy_Mike

On the arduino there is only one analogue to digital converter, it has built in a 6 input analogue multiplexer on the front end.
When you read a value it switches the multiplexer to that channel and then takes the reading. On the front of the analogue to digital converter is a sample and hold circuit that in effects charges a capacitor to the value of the incoming voltage. If you switch to a channel with nothing connected to it there is still the remains of the charge on the input capacitor from the previous reading and you will read something less than the previous reading. So it might look like cross talk but it is not.

Solutions:-
1) Wire one analogue input to ground and always read that before reading a real input. That way you will discharge the input capacitor removing any trace of the previous reading.
2) Fit a resistor from the input to ground of about 10K (this is a pull down) this will discharge the capacitor quite a bit when there is nothing connected and reduce the effect.

spatry

You are correct in this observation.  There is one Analog to Digital converter on the uP, this is multiplexed to all of the inputs (http://www.atmel.com/dyn/resources/prod_documents/doc8271.pdf page 251).   So yes you will see some crosstalk.

You could put a pull down resistor (something like 100k on each input pin).  However this will likely introduce some settling delays, so you may need to read each pin multiple times to let the A/D settle some.  There are better technical solutions, but they require more parts.

Go Up