Accuracy reading two analog inputs on Arduino

Hi guys I need a help with this question. I'm trying to reproduce a Wheatstone Bridge with Arduino, the main idea is read the two legs of the circuit with two analog inputs of Arduino, for the while I'm analyzing the values with 4 equal resistors as the Arduino reads (0 to 1023 bits). The problem is when I change one of the resistors (Rx), the voltage on A0 (first leg C) should not be changed, but it happens.

I've read something about the analog inputs of the Arduino suffer interference, but I don't know how to avoid this.

After switching analog channels, it is usually a good idea to discard the first reading. The second reading will be correct.

Is there a way to turn off an analog input? Because the problem start when I execute the second "analogRead". I'll give an example of my results:

A0 = first measure of the leg C in the bridge
A5 = second measure of the leg B in the bridge

In all simulators I have 511 as result in both analog inputs, in real life disregarding the natural oscillation voltage I do have the 511 but just if I read only the A0, when I read the A5 after change the Rx resistor the A0 results goes to something about 700, but theoretically the A0 should not change.

I've already tried delay between the measurements, change the analog inputs... But always unsucceful.

I don't know if interrupts is the way, but I'm not so familiar with this option... :sob:

Only if you disconnect it externally. See Fig 24-1 of the datasheet.
Best method is to take consecutive readings on a channel and use the 2nd one.

If the resistances are 10k or less a second reading won't make significant
difference - if higher it will.

If the resistances are very small the resistance of the wiring to the bridge from
the power supply will cause a genuine coupling between the voltages. Star
grounding will help in this case.

Thank you guys for the answers, I'll try a little more... In my application I only have high values of resistances from 500k to 100M.

Then stick 100nF capacitor to ground on each analog input you use if the
signal is DC or only slowly varying, that's going to bring the impedance
right down.

Hello ivanks,

Did you ever resolve this issue? I have tried all the suggested software and hardware resolutions and I still get one analog input being affected by the other analog input. I am reading a temperature sensor on pin A0 and a potentiometer (setting the temperature trigger point) on pin A5. When the pot is adjusted so that its value is close to the actual temperature, the actual temperature reading (on A0) shoots up 20 degrees F. Then the value of A0 (the temperature sensor) begins to oscillate back & forth between the 20 degree range. I've tried the "two readings with 10ms wait time between reads" suggestion, as well as the "100nF between the pin and ground" suggestion. Please let me know if/how you resolved the issue.