3-wire encoders breaking

We are having Encoder problems where it just breaks when we run the code sometimes. It doesn’t display any values and is completely broken.

When we tried replacing the encoder with a new one and it solved the problem momentarily, before it breaks again after running the code once or twice. In total we have gone through 2 encoders and don’t want to break anymore.

We have tried changing the port that the encoder is plugged into and that didn’t fix the problem. We also replaced the brain and so far the broken encoders are still broken. We suspect that the ports on the brain are killing the encoders some how.

Any ideas or solutions. Need help ASAP. Tournament one week away.

Is this the old style (red) encoder that connects to the legacy 3-wire ports?

Or is it a new V5 encoder that connects to the V5 smart ports?

In case of the latter - this might be ESD (electro static discharge) that is killing the ports.

Then try spraying your fields with antistatic, rub your robot with antistatic wipes, or use ferrite cores like they talk in this topic: Smart Motors have no power

https://kb.vex.com/hc/en-us/articles/360035589572-Minimizing-Electrostatic-Discharge-at-VRC-Events

We are using the old style (red) encoders that are the 3 wired. We ended up replacing our brain and so far its working. Thanks though.