A homemade Differential Swerve drive base

I am a robot enthusiast based in Montreal, Canada, and a 6 year veteran FRC mentor with various teams (4955, 3986, 296). This summer and fall, I designed and built this Differential Swerve drive base and would like to share my experience with the FRC community. I have included in the following GrabCAD link the CAD drawings for the parts, the source code, some photos and videos, and documentation. I hope this will help a few teams design their own Differential Swerve drive base for an FRC competition.

Full documentation (French & English)


Videos :

Differential Swerve robot FRC size (Outdoor test #2) - YouTube Straight line,full speed

Differential Swerve robot, FRC size (outdoor tests) - YouTube Tests outside

https://www.youtube.com/watch?v=4ZyLL9S24TY Cross (autonomous)

https://youtu.be/p0qX0L3j92I diamond (autonomous)

https://youtu.be/dxU-3p4S7NU quarter circles (autonomous)

https://youtu.be/feRI8y-yqhM test different angles (prototype)

https://youtu.be/xt62nak-tKM test with joystick (prototype)

In order to save on cost, I used Arduinos and non-FRC motor drivers for the electronics, but someone could easily use the legal FRC electronic components instead (with better results!)

Happy reading,

André Théberge


Woah, that’s a bunch of great work, nice job!

Are you able to log current in your setup? I’ve always been interested in how much current a differential swerve should use for steering, and how much for straight line. Or rather, how much current you have to hold back in a sprint so that you have enough left to control steering, and whether that’s a constant, or can be adjusted depending on conditions. The answer would point towards whether differential Swerves have any advantage over separate drive and steering motors.

Thank you for your comments.

With the current setup, I do not log the current going to the motors. I think it could be achieved using these hall effect sensors ACS712 Current Sensor Module (30A Max) in Canada Robotix, (you can get equivalents through Amazon). Putting one on each power signal coming from the Fuse box, and having a separate Arduino (nano, with 8 A to D inputs) to sample the signal and logging the values with timestamp into an SD card, for further analysis. As a rough estimate about the current drawn by each motor, I originally put 10A fuses, and blew a couple while moving forward and steering the robot at the same time. Moving to the next amperage (15A), I did not encounter this problem again. So the maximum average current must be between 10 and 15A per motor.

A possible disadvantage of differential swerve drives compared to regular Swerve is that you may have to temporary reverse the voltage (and current) going to a specific motor in order to perform an angular motion around the pivot point. This creates a current peak, especially when 4 motors are doing it simultaneously.

This is really awesome! The machine itself is impressive and the extent of documentation here is excellent.

Now it’s time for me to be a downer:

While this is good data to have, your conclusion may be a bit off. Assuming your fuses are similar to this ATC line from Eaton, you can see that a 15 A rated fuse can actually handle ~20 A for 100+ seconds. You can also see that it can handle the stall current of the BAG motor (53 A) for substantially longer than the 10 A rated fuse.

Hello Josesantos,

Thanks for your comments, and sharing this information about the fuses. Yes, I use ATC type fuses in the design, and was surprised to see from your graph that a 15A fuse could take a current 33% higher than nominal (20A) for 100 seconds! I was under the impression that the trip time would be instead very short (around 1 second) when the current is above 15A, but I was wrong. The curve also shows that the stall current of the motor (in this case, 53A) can exist for less than 0.2 second), which seems to make sense. So I would revise my estimate to a higher current per motor, based on your data. Maybe someone has an idea on how to estimate it using the ATC curves. Another observation, the voltage at the battery terminals can drop by up to 3V when all the motors are activated (verified on the scope). Unfortunately, I do not have a tester to measure the internal resistance of my battery, which was purchased in 2016. If I could, then the total current going to all 8 motors would be easily estimated.

1 Like

This is good stuff!

I would be interested in your gear ratios for steering vs drive? and what motor s, encoders and controllers you are using. Looks like pairs of BAG motors with Talon SRX’s?

I love the mechanical challenge of Diff swerve and have also made prototypes, and like what you have done - but now with the Falcons (and Neos) less sure they buy their way in - your thoughts?

( i.e. 4 Falcons seem to provide sufficient power to not need more and possibly reduce controllability)

Hi page20167,

Thank you for your comments and interest. A lot of this information is already in the documentation, but to answer your specific questions:

Motors are indeed BAG
Encoders are AMT-103V by CUI
Controllers are Double BTS7960B DC 43A. Not too happy with those, but they are cheap.

The gear ratio is 40:1 in the VersaPlanetary gearbox. 20:1 or 30:1 would be better.
The ratio between the Versaplanetary output and the gear ring is 4:1.
The ratio between the gear ring and the bevel pinion is 1:4.
The ratio between the bevel pinion and the drive wheel is 1:1.

So, starting at the BAG motor shaft all the way to the wheel, the ratio is 40:1. Again, I would make this ratio smaller in the next revision.

Because this is a differential swerve, there are no ‘ratio’ between the steering and the drive, both motors on each wheel are involved at all times.

Using NEOs or Falcons instead of BAG motors would provide LOTS of (even too much) power. Enough to rip or burn the carpet (figure of speech)!

