Close

Learning PID controllers

A project log for HANDY

Tendon-driven 3D-printed robotic hand learning to roll a coin and sign ASL, with 5 per-finger PID loops tuned live by one shared neural net.

gabrielGabriel • 08/13/2026 at 16:09•0 Comments

Small update this week, no printing, no hardware, but a chunk of learning I think is worth writing up because it changes how the control system actually gets built.

I'd been saying "PID controller" for a couple posts without really understanding it, so I sat down with four different videos to actually learn it properly instead of just copy-pasting the equations.

To make it stick, I built a tiny live simulation in Desmos using the ticker feature: a point chasing a target using a PID loop. Desmos graph demo

Motion is smooth, no overshoot, but I'll be upfront: the gains in there are completely arbitrary. I haven't tuned P, I, or D against anything real, this was just to get the shape of the behavior right before I touch actual hardware.

The control flow got simpler

The bigger thing this week was redoing Handy's control flow diagram in Figma. The idea hasn't changed from my last post: a shared neural net producing gains, feeding five independent per-motor PID loops. But the old diagram was overcomplicated in a way that made it harder to build, not easier.

Roughly how it reads: desired trajectory and the hand's current output get compared to produce an error signal. That error, plus some previous-state values, feeds a small neural net with a sigmoid hidden layer, which outputs Kp, Ki, and Kd. Those gains go into a PID controller along with the error, and the PID output is the torque sent to the hand. The hand's new output feeds back into both the error comparison and the previous-state block, closing the loop.

That loop runs five times, once per finger. (The diagram currently says x9 in a couple spots, that's a labeling mistake, it should say x5.)

Next step is actually tuning the gains instead of eyeballing them, probably back in the Desmos sandbox before it touches real hardware.

Discussions