The two wires from the sensors (signal and ground) or three (5 volt feed) create a loop, which acts as antenna to pick up magnetic fields. To avoid that, either use shielded wire or simply twist the wires together. Each twist creates a smaller loop, which picks up less of that noise, but also adjacent loops pick up a signal that’s inverted from the loop before. This way the induced noise voltages in each loop cancel each other.
|