Introduction
Proper low-cost and low-power FOC supporting boards are very hard to find these days and even may not exist.
Even harder to find is a stable and simple FOC algorithm code capable of running on Arduino devices. Therefore this is an attempt to:
- Demystify FOC algorithm and make a robust but simple Arduino library: Arduino SimpleFOC library
- Develop a modular BLDC driver board: Arduino SimpleFOC shield.
Features
- Arduino compatible: Arduino library code
- Easy to setup and configure:
- Easy hardware configuration
- Easy tuning the control loops
- Modular:
- Supports as many sensors , BLDC motors and driver boards as possible
- Supports as many application requirements as possible
- Plug & play: Arduino SimpleFOC shield
Supported Hardware
- Motors
- BLDC motors
- Stepper motors
Drivers
- BLDC drivers
- Gimbal drivers
- Stepper drivers
Position sensors
- Encoders
- Magnetic sensors
- Hall sensors
- Open-loop control
Microcontrollers
- Arduino
- STM32
- ESP32
- Teensy
Example code
void setup() {
motor.linkSensor(&encoder);
driver.init();
motor.linkDriver(&driver);
motor.initFOC();
}
void loop() {
motor.loopFOC();
motor.move(2);
}
License
MIT license, all text here must be included in any redistribution.