Day 18: it said yes and stayed exactly where it was
What did I say yesterday? The hard part isn’t the hardware anymore? Yeah. If you want to make God laugh, tell him your plans.
The camera, the wall it was mostly looking at, and gravity — the only one of the three telling the truth.
First the arm stopped taking orders
I was running the arm through a series of positions, ninety degrees at a time, taking a photo at each stop. Simple. Except it only went to some of them.
Not “it went to the wrong place.” Not “it jammed.” It moved to the first position perfectly, then I asked for the next one and it sat there. Asked again. Sat there. Then, several requests later, it suddenly went somewhere — the right somewhere — and then stopped listening again.
Four out of nine. That’s not a pattern, that’s a coin.
So I read the servo’s own memory back to see what it thought I’d asked for. And it had the right answer. Every single time. The commanded position register held exactly the number I’d sent, including on all the moves that never happened. The servo had received the instruction, agreed with it, filed it, and simply not moved.
I checked the obvious things and they were all fine. Not in a weird mode. No travel limits set. No error flags. No overload. Torque on. Voltage fine. Temperature fine.
Which left the least comfortable option: the problem was in how I was talking to it.
Two messages, one millisecond apart
What I found was this. Every time the arm was asked to move, two separate messages went out: first the target position, then the speed to move at. Perfectly reasonable, in the order a human would say it out loud.
But this servo doesn’t talk like that. It was raised in a rich Chinese tradition reaching back to the very origins of civilization, taught by Chinese masters in a language where a single character carries an entire state of the soul. Hand it your instructions one at a time, in a neat little sequence, and the two of you will never find a common language. The moment the target position lands, it starts planning the move — working out the acceleration curve, the whole trajectory. And then, a fraction of a millisecond later, my second message arrives and overwrites the speed mid-calculation.
The planner throws up its hands and abandons the move. The target stays in memory, pristine and correct, describing a journey that will never happen.
So to solve it I had to become, briefly, Chinese about the whole thing: describe in one single command the entire state my servo’s soul was required to enter. Both things in one breath — position and speed together, so it has everything before it starts thinking. Nine out of nine after that.
What actually bothers me is the shape of the failure. The servo didn’t refuse. It didn’t error. If you asked it what it was doing, it would have given you a completely correct answer about a move it had no intention of making. Every diagnostic I had said the system was fine.
Then: what is the camera actually looking at
With the arm reliable again, I could finally do the thing this was all for — sweep the arm, watch the marker on it move, and work out where the camera sits relative to the joint.
It worked. The marker traced a beautiful circle. And the numbers said the camera and the arm’s pivot disagreed with each other by a few degrees — where the design says they should differ by thirty.
But here’s the problem with that measurement: it’s relative. All I’d learned is that two things on my robot disagree. It cannot tell me which one is wrong. Either the camera isn’t aimed where I think, or the arm’s pivot isn’t standing up straight — and a pivot that isn’t straight would quietly poison every single measurement this robot ever makes.
There is no way to settle that by measuring one part of the robot against another part of the robot. I needed something outside the argument.
So I asked it which way was down
The camera has an accelerometer in it. Not for this — it’s there for motion and stabilization. But an accelerometer sitting still isn’t measuring motion. It’s measuring gravity. Which is the one reference in the room that isn’t part of my robot and has no opinion about my design document.
Turned on, left alone for a couple hundred readings, and it reported: the arm’s pivot is vertical to within half a degree. The frame is square. The bracket is fine. That whole category of nightmare, closed.
And the camera is looking down about six degrees. It is supposed to be looking down thirty.
Six degrees is barely looking down at all. Which explains something that had been quietly bothering me all day — every photo the robot took was mostly blank wall, with the entire robot crushed into a strip along the very bottom of the frame.
Two independent instruments — the marker sweep and gravity — agreeing to about a tenth of a degree about how wrong it is. It’s a good feeling when two completely different ways of measuring the same thing land on the same number. Rather poisoned, in this case, by the number being wrong. It would be a much better feeling if it were thirty.
And the part is correct
I went and measured the printed mount in CAD. It’s at thirty degrees. Exactly as drawn.
So the model is right, the printed part is right, and the camera on top of it is looking somewhere else entirely. Something between the drawing and the bench is losing twenty-four degrees, and I don’t yet know what.
That’s tomorrow. For today I’ll take it: a bug that had been sitting under every single movement this robot has ever made is gone, the frame is provably square, and the robot answered a question about its own body that I could not have answered any other way.
It’s a strange kind of progress. I spent the day discovering that things I’d written down as finished weren’t. But I’d rather find that now, with one joint, than with thirty.