simplefoc/Arduino-FOC
Arduino FOC for BLDC and Stepper motors - Arduino Based Field Oriented Control Algorithm Library
What it solves
Field Oriented Control (FOC) is an efficient but complex method for driving Brushless Direct Current (BLDC) and stepper motors. This library simplifies the implementation of FOC, removing the need for hardware-specific driving algorithms and providing a cross-platform solution that works across various microcontroller architectures.
How it works
The library provides a modular C++ object-oriented approach where motors, sensors, and drivers are treated as distinct objects. It allows users to link these components together to create a control loop. It supports multiple control modes, including velocity and position control, and offers both closed-loop and open-loop modes with various torque control options (voltage, current, or estimated current).
Who it’s for
It is designed for the hobbyist community, researchers, and developers who want to implement high-performance motor control using the Arduino IDE or PlatformIO without having to write complex FOC algorithms from scratch.
Highlights
- Cross-Platform Support: Works with a wide range of MCUs including Arduino, STM32, ESP32, Teensy, RP2040, SAMD, and MBED.
- Hardware Agnostic: Supports a vast array of motor, sensor, and driver combinations.
- Advanced Control: Includes velocity and current feed-forward, improved velocity calculation, and a dedicated GUI tool (SimpleFOCStudio) for real-time tuning.
- Comprehensive Documentation: Provides API references, step-by-step setup guides, and a detailed "theory corner" for learning FOC.
Related
- Project
- Project
- Project
- Project
- Project