Reverse Engineering a VanMoof E-Shifter – Part 2 – Decoding the Signals
mikecoats.com
mikecoats.com
(Not my repo but has a lot of good info, I plan to share the binary as well once I made some progress in reversing it)
Cowboy bikes are much better, but mine broke on the second day. I sent it back.
Now I got big legs thanks to those brittle novelty iPhone e-bikes failing me.
I always wondered what exactly the problem e-shifters were trying to solve was. Is it the "ugliness" of shifting cables? Route them through the frame...
With a derailleur, no amount of e-shifting magic can shift while stopped. And even with a hub shifter, most “automatic” systems I’ve used have an annoying failure in which you slow or stop briefly, try to start pedaling again, and discover that the system has chosen that moment to downshift several steps and you actually can’t go anywhere until it’s done.
Expensive road bikes (as well as the ones professionals ride) use e-shifters without any problems. These are made by companies that have some expertise in manufacturing shifters. They’re very expensive, though, as they’re made for road racing, not for regular bikes like the ones VanMoof made.
VanMoof wanted to do everything themselves and found out the hard way that was a bad idea.
Advantages:
The controls are simply electronic switches, so you don't need much finger strength to operate them (reputedly these make them useful for people with hand strength issues such as arthritis) and also this means that you can reconfigure them (e.g. a one-armed cyclist can move the relevant controls to just one side) or even add extra controls such as sprinter buttons.
If you've got double/triple chainrings, then the gear change can incorporate the switch-over point so you can just change up or down a gear and let the electronics handle when the chainring shift should occur (this can be changed in the software too according to your preferences).
Also, with regards to the chainrings, the shifting system can adjust the front derailleur to accommodate the chainline better i.e. the front derailleur may need to be a mm or two further over for the smallest or biggest rear cog to prevent the chain rubbing. That's commonly referred to as "trim" and can usually be done manually on a manual gear system.
Probably the biggest benefit is highly reliable shifting - once set up, it will perform perfect shifts every single time, whereas traditional gears will need adjusting as the gear cable inner stretches over time.
As to disadvantages, the biggest issue is the price and the next problem would be that you need to keep the battery charged up or otherwise you're not going to be able to change gear. Typically, a single charge will last for thousands of shifts or a few months. I've also had the battery fail and unfortunately, they're very expensive to replace as the battery component also houses the main electronics for the system (e.g. the brain).
One of the greatest things about bikes, IMO, is how elegantly simple they are and how that translates into reliability and ease of maintenance. The push to using electrical components feels like a step in the wrong direction in this regard.
The point is, it's an everything bike, in a stylish package.
You can take my double-chainring when you can pry it out of my cold dead hands.
I do agree about the simplicity and maintenance benefits of manual shifters (I do most of my own bike maintenance, so have worked on both systems) and if I were planning a cross-continent bike ride, I think mechanical shifters would be beneficial as it may not be easy to source electronic shifting components (e.g. hitting a rear derailleur on a rock and requiring a replacement).
However, the sheer pleasure of using electronic shifting (a slight press and then a satisfying click-whirr to change gear) means that most people who have experienced it are unlikely to go back to mechanical.
By the way, you usually just charge up the Di2 system rather than replacing the battery. Battery replacement is only for when something has gone wrong or you require features not supported on the older versions (e.g. synchro-shifting wasn't supported on the older external battery compared to the seat-post battery versions).
Pros of electronic controls: it will try to delay shifting until the minimum pedal torque part of the cycle (kinda cool, but I can do this myself just fine without even thinking about it), it will reduce motor torque (useful, but see before — if I pause pedaling for a split second, that will pause motor torque too), and it will automatically downshift when stopped (this is conceptually nice but so problematic that I turned it off).
Cons: you can’t shift large amounts quickly. And, critically, if the Bosch assist system craps out for any reason except low-but-not-quite-dead battery, the shifter will crap out along with it. This turns an oh-well-I-have-no-assist situation into a there’s-no-way-I’m-getting-this-bike-back-home situation.
The Rohloff system is a hub shifter, so all the fancy front derailleur management benefits don’t apply at all.
An oscilloscope is able to show analog values. If you have no clue what a signal is, it is your best bet to start with. In this case it turned out to be a simple digital serial signal, but it could've just as well been a 0V-5V analog one or perhaps an open drain bus with pullups like i2c.
Logic analyzers only really work for binary values. You are able to set a single threshold: everything above becomes a 1, everything below becomes a 0. Great if you've got a purely digital signal, useless if it has analog components.
In the first part the author had to start with an oscilloscope to begin exploring. They could've probably switched to the logic analyzer before the first step of part two, but there isn't really a strong reason to do so - and there would still be a nonzero chance of analog components playing a role. Seeing that it was a simple digital "one wire TX, one wire RX" probably gave enough confidence to assume it was something like serial uart and move on.