Cart Pole
Spring ‘26 —
Classic inverted pendulum problem - linear motion of the cart comes from a rack-and-pinion driven by a NEMA 17 stepper motor, chosen over a belt for 3D printability. The cart slides along two 20mm linear rails using flanged linear bearings. The pole angle is read by an AS5600 magnetic encoder at the hinge, which gives clean absolute angle feedback for the controller.
The plan is to start with PID to get the pole standing, then move to LQR for a more principled balance of cart position and pole angle.
Cart is designed and the first parts are printed (the cart body); encoder is in hand. Currently reworking several parts of the design before the next print round. CAD screenshots and photos of the printed parts below.
I used Claude Code to build a nominal cart-pole simulation environment; the PID control logic on top of it is my own.