Learning To Speak Peloton

Recently [Imran Haque]’s family bought the quite popular Peloton bike. After his initial skepticism melted to a quiet enthusiasm, [Imran] felt his hacker curiosity begin to probe the head unit on the bike. Which despite being a lightly skinned android tablet, has a reputation for being rather locked down. The Peloton bike will happily collect data such as heart rate from other devices but is rather reticent to broadcast any data it generates such as cadence and power. [Imran] set out to decode and liberate the Peleton’s data by creating a device he has dubbed PeloMon. He credits the inspiration for his journey to another hacker who connected a Raspberry Pi to their bricked exercise bike.

As a first step, [Imran] step began with decoding the TRRS connector that connects the bike to the head unit. With the help of a multi-meter and a logic analyzer, two 19200bps 8N1 RS-232 channels (TX and RX) were identified. Once the basic transport layer was established, he next set to work decoding the packets. By plotting the bytes in the packets and applying deductive reasoning, a rough spec was defined. The head unit requested updates every 100ms and the bike responded with cadence, power, and resistance data depending on the request type (the head unit did a round-robin through the three data types).

Once the protocol was decoded, the next step for [Imran] was to code up an emulator. It seems a strange decision to write an emulator for a device with a simple protocol, but the reasoning is quite sound. It avoids a 20-minute bike ride every time a code change needs to be tested. [Imran] wrote both an event-driven and a timing-accurate emulator. The former runs on the same board as the PeloMon and the latter runs on a separate board (an Arduino).

The hardware chosen for the PeloMon was an Adafruit Feather 32u4 Bluefruit LE. It was chosen for supporting Bluetooth LE as well as having onboard EEPROM. A level shifter allows the microcontroller to talk directly to the RS-323 on the bike. After a few pull requests to the Adafruit Bluetooth libraries and a fair bit of head-banging, [Imran] has code that advertises two Bluetooth services, one for speed and another for power. A Bluetooth serial console is also included for debugging without having to pull the circuit out.

The code, schematics, emulators, and research notes are all available on GitHub.

MIDI Controller In A Concertina Looks Sea Shanty-Ready

Did you know that the English concertina, that hand-pumped bellows instrument favored by sailors both legitimate and piratical in the Age of Sail, was invented by none other than [Sir Charles Wheatstone]? We didn’t, but [Dave Ehnebuske] knew that the venerable English gentleman was tickling the keys of his instrument nearly two decades before experimenting with the bridge circuit that would bear his name.

This, however, is not the reason [Dave] built a MIDI controller in the form of an English concertina. That has more to do with the fact that he already knows how to play one, they’re relatively easy to build, and it’s a great form factor for a MIDI controller. A real concertina has a series of reeds that vibrate as air from the hand bellows is directed over them by valves controlled by a forest of keys. [Dave]’s controller apes that form, with two wind boxes made from laser-cut plywood connected by a bellows made from cardboard, Tyvek, and nylon fabric. The keys are non-clicky Cherry MX-types that are scanned by a Bluefeather microcontroller. To provide some control over expression, [Dave] included a pressure sensor, which alters the volume of the notes played depending on how hard he pushes the bellows. The controller talks MIDI over Bluetooth, and you can hear it in action below.

We’ve seen MIDI controllers in just about everything, from a pair of skate shoes to a fidget spinner. But this is the first time we’ve seen one done up like this. Great job, [Dave]!

Continue reading “MIDI Controller In A Concertina Looks Sea Shanty-Ready”