Ø32 BLDC Controller

Miniature closed-loop controller for brushless DC motors

Public Chat
Similar projects worth following
Small robots often use servos or small brushed DC motors, but they are not as power dense as the brushless DC (BLDC) motors commonly found in drones. Called the Ø32 because the M2 mounting holes are on a 32mm diameter circle, this project aims to control 7-15V motors with position feedback, while fitting almost completely behind a 2304 or larger drone motor.

Youtube channel with short videos

Application of motor controller


  • M2 mounting holes on a 32mm diameter circle
  • 27mm x 27mm x 0.8mm, 4-layer, 1oz copper PCB
  • 7-15V input, built-in voltage sensing
  • Internal temperature sensor
  • 12-bit magnetic angle sensor
  • 3 shunt current sensing and overcurrent protection 
  • 2x 2-pin JST-SH connectors for I2C for RS-485 communication, allowing daisy chaining
  • 1x 4-pin JST-SH connector for Serial Wire Debug programming and UART output
  • 3.3V auxiliary output

Critical components:


  • 5200rpm with a 1850KV motor
  • 4A bus current

Should be possible:

  • 40A continuous, 110A peak
  • Position, velocity, and torque/current control over serial
  • Field oriented control (FOC)

Status: Closed loop six-step (trapezoidal) works, daisy chain multiple controllers with RS485, currently debugging FOC

Previous version

  • Daisy chaining

    Christopher Xu08/27/2023 at 17:30 0 comments

    One feature of this motor controller is that it has two power and two RS485 ports so it can be easily daisy chained with other. This week I spent a few days developing a simple 3-byte serial protocol that allows for bidirectional communication between multiple motor controllers and a master device (Teensy 4.0) for messages like set voltage, set current, get position, etc. It's like CAN, but I had to make do with a microcontroller without a CAN peripheral. 

    The goal is reduce the number of wires running along a robot, especially for serial linkages. The limit is currently around 4 motors in series at 500Hz because only a certain number of bytes can fit within a certain time frame and all the current passes through one board, but I think it's worth the wiring convenience. 

    Also, here's the robotics project I'm using these for:

  • Smooth commutation

    Christopher Xu07/02/2023 at 23:56 2 comments

    A classic: using too many printf statements (over UART) that the code execution was taking too long and causing inconsistent commutation. Now it is spinning so much quieter and with more torque, at around 5200rpm. It should be able to go faster, I'm only applying about half duty cycle at the moment.

  • Spinning!

    Christopher Xu06/20/2023 at 05:39 0 comments

    I got a bit distracted with other projects, but I'm back to developing this! I 3D printed a small stand for a motor and starting running the motor open-loop by simply iterating through 6-step commutation at a fixed speed and hoping the magnets in the rotor follow the generated magnetic field. It spins, so there are no major problems with the hardware. The MA702 magnetic angle sensor also works great, so next step is using the sensed angle to commutate properly. I'm delighted by the simplicity of the MA702. Just send 12 zeros, and you get a 12-bit angle in response, without any register operations. 

  • Life

    Christopher Xu01/18/2023 at 06:54 0 comments

    Safely powers up! Still waiting on the MA702 to arrive, but until then I’ll start on blinking the LEDs, communication with external MCU, and toggling the Mosfets.

  • Christopher Xu01/14/2023 at 02:04 0 comments

    I’m excited

  • Tinymovr

    Christopher Xu01/13/2023 at 20:26 0 comments

    Found out about the Tinymovr motor controller. Basically what I'm trying to do! Very cool, and my version 2 will use it as reference. I hope to make mine even smaller (27x27mm vs 40x36mm) and cheaper ($40 vs €89). I only need up to 13V (3S lipo), while theirs goes up to 38V. Huge respect to their firmware too, lots of features there. 

  • The past

    Christopher Xu01/13/2023 at 20:17 0 comments

    This project started when I tried to make a jumping robot. It jumped, but the servo seemed weak for its weight. I looked into brushless motors, but existing drone and car ESCs did not have the positional accuracy at low speeds and the more complex sensored motor drivers like the Odrive were too bulky, and also expensive. So, I tried to make my very first PCBs:

    The motor driver board is the small one on the right, designed to fit behind the red motor. The larger board serves as the main controller, and this main board can control up to two driver boards. I based my design on the RAA227063 gate driver IC, and the PWM commands must be sent from the Teensy 4.0 on the main board. This worked, but only for a moment. 

    With any load, one of the high side mosfets would be burn out, ending up with the gate shorted to drain. I replaced the mosfet 2 times, with the same failure. After some crude probing I believe this was the result of ringing on the gate, because I didn't put a resistor between the driver and the gate, and the trace was probably not routed optimally. Next version, I'm adding a gate resistor and making it a 4-layer board, hoping that the extra ground planes will decrease parasitic inductance. There will also be RC snubbers on the output in case.

View all 7 project logs

Enjoy this project?



rraetz wrote 06/20/2023 at 11:51 point

This is awesome! That's precisely what we need to build robots with lightweight BLDC motors instead of bulky and slow stepper motors. Keep up the good work!

  Are you sure? yes | no

Samuk wrote 01/13/2023 at 18:07 point

Are you using this with

  Are you sure? yes | no

Christopher Xu wrote 01/13/2023 at 19:47 point

SimpleFOC is definitely an inspiration for this, I'll probably use some of the code there but not copy over the entire library. Once I get the motor spinning with simpler control methods I'll try it out

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates