The SimpleDCMotor library extends SimpleFOC library to handle DC motors via their commonly used driver types.
A collection of
DCDriver classes and a
DCMotor class that build on SimpleFOClibrary.
DCDriverclasses for different DC motor driver types
- Some examples how to use them
The core library doesn’t work with DC motors, that’s not its purpose. This library adds DC motor functionality.
This lets you use the many sensor drivers available in SimpleFOC, as well as helpful classes like the Commander, when working with DC motors also.
And it allows you to use SimpleFOC’s control architecture to use closed loop control, so in combination with a sensor, you can turn even a cheap DC motor into an accurate digital servo.
It is in the arduino library manager, called “SimpleDCMotor”. Install as normal for arduino libraries in Arduino IDE or PlatformIO.
Please see the readme file on github and the library examples for how to use it.
You can find the source code for the library here: https://github.com/simplefoc/Arduino-FOC-dcmotor.
Please see the documentation on github. Note that there is additional documentation in the
drivers subdirectory describing the individual DC motor drivers.