GearSense devlog

The freewheel truth

A 1300-metre commute told a seven-speed bike it had twelve gears. Chasing that lie turned out to be the most important thing GearSense has learned so far — not about gears, but about knowing when it doesn’t know.

I took GearSense on the shortest possible ride — the dash to the office, about 1.3 km — and it came back proud of itself, reporting that it had detected twelve gears. My bike has seven.

That is the good kind of wrong. A clean ride would have told me nothing. This one handed me the deepest idea in the whole project, gift-wrapped.

What a ratio actually is

GearSense works on one number: the ratio of how fast the wheel turns to how fast the cranks turn. In a given gear that number is fixed by the teeth on the chainring and the cog — it’s pure mechanism. Watch the ratio, and you’re watching the gear.

Except that’s only true while you’re actually driving the chain. And here’s the thing I’d been quietly ignoring: a bike has a freewheel. A one-way clutch. It lets the wheel spin faster than your legs are turning the pedals — that’s what coasting is. The moment the bike outruns your legs, the cranks and the wheel come uncoupled. They’re no longer speaking to each other through the chain.

And on an e-bike, that happens constantly. Picture my commute: I pull away, run up through a couple of gears, and within a few seconds I’m at the bike’s governed top speed with the motor doing the work. My legs can’t keep up — even in top gear, at that speed, I’d have to pedal like a lunatic to stay engaged. So I don’t. I spin along at whatever’s comfortable, just enough to keep the assist awake. You see it everywhere once you look — there’s a woman who blasts past our office almost every day, feet barely moving, basically a motorbike with pedals.

In that state, the ratio of wheel-speed to pedal-speed is meaningless. It isn’t a gear. It’s just “how fast do I happen to be twiddling my feet” divided into “how fast is the motor pushing me”. And that number wanders around, and every so often it holds still for a second or two — long enough for GearSense to go “aha, a new gear!” and write down a ghost.

Twelve gears on a seven-speed. Five phantoms, potentially every one of them born in that decoupled, freewheeling cruise.

The reframe

So the job may never have actually been “detect gears.” The real job is know whether you’re driving or freewheeling, and only trust the ratio when you’re driving. The gear number was always just a friendly label for humans; the thing that actually matters underneath is: are your legs connected to the road right now, or not?

The lovely part is that you can tell the two apart from the same two numbers, no extra sensor needed. A real gear is somewhere you stay and push — the ratio parks on one precise value and returns to that exact spot every single time you’re in that gear. Freewheeling is the opposite: the ratio drifts, sits above your top gear, and when it does hold still it holds at a different value each time. One is reproducible. The other never comes back to the same place twice.

So GearSense stopped believing a ratio just because it sat still for a moment. Now a steady ratio only earns a provisional pencil-mark. It becomes a real, confirmed gear only after you’ve returned to it three separate times. Recurrence is the proof. Ghosts don’t recur.

Locked, but still paying attention

This triggered a change I’m most pleased with, because it’s the part that decides whether people trust the thing.

Once GearSense has ridden with you enough to be confident it has found the whole set — and it earns that confidence across rides — it locks, not in one short dash; my 1300-metre run is just one deposit. With the new paradigm it stops hunting for new gears. But here is the important part, locked doesn’t mean stubborn. It means “stop hunting, but keep paying attention.” If it locked at six because you never used your top gear on the rides it learned from, that is actually "correct".  It is what it 'sensed' and what it should do.  The very first time you actually drop into that seventh gear — a clean, steady, obviously-real ratio sitting right where a gear should be — it quietly adds it. It heals itself.

And if it’s truly not sure yet? It says so. “That ride was short — still learning.” I decided early that GearSense would rather admit low confidence than fake a confident answer. Every cheap gadget overclaims; it snaps to a number instantly and it’s wrong. I’d rather build something that tells you the truth about what it knows. I think people respect that. I know I do.

Why this matters beyond a number on a screen

The gear number is still just eye-candy. But that hidden variable underneath it — are you driving or freewheeling? — is exactly what the next stage of GearSense needed. When it starts helping manage the assist, it has to know that during that governed-speed cruise your pedalling isn’t a request for more power; it’s just you 'keeping the lights' on. A short, messy commute taught GearSense it needs to tell the difference. Humans are messy. The gears are simple. The trick is knowing which one you’re looking at.

Next up: letting it write its ride notes to a memory card so I can pore over the raw numbers, and teaching it to sleep when the bike is parked so it stops holding my sensors awake. But those are stories for another day.

— Paul

Comments

No comments yet — be the first.

Leave a comment

Comments

Loading…

Leave a comment