It is no longer an idea.
The day GearSense learned its own gears — and stopped reinventing the wheel.

A month ago GearSense was a ratio scribbled on a napkin. Tonight it sits on my desk, learns a drivetrain it has never seen, and tells me which gear I am in — having been told nothing about the bike at all. Three things happened today to get it here. It learned to discover gears for itself; we let it stand on a standard the whole industry already shares instead of rebuilding it; and somewhere in the middle of that, quietly, it stopped being an idea.

30
days, idea to instrument
0
gears known at power-on
1816
CSC: the standard it stands on
any
cassette it can learn, unconfigured

The number that couldn't be right

It started, as the good ones do, with something that looked wrong. The screen said IN GEAR 3, and underneath it, OF 2 DETECTED. Three of two. How can I be in a gear higher than the number of gears the thing claims to have found? Either it could count or it couldn't, and that contradiction sat there glaring at me.

My instinct went somewhere uncomfortable: maybe we weren't sensing the gear at all. Maybe the test rig — the little board that plays the role of rider and drivetrain — was simply telling the head unit "you're in gear three," and GearSense was parroting it back. That would make the whole project a very expensive echo. I said so, plainly, because a doubt you don't voice is a doubt that quietly rots the foundation.

We almost fooled ourselves The first "proof" offered up that it really was sensing pointed at the rig's own console — clean, confident numbers reading ratio=2.000. But those were the numbers being sent, not the numbers being sensed. Citing the source to prove the measurement is circular. I'm glad I pushed back instead of nodding along; the whole method's credibility was riding on telling the difference.

The real proof was on the other screen — GearSense's own log, doing its own arithmetic. And it told the truth precisely because it was messy:

# the rig SENDS a clean 2.000. GearSense COMPUTES its own:
wheel=2.45 crank=1.23 ratio=1.990  ->  (no match)
wheel=2.50 crank=1.23 ratio=2.033
wheel=2.62 crank=1.28 ratio=2.045
wheel=2.55 crank=1.30 ratio=1.963
wheel=2.55 crank=1.23 ratio=2.072

A parrot repeats 2.000. GearSense never sees 2.000 — it receives raw wheel and crank counts over two separate Bluetooth radios and divides them itself, scatter and all. Those wobbling decimals are the sensing. And that first line, the one that politely declines to call anything a gear, is a machine exercising judgement on its own evidence. An echo can't do that.

GearSense Mark III display showing IN GEAR 1 — OF 1 DETECTED. One gear learned, one gear occupied.

1 of 1 detected. It has found exactly one gear and is sitting in it. An echo can't be this honest about what it doesn't know yet.

Numbers are for humans

So the detection was real. But the contradiction was also real — just a different kind of bug. The big number and the little number were measuring two different things and the words pretended they were one. The "3" was an identity (a position on the cassette, looked up in a hardcoded table). The "2" was a tally (how many distinct gears we'd happened to confirm). Gluing an identity to a tally is how you get nonsense like three-of-two.

Pulling on that thread unravelled something much bigger and much better. If the device already knew the seven gears from a table, what was it really discovering? Nothing. The honest version doesn't get told the cassette at all. It earns it. And that reframed the entire machine:

what the controller actually steers on
ratio = wheel_hz / crank_hz
Continuous, exact, and enough on its own. A future assist controller acts on this number directly — it never needs to know how many gears exist or what they're called. The gear NUMBER is just this ratio's rank in the set we've seen so far: a label drawn for the human, never an input to the machine.

That sentence — numbers are for humans, the ratio is the control system — is the whole architecture in a line. The discrete gears are a courtesy to the rider. The continuous ratio is the truth the electronics live by.

Learning from nothing

So out came the hardcoded table, and in went a thing that builds the drivetrain up from an empty list as you pedal:

Then I flashed it, started the rig from cold, and pedalled. The screen began with nothing and filled in before my eyes:

# GearSense head unit v0.6 — knows nothing about the bike
ratio=2.03  # LEARNED gear #1 (now 1 gear)
ratio=2.18  # LEARNED gear #2 (now 2 gears)
ratio=2.40  # LEARNED gear #3 (now 3 gears)
ratio=1.41  # LEARNED gear #4 — inserted FIRST, all others renumber
# ...and on up the cassette, building its own ladder

Watching a fresh gear appear as a new rung on the ladder — and watching the whole ladder politely renumber itself when a lower gear turns up later — is the most alive this project has ever felt. My friend Bjorn and I just stood there grinning at it. It has that wow. It knows nothing, and then it knows your bike, and you never told it a thing.

GearSense Mark III display showing IN GEAR 2 — OF 7 DETECTED, with a full pip ladder of seven rungs on the right side of the screen.

2 of 7 detected. The pip ladder on the right has seven rungs — every gear the bike has, learned from nothing. The number on screen is always its rank in that earned list.

Standing on the standard

There was one piece of cleverness left that turned out to be a piece of foolishness. To tell the speed sensor from the cadence sensor, the firmware had been reading the sensor's name and looking for the letters "cad." It worked — because my bench sensors are politely named. It would have fallen over against a real Garmin or Wahoo named something else entirely.

And then the obvious question, the one that should have come first: isn't there a standard? There is. These are all Bluetooth SIG CSC sensors — same service, same characteristic, every vendor. And the data isn't an opaque blob: the very first byte of every measurement declares what's in it.

how a sensor states what it is
flags & 0x01 → wheel  ·  flags & 0x02 → crank
Every CSC sensor announces its own role in the first byte of every packet, per the standard. Read that instead of guessing at a name, and GearSense speaks Garmin, Wahoo and no-name alike — without a single line of per-brand code.

So the name-guess came out, and role now comes from the protocol itself. But the real prize wasn't the tidier code. It was the realisation behind it, and I'll put it the way it landed on me:

GearSense is my product — not speed and cadence sensors. Standing on the standard frees me to build the thing nobody else makes, instead of rebuilding the things everyone already has.

That's the difference between a project and a product. The wheel is already round. My job isn't to re-cut it; it's to put something on top of it that's never existed.

Born

As Bjorn was heading out the door today I heard myself say, "You know, we're going to have to start thinking seriously about how we sell these." He stopped, and after a second said: "I know. But I don't know how — I've never gotten a project this far before."

I'm still smiling at that, hours later. Not because it's a problem solved — it's a problem we've never had the privilege of having. For a month this was a hunch about a number. Tonight it's a thing on a bench that learns. A remarkably short gestation, and I don't take for granted what it took: stubbornness, a willing bike, late nights, and a working partnership I'll write about honestly because theIdea.club runs in the open — the firmware across today was built shoulder-to-shoulder with Claude, me bringing the bike and the bad ideas and the skepticism, it holding the protocol details and a steadier memory than mine and pushing back when I'm about to fool myself. Neither of us gets there alone.

Conceived a month ago. Born today. Now we find out how far it can ride.

What comes next

It learns. Next we find out whether it can be fooled.

  1. Stress the discovery engine with the silly things humans really do — snap shifts, soft-pedalling to hold assist, coasting, backpedalling — and watch for phantom gears
  2. Point it at real third-party sensors (Magene, CYCPLUS) and prove "works with anything" is true, not just intended
  3. Optionally let it remember a learned cassette across power cycles — eye-candy, honestly, once discovery is trusted enough not to need it
  4. And the new question on the bench: how a two-man shop actually brings a thing like this to the people who'd want it

Comments

Loading…

Leave a comment