Six-step drive: pulling the rotor with six combinations
In each sector reported by three Hall sensors, current flows in only two phases to make a rotating magnetic field. The commutation table and its limits.
Principle
One electrical revolution is divided into six sectors of 60°. In each sector one phase is +, one phase is −, and the third is left disconnected (floating). Keep the stator field made this way about 90° ahead of the rotor magnets and the rotor is pulled round.
Commutation table (example)
| Hall (CBA) | Current | High | Low | Floating |
|---|---|---|---|---|
| 101 | A → B | A | B | C |
| 100 | A → C | A | C | B |
| 110 | B → C | B | C | A |
| 010 | B → A | B | A | C |
| 011 | C → A | C | A | B |
| 001 | C → B | C | B | A |
Hall signal placement and phase names differ from motor to motor, so the table has to be checked against the real motor. Get it wrong and the motor only shakes, turns backwards or draws a large current.
Speed control
PWM the selected high side (or low side) to adjust the average voltage. Add current sensing and you can control torque as well.
Limits and sensorless
- The current changes in steps every 60°, which causes torque ripple and noise.
- By detecting the instant the back-EMF crosses zero (zero crossing) on the floating phase, the motor can be driven without Hall sensors. Drone ESCs work this way. At standstill and low speed, however, the back-EMF is small and hard to detect.
The BLDC six-step 3D simulation in the lab shows the switch combination and rotor position changing sector by sector.
The six-step table
Current flows in only two of the three phases and one phase is left open. The combination changes every 60 electrical degrees.
| Step | Hall sensors (H1 H2 H3) | Current direction | Switches on | Open phase |
|---|---|---|---|---|
| 1 | 1 0 1 | A → B | A high, B low | C |
| 2 | 1 0 0 | A → C | A high, C low | B |
| 3 | 1 1 0 | B → C | B high, C low | A |
| 4 | 0 1 0 | B → A | B high, A low | C |
| 5 | 0 1 1 | C → A | C high, A low | B |
| 6 | 0 0 1 | C → B | C high, B low | A |
The mapping between Hall values and steps depends on the motor and the wiring. The table above is one example; in practice you turn the motor by hand, write down the order in which the Hall values change, and build the table. If the Hall value reads 000 or 111, a wire is broken or power is missing.
In a picture: Hall sensor signals
Code structure
static const uint8_t step_of_hall[8] = { 0xFF, 6, 4, 5, 2, 1, 3, 0xFF }; // example: measure the real values for your motor
void hall_isr(void) { // called on both edges of the three Hall pins
uint8_t hall = read_hall(); // 0 to 7
uint8_t step = step_of_hall[hall];
if (step == 0xFF) { all_off(); fault = 1; return; }
apply_step(step, duty); // PWM on the high side, low side held on
}
The next step has to be applied the moment a Hall sensor changes, so this is handled in an interrupt. Speed is adjusted with the PWM duty of the high-side switch that is on.
3D labRun what you have read so far→To change direction
You do not read the table backwards; you apply the opposite current direction for the same Hall value (the same as skipping three steps ahead). Keeping separate forward and reverse tables leads to fewer mistakes.
Dead time
If the high and low switches of the same phase are on together, the supply is shorted. MOSFETs take time to turn off, so you turn one off, wait a few hundred ns, and then turn on the other. The timer's dead-time feature or the gate driver handles this.
Limits of six-step and the next stage
Because the current changes abruptly every 60°, the torque ripples and the motor makes noise. Where things spin fast, such as drones and power tools, this is not a problem. When you need smooth rotation at low speed, you move on to FOC, which shapes the three phase currents into sine waves.
Problems that come up in practice
- The motor only shakes and does not turn: the mapping between Hall sensors and phases is wrong. Swap two of the three phase wires or measure the table again
- Runs well in one direction only: the Hall sensor position is off (timing advance needs adjusting)
- Overcurrent right after start: at standstill there is no back-EMF and a large current flows. Raise the duty gradually