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.
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 |
To control the SimpleFOCMini with an Arduino UNO, follow these steps:
#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();
}
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.