Encoder issue happens at a weird time.

So, we’ve been having an issue all year that many other teams have - the encoder resets and the arm begins to read at a weird value, the arm strains and can’t pick itself up, etc etc etc.
But we noticed that it happens RIGHT as the Robot LED on the controller turns orange from green. Is this indicative of something that we can use to fix the issue? It’s ridiculous - we’ve replaced every piece of electronics on our robot and it still happens. Could it be a Cortex issue?

What sort of encoder? An IME or a quadrature encoder (the red ones).

Controller robot led turning orange? Does the cortex robot led turn orange as well? That’s low battery indication.

IME. Yeah, the controller LED turns orange - when it happens again we’ll be sure to see if the Cortex light turns orange too. If it doesn’t, what could the issue be?
It doesn’t seem like we’re using any unnecessary battery power, considering we haven’t added anything besides the LCD screen (we’re using your selection code, by the way)!
Could it be an issue in reverse, where the IME failure affects the battery level?

Update: The Cortex light turns orange as well.

Another update: It just happened but the Robot lights stayed green. What. I have an encoder reset button, and when our driver pushed it, the motors turned back on (you could hear the whining)

Ok, so cortex led turning orange means the battery dropped below 6.5V. This could happen either because you have a weak battery (I have one that now lasts about 5 minutes after being charged before the led turns orange, need to dispose of it) or you motors pull lots of current and momentarily cause the battery voltage to drop. If the battery drops too much then this could cause an IME reset.

Alternatively, if you search the forums you will find that there’s been lots of discussions about IMEs and static over the last two years. It’s possible that this is causing your IME to reset with the effect of reseting the encoder count to zero.

Using a backup battery (and competition switch) will help with the first condition, not much you can do about the static problem (there is some ROBOTC code I wrote that may help but you may not want to try that so close to worlds).

When this happens, what does the led on the IME do? Does it stay blipping green or turn orange?

Yeah, we’ve been using antistatic spray.
Huh! One of the batteries certainly wasn’t bad - like I said before, in one of the runs the battery stayed green after it happened. We’ll post what happens to the IME when it happens next. Our backup battery is apparently dead, so we’ll replace it.

Don’t forget the backup battery is only enabled with a competition switch connected.

IT IS?!
WH-
That’s crazy! Sweet, will keep that in mind.

Also look for nicks in the wires. That can cause nastiness as well. Look especially around tight corners or where the wire is repeatedly banged into the bump squishing it over and over again.

We seen similar issues and not sure if it is directly attributable or not but a good cleaning of the IME board seemed to help. Not sure why but that crusty looking grease on the bottom of the board was wiped off. After that, no more orange lights. (same battery)

A clamping diode would be good too but illegal in competition.

What did you clean the IME board with?