I am building a speed-testing stand for electric wheelchairs with an Arduino Nano and a 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.
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.