Article / Embedded
20 Dec 2025
DC motor stall detection that survives a jam
Current sense, timeout windows and firmware interlocks for a gearbox that will eventually bind.

Assume the jam
Every gearbox jams eventually — dirt, cold grease, a misaligned magazine. The driver must survive it without cooking the FET or flattening the pack.
Hardware current limit is the fuse of last resort. Firmware stall detect is what keeps you from needing it every week.
What we measure
Shunt or high-side sense into the ADC, sampled during drive only. Compare running current to a baseline captured on the last good cycle.
A spike over threshold for more than 50 ms triggers shutdown. A timeout with no encoder progress triggers shutdown. Both paths log a fault code to the OLED.
Recovery
After a stall, back off, wait, retry once at lower duty. If the second attempt fails, require a manual clear so the operator knows something is physically wrong.
Password-protected config stays untouched — stall limits are not a field adjustment.