Exercise Bike Hacked As Input For Xbox 360

If you like playing Grand Theft Auto, you’re pretty familiar with squeezing the triggers for accelerating and braking while driving around. [David Programa] decided this was too easy, and instead developed a system to allow him to pedal his way around the virtual world.

The device relies on a flywheel-based exercise bike, with six magnets placed on the flywheel that triggers a reed switch six times per rotation. The extra magnets give the system better resolution at slow speeds. A Hall Effect sensor would be a more reliable way to build this to survive in the long term, but the reed switch does work. It’s paired with a debounce circuit to keep the output clean. A Raspberry Pi is pressed into service, running a Python program to read a GPIO pin activated by the reed switch, counting pulses to determine the speed of pedalling.

The trigger control used in the Xbox 360 controller is a potentiometer that creates varying voltages depending on its position, allowing it to act as an analog accelerator input. 0 volts corresponds to no input, while the trigger reads 3.3 volts when fully depressed. The Raspberry Pi emulates this with its PWM output, paired with a low-pass filter to create the relevant voltage to inject into the trigger input on a generic Xbox 360 controller.

While it’s a lot less practical than simply using a regular controller, the pedal controls do allow you to get a great workout while playing Grand Theft Auto. Some of the more intense chase missions should be a great way to get your heart rate up, and that’s got to be a good thing.

Ironically, though, the system only works for cars and motorbikes in game. The bicycles in Grand Theft Auto are controlled by mashing the A button instead. Alternatively, you might consider a similar system for playing Mario Kart on the Nintendo Switch. Video after the break.

Continue reading “Exercise Bike Hacked As Input For Xbox 360”

Cycling Cadence Display With ESP32

Terry Pratchett once said “Wisdom comes from experience. Experience is often a result of lack of wisdom.” This is as true with technical skills as it is with the rest of life, and you won’t truly understand a specific topic unless you’ve struggled with it a bit. [publidave] wanted a simple wireless display for a bluetooth cycling cadence sensor, and soon found himself deep down the rabbit hole of Micropython and Bluetooth Low Energy on the ESP32.

[publidave] had converted his bicycle for indoor training during lockdown and winter, and realized he can’t use the guided training app and view his cadence simultaneously, so he needed a dedicated cadence display. Since [publidave] was comfortable with Python, he decided to give Micropython on the ESP32 ago. Bluetooth Low Energy can be rather confusing if you haven’t implemented it before, especially if good examples are hard to come by. In short, the ESP32 needs to find the sensor, connect to it, select the right service, and listen for the notifications containing the data. The data is then converted to RPM and displayed on a small OLED display. [publidave] does an excellent job of describing what exactly he did, highlighting the problems he encountered, and how he solved them.

In the end, he had a functional display, a good idea of what he would do differently next time, and a lot of additional knowledge and understanding. In our book that’s a successful project.

Since so much of the health related devices work with Bluetooth Low Energy, it could be handy to know the technology and how to interface with it. It would allow you to do things like unbrick a $2000 exercise bike,

Reverse Engineering Shimano Bike Electronics

ANT+ is a wireless protocol specifically designed for use with sensors, and has similar functionality in some respects to Bluetooth Low Energy. It’s found a place among various bicycle equipment manufacturers, to connect smartwatches, cycle computers and electronic gear shifters. Of course, as soon as something becomes a defacto standard someone has to start coloring outside the lines. In this case, Shimano went off book with their DI2 groupset, leaving [kwakeham] with a reverse engineering job on his hands.

[kwakeham] gives us a great example of how to approach reverse engineering. Researching the Shimano hardware by its FCC ID shows that the device communicates using an NRF24AP2 chip, common in ANT+ devices. The Shimano device is then opened, and a logic analyser attached to various test points until the SPI interface between the transceiver and microcontroller is found. At this point, it’s a simple matter of putting the hardware through its paces and capturing data until the protocol can be pulled apart, piece by piece.

The work is documented on Github for anyone wishing to interface with the Shimano DI2 groupset. Reverse engineering is a powerful skill, that can teach you about everything from Pokemon to botnets. Video after the break.

Continue reading “Reverse Engineering Shimano Bike Electronics”

The Apocalypse Bicycle

