We are complete newbies with swerve, and we’re going to get our first MK4i kit in the next few weeks. The SDS website says we need CANcoders for the steering motors, but it does not specify if we only need one or if we need one for every steering motor. Anyone know?
CTRE CANcoders are great, and they are the best documented in terms of integrating with SDS swerve modules. But to be clear, they aren’t the only option if you are worried about price. Alternatives include:
If you go with CANcoders i highly recommend getting them with the leads already soldered on. Its more expensive but can save you from having a major headache.
Yes you will need 4 CANcoders for each module but you can buy extra for any issues. And you need to solder the cancoder when you bought the standart one. If you have budget to buy wired ones you I prefer that the solder is not so easy to do on CANcoder you must to be so carefull when you are doing the soldering.
This holds true for basically anything in FRCFIRST Robotics Competition. The bare minimum in this instance is 1 encoder per module, however it will never hurt to have extras of something in your shop “just in case” (assuming you have the budget to support this habit).
Generally speaking people will use the encoders built into their drive motors for odometry (assuming you’re using NEOs or Falcons). If this is the case with your team, than you’ll only need CANcoders for your steering motors (not the drive motors).
There no provision for mounting encoders for drive, so just the steering. We have been using 4x SRX Mag Encoders for several years now, but CANcoders are a bit easier to wire (especially if you order with the optional pre-soldered wires).
Hi. Can you confirm that the Thriftybot absolute encoders can be used with the Spark Max controllers through the data port together with brushless motors (doing PID control on the Spark Max controllers)?
We are still getting the sense that this is not a supported configuration. See
(we are for now using MK4i with NEOs and Thriftybot absolute encoders that we wired to the Rio and are only using to see the integrated relative encoders of the NEOs)
You’ve been given the right answer already, but I wanted to add the reason.
The CANcoders act as an “absolute encoder”, reporting the angle of the wheels consistently over restarts and power cycles. If you don’t have absolute encoders on your swerve module wheels, then the alternative is to physically align your wheels to a zero position every time you power on the robot (or perhaps every time you deploy code). This is tedious and error prone.
You don’t require absolute encoders for your drive motors, as you only need to know how you have moved relative to the starting point.
We used the CTRE mag encoders successfully this year through the Spark Max data port, together with brushless motors, doing PID control on the Spark Max controllers. The Thriftybot absolute encoders are PWMPulse Width Modulation output, same as the CTRE mag encoders, so they should work the same, though we have not (yet) tested that.
Thanks. It’s good to know that you were successful with the CTRE mag encoders.
Note however that the Thriftybot absolute encoders, unlike the CTRE mag encoders, do NOT provide a PWM output via their 3-wire “PWM-style” cable. They provide an analog signal between 0 and Vin volts where Vin is about 5V.
We are using Redux Robotics Helium Coder although we have the option to use CAN we decided to go with the other option and wire it into the SPARK MAX as a PWM for ease of wiring the Helium can be use in either CAN or PWM configuration.