Servo wire shielding noob, EMI, twisting etc...

Basically I will have about 20 servos connected to a controller. I know that electricity running through a wire creates a magnetic field on it.

Could someone please explain the basic things I need to do to prevent any interference between the servo wires?

I did some research on google but haven't really found any good explanations on why people twist the cables or how to shield servo cables, or if I should even shield them in general.

The servos are standard size.

Thanks in advance

Could someone please explain the basic things I need to do to prevent any interference between the servo wires?

If the cable runs are short and/or if the wiring to all of the servos isn't bundled together, it might not be a problem. Digital signals are somewhat immune to noise & interference... As long as a "1" remains a "1" and a "0" remains a "0", there is no problem.

The output of an Arduino is (relatively) low impedance, and since noise & interference signals have no direct connection and they can't supply much current, the noise/interference voltage tends to be low a "1" tends to remain a "1" and a "0" tends to remain a "0". And, that's the great thing about digital!

With motors, you're more likely to get noise through the power supply (if the power supply isn't robust enough) an that can result in glitches in the processor or the servos.

If there is a problem, it's often a matter of trial-and-error to fix it.

I did some research on google but haven't really found any good explanations on why people twist the cables or how to shield servo cables, or if I should even shield them in general.

A shield "blocks" electromagnetic signals (and noise) from getting through the shield. The shield is grounded, so any noise/interference is carried to ground.

Twisting relies on the fact that the signal is represented as a difference-voltage, usually between the signal wire and ground. So the idea would be to twist the servo-control wire and it's ground together for each servo together, separate from the wires to the other servos.

In the case of differential signals (Ethernet connections, or balanced audio cables) there two opposite signals. Any noise is picked-up in-phase by both wires so there is no difference voltage created by the noise/interference.

Thanks for the great answer. In the case of analog inputs, such as sensors, I'm guessing shielding would be required, such as capacitive sensors.

All of my servos are digital so thankfully I won't have to worry about that at least.