# Arduino-FOC
**Repository Path**: li19910513/Arduino-FOC
## Basic Information
- **Project Name**: Arduino-FOC
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2021-03-13
- **Last Updated**: 2022-06-14
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# Arduino Simple Field Oriented Control (FOC) library

[](https://opensource.org/licenses/MIT)
[](https://www.ardu-badge.com/badge/Simple%20FOC.svg)
[](https://joss.theoj.org/papers/4382445f249e064e9f0a7f6c1bb06b1d)
We live in very exciting times 😃! BLDC motors are entering the hobby community more and more and many great projects have already emerged leveraging their far superior dynamics and power capabilities. BLDC motors have numerous advantages over regular DC motors but they have one big disadvantage, the complexity of control. Even though it has become relatively easy to design and manufacture PCBs and create our own hardware solutions for driving BLDC motors the proper low-cost solutions are yet to come. One of the reasons for this is the apparent complexity of writing the BLDC driving algorithms, Field oriented control (FOC) being an example of one of the most efficient ones.
The solutions that can be found on-line are almost exclusively very specific for certain hardware configuration and the microcontroller architecture used.
Additionally, most of the efforts at this moment are still channeled towards the high-power applications of the BLDC motors and proper low-cost and low-power FOC supporting boards are very hard to find today and even may not exist.
Therefore this is an attempt to:
- 🎯 Demystify FOC algorithm and make a robust but simple Arduino library: [Arduino *SimpleFOClibrary*](https://docs.simplefoc.com/arduino_simplefoc_library_showcase)
- Support as many motor + sensor + driver + mcu combinations out there
- 🎯 Develop a modular FOC supporting BLDC driver boards:
- ***NEW*** 📢: *Minimalistic* BLDC driver (<3Amps) : [SimpleFOCMini ](https://github.com/simplefoc/SimpleFOCMini).
- *Low-power* gimbal driver (<5Amps) : [*Arduino Simple**FOC**Shield*](https://docs.simplefoc.com/arduino_simplefoc_shield_showcase).
- *Medium-power* BLDC driver (<30Amps): [Arduino SimpleFOCPowerShield ](https://github.com/simplefoc/Arduino-SimpleFOC-PowerShield).
- See also [@byDagor](https://github.com/byDagor)'s *fully-integrated* ESP32 based board: [Dagor Brushless Controller](https://github.com/byDagor/Dagor-Brushless-Controller)
## Arduino *SimpleFOClibrary* v2.2 This video demonstrates the *Simple**FOC**library* basic usage, electronic connections and shows its capabilities. ### Features - **Easy install**: - Arduino IDE: Arduino Library Manager integration - PlatformIO - **Open-Source**: Full code and documentation available on github - **Goal**: - Support as many [sensor](https://docs.simplefoc.com/position_sensors) + [motor](https://docs.simplefoc.com/motors) + [driver](https://docs.simplefoc.com/drivers) + [current sense](https://docs.simplefoc.com/current_sense) combination as possible. - Provide the up-to-date and in-depth documentation with API references and the examples - **Easy to setup and configure**: - Easy hardware configuration - Each hardware component is a C++ object (easy to understand) - Easy [tuning the control loops](https://docs.simplefoc.com/motion_control) - [*Simple**FOC**Studio*](https://docs.simplefoc.com/studio) configuration GUI tool - Built-in communication and monitoring - **Cross-platform**: - Seamless code transfer from one microcontroller family to another - Supports multiple [MCU architectures](https://docs.simplefoc.com/microcontrollers): - Arduino: UNO, MEGA, DUE, Leonardo .... - STM32 - ESP32 - Teensy - many more ...NEW RELEASE 📢: SimpleFOClibrary v2.2.2 see release
- GenericCurrentSense bugfix and testing
- bugfix leonardo #170
- bugfix - no index search after specifying natural direction
- Low level API restructuring
- Driver API
- Current sense API
- New debugging interface - see in docs
- Static class SimpleFOCDebug
- CurrentSense API change - added method
linkDriver()- see in docs- Low-side current sensing - see in docs
- ESP32 generic support for multiple motors
- Added low-side current sensing support for stm32 - only one motor
- f1 family
- f4 family
- g4 family
- New appraoch for current estimation for torque control using voltage - see in docs
- Support for motor KV rating - back emf estimation
- Using motor phase resistance
- KV rating and phase resistance used for open-loop current limiting as well - see in docs
