Blog
Project details, notes and such
The low-speed drive without an FPU
The HFI sensorless drive rewritten in integer arithmetic, to see whether it fits a Cortex-M0+. On motor 3 it matched the floating-point drive, and the emulated M0+ step takes 29–57% of a 10 kHz control period at 64 MHz.
Rotor position at zero speed: high-frequency injection
Sensorless FOC down to standstill on motor 3, using the rotor's small saliency instead of back-EMF. How the carrier, demodulation, tracker and polarity check work, what went wrong on the bench (a carrier that cancelled itself, polarity pulses that threw the rotor, an angle that moved with load current), and where the low-speed floor ended up.
A digital twin of the bench, and what it found in the FOC drive
A phase-domain model of motor 3, the L6230 bridge and the F302 board, running the unchanged firmware. Calibrating it against the bench found a misplaced hall sensor, a position-dependent torque behind low-speed hunting, and three flaws in an online R/ψ estimator, and each fix went back into the drive.
Six-step at 120° and 180° conduction
A bench comparison of the two six-step conduction patterns on a sinusoidal motor. 180° gives 15% more voltage but drew up to 3.7× the phase current and tripped the overcurrent limit at half the speed 120° reached. The harmonic current follows a simple ψ/(n²L) rule.
Six-step, a second board, and position on halls
Sensorless six-step commutation from first forced steps to a live handover from FOC, a port to a second MCU and motor, and a first position loop running on hall sensors — with its limits measured.
Going open, and letting AI take the Wheel
The Modular Motor Controller is now open source. Notes on the repository, a back-EMF sensing experiment that didn't work as intended, and the milestone reorder that came out of it.
A second motor changes the story
The auto-tune profiler was built around one bench motor. Handing it a completely different one broke exactly the assumptions worth breaking — and the probe found the first motor had been hiding a trick.
July 13, 2026What's actually on the chip
A breakdown of the MMC firmware at milestone MS6 — feature set, drive modes, and where every kilobyte of flash and RAM actually goes.
How this started
The origin of the Modular Motor Controller project — asking Claude to build an FOC motor controller from scratch.