Hello, during the offseason this year, my team has been pursuing the development of a swerve drivetrain for RND purposes to see how it can fit our team. We have decided to go with MK4 modules via AndyMark with an L1 8.14 gear ratio. I’m aware that SDS provides code for these modules but it would require us to downgrade our roboRio to a 2021 GradleRIO version. For this reason, we are creating our own code. Most teams I have found use NEOs and Falcons exclusively for drive and steer. Our team has opted to use a Falcon for drive and a 775 for steer, does anyone know any issues that this may present? Furthermore, does anyone know any other teams that use this in a command-based fashion that I could use for a code reference?
This is not directly responsive to your question, but I’m hoping you’ve had a chance to look at what WPILIB offers:
I will take a look at this
Things to consider -
- Mounting holes, I don’t believe the 775 has the same diameter mounting hole pattern. Check to ensure that the MK4 has holes to mount it and holes for airflow.
- The Neo and the Falcon have integrated encoders. The 775 does not. This could make it trickier to do things like motion profiling.
- If you download the SDS template code locally you shouldn’t need to change your gradle version at all.
This won’t work without an additional gearbox at least. The SDS is designed for a lower speed/higher torque motor than the 775. It can work, but you will need a versa planetary for each module to make this work. Ratio will depend on exactly what motor you want to use. Are you thinking about using a 775 pro/redline for steering, or a different legal 775 motor?
What steering encoder are you planning on using?
The 775 will need a gear reduction. If you do it with a versa planetary you can add an encoder slice and kill two birds with one stone.
Up until 2020, we used an RS550 for steering. Like the RS550, the 775 you are planning to use does not have a built in encoder, so you will need an additional encoder somewhere in the mix. If you are planning on using an absolute (azimuth) encoder anyway, you can definitely use that for your steering control. As others have said, you will need a gearbox to reduce the speed of the motor to get the right steering speed for enough steering torque as well as to be able to get a stable PID control.
PID control stability is a little trickier when you are using the absolute encoder and a gearbox with a decent amount of reduction. The gearbox introduces additional backlash in the system which causes the control loop to be a bit jittery. The general consensus was that a steering speed of around 250 rpm (motor free speed x gear reduction) was about the fastest you could spin the module and have a stable PID control using the RIO. If you are able to feed the encoder into the motor controller, you might be able to do a little better than that as the internal compute cycle is faster in the motor controller than it is in the RIO (depending on the motor controller you plan to use). You may want to target a slightly slower speed to make it easier to tune. 150-200 RPM might be a good place to start and should be plenty fast for drivability.
If you need hints or run out of time my team first tried SDS software and I don’t remember much work to get it on 2022. Then we choose to go with the WPILib example program SwerveBot that was mentioned in #2 .
We made very few tweaks to the SwerveBot to suit us as “polished” code for competition with the major one being PID constants and a little code to keep the robot from twitching on startup. Later we started to change the units but that doesn’t change functionality and is not needed.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.