Andreu Playà
EN
← All projects Archive

Sensorless motor control

Closed-loop speed control of a DC motor with no tachometer and no encoder: the motor is its own sensor.

StatusAcademic work
Built2012
StackEmbedded · PWM

What it is

Overview

A spinning motor generates a voltage against the one driving it, and that back-EMF is proportional to its speed. So the speed sensor you were going to bolt on is already inside the motor — the trick is reading it while the motor is being driven.

The answer is to stop driving it, briefly. During the low phase of the PWM an interrupt fires and samples the back-EMF off the very pin that drives the coil, in the window where the drive is off but the rotor is still turning. That voltage closes the loop.

What it left behind

Afterwards

This is the oldest thing on this site and the root of everything else on it. It is where I learned that a control loop is a conversation with a physical thing that will not wait for you: the sampling window sits where it does because that is when the electronics allow it, not because it was convenient.

Fourteen years later I write motion code for packaging machines. Same argument, more axes.

The write-up

PDF

The original report, with the schematics, the sampling window and the measurements.

Read the PDF