Skip to content

Candas1/Arduino-FOC-drivers

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimpleFOC Driver and Support Library

Library Compile License: MIT Release

This library contains an assortment of drivers and supporting code for SimpleFOC.

The intent is to keep the core of SimpleFOC clean, and thus easy to maintain, understand and port to different platforms. In addition to this core, there are various drivers and supporting code which has grown around SimpleFOC, and which we would like to make available to the community.

New Release

v1.0.4 - Released June 2023, for Simple FOC 2.3.0

What's changed since 1.0.3?

  • New Comms/Input: STM32SpeedDirCommander
  • New Utility: STM32PWMInput
  • Fixed MT6835 driver bugs
  • Improved AS5047 driver, fixed bugs
  • Improved AS5047U driver, fixed bugs

What is included

What is here? See the sections below. Each driver or function should come with its own more detailed README.

Motor/Gate driver ICs

Encoders

  • AS5048A SPI driver - SPI driver for the AMS AS5048A absolute position magnetic rotary encoder IC.
  • AS5047 SPI driver - SPI driver for the AMS AS5047P and AS5047D absolute position magnetic rotary encoder ICs.
  • AS5047U SPI driver - SPI driver for the AMS AS5047U absolute position magnetic rotary encoder ICs.
  • MA730 SPI driver - SPI driver for the MPS MagAlpha MA730 absolute position magnetic rotary encoder IC.
  • MA730 SSI driver - SSI driver for the MPS MagAlpha MA730 absolute position magnetic rotary encoder IC.
  • AS5145 SSI driver - SSI driver for the AMS AS5145 and AS5045 absolute position magnetic rotary encoder ICs.
  • TLE5012B SPI driver - SPI (half duplex) driver for TLE5012B absolute position magnetic rotary encoder IC.
  • STM32 Hardware Encoder - Hardware timer based encoder driver for ABI type quadrature encoders.
  • SC60228 SPI driver - SPI driver for SemiMent SC60288 magnetic encoder IC.
  • MA330 SPI driver - SPI driver for the MPS MagAlpha MA330 absolute position magnetic rotary encoder IC.
  • MT6816 SPI driver - SPI driver for the MagnTek MT6816 absolute position magnetic rotary encoder IC.
  • MT6701 SSI driver - SSI driver for the MagnTek MT6701 absolute position magnetic rotary encoder IC.
  • MT6835 SPI driver - SPI driver for the MagnTek MT6835 21 bit magnetic rotary encoder IC.
  • STM32 PWM sensor driver - STM32 native timer-based driver for PWM angle sensors.

Communications

Utilities

  • STM32 PWM Input driver - PWM Input driver for STM32 MCUs. Accurately measure PWM inputs with zero MCU overhead.

How to use

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 drivers library and install the latest version.
  • Reopen Arduino IDE and you should have the library examples in File > Examples > Simple FOC drivers.

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

Using parts

You can copy parts of the library, for example to minimize your code size, or make it easier to add adaptations of your own. If you do so, please be sure to adhere to and include the LICENSE.

Further Documentation

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

Release History

What's changed since 1.0.2?

  • New Sensor: MT6835
  • Fixed bugs

What's changed since 1.0.1?

  • Calibrated sensor by @MarethyuPrefect
  • New Sensors: MT6701, MA330, MT6816
  • Fixed bugs

About

Drivers and support code for SimpleFOC

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 96.4%
  • C 3.6%