Swerve Encoder options

We are currently using the SDS MK4i swerve modules, but we don’t want to spend $100 to replace an encoder. AndyMark has a REV Through Bore Encoder to SDS MK4i Adapter, which seems like a cheap and easy replacement. Is this product reliable and sufficient for swerve needs? If this doesn’t work we are also considering the Helium Canandcoders and TTB Thrifty Encoders.

Didn’t know the REV Through Bore Encoder adapters existed for the Mk4i

I didn’t know this existed either. Interesting.

We have used TTB encoders for a couple years now, we had a couple die last year but we were all good this season so it was likely somehow our implementation. I can definitely recommend them, we moved from CTRE CANcoders (which we ran on MK4s in 2022). Definitely hot glue connectors if you use them though.

I didn’t know REV had an adapter either but their encoders are really good so I’ll have to look at that for next year…

if you’re a cheapskate like me, and don’t mind soldering and pronting your own cases, you can use these AMS breakout boards, they produce a duty cycle output which is better than the voltage output of some other options. the new vortex motor can use this signal directly for position control.

we’ve also used thriftybot, they work well, plug and play.

Note that the AS5048 only provides a wonky PWM output, so you’ll need to do some math to decode it properly.

The more useful AS5145B will provide a 0.1-99.9% duty cycle that is easily decoded with the DutyCycleEncoder class on the RoboRIO.

The Canandcoder provides both CAN and PWM output.

1 Like

tbh if i were in your situation I would just go with the Helium Canandcoders, they’re pretty cheap, very straightforward to use, and very reliable. They also reduce the wiring hassle especially if you are using neos.

5 Likes

FWIW, we used NEOs for Azimuth and were able to use Canandencoders with PWM directly to the sparkmax, this allowed the entire azimuth close loop control to be contained to the sparkmax, simplifying wiring and code. We have also used TTB analog encoders and seeded the sparkmax value on code startup. I’ve found better results with the former directly closing the loop on the encoder as backlash will not effect the readings.

1 Like

thank you, you’re right.

If NEOS are being used for module rotation, then the through bore encoder with adapters seems like the cleanest option. Then you can get the absolute encoder adapters for the Spark Max, and just plug the encoder straight in.

The Canandcoder seems just about as simple. You’ll just have to solder to a data breakout adapter board on the Spark Max.

The Canandcoder plugs into a Spark MAX directly with no modifications fwiw.

4 Likes

Oh nice.