SimpleFOCproject

Arduino SimpleFOClibrary v2.3

Open-Source user friendly FOC implementation

This Arduino library implements Field Oriented Control (FOC) algorithm for BLDC and Stepper motors. FOC algorithm produces incomparably smooth operation and high degree of torque, velocity and position control. The library is intended both for:

  • Beginners searching for a simple and user-friendly way to learn how to control BLDC and Stepper motors
  • Advanced users ready to dig deeper into the FOC algorithm and optimize the code for their particular application/hardware.

Features

Arduino IDE Compatible

The code of Arduino SimpleFOClibrary library is available as Arduino sketch or through Arduino Library Manager. Installation docs.

Easy configuration

SimpleFOClibrary makes it very simple to configure for different types of motors, position sensors and microcontrollers. Coding docs.

Open Source

The code and full documentation is available on Github.

Plug & play

Especially in combination with Arduino SimpleFOCShield.

Supported hardware

Arduino SimpleFOClibrary is made with a goal to enable using Field Oriented Control algorithm with hobby hardware.
With that in mind, the library is in constant development to support as many motor + sensor + driver + microcontroller combinations out there.

Motors

- BLDC motors
- Stepper motors
Read more

Drivers boards

- BLDC drivers
- Gimbal drivers
- Stepper drivers
Read more

Position Sensors

- Encoders
- Magnetic sensors
- Hall sensors
- Open-loop control
Read more

Microcontrollers

- Arduino
- STM32
- ESP32
- Teensy
- Portenta H7
- Raspberry pi Pico
- SAMD21/ SAMD51
Read more

Gimbal controller board example - HMBGCV 2.2

Project link

This is a short video showing the setup procedure and the capabilities of the SimpleFOClibrary.

The video setup consists of:

High-performance board example - DRV8302

Project link

This video demonstrates SimpleFOClibrary support for high-performance BLDC drivers such as DRV8302 and the support for Arudino and STM32 MCU architectures.

The video hardware setup consists of:

Backdrivable Stepper motor - L298N

Project link

This video demonstrates SimpleFOClibrary support for stepper motor control using a very simple L298N driver, as well as the support for STM32 MCU architecture.

The video hardware setup consists of:

Arduino SimpleFOCShield v2.0.4

Low cost, modular, true FOC, gimbal motor driver board

This is an open-source low-cost Brushless DC (BLDC) motor driver board intended primarily for low-power FOC applications up to 5Amps. The board is fully compatible with the Arduino UNO and all the boards with the standard Arduino headers. Arduino SimpleFOCShield, in combination with the SimpleFOClibrary provides user-friendly way to control BLDC motors both in hardware and software.

Stackable

Possibility of stacking 2 shields (2 BLDC motors + 2 position sensors)

Configurable pinout

Possible to choose all the pins used by the board.

Sensor Interfaces

Encoder/Hall senosor pull-ups (3kOhm), I2C pullups (4.7kOhm).

Current Sensing ( from version > v2.0 )

3A/5A in-line current sensing

On-board voltage regulator ( from version > v2.0 )

5V/8V linear voltage regulator

Open Source

The code and full documentation is available on Github.

20.00

Arduino BLDC Balnceing robot - Arduino SimpleFOCBlancer

This is a project of designing and controlling very dynamics two wheel bancing robot relying entirely on Arduino SimpleFOC library and SimpleFOC shields.
This is a very fun project in many ways, and I've enjoyed myself creating it, I hope you'll like it!

  • Arudino code

    Using SimpleFOClibrary and two SimpleFOCShield
  • CAD designs

    All CAD designs available for modification and STL files provided
  • Control algorithm

    Double PID cascade
  • Plug and Play

    Very simple to assemble, configure and setup.

Arduino FOC Inertia Wheel Inverted Pendulum - Arduino SimpleFOCShield

This is a project of designing and controlling the reaction wheel inverted pendulum based entirely on Arduino SimpleFOC library and SimpleFOC shield.
This is a very fun project in many ways, and it is intended:

  • Students in search for a good testing platform for their advanced algorithms
  • Everyone with a bit of free time and a motivation to create something cool :D

  • Arudino code

    Arduino UNO using SimpleFOClibrary and SimpleFOCShield
  • CAD designs

    All CAD designs available for modification and STL files provided
  • Control algorithm

    State-space LQR controller
  • Plug and Play

    Very simple to assemble, configure and setup.

Steer by wire example - Arduino SimpleFOCShield

Project link

This video demonstrates SimpleFOClibrary support for Arduino SimpleFOCShield and using multiple motors with Arduino UNO. The project examples are based on bidirectional haptic control.

The video hardware setup consists of: