← sources

I built an open-source $20 closed-loop stepper driver with dual encoders to compensate for gearbox backlash

source: reddit (reddit:robotics)published 2026-11-09 16:26ingested 2026-11-10 02:41

retained text

I've been working on my 3D-printed robotic arm for quite some time now, and backlash has always been one of the biggest headaches. Even with closed-loop steppers, you still don't really know where the joint is, only where the motor is.

So I ended up designing my own driver with two encoders. One measures the motor position, the other measures the actual joint position after the gearbox. 

The idea is to compensate for backlash in software instead of spending a fortune on precision gearboxes.

It's based on the ESP32-S3 and TMC2209, and I'm trying to keep the price around $20.

[GitHub](https://github.com/Arctos-Robotics/CLMD-Closed-Loop-Motor-Driver)

Has anyone here tried something similar? 

I'm especially curious how you handled backlash compensation without making the control loop unstable.

document fetched 2026-11-10 00:36 · canonical https://reddit.com/r/robotics/comments/1xrw5ob/i_built_an_opensource_20_closedloop_stepper