Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use SimpleFOCMini: Examples, Pinouts, and Specs

Image of SimpleFOCMini
Cirkit Designer LogoDesign with SimpleFOCMini in Cirkit Designer

Introduction

The SimpleFOCMini is a compact and versatile 3-phase motor controller designed to implement Field-Oriented Control (FOC) for Brushless DC (BLDC) and Permanent Magnet Synchronous Motors (PMSM). This controller is ideal for precision motor control applications, such as robotics, drones, and automation systems, where smooth and efficient operation is required.

Explore Projects Built with SimpleFOCMini

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
STM32H7 Controlled Brushless Motors with AS5048 Encoders and CAN Bus Communication
Image of Robot Arm 2.0: A project utilizing SimpleFOCMini in a practical application
This is a motor control system designed to operate and manage multiple brushless motors with feedback from magnetic encoders. It uses a STM32H7 microcontroller for control logic, SimpleFOCMini drivers for motor control, and a CAN BUS for communication, all powered by a 12V DC supply.
Cirkit Designer LogoOpen Project in Cirkit Designer
Beelink Mini S12 N95 and Arduino UNO Based Fingerprint Authentication System with ESP32 CAM
Image of design 3: A project utilizing SimpleFOCMini in a practical application
This circuit features a Beelink MINI S12 N95 computer connected to a 7-inch display via HDMI for video output and two USB connections for power and touch screen functionality. An Arduino UNO is interfaced with a fingerprint scanner for biometric input. The Beelink MINI S12 N95 is powered by a PC power supply, which in turn is connected to a 240V power source. Additionally, an ESP32 CAM module is powered and programmed via a USB plug and an FTDI programmer, respectively, for wireless camera capabilities.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino-Controlled Quadcopter with GPS and NRF24L01 Wireless Communication
Image of Octocopter Drone Circuit1: A project utilizing SimpleFOCMini in a practical application
This circuit is designed for a quadcopter control system. It features an Arduino Pro Mini as the central microcontroller, interfacing with a GPS module for positioning, an NRF24L01 module for wireless communication, and an MPU-6050 for motion sensing. Power regulation is managed by an MP1584EN board, and four electronic speed controllers (ESCs) are connected to brushless motors for propeller control.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Pro Mini and HC-05 Bluetooth Controlled Coreless Motor Clock with MPU-6050 Feedback
Image of drone: A project utilizing SimpleFOCMini in a practical application
This is a motion-controlled device with wireless capabilities, powered by a LiPo battery with voltage regulation. It uses an Arduino Pro Mini to process MPU-6050 sensor data and control coreless motors via MOSFETs, interfacing with an external device through an HC-05 Bluetooth module.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with SimpleFOCMini

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Robot Arm 2.0: A project utilizing SimpleFOCMini in a practical application
STM32H7 Controlled Brushless Motors with AS5048 Encoders and CAN Bus Communication
This is a motor control system designed to operate and manage multiple brushless motors with feedback from magnetic encoders. It uses a STM32H7 microcontroller for control logic, SimpleFOCMini drivers for motor control, and a CAN BUS for communication, all powered by a 12V DC supply.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of design 3: A project utilizing SimpleFOCMini in a practical application
Beelink Mini S12 N95 and Arduino UNO Based Fingerprint Authentication System with ESP32 CAM
This circuit features a Beelink MINI S12 N95 computer connected to a 7-inch display via HDMI for video output and two USB connections for power and touch screen functionality. An Arduino UNO is interfaced with a fingerprint scanner for biometric input. The Beelink MINI S12 N95 is powered by a PC power supply, which in turn is connected to a 240V power source. Additionally, an ESP32 CAM module is powered and programmed via a USB plug and an FTDI programmer, respectively, for wireless camera capabilities.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Octocopter Drone Circuit1: A project utilizing SimpleFOCMini in a practical application
Arduino-Controlled Quadcopter with GPS and NRF24L01 Wireless Communication
This circuit is designed for a quadcopter control system. It features an Arduino Pro Mini as the central microcontroller, interfacing with a GPS module for positioning, an NRF24L01 module for wireless communication, and an MPU-6050 for motion sensing. Power regulation is managed by an MP1584EN board, and four electronic speed controllers (ESCs) are connected to brushless motors for propeller control.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of drone: A project utilizing SimpleFOCMini in a practical application
Arduino Pro Mini and HC-05 Bluetooth Controlled Coreless Motor Clock with MPU-6050 Feedback
This is a motion-controlled device with wireless capabilities, powered by a LiPo battery with voltage regulation. It uses an Arduino Pro Mini to process MPU-6050 sensor data and control coreless motors via MOSFETs, interfacing with an external device through an HC-05 Bluetooth module.
Cirkit Designer LogoOpen Project in Cirkit Designer

