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.
- Plug & play: Arduino SimpleFOClibrary
- Low-cost: Price in the range of $20-$40
- Open Source: Gerber files and BOM available
- Stackable: running 2 motors in the same time
If you are interested in this board, preorder your version on this link: Arduino Simple FOC Shield
This video demonstrates the Simple FOC library basic usage, electronic connections and shows its capabilities.
- 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
Depending on if you want to use this library as the plug and play Arduino library or you want to get insight in the algorithm and make changes there are two ways to install this code.
The simplest way to get hold of the library is directly by using Arduino IDE and its integrated Library Manager.
- Open Arduino IDE and start Arduino Library Manager by clicking:
Tools > Manage Libraries...
. - Search for
Simple FOC
library and install the latest version. - Reopen Arduino IDE and you should have the library examples in
File > Examples > Simple FOC
.
- Go to the github repository
- Click first on
Clone or Download > Download ZIP
. - Unzip it and place it in
Arduino Libraries
folder. Windows:Documents > Arduino > libraries
. - Reopen Arduino IDE and you should have the library examples in
File > Examples > Simple FOC
.
- Open terminal and run
cd *arduino libraries folder*
git clone https://github.com/askuric/Arduino-FOC.git
- Reopen Arduino IDE and you should have the library examples in
File > Examples > Simple FOC
.
For those willing to experiment and to modify the code I suggest using the minimal version of the code.
This code is completely independent and you can run it as any other Arduino Sketch without the need for any libraries.
- Go to minimal branch
- Download the code by clicking on the
Clone or Download > Download ZIP
. - Unzip it and open the sketch in Arduino IDE.
- Open the terminal:
cd *to you desired directory* git clone -b minimal https://github.com/askuric/Arduino-FOC.git
- Then you just open it with the Arduino IDE and run it.
Find out more information about the Arduino SimpleFOC project in docs website
Branch | Description | Status |
---|---|---|
master | Stable and tested library version | |
dev | Development library version | |
minimal | Minimal Arduino example with integrated library |