Reading analogue sensors in a noisy environment
Lets examine the magnetic interference.

The Vinduce into a rectangular loop, from a straight wire located in the plane of the loop, and ignoring natural-log coefficients that may obfuscate the causality, is

Vinduce = [ MU0 * MUr * Loop_Area / (2 * pi * Distance) ] * dI/dT

In air, this simplified to

Vinduce = 2e-7 * Area/Distance * dI/dT   [volts]

Assuming some evil spikes on the current waveform (from motors, or poorly filtered switching regulators) at the 100amp/100 microsecond size, using non-twisted pair sensor cables of physical nature 1meter long by 2mm signal-return spacing, and this sensor cable located 1cm from the evil spiky breaker&amp;cables, we compute this level of trash

Vinduce = 2e-7 * (1 meter * 2milliMeters) / 1cm Distance * 100 amp/100uS

Vinduce = 2e-7 * 0.002 / 0.01 * 1e+6 amp/sec

Vinduce = 2e-7 * 0.2 * 1e+6 = 0.4 * 1e-1 = 0.04 volts of trash.

In a 2.5 volt sensor signal, the (unfiltered) trash causes 2.5/0.04 = 62:1 ratio, thus
about 6 bits may be possible. Heavy filtering may improve the accuracy.