It seems to be a perennial among humans, the tendency among some to expect the End Times. Whether it was mediaeval Europeans who prepared for a Biblical Armageddon at the first sight of an astronomical phenomenon, 19th-century religious sects busy expecting a Noah’s flood, cold-war survivalists with bunkers under the lawn, or modern-day preppers buying survival gear, we have a weakness for thinking that Time’s Up even when history shows us repeatedly that it isn’t. Popular culture has even told us that the post-apocalyptic world will be kinda cool, with Mad Max-style rusty-looking jacked-up muscle cars and Tina Turner belting out ballads, but the truth is likely to be a lot less attractive. Getting away from danger at faster than walking pace as a starving refugee would likely be a life-or-death struggle without the industrial supply chain that keeps our 21st-century luxury cars on the road, so something more practical would be called for.

[Don Scott] has written a paper describing an extremely straightforward solution to the problem of post-apocalyptic transport, which he calls the Apocalypse Bicycle. As you might expect it’s a two-wheeler, though it’s not the kind of machine on which you’d lead a break-away from the Tour de France peloton. Instead this is a bicycle pared down to its minimum,, without advanced materials and with everything chosen for durability and reliability. Bearings would have grease nipples, for instance, the chain would be completely enclosed for better retention of lubrication, and the wheels would be designed to have strips of salvaged tyre attached to them. Interestingly, the machine would also be designed not to attract attention, with muted matte colours, and no chrome. It occurs to us that many of the durability features of this machine are also those that appear on the rental bicycles owned by bike sharing companies that have been spread liberally on the streets of many cities.

You might wonder what use the idea might have, and why a prepper might consider one alongside their tins of survival rations. But it’s also worth considering that these machines have a real application in the here-and-now, rather than just an imagined one in an apocalyptic future. Many Hackaday readers are fortunate enough to live in countries unaffected by wars or natural disasters, but there are plenty of places today where an aid agency dropping in a load of these machines could save lives.

Apocalyptic cycling has featured little here. But we have brought you at least one bike made from wood.

Take A Bicycle Tour Anywhere In The World

Imagine yourself riding through the countryside of Tuscany in the morning, then popping over to Champagne for a tour in the evening without taking a plane ride in the intermission. In fact, you don’t have to leave your living room. All you need is a stationary bicycle, a VR headset, and CycleVR.

[Aaron Puzey] hasn’t quite made the inter-country leap quite like that, but he has cycled the entire length of the UK, from its southern point to its northernmost tip. The 1500km journey took 85 hours over the course of eight months to complete.

CycleVR is actually a VR app created using Unity. It takes advantage of Google street view’s panoramic image data, using Bluetooth to monitor the cycling pace  and transition between the panorama capture points. So, the static images of pedestrians and cars clipping and distorting as the panorama images load might throw off the illusion at first, but there’s thousands of side streets and country roads out there where this won’t be as pronounced. Check out the highlight reel from [Puzey]’s journey after the break.

Continue reading “Take A Bicycle Tour Anywhere In The World”

Cyclists Use Tiny Motors To Cheat

Blood doping is so last decade! The modern cyclist has a motor and power supply hidden inside the bike’s frame.

We were first tipped off to the subject in this article in the New York Times. A Belgian cyclocross rider, Femke Van den Driessche, was caught with a motor hidden in her bike.

While we don’t condone sports cheating, we think that hiding a motor inside a standard bike is pretty cool. But it’s even more fun to think of how to catch the cheats. The Italian and French press have fixated on the idea of using thermal cameras to detect the heat. (Skip to 7:50 in the franceTVsport clip.) We suspect it’s because their reporters recently bought Flir cameras and are trying to justify the expense.

The UCI, cycling’s regulatory body, doesn’t like thermal. They instead use magnetic pulses and listen for the characteristic ringing of a motor coil inside the frame. Other possibilities include X-ray and ultrasonic testing. What do you think? How would you detect a motor inside a bike frame or gearset?

Grinding A Bicycle Crank For Power Analysis

For [Mark] and [Brian]’s final project for [Bruce Land]’s ECE class at Cornell, they decided to replicate a commercial product. It’s a dashboard for a bicycle that displays distance, cadence, speed, and the power being generated by the cyclist. Computing distance, cadence and speed is pretty easy, but calculating power is another matter entirely.

The guys are using an ATMega1284 to drive an LCD, listen in on some Hall Effect sensors, and do a few calculations. That takes care of measuring everything except power. A quick search of relevant intellectual property gave then the idea of measuring torque at the pedal crank. For that, [Mark] and [Brian] are using a strain gauge on a pedal crank, carefully modified to be stiff enough to work, but flexible enough to measure.

A custom board was constructed for the pedal crank that measures a strain gauge and sends the measurements through a wireless connection to the rest of the bicycle dashboard. It works, and the measurements in the classroom show [Brian] is generating about 450 W when pedaling at 33 mph.

Video below.

Continue reading “Grinding A Bicycle Crank For Power Analysis”