This is a swerve module I designed as a custom swerve my team would actually build and compete with if we are comfortable using custom instead of COTS. This is design is heavily based off of team 2471’s Hermes module, it also takes inspiration from team 33’s winter swerve.
The main goals of this module were to minimize footprint and weight with a 4in wheel and use COTS parts when possible to make it easier to manufacture and build.
Some stats:
Weight 4.5lbs
Footprint 4in wide x 5.5in long
Height 10in
Ground Clearance 3.86in
Gearing 13:22 (normal) ->15:60 (bevel), 4in wheel
Free speed 16.5fps or 13.9fps using the same spacing
Azimuth gearing 10:1 VersaPlanetary Lite → 20:80 belt reduction
The drive motor is a Falcon 500, azimuth motor is a NEO 550. 4in black tread HiGrip wheel for simplicity (no custom tread, no hassle). The bevel gears are the same as 2910’s MK2 module and are from from Swerve Drive Specialties. The top plate is 1/4in thick aluminum and the bottom plate is 5/16in thick aluminum. The azimuth pulley and wheel forks would be 3D printed out of PETG or onyx.
We have struggled a bit with integrating the Lamprey encoder directly to the SparkMax. However, if you use the Lamprey just for the initial position, you can use the NEO 550s internal encoder for steering from that point on. I have not looked into whether you can plug the Lamprey into the Falcon 500. Obviously, you wouldn’t use the Lamprey for the drive motor, but if the motor controller on the Falcon can read the Lamprey and then pass the measured position to the main code through the CANbus when initializing, then this can be passed to the SparkMax by CANbus as the initial position. It might work.
To be honest I didn’t even consider this, I’d be worried about using the NEOs encoder due to the high backlash generated by the VersaPlanetary, but running the signal through the falcon seems like it would be a good solution. Programming and electronics are not my forte so I will have to ask some teammates if they have a solution, or if I should just use a different encoder.
Any reason why the plates are filled out here? It doesn’t do much for the rigidity, and you might want that real estate later on a robot. Alternately, you could put a standoff in the corner instead to improve rigidity.
No particular reason that I left that. I will mirror the mounting holes on the other side of the versaplanatary into that space and add a stand-off, thanks for pointing that out.
We used the NEO 550’s internal encoder for steering control in 2020 and it was rock solid. So, no issues there.
The issue was with the Lamprey plugged in to the SparkMax. We were still de-bugging that when the season shut down and we have not really made much progress since (mostly because of a lack of working on it).
In that case we could probably just add a physical pin system to set the wheel in the same orientation each match and zero the NEO encoder each time. Is this what you did in 2020 or did you have a different solution?
Yeah, we had a sharpie mark on the azimuth housing that we would line up with a sharpie mark on the static plate. Not ideal, but the best we could do the day before competition.
Ideally, you would want an azimuth encoder in case you have a re-boot during a match although we think the SparkMax will hold the encoder count during a re-boot.
Take a look at my comments around March 11 on this thread, which discusses the issues plugging a lamprey encoder into a SparkMax:
In short, the SparkMax software averages the past few analog inputs, which generally works fine, but doesn’t work well for a “wraparound” encoder whose values go from 3.3V to 0V when the encoder makes a full rotation.
If your team (or others reading along) has pretty solid electrical/software skills, here are a few other options for absolute position sensing for swerve:
Add a sensor just to detect the zero position and run a search for zero as soon as things power up (this can be fast if the angle is manually set close to zero, and works no matter the initial angle – there are CD threads on doing this, can use incremental encoder with an index, etc.);
There are several non-contact, non-magnetic, inductive position sensors, such as this one (this would involve doing a custom printed circuit board);
There are some pre-packaged sensors that may fit pretty well (example).
The main point is this sensor is pretty important, so be sure someone has a handle on this side of things. This is an area where you may not want to be on the leading edge. As always, plan to get things sorted out in the off season.
The MA3 and SRX are also popular options in FRC. The main thing is to be sure you have a good plan for interfacing the steering motor controller with some type of absolute sensor – or a relative one plus some method for indexing the zero position. You can go through the RIO to do this, but be sure you have a plan for the software also and see how other teams have fared with the approach you are trying. You don’t want to be in the position of having done a really nice mechanical solution but not being able to mount the sensor you need, nor get things working well with the sensor you did include.
Thank you for noticing this. I guess this should teach me a lesson in not designing off of memory. I will modify the original post with new gearing and speeds.
If you got rid of the extended part of the plates that mount to the tube, you could make the plates rectangular and symmetrical so you wouldn’t need multiple spare modules and plates for each version (left/right). Even if you can flip the plates for each module so you don’t need to machine different plates, you’d still need twice as many spare modules at a competition.
I can’t just cut that part off because then the tube would not have enough surface area to mount on and I don’t want to extend the full plate to that width because that takes up robot space and adds weight.
I find it funny and reassuring that you guys had issues with this as well.
We were using a magnepot absolute encoder plugged into the spark max to set the zero on the neo encoder. We made a complete swerve chassis with the same modules in the offseason, and 60% of the time, it worked every time (jk it worked great probably 80% or %90 of the time, but I couldn’t resist.)
In any case it had a an intermittent issue, where one neo would randomly just not spin at all. If I remember correctly, the LEDs on the affected spark max would flash in a way that was not listed in rev’s error code table. This could happen to a drive or steering neo, but I don’t remember noticing it on the shooter. We tried reaching out to rev, but they didn’t really know what to tell us. It’s hard to diagnose and fix an issue that is so intermittent. So we suffered through the whole season with it.
We actually had the same issue, it caused us to almost lose a semifinals match when our spindexer wouldn’t move. We swore off neos for the season and moved on, but now we’ve been getting back to it and are trying to find a solution