REV Absolute Encoder Position Flickering

Problem: position reading spontaneously begins to flicker between 0 and the accurate position reading. During some bouts (this occurred a number of times), the absolute encoder position read 2e13 and 2e-13.

Setup: absolute encoder connected to spark max (through the encoder adapter).

Frequency of occurrence: Once every couple hours of testing. Then we hit our heads against the wall and redeploy (see additional notes).

Additional Notes: After redeploying, the flickering stops and normal readings resume.

Testing so far: we tried switching out the encoder adapter (didn’t help).

Is it a faulty spark max, or does the redeploying fix suggest otherwise?

(also asked in discord, will post answers here if I get any)

  • Have you tried swapping the SparkMax?
  • Maybe you’re somehow resetting the position in the code.
  • Try SmartDashboard-ing the encoder position to see what might be happening.

Our team uses the relative encoders that are built in. This has worked fine for us. Let me know how it goes!

2 Likes