If my team purchases the MK4i swerve drive from swerve drive specialties, and used the double neo config, what are the cancoders, what makes them better/worse, and is it simpler just to use more spark maxes?
The cancoders are used to get the absolute position of each module on start up, without this when you turn your robot on it won’t know it’s initial module angle.
So the built in NEO/Falcon encoder is used to get the RPM/speed of your wheel, while the absolute position of the cancoder is used to get module rotational position as it will persist through a power down/up.
okay, so its probably pretty useful lol. do you have any info on how to use them?
The most widely used method for using the CANCoders in swerve is to feed the absolute position that is read from the CANCoder into the motor’s internal encoder so it can use its internal PID at a lower latency (on boot up the absolute encoder says it is 50 degrees, so set the internal encoder to position 50 degrees).
If you are looking for actually how to use it in software: Phoenix 5 documentation and Phoenix 6 javadoc.
how does one even install a cancoder, I dont have the part so it may be obvious, but ive been looking for ages and i cant find anything on it
In the context of SDS swerve, there are two #3-48 screws that go through the CANCoder case and into tapped holes in the swerve plate (see image). There are four holes on the plate so you can mount it in two different directions.
The magnet for the encoder is glued down into hole (orange part of image) so that when the wheel rotates the magnet will also rotate.
Broader and more information can be found in the user guide.
thank you both so much
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.