Technical Specifications

Key Technical Details

  • Voltage Range: 6V - 30V
  • Continuous Current: Up to 3A
  • Peak Current: Up to 5A (short duration)
  • PWM Frequency: Up to 40kHz
  • MCU: STM32G431 (32-bit ARM Cortex-M4)
  • Communication: UART, I2C, SPI, PWM, Analog
  • Encoder Support: ABI, UVW, Hall sensors
  • Sensorless Support: Yes, with back EMF sensing

Pin Configuration and Descriptions

Pin Number Pin Name Description
1 GND Ground connection
2 VIN Voltage input (6V-30V)
3 OUTA Phase A motor output
4 OUTB Phase B motor output
5 OUTC Phase C motor output
6 EN Enable pin (active high)
7 TEMP Temperature sensor output
8 AN Analog input for current sensing
9 SCL I2C clock line
10 SDA I2C data line
11 TX UART transmit
12 RX UART receive
13 SWDIO Serial Wire Debug Data I/O
14 SWCLK Serial Wire Debug Clock

Usage Instructions

Connecting the SimpleFOCMini to a Motor

  1. Connect the motor phase wires to the OUTA, OUTB, and OUTC pins on the SimpleFOCMini.
  2. Ensure that the power supply voltage is within the specified range (6V-30V) and connect it to the VIN and GND pins.
  3. If using an encoder or Hall sensors, connect them to the appropriate pins as per the sensor's datasheet.

Programming and Configuration

To control the SimpleFOCMini with an Arduino UNO, follow these steps:

  1. Install the SimpleFOC library using the Arduino Library Manager.
  2. Connect the SimpleFOCMini to the Arduino UNO via UART, I2C, or SPI.
  3. Use the following sample code to initialize the motor and set up the control loop:
#include <SimpleFOC.h>

// Motor instance
BLDCMotor motor = BLDCMotor(pole_pairs);
BLDCDriver3PWM driver = BLDCDriver3PWM(pwmA, pwmB, pwmC, en);

void setup() {
  // Motor & driver setup
  motor.linkDriver(&driver);
  motor.voltage_limit = 12; // Voltage limit in volts
  motor.velocity_limit = 5; // Velocity limit in rad/s

  // Initialize motor and driver
  motor.init();
  driver.init();

  // Set the initial target velocity
  motor.target_velocity = 1;

  // Enable motor
  driver.voltage_power_supply = 12;
  driver.enable();
}

void loop() {
  // FOC algorithm iteration
  motor.loopFOC();
  
  // Motion control loop
  motor.move();
}

Important Considerations and Best Practices

  • Always ensure the power supply is disconnected before making any connections to the motor or sensors.
  • Use appropriate gauge wires for motor connections to handle the expected current.
  • Implement proper cooling if operating the controller at high currents for extended periods.
  • Use filtering capacitors close to the controller's power input to reduce voltage spikes and electrical noise.

Troubleshooting and FAQs

Common Issues

  • Motor not spinning: Check connections, ensure power supply is within range, and verify that the motor parameters are correctly set in the software.
  • Overheating: Ensure adequate cooling, check for shorts, and verify that the current limits are not exceeded.
  • Communication failure: Check wiring for UART, I2C, or SPI and ensure that the correct communication protocol and settings are used in the software.

Solutions and Tips

  • Motor stuttering: This can be due to incorrect encoder readings or misconfiguration of the motor parameters. Double-check the encoder connections and motor specifications.
  • No response to commands: Verify that the enable pin (EN) is set high and that the controller is receiving the correct control signals.

FAQs

Q: Can the SimpleFOCMini be used without an encoder? A: Yes, the SimpleFOCMini supports sensorless operation using back EMF sensing.

Q: What is the maximum PWM frequency supported by the SimpleFOCMini? A: The maximum PWM frequency is 40kHz.

Q: How do I update the firmware on the SimpleFOCMini? A: Firmware updates can be done via the Serial Wire Debug (SWD) interface using compatible programming tools.

For further assistance, please refer to the SimpleFOC community forums or contact technical support.