High-current motor on isolated circuit causing servos to move

arduinodc motorrelayservo

I have a robot with several servos controlled by an arduino. Also attached is an electric airsoft gun, which draws considerable current. The gun is on an independent circuit with a separate battery pack. The arduino is connected to a relay which controls the gun.

The gun is on a physically separate circuit from the arduino and servos.

The problem is that when the gun is fired, all of the servos move toward their 0 position. This doesn't make sense to me, because the gun circuit is not connected to the servo-arduino circuit.

Why is this happening, and how can I fix it?

Best Answer

If the airsoft gun thing is on a seperate circuit and galvanically isolated from the Arduino then it's possible that the arduino is getting reset/corrupted by magnetic induction. This is quite common when the wiring between the two circuits are in close proximity and the current taken by one circuit is high and pulse like.

It's the same principal for an AC transformer; the primary winding generates a voltage on the secondary due to the magnetization current in the primary. With loosely connected windings the voltage is less of course but with a bigger primary magnetization current the voltage induced gets bigger.

Here's a picture showing a bad cable method and a good cabling method: -

enter image description here

And another showing how fields cancel on twisted wires: -

enter image description here

Twisting wires that carry heavy pulses of currents (or AC) reduces the emission to other wires. Twisting wires that might be susceptible to EMI improves their ability to withstand interference. Best practise is do both.

Related Topic