Component guide · Advanced · 3 min read
SimpleFOCmini BLDC Motor Driver

Gimbal Motors, Encoders and FOC Code
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
SimpleFOCmini is a tiny three-phase BLDC driver based on the DRV8313, made for the SimpleFOC Arduino library. With a magnetic encoder it runs gimbal motors smoothly at low speed, holds positions and works as a direct-drive servo or haptic knob. It handles 8 to 30 V and about 2.5 A peak, so it is for small motors, not drone or e-bike motors.
Key specs at a glance
- Chip
- TI DRV8313
- Supply
- 8 to 30 V
- Current
- About 1.5 A continuous, 2.5 A peak
- Inputs
- IN1, IN2, IN3 PWM, EN
- Logic
- 3.3 or 5 V
- Use
- Gimbal BLDC motors with SimpleFOC
This part can carry many amps. Use wire thick enough for the current, put a fuse close to the battery, check that connectors are rated for the load and give drivers and motors room to cool. A short at these currents melts wires in seconds.
What the SimpleFOCmini BLDC driver is
SimpleFOCmini is a small open-hardware three-phase driver board using TI's DRV8313. It lets an Arduino, ESP32 or STM32 run field oriented control (FOC) on gimbal BLDC motors with the SimpleFOC library.
Field oriented control (FOC) needs rotor position, so pair it with an AS5600 or AS5048 magnetic encoder, or use open-loop mode for simple tests.
Gimbal motors have high winding resistance (around 10 ohm), which keeps current low. Low-resistance drone motors overload this driver.
SimpleFOCmini BLDC driver pinout
The pins on the SimpleFOCmini BLDC driver and what each one does.
| Pin | Function |
|---|---|
| VIN / GND | Motor supply |
| M1, M2, M3 | Motor phases |
| IN1, IN2, IN3 | PWM inputs |
| EN | Enable |
| nRT, nSP, nFT | Reset, sleep, fault |
- VIN / GND
- Motor supply
- M1, M2, M3
- Motor phases
- IN1, IN2, IN3
- PWM inputs
- EN
- Enable
- nRT, nSP, nFT
- Reset, sleep, fault
Wiring the SimpleFOCmini BLDC driver
Connect the SimpleFOCmini BLDC driver like this.
| SimpleFOCmini BLDC driver pin | Arduino Uno | ESP32 |
|---|---|---|
| IN1 | D9 | GPIO 32 |
| IN2 | D10 | GPIO 33 |
| IN3 | D11 | GPIO 25 |
| EN | D8 | GPIO 26 |
| GND | GND | GND |
- IN1
- Arduino Uno:
- D9
- ESP32:
- GPIO 32
- IN2
- Arduino Uno:
- D10
- ESP32:
- GPIO 33
- IN3
- Arduino Uno:
- D11
- ESP32:
- GPIO 25
- EN
- Arduino Uno:
- D8
- ESP32:
- GPIO 26
- GND
- Arduino Uno:
- GND
- ESP32:
- GND
Example code
Add a sensor and switch to angle mode for position control.
#include <SimpleFOC.h>
BLDCMotor motor(7); // pole pairs
BLDCDriver3PWM driver(9, 10, 11, 8);
void setup() {
driver.voltage_power_supply = 12;
driver.init();
motor.linkDriver(&driver);
motor.voltage_limit = 3;
motor.controller = MotionControlType::velocity_openloop;
motor.init();
}
void loop() { motor.move(5); } // rad/sSetup and tuning
count the motor's magnets and divide by two (a 14-magnet gimbal motor has 7 pole pairs), and set it in the code.
start with a low voltage limit (2 to 3 V) in open loop so the motor does not overheat while you test.
mount the diametric magnet centred on the shaft and 1 to 2 mm from an AS5600 or AS5048 sensor.
use three PWM-capable pins on the same timer where possible; the SimpleFOC docs list good pins per board.
12 V is a good start; stay under 30 V.
What you need
Shop this list3 of 4 found in our store · ₹1,416
SimpleFOCmini BLDC Motor Driver: the part this guide coversSimpleFOCmini BLDC Motor Driver₹729- Uno R3 development board: the controller used in the wiring tableFind this part
ESP32-WROOM-32 38-pin development board: for Wi-Fi logging and dashboardsESP32-WROOM-32 38-Pin Development Board₹389
SMPS power supply in metal enclosure (5/12/24 V): a 12 or 24 V supplySMPS Power Supply, Metal Enclosure (5V / 12V / 24V)₹298Closest match, check the specs
Alternatives and when to choose them
- BLD-305S BLDC driver: Hall-sensor industrial motors.
- BLDC motors and ESCs.
- Optical and absolute encoders.
Common mistakes to avoid
- Driving low-resistance drone motors, which overload the driver.
- Setting a high voltage limit in open loop, which overheats the motor.
- Entering the wrong pole pair count, so the motor runs rough or not at all.
- Mounting the encoder magnet off-centre, which gives noisy angles.
Frequently asked questions
Which motors work with SimpleFOCmini?
Gimbal BLDC motors with high winding resistance (around 5 to 15 Ω). Low-resistance drone motors draw far more current than the DRV8313 can supply.
Does it need an encoder?
For closed-loop position or velocity control, yes: a magnetic encoder like the AS5600 is the usual choice. Open-loop mode runs without one.
Does it work with an ESP32?
Yes. SimpleFOC supports ESP32, STM32, RP2040 and Arduino boards; use PWM-capable pins.
What current can it handle?
About 1.5 A continuous and 2.5 A peak, which is plenty for gimbal motors.
Can it hold a position like a servo?
Yes. With an encoder in angle mode the motor holds a target position and resists being turned.
Parts for this guide
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

