3D printed coaxial swerve drive!
Demo Video: https://www.youtube.com/watch?v=bPC4PA_9ZH0

Bill of Materials: https://docs.google.com/spreadsheets/d/1JbDlUu6udkqM81WZ7hx05DRgLwFBebW2xzIRILkRvEQ/edit?gid=0#gid=0
It should be relatively easy to design your own frame rails to change the overall length/width of the drive base if you choose.
The only thing that actually needs supports is the drive fork that has the bevel gear slot, since most printers should be able to do the other overhangs. Printed on my A1M just fine with standard settings.
Note: I did not print out the bellypan, I cut it out by hand from some high density cardboard I had lying around. I reccomend this as well since its easier to make holes to mount things and this part is pretty big.
Everything goes together exactly how it is in the CAD. Make sure to hot glue in the magnets into the encoder shaft. As previously mentioned, I just placed my electronics and drilled mounting holes for them into the bellypan.
To secure the encoder column and thhe magnet, use hot glue. It is critical for the magnet to be secured properly for the encoder to track position correctly!
To increase traction on the wheels I just put some electrical tape around them.
IMPORTANT: Adafruit motor shield by default uses 5 volt logic, but nucelos use 3.3 volt outputs so you must cut the trace and bridge the 3.3 volt logic pad as seen in the wiring diagram Also important: The only thing that runs on 5 volts is the flysky reciever, everything else uses 3.3 volts (aside from the motors obviously which use 12 volts)
For the 12 volt power distribution, I just used some wagos to split up the power to all the drive motors and the adafruit motor shield in parallel.
After soldering the wires to the N20 motors, they have a tendency to break off, so I hot glued the connection. I also hot glued the encoder cables because dupont connectors aren't that great and even a slightly loose connection can throw the encoder readings off.
Note: Pins can change as wished by the user, but every input pin for an individual simpleFOC module (IN1, IN2, IN3) must be on the on the same hardware timer on the nucleo
EN- PA12
IN1- PA11
IN2- PA9
IN3- PA10
Encoder Out- PC1
EN- PB5
IN1- PB6
IN2- PB8
IN3- PB9
Encoder Out- PA4
EN- PC5
IN1- PC6
IN2- PC7
IN3- PC8
Encoder Out- PC2
EN- PC4
IN1- PA0
IN2- PA1
IN3- PA15
Encoder Out- PC0
Uploading is pretty straightforward, make sure you have the official STM32Cores and have set up the Arduino IDE for STM32 upload.
- SimpleFOC (Important: At the time of writing this, only the 2.3.5 version of the library works, the latest version, 2.4.0, does not work)
- PID by Brett Beauregard
- Adafruit Motor Shield V2 Library
- MPU6050_Light by rfetick
- IBusBM by Bart Mellink
https://www.chiefdelphi.com/t/paper-4-wheel-independent-drive-independent-steering-swerve/107383 https://www.chiefdelphi.com/uploads/default/original/3X/8/c/8c0451987d09519712780ce18ce6755c21a0acc0.pdf
Gemini was used only for generating pinouts for the simpleFOCs and for minor debugging. All code was written by hand with inspiration from the aforementioned sources.