A stepper motor can reach its target while the robot joint it drives is still in the wrong place. That gap comes from backlash in the gearbox, and it is the reason cheap 3D-printed robot arms feel sloppy. Arctos Robotics, the maker behind the open-source Arctos arm, built CLMD, an open-source ESP32-S3 stepper driver that reads a second encoder right at the gearbox output and corrects the joint itself, not just the motor.
Two encoders, two jobs
Ordinary closed-loop steppers measure the motor shaft, so they know where the motor is but not where the joint is. CLMD adds a second encoder after the gearbox. The output encoder closes the position loop and produces an acceleration-limited velocity command for the TMC2209 driver, while the motor encoder handles speed measurement, stall and direction checks, and flags any mismatch between motor and joint. The maker admits that this mismatch includes belt stretch as well as backlash, and there is no compliance model or active damping yet.
The board pairs an ESP32-S3R8 with a TMC2209 (up to 2 A RMS), a 15-bit TLE5012B magnetic encoder with 0.011 deg resolution, CAN bus at 500 kbps for daisy-chaining, USB-C, two endstop inputs and a 6 to 28 V supply. The ESP-IDF firmware runs a 1 kHz PID loop with trapezoidal motion planning, and a PyQt5 tool handles live tuning and firmware updates.
The numbers on a 45:1 printed gearbox
In the video, the same move runs four ways on a 45:1 3D-printed gearbox. With motor feedback alone, the joint settled with an RMS error of 0.065 deg. Using the second encoder to correct the joint brought that down to 0.014 deg on the bench. Six drivers can share one CAN line to run a full six-axis arm.
The target price is about $20 per board. That is a goal rather than today's price: in small batches of 5 to 10 boards, the maker paid close to $40 each.
Our take
Measuring the output instead of trusting the motor is standard in industrial servos, and it is good to see it reach DIY robotics at this price. If you are new to the driver chip, our TMC2209 interfacing tutorial covers the basics.
Image credit: Arctos Robotics / YouTube, cropped and resized.
About the author: Aswinth Raj is an electronics engineer and the editor of CircuitDigest, where he has published more than 150 hands-on projects and tutorials across Arduino, PIC, ESP32, Raspberry Pi and EV battery systems. He selects the stories on this page for what engineers and makers can actually learn or build from. Connect on LinkedIn
Add a comment
No account needed. Your comment appears once a moderator has reviewed it.