Swerve Drive
- 7 Devlogs
- 16 Total hours
Coaxial FRC style swerve drive using n20 motors for steer and brushless gimbal motors with FOC for drive
Coaxial FRC style swerve drive using n20 motors for steer and brushless gimbal motors with FOC for drive
Swerve azimuth control
Got PID working for one module, though it probably still needs to be tuned. Also I need to figure out the logic for wrapping around since the encoder measures values from 0-1023 which I have mapped to 0 to 360, but after 360 it goes back to 0 which complicates the logic a bit. I also need to implement the logic for the swerve just switching the wheel rotation direction rather than rotate the entire module 180 degrees whenever it can. Realistically, the module should only ever rotate a max of 90 degrees from one input to the next
Tested all hardware for the swerve drive. The latest version of SimpleFOC (2.4.0) doesn’t work for some reason but the previous version (2.3.5) works perfectly fine. The as5600 encoders work great and track the rotation of the module nicely. I also made a few design changes to make assembly easier which includes changing the design of the encoder column support and the design of the standoffs.
Swerve module v1 assembled! The gears mesh nicely and the entire system has a lot less friction than I thought it would :)
Things needed to do in terms of design:
Finished soldering wires to the motors and header pins to the encoders. Got stm32 nucleo 64 f411re working with platformio ready for programming along with the motor shield to control everything!
finished building one module in real life!
Added drive column for drive gear train which is coaxial to the encoder column which has the magnet for the as5600 to track the module’s rotation. Done with the drive module for now, moving on to the motor mounts!
CAD for a single module done including gear relations. No motors yet