Your best option for determining the motor current is to install one of the ACS712 current sensors on one of the wires between your motor controller and the motor. The input currents to the motor controller are not the same as the output current to the motor. Please note that the current sensor has a range of -30 A to +30 A. This is probably sufficient for the BAG motors but will not be sufficient range with more powerful motors.

It may be a good idea to use a simple R-C low-pass filter between the current sensor and the Arduino inputs. The corner frequency of the filter should be at most half of the sampling frequency of each channel of the Arduino.

Fuses are typically rated at 25 C. The various safety agencies (UL, CSA, IEC etc.) regulating protection devices such as fuses and circuit breakers expect them to trip at around 25% over their rating. There is also the sample-to-sample tolerance of the fuse itself that must be taken into account. Unfortunately, the ATC data sheet does not show the tolerance. Lastly, since fuses are thermal devices, the trip current has to be derated when operating at temperatures higher than 25 C (see attached).

I highly recommend everyone to read the documentation. Not only is this a functional differential swerve (impressive enough on it’s own), but the budget is unreal.

Praise aside, I would love to know how the 3D printed gears hold up after some heavy usage. I’ve always been suspicious of 3D printing bevel gears, perhaps without reason.


Super impressed with the build and the results. It’s impressive how good of a result you have with such rudimentary software (not even a continuous control loop). Have you experienced any trouble with desynchronized wheel speeds and angles? Does each wheel act independently to reach its target velocity and direction or do they work in concert to make sure that they’re all in the right angles to move without slipping?

You’re probably going to have a rough time with any motor controller without discrete mosfets at the kind of current you need. Unfortunately the cheap RC motor controllers that you can get most places are made for RC car/plane/boat models and either have no reverse capability or require stopping before reversing. I’ve had good experiences with controllers similar to these variety.

1 Like

It would be good to to check the current rating for the controllers, especially if they give a continuous rating. The motor controllers made for airplanes and helicopters will have been optimized for low weight and the ones my friend used didn’t really have any heatsinks. They probably would not survive being connected to a motor rated near the controller rating if the motor is stalled for any length of time since the motor in an airplane or helicopter would not be expected to be held in stall.

Thank you philso for you inputs and suggestions about the ACS712 and the fuses. I have not done too many high power designs in my life (more than 5 amps), so I still have to learn the ‘gotchas’, so indeed, your suggestions are welcomed.

Hello AlexanderTheOK

Thank you very much for your comments. I have not seen any significant signs of wear so far, but also, I did not ram the robot into a wall or try anything destructive while driving it.

I chose a 12DP pitch for the gears, so the teeth are larger than 20DP (Vex/AndyMark) and their shape is closer to an involute pattern then if I chose a smaller pitch. I used PLA 0.15mm thick, 30% filling. I can move to 100% infill, and a few machinists have put Youtube videos of 3D printed gears in PLA used successfully as change gears in a lathe. There is also the option of using PETG, ABS or Nylon. I would recommend the 100% infill and PETG or ABS for an FRC competition robot (i.e. heavy-usage)

Hello dydx,

Thank you for your comments. The wheels are each controlled by an Arduino, and as such, are not communicating with the other wheels in the current hardware - software configuration. There is a possibility to do so if the main Arduino UNO is replaced by a MEGA, which has 4 full serial ports. Then, a 2 way communication protocol could be implemented. Using a single CPU (Roborio with Talon SRX) would also allow this, in a much simpler fashion. I did not use the RoboRio because I had to make cost compromises and also, I did not use a single MEGA to control the drive base because it did not have enough specialized I/O pins and computing power for a one CPU implementation, like the Meccano prototype.

In this implementation, the main Arduino UNO computes the X, Y and Omega and broadcast this information to the 4 Arduino AStar (one on each wheel). Each AStar computes his own speed and angle, but in the process, it must compute also the other wheels speed and angle, to perform normalization of the values if they exceed +/- the maximum velocity.

Great work! A friend and I from 2521 created a differential swerve base over the summer as well and this post is inspiring me to upload our work as well. Unfortunately we don’t have documentation as good as yours, since we didn’t take many pictures along the way, so great job on all the documentation. I’ll try to have a post up asap. here’s a link to cad if you want to see it earlier. https://workbench.grabcad.com/workbench/projects/gcx-SNTEthGsfKsrosQk-z5Tbc9QUTQHlWsQYNB3w8QcVS#/space/gch7Rp1fJxSINPqHRJIC0hSADLWKPs8nMGr2dMI4NQD1Fu

1 Like

This is super cool! Excuse my ignorance, but what differentiates (pun un-intended) a differential swerve drive from a normal swerve drive?

1 Like

Differential Swerve uses both motors to power the wheel, an inbalance in the motors speed causes the module to rotate. When the differential module is going straight both motors spin at the same speed so the wheel gets the power from both but the module does not rotate. Normal swerve also uses two motors but only one powers the rotation of the wheel, the other powers the rotation of the module.


Wow! That is really cool!

1 Like

There is a new Addendum (#2) in the Differential Swerve documentation below. It covers improvements in the software, my tribulations using the low-cost motor controllers (BTS7960B, bad choice!) and the importance of using grease in the reduction boxes. I about a month time, I will have added brand new electronics and a different gear ratio, for better performance. Happy reading!



What was the state of the motor controllers immediately after failure? Regardless of which controllers you end up using, I recommend ensuring that they are adequately cooled.