Skip to content

chicostate-mmem/Arduino-FOC

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arduino Simple Field Oriented Control (FOC) library

Library Compile License: MIT arduino-library-badge

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:

Arduino SimpleFOCShield

Features

  • 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

Arduino SimpleFOClibrary

This video demonstrates the Simple FOC library basic usage, electronic connections and shows its capabilities.

Features

Getting Started

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.

  • Full library installation Docs
  • Minimal code installation Docs

Arduino SimpleFOC library installation to Arduino IDE

Arduino Library Manager

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.

Using Github website

  • 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.

Using terminal

  • 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.

SimpleFOC library minimal sketch example

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.

Github website download

  • 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.

Using terminal

  • 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.

Documentation

Find out more information about the Arduino SimpleFOC project in docs website

Arduino FOC repo structure

Branch Description Status
master Stable and tested library version Library Compile
dev Development library version Library Dev Compile
minimal Minimal Arduino example with integrated library MinimalBuild

About

Arduino FOC - Arduino Based Field Oriented Control Algorithm Library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 97.1%
  • C 2.9%