Skip to content

Latest commit

 

History

History
123 lines (102 loc) · 10.8 KB

index.md

File metadata and controls

123 lines (102 loc) · 10.8 KB
layout title nav_order description permalink
default
Home
1
Arduino Simple Field Oriented Control (FOC) project documentation.
/

Arduino Simple Field Oriented Control (FOC) project

License: MIT arduino-library-badge status

GitHub release (latest by date) GitHub Release Date GitHub commits since tagged version GitHub commit activity (branch)

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
    • Support as many motor + sensor + driver + mcu combinations out there
  • 🎯 Develop modular and easy to use FOC supporting BLDC driver boards

NEW RELEASE 📢: SimpleFOClibrary v2.3.3 see release

- STM32 MCUs - support for center aligned pwm (even across multiple timers and motors/drivers) [#374](simplefoc/Arduino-FOC#374), [#388](simplefoc/Arduino-FOC#388) - support for DMA based low-side current sensing: [#383](https://github.com/simplefoc/Arduino-FOC/pull/383),[#378](https://github.com/simplefoc/Arduino-FOC/pull/378) - support for F7 architecture [#388](https://github.com/simplefoc/Arduino-FOC/pull/388),[#394](https://github.com/simplefoc/Arduino-FOC/pull/394) - Teensy4 MCUs - support for low-side current sensing [#392](simplefoc/Arduino-FOC#392) - support for center aligned 6pwm and 3pwm (optional) [#392](simplefoc/Arduino-FOC#392) - KV rating calculation fix [#347](simplefoc/Arduino-FOC#347) - Much more performant Park/Clarke calculation [#340](simplefoc/Arduino-FOC#340) - And much more - see the complete list of bugfixes and new features of v2.3.3 [fixes and PRs](https://github.com/simplefoc/Arduino-FOC/milestone/10?closed=1) - Docs - Added a practical guides section - [see the docs](digging_deeper) - Added a guide to choosing PWM pins for your application - [see the docs](choosing_pwm_pins) - Added docs on stm32 PWM and ADC pinouts - [ stm32 pinouts](https://docs.simplefoc.com/stm32pinouts/)

Arduino SimpleFOClibrary

<iframe class="youtube" src="https://www.youtube.com/embed/Y5kLeqTc6Zk" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> 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 + motor + driver + 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
    • SimpleFOCStudio configuration GUI tool
    • Built-in communication and monitoring
  • Cross-platform:
    • Seamless code transfer from one microcontroller family to another
    • Supports multiple MCU architectures:
      • Arduino: UNO, MEGA, DUE, Leonardo, Nano, UNO R4, MKR ....
      • STM32
      • ESP32
      • Teensy
      • many more ...

Arduino SimpleFOCShield v2.0.4

<iframe class="youtube" src="https://www.youtube.com/embed/G5pbo0C6ujE" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Features

  • Plug & play: In combination with Arduino SimpleFOClibrary - github
  • Low-cost: Price of €15 - Check the pricing
  • In-line current sensing: Up to 3Amps/5Amps bidirectional
    • configurable: 3.3Amps - 3.3V adc, 5Amps - 5V adc
  • Integrated 8V regulator:
    • Enable/disable by soldering pads
  • Max power 120W - max current 5A, power-supply 12-35V
    • Designed for Gimbal motors with the internal resistance >10 Ωs.
  • Stackable: running 2 motors in the same time
  • Encoder/Hall sensors interface: Integrated 3.3kΩ pullups (configurable)
  • I2C interface: Integrated 4.7kΩ pullups (configurable)
  • Configurable pinout: Hardware configuration - soldering connections
  • Arduino headers: Arduino UNO, Arduino MEGA, STM32 Nucleo boards...
  • Open Source: Fully available fabrication files - how to make it yourself
If you are interested in this board as a product, find more information on this link: Arduino SimpleFOCShield

Alternative FOC supporting projects

Over the period of the past few years several cool FOC supporting projects which provide hardware and software solutions have emerged, here are some of them. None of the projects listed uses SimpleFOC.

Project Open Source Hardware Open source firmware Simple to use Low cost Power rating Stepper Support

Odrive
✔️/(❌ from recently) ✔️/(❌ from recently) ✔️ ❌ (>200$) High >50A

Vesc
✔️ ✔️ ✔️ ❌ (>100$) Vey High >100A

Trinamic
✔️ ❌ (>200$) Low ~10A ✔️

Infineon
✔️ ✔️ ✔️ (50$) Low ~10A

FOC-Arduino-Brushless
✔️ ✔️ ✔️ (Price ?) Low ~10A

Tinymovr R5.2
✔️ ✔️ ❌ (~90$) High (~30A)

Tinymovr M5.2
✔️ ✔️ ❌ (~90$) Low (~6Amps)

Mjbots moteus
✔️ ✔️ ❌ (80-160$) Mid (9-22Amps)


Open robotics initiative
MicroDriver
✔️ ✔️ ✔️(~50$) Mid (-20Amps)


SOLO
✔️ ❌(70$-600$) Mid (-16Amps) to Very high (-120Amps)
⚠️ This list is certainly not exhaustive, feel free to contribute to extending/completing/correcting it!