Link
β˜… Loading...
Helpful?

Driver configuration

Arduino SimpleFOClibrary supports BLDC and stepper motor drivers:

  • BLDC driver (BLDC or Hybrid stepper motors)
    • 3 PWM signals ( 3 phase ) - BLDCDriver3PWM
    • 6 PWM signals ( 3 phase ) - BLDCDriver6PWM
  • Stepper drivers (Stepper motors)
    • 4 PWM signals ( 2 phase ) - StepperDriver4PWM
    • 2 PWM signals ( 2 phase ) - StepperDriver2PWM

Configure BLDC drivers Configure Stepper drivers

The driver code is written in a way to support as many different drivers out there as possible and in a way to be fully interchangeable. These classes can be used as stand-alone classes and they can be used to set certain PWM value to the driver outputs, see example codes in utils > driver_standalone_test.

Driver support per MCU architecture

MCU 2 PWM mode 4 PWM mode 3 PWM mode 6 PWM mode pwm frequency config
Arduino AVR (8-bit) βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ (either 4kHz or 32kHz)
Arduino DUE βœ”οΈ βœ”οΈ βœ”οΈ ❌ βœ”οΈ
stm32 βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ
esp32 MCPWM βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ
esp32 LEDC βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ
esp8266 βœ”οΈ βœ”οΈ βœ”οΈ ❌ βœ”οΈ
samd21/51 βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ
teensy3 βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ
teensy4 βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ
Raspberry Pi Pico βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ
Portenta H7 βœ”οΈ βœ”οΈ βœ”οΈ ❌ βœ”οΈ
Renesas (UNO R4 Minima) βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ
nRF52 βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ
Arduino Nano Matter (πŸ“’NEW) βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ βœ”οΈ
πŸ“’ Here is a quick guide to choosing appropriate PWM pins for different MCU architectures see in docs.