Page 1 of 1

Using a brushless motor as a servo/actuator

PostPosted: April 14th, 2013, 4:32 am
by UAirLtd
A recent Hackaday post: ... per-motor/ inspired me to write up a little about a project I'm doing right now.

Brushless motors are designed for continuous rotation, they're cheap (<$10) and powerful. What if you wanted to use brushless motors for fine angle control? Compared to servos, they'd have smoother operation and allow for continuous rotation. However they'd have to work in open loop control (and therefore prone to the possibility of skipping), and would require more current than servos. On the balance, angle-controlled brushless motors acting as servos are useful in a lot of situations.

The method behind using a brushless motor in angle-control is fairly simple - feed it with the correct voltage at each phase, and the resultant magnetic field that is the sum of the vectors. All this requires is a custom drive algorithm. In fact, one could simply reprogram the ATMega8 found on most cheap ESCs to do this. There are a small handful of boards designed specifically to drive brushless motors in angle-control mode, some even come with gyros/IMUs to achieve closed-loop angle control. All of them are far more expensive than necessary for what is basically a 3-phase motor driver with a slightly different algorithm. So I have decided to make my own low-cost motor drive for our own purposes.

While aimed specifically at running a brushless motor in angle-control (for the application we currently need it for), it is also suitable for being used as an H-bridge to control the speed and direction (but not specific angle) of brushed DC motors, and also using two or more together for controlling stepper motors. There however is no capability for sensorless control, which is required to run brushless motors at higher speeds, for that you might as well go with a conventional ESC.

So the current spec is:
- 5 to 24V input range
- about 6A current limit
- 3-phase PN MOSFET bridge circuit
- current sensing
- PWM and SPI input
- 50MHz 32-bit ARM Cortex-M0 board
- 22x14mm board dimension
- 10-bit resolution symmetrical PWM at 40kHz drive frequency (20kHz effective PWM rate for symmetrical PWM)
- ~$15

While I waited for PCB fabrication, I began writing the drive code by removing the ATMega8 from a cheap ESC, and wiring up the MOSFET gates to one of our own ARM boards. Here's where I'm at so far:



Am testing it with a control input from a controller in speed-control mode because the ARM board I am using for code-testing happens to be the autopilot from our quadrotors, and has a Spektrum satellite receiver port. The final version will be controllable via an angle or speed demand as a PWM signal, or as a digital signal over the 4-wire SPI bus.

Think 50MHz 32-bit ARM chip overkill? Not if you want 20kHz effective PWM frequency with 10-bit PWM resolution.

Re: Using a brushless motor as a servo/actuator

PostPosted: April 14th, 2013, 4:33 am
by UAirLtd
[reserved for update]

Re: Using a brushless motor as a servo/actuator

PostPosted: March 6th, 2014, 5:28 pm
by tomk358
Have you made any progress on this project? I'd like to do something similar.

Re: Using a brushless motor as a servo/actuator

PostPosted: December 11th, 2017, 3:59 am
by stevenc
Thanks for sharing it. The listing and image have been very helpful.