Help with MK4i Swerve

Our MK4i swerve robot runs on Neos, CANCoders for turning and a NavX. (we have a pigeon too) We use the Phoenix Tuner for tuning the CANCoders and straighten all the wheels so that the bearings are facing left. We then take the Absolute Encoder without Offset value and multiply it by 360 to convert from rotations to degrees. This has worked to straighten and tune 3 of our 4 modules; however, one module (front left) is not working the same. Everytime we calculate the offset for this module, the value varies. It is inconsistent whereas the other three modules all remain the same. In addition, when we spin the wheel turning motor 360 degrees, the value that it started at is not the same as the one it ends at. Has anyone else run into this problem or have any idea why the value is inconsistent?

I’d say that you’d either want to check to see if a magnet came unglued or try replacing a CanCoder.

You could run a sanity check by looking at the Encoder on the neo turning motor.

We have checked the magnet; we have changed out the encoder.

How much variance is there in the offset?

Around 90deg. Never the same number on that one module.

The center column could be misaligned or not tight

Yes, done, superglued in place with Loctite 609. Checked and re-checked. I will have them check the cap screw tonight.

I’m not talking about the magnet. The center shaft doesn’t call for Loctite 609 for attaching to the azimuth pully

You’re specifically talking about this connection, correct?

(Following along as inevitably we will run into the same issues).

Correct

Okay, we will dive in to that tonight. Thanks for this idea.

None of these fixes solved the problem. We have until Saturday to figure this out or we will need to switch to a more traditional drive train.

If you swap the CANCoders on two modules, does the problem follow the CANCoder?

The center column is keyed, so even if it is loose there is no way for it to rotate that much.

Is it an issue with the magnet itself? Maybe you ended up with a magnet of the wrong type of polarization?

1 Like

How old is your cancoder? Is it a green status light when running? Did you solder it yourself?

Brand new, I will need to look for the light, we bought it soldered.

We have had the exact same problem with our front left module also. But only a 20 degree change.

How did you fix it?

We have not yet, I was thinking it was a magnet issue but if our issue is the exact same then it might be a different issue.

If you would like we can schedule a call with our programmers and Electrical team they have dealt with this issue before. FRC Team 11.