Electronic – arduino – Avoid voltage peak / static discharge freezing arduino

arduinoencoderstatic-electricity

I am building a speed-testing stand for electric wheelchairs with an arduino nano + rotary encoder. The wheelchair is put on cable caddies, which turn the rotary encoders via a belt.

The setup itself with measuring the speed works pretty well.
However, due to the rubber wheels on the metal caddies, charge builds up and then there is a static discharge (you can see the flash), which freezes the arduino.

So far, I don't have any protective circuit for this.
The arduino is connected to power with a USB-Powersupply. The rotary encoders get their power from the VCC+GND Pins of the arduino. The data pins of the encoders are connected to the arduino digital Pins 4 + 5 (defined as INPUT_PULLUP).

What is the best way to protect the circuit from these voltage spikes / static discharges? There isn't really a way to ground the cable caddies, because they are portable and set-up in sport-halls with plastic floor.

Any hints will be greatly appreciated!

Best Answer

Lets examine some magnetically-induced upsets. Suppose the spark is 100 amps with risetime of 10 nanoseconds, with the 10 nanoseconds edge sized to be a realistic physical size ( several feet of metal structure).

Assume a vulnerable loop on your MCU of 33cm by 33cm, or (0.1 meter)^2 area. And assume a distance between the spark current path and your MCU loop of 33cm.

What is the voltage induced by the spark into the MCU loop?

If we combine Faraday Law of Induction with Biot_Savart Law, for coupling between a long straight wire and a rectangular loop, the wire being in the plane of the loop, and assume the loop is small compared to the wire-loop distance (so we avoid a LOG term in the math), we have this:

Vinduce = [ MUo * MUR * AreaLoop / (2 * PI * Distance)] * dI/dT

and for MU0 = 4*PI*1e-7 Henry/meter and for MUr=1 (air, copper, FR-4), this simplifies to

Vinduce = ( 2e-7 * Area/Distance ) * dI/dT

At this point, I don't know how big or small this magnetically-induced voltage will be. Certainly if 5 volts or larger (than your MCU VDD), you have a problem.

By specifying a "this will be a problem" before we do the math, we bring some integrity to our investigation.

Vinduce = [ 2e-7 * 0.33 * 0.33 / 0.33 ] * 10 Billion amps/second

Vinduce = 2e-7 * 0.33 * 1e+10 and "Houston, we have a problem" as we see just from the exponents of the numbers.

Vinduce = 0.66 * 1e+3 = 660 volts.

Yes, you have a problem with 660 volt induced into your MCU wiring.

Now how to mitigate this?

One method is to insert 10,000 ohm resistor into each lead of the MCU (input and output). This protects the MCU, but may not prevent RESET.

Do you use a Ground Plane, with no slits? to which filtering R+C can be grounded?

Read the comment of Peter Jennings.