Motor Controllers

Status: Never ending...

Hardware Design [Modular Isolated Half-Bridge] [3ph v2.1 Write-Up]
Field-Oriented Control [Modified SCR] [Quals Presentation] [Post Archive]
Sensorless [Gen. 1 Write-Up] [Post Archive]

Hardware: Specifications and design files are at each version bookmark.
3ph [Duo (v2.1)] [HD (v3.1)] [SL (v4.0)] [Post Archive] [MIDI Demo]
FF [v1.1] [v.12s] [Post Archive]
DD [v1.0] [Post Archive]
HexBridge [v2.0] [Post Archive]
Other [CapKart]

Since 2007 I've been building custom motor controllers for various projects including Cap KartBWD Scooter, Pneu Scooter, and a variety of flying craft. and  In general there are enough inexpensive motor controllers on the market that building your own is not necessarily justified, but I'm interested enough in the learning experience that I do it anyway. One thing I like about motor control is that a typical controller can be upwards of 95% efficient, when it's working properly. This means that even a tiny controller can move around a lot of power. Unfortunately, the same fact also makes motor controllers somewhat volatile; if they stop being 95% efficient for even a brief period of time, they explode....

...which is why I have a drawer full of dead motor controllers.
But when they do occasionally work, they're pretty cool. The following are some of the working motor controllers I've put together.

3ph Line:

The 3ph line of controllers is the one into which I've put the most development effort. The first one, v1.0, was my first three-phase motor controller and used simple BLDC six-step commutation with Hall effect sensors. It was designed to control the motors on BWD Scooter. This version was short-lived because it was excessively large, so I quickly built v2.0 and v2.1, dual BLDC controllers that fit inside the scooter deck.

Left-to-right: 3ph v2.1, v2.0. and v1.0 (x2).
3ph "Duo" v2.1 [Design Files] [Write-Up]
Type: Dual 3-Phase PMSM (Sensored FOC)
Vehicle: B.W.D. Scooter
Power: 48V / 20A (x2)
Power Devices: IXYS GWM100-01X1 (x2)
Gate Drive: HCPL-3120
Microcontroller: TI MSP430F2274

3ph v2.0 bottom side, showing the MOSFET packages.

3ph "Duo" (v2.1) was the first to use sinusoidal commutation and field-oriented control, using Hall effect sensors and interpolation to measure rotor position. Since it used a relatively low-power MSP430F2274 microcontroller with no hardware multiplier, a lot of software optimization went into the dual FOC for this controller. I did an extensive write-up for this controller as well.

3ph "HD" v3.1 [Design Files] [MIDI Demo 1] [MIDI Demo 2]
Type: 3-Phase PMSM (Sensored and Sensorless FOC)
Vehicle: Pneu Scooter
Power: 48V / 40A
Power Devices: IXYS GWM100-01X1
Gate Drive: IRFS21844S
Microcontroller: STM32F103C4

After the "Duo", I decided that having a single controller at half the size would be preferable. Thinking ahead toward sensorless algorithms, I was also ready to move on to a more powerful processor, the STM32F103C4. This was the motivation for 3ph "HD" (v3.1).

3ph "HD" (v3.1) top.
3ph "HD" (v3.1) side.
3ph "HD" (v3.1) bottom.
The "HD" stood for a few things. "High Density" was the most obvious one. The power layout was improved to be able to output 40A at 48V for a single motor, twice the power density of v2.1. The vehicle I had in mind for this controller was Pneu Scooter, a pneumatic-tire scooter driven by a single hub motor. Both Pneu Scooter and the 3ph "HD" (v3.1) have been extremely reliable.

The other meaning of "HD" is Harmonic Drive, my code name for a feature I wanted to implement in order to use up all that extra processing power I'd have now with the STM32. The feature was a three-track MIDI music player, using each of the three motor windings as a speaker to play a note.

Ultimately, though, the STM32's processing power would be put to better use running a sensorless rotor position estimation algorithm. I used v3.1 as a test platform for my first attempt at sensorless field-oriented control and successfully implemented it on Pneu Scooter.

3ph "SL" v4.0
Type: 3-Phase PMSM (Sensorless FOC)
Vehicle: Pneu Scooter
Power: 48V / 40A
Power Devices: IXYS GWM100-01X1
Gate Drive: HCPL-3120
Microcontroller: STM32F103C4

With a good grip on sensorless field-oriented control, I designed a new version, 3ph "SL" v4.0, optimized for sensorless control in several ways. First, I returned to optically-isolated gate drivers, which should keep the analog measurements, critical to sensorless control, more clean. I also did a better job (I think) laying out and shielding the current sensor traces. Finally, I added phase voltage sensing through differential amplifiers. This can be used to acquire a rotor position estimate even with the power stage completely off, useful for push-starts or resetting after a fault. 3ph v4.0 has not yet been tested.

3ph "SL" (v4.0) layout, including optically-isolated gate drive.

FF Line:

The FF line is the newest set of motor controllers I've been working on. They are fundamentally different than 3ph in a number of ways. For one, they are designed to be single-board controllers, instead of using a separate logic and power board like the 3ph line. They are also designed to use discrete MOSFETs instead of the GWM 3-phase mini bricks. This allows them to be smaller and cheaper.

The target application for the FF line is actually not ground vehicles, but multirotors. The name "FF" comes from Flying Flux, my codename for the project and reference to the flux observer-based sensorless algorithm. (Like 3ph v4.0, they're designed from the ground up as sensorless controllers.) FF also refers to FreeFly, makers of the CineStar multirotor camera platforms and project sponsor for the FFv1.1.

A set of six FFv1.1's.
FF v1.1 [Design Files]
Type: 3-Phase PMSM (Sensorless FOC)
Vehicles: CineStar 6, Melonscooter
Power: 48V / 30A (cont.), 75A (peak)
Power Devices: IRFS3004-7, IPB014N06N3 G
Gate Drive: TI DRV8301
Microcontroller: STM32F103C4

FF v1.1 is the most extensively tested of all my motor controllers. It's been flight tested on both small and large multirotors at 15-20V with continuous currents of 8-15A. Testing on even larger multirotor motors (continuous currents up to 40A at 24V) is in progress. Even though it wasn't designed for ground vehicles, it's also been tested on a hub motor go-kart (40V / 25A), an electric bike (24V / 75A) , and an electric scooter (40V / 75A).
FF v1.2s [Design Files]
Type: 3-Phase PMSM (Sensorless FOC)
Vehicles: Kramnikopter
Power: 48V / 15A (cont.), 30A (peak)
Power Devices: BSC016N04LS G
Gate Drive: TI DRV8301
Microcontroller: STM32F103C4

Because FF v1.1 is overkill for everything but huge multirotors, I redesigned just the power stage to be much more compact, using Power SO-8 MOFETS instead of the bulky D2Pak-7's. This version, FF v1.2s, will be the first of the "small" series for FF controllers. It should still be able to handle about 10-15A continuous current on up to 24V.

FFv1.2s layout.

DD Line:

The DD ("Direct Drive") line is my largest motor controller project other than Cap Kart's monster half-bridge. It gets its name from the DirectFET MOSFETs it uses, 24 in total. This means a total resistance per FET group of about 0.5mΩ. The layout of the board uses the DirectFET cans as current-conducting power buses. The target power for DirectDrive is just under 10kW (48V / 200A), for which it will need a good deal of heat sinking. So far, there is only v1.0.

DD v1.0 [Design Files]
Type: 3-Phase PMSM (Sensored / Sensorless FOC)
Vehicles: tinyKart?
Power: 48V / 200A
Power Devices: IRF7759L2TRPbF
Gate Drive: HCPL-3120
Microcontroller: STM32F103C4

Arduino HexBridge Shield:

The HexBridge shield was designed to be the most powerful and flexible motor control shield for Arduino. It's called a HexBridge because it has six semi-independent half bridges onto a single board, leaving it flexible enough to be configured by the user in software. It can pretty easily be configured as a sensored BLDC controller, as demonstrated by Charles. It can also be a dual BLDC controller, a dual H-bridge, or a single large H-bridge.

Arduino HexBridge shield in place.
Hexbridge v1.0 was a miserable failure, so I'll skip straight to v2.0:

HexBridge v2.0 [Design Files] [State Table]
Type: Half-Bridge (x6), H-Bridge (x2), Three-Phase BLDC (x2), SepEx
Vehicles: N/A
Power: 48V / 20A per bridge
Power Devices: any D2Pak
Gate Drive: IRFS21844S
Microcontroller: ATmega328 / Arduino

The Cap Kart's Modular Half-Bridge:

The Cap Kart's controller was my first and probably most frustrating motor control project. (Hint: Don't learn on a 10kW controller.) I can't even count how many iterations this controller went through. Some really good knowledge came out of the process of rebuilding this controller so many times, though. Most notably, the isolated modular half-bridge unit came from this design. It's a totally floating half-bridge configuration that uses DC/DC converters and optocoupled gate drivers, and it can be deployed with almost any MOSFETs or IGBTs. I've used this as a plug-and-play design element for other controllers.

I still have nightmares...
Cap Kart's Modular Half-Bridge [Write-Up]
Type: Half-Bridge
Vehicles: Cap Kart
Power: 48V / 300A
Power Devices: IRFS3107-7
Gate Drive: HCPL-3120
Microcontroller: TI MSP430F2274