Team 4909 Differential Swerve

Hello everyone, Team 4909 is proud to present our first attempt at a differential swerve drive. We began the project after the 2020 season and we were able to continue working on it through the 2021 season since it was virtual.

To head off the questions about what a diff swerve is, what makes it different than a “normal” (coaxial) swerve, etc. see below:

Diff Swerve vs Coaxial Swerve

In a coaxial swerve drive, each swerve pod has 2 motors: 1 for spinning the wheel (driving) and 1 for turning the wheel (pointing in a new direction). This means that a total of 4 motors are responsible for the driving power in a coaxial swerve, and the other 4 are used exclusively for turning the wheels to point in different directions.

A differential swerve on the other hand uses a differential mechanism in order to use each pod’s 2 motors to control both spinning the wheel (driving) and turning the wheel (pointing in a new direction). This mechanism works through the difference in the velocities in the 2 motors. Different diff swerve designs implement the differential mechanism in a different way, but in this particular design if both motors spin the same velocity and direction, the wheel of that pod turns (points in a new direction) with the wheel not spinning at all. If the motors spin at the same velocity but in opposite directions, the wheel will spin (driving) and not turn (point in a new direction) at all. If the motors have any other combination of velocities, then a combination motion will result, where the wheel is both spinning and turning at the same time. Since both motors in a pod can be used for the spinning of the wheels, when the wheels are not turning at all, a maximum of all 8 motors on the drivetrain can be used for driving.

Shoutouts and Credit

@MattYoung was the lead designer of the system, and he spent from summer 2020 through until he graduated in June 2021 working on it. The project was initially his idea, and he did the vast majority of the design and manufacturing work. Major props to him for all the mechanical work that you see here.

@peytonfitz led the development a different diff swerve at Northeastern University (based on @Aren_Hill 's design) as a part of the NURobotics (the robotics club at NU) prior to our system’s development, and graciously offered his time to help us develop our own. His insight was very helpful, between lessons learned from his own diff swerve and the mechanical design that this system required. Peyton also allowed us to use the NURobotics diff swerve chassis for our software testing while our system was designed and built, which was critical for allowing us to parallel path the hardware and software development.

At this point there are so many that I cannot list them all, but we would like to give a nod to all teams who have worked on swerve designs (coaxial and diff) in the past. While our design is unique in some ways, it was only possible because of the incredible work that the community has shared over the years. Thank you to all those individuals and teams!

Design Overview

Onshape Link

The CAD is due to be cleaned up, but we wanted to share our progress with you all now, so that will happen at some point in the future.

image

Technical Details

Weight:
While we did not weigh a module physically, based on CAD it is estimated to be 6.458lbs. We did account for perimeters and infill on the printed parts and hardware, so it should be close. This does not include the weight of the box beam that makes up the chassis, just the pod itself.

Gear Ratios:
6.31:1 Turning Ratio
2.70:1 Driving Ratio

The gearing was optimized for the traction limit of the drivetrain at stall torque assuming a full weight (125lb robot + battery + bumpers = 150lbs).

BOM:
Spreadsheet Link

Bulk Module cost is just Sum per Drivetrain/4. The “bulk” name is because if you were to build only 1 module it would cost more than this value since you would need an entire box of each type of screw for it, instead of only needing 1 box for the whole drivetrain.

Cost Summary:

Videos
By the time it was in driving shape we didn’t have a ton of time with it since summer was quickly approaching, but we did get some footage. In the driving video the system is software limited to a slower speed than it is technically capable of, because at full speed it became mechanically unreliable.

Modules Turning
Driving Around

Next Steps

  • Mechanical
    • Rework the v-groove bearing setup, by either making the mating part out of metal or rethinking it entirely
    • Address belt skipping issues at higher motor speeds
    • Reduce part count and machining time
    • Make assembly easier
  • Software
    • Lots of optimization (I am not qualified to speak on this, I will defer to @techplex for questions on software)

If you have any questions, comments, or suggestions we would love to hear them. While a big first step, we recognize that it is just that, a step in the process towards getting this design to a fieldable state. We do not plan on fielding a diff swerve in 2022 but hope to in a future season.

17 Likes

As Scott mentioned above we were fortunate enough to borrow a nearly-complete diff-swerve drivebase from Northeastern Robotics to prototype our software setup.

We were able to bring up two mechanically different differential swerve drivetrains and were able to develop the software to support both systems by sharing the common code. Here is our open source repository of the code:

From a high level we use the wpilib kinematics code to convert joystick inputs to module states and then use a set of equations to convert the module state to module motor a and motor b velocities.

We built a number of dashboards to streamline the bringup process which allows tuning the PID of a single motor, then a module then simulating joystick inputs for testing.

First we zero the encoders, the REV hex encoder comes zero’ed from the factory but there seems to be a +/- 5 degree swing in the units we tested making consistent mounting inadequate.

Second we tune the PID in the motor controller. We have had success with Falcons and Neos. The neos take speed in RPM as a setpoint whereas the falcons are ticks per 100ms, since we started with the neos we do the math in RPM and convert to the specific units needed for the motor controller.

Third, we tune the rotation PID, we found a simple P controller was sufficient to “convert” the module state heading into a difference in speed between the a and b motors.

Then we test at the drivetrain level, we really need to make the slew rate limiter constants configurable but that is on our todo.

In this dashboard the user can override the joystick and use the sliders to set precise speeds for testing. We also need to add a checkbox for field oriented drive defaulting to enabled.

12 Likes

So cool. Congrats!
FYI, the “Driving Around” video link seems to be broken.

2 Likes

That’s a sweet-looking swerve guys, well done! Can’t wait to see where differential swerves go in these next few seasons.

1 Like

Thanks for the heads up, should be fixed now.

Really great work here guys! Love all the Thrifty parts.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.