A bike computer sits on a wooden background. The back of the bike computer has a 3D printed attachment with two white translucent zip ties running through the back.

Repairing A Bike GPS With 3D Printing

We love hacks that keep gadgets out of the trash heap, and [Brieuc du Maugouër] has us covered with this 3D printable replacement mount he designed for his bike GPS.

One of the most frustrating ways a gadget can fail is when a small, but critical part of the device fails. [du Maugouër] combined a 3D printed back and four M2x6mm screws to make a robust new mount to replace the broken OEM mount on his handlebar-mounted GPS. Slots for zip tie mounting are included in case the replacement mount breaks before yet another replacement can be printed. Apparently [du Maugouër] agrees with Chief O’Brien that “in a crunch, I wouldn’t like to be caught without a second backup.” [Youtube]

It’s exciting that we’re finally in a time when 3D printed replacement parts are living up to their potential. This would be a lot easier if more manufacturers posted 3D printed design files instead of getting them pulled from 3D file platforms, but makers will find a way regardless of OEM approval.

We’ve covered a lot of bike hacks over the years including DIY Bike Computers and GPS Trackers. Do you have a project that keeps something from becoming trash or might save the world another way? There’s still time to enter the Save the World Wildcard round of the Hackaday Prize (closes October 16th).

An OpenBikeSensor

OpenBikeSensor Measures Close Calls

Cycling is fun, healthy, and good for the environment. But unfortunately it’s not always the safest of activities, as inconsiderate drivers can be a significant hazard to cyclists. Several countries, including Germany, France, and Belgium have introduced legislation mandating a minimum passing distance of at least 1.5 meters between cars and bikes. Enforcing such a rule is tricky however, and without accurate data on average passing distances it’s hard to know how many drivers are following it.

Enter OpenBikeSensor, an open-source hardware and community science project designed to gather exactly this information. Currently in its prototype phase, it aims to make a simple bike-mounted sensor that measures the lateral distance to any passing vehicles. The resulting data is collected online to generate maps highlighting danger zones, which can ultimately be used by city planners to improve cycling infrastructure.

The hardware is based around a set of ultrasonic sensors that measure the lateral distance to any large object. A GPS module keeps track of the bike’s location, while an ESP32 reads out the data and stores it onto an SD card. The user interface consists of a handlebar-mounted display that shows the system’s status. There’s also a button that the user needs to press any time they are passed by a vehicle: this will trigger a measurement and log the location. Once back home, the user can connect the OpenBikeSensor to their WiFi network and download their trip data.

The initial results look promising, and any project that gets people cycling and tinkering with electronics at the same time is worth looking into. It’s not the first time we’ve seen bike-mounted sensors either: people have designed their own sensors to measure air pollution in South America, or simply their own bike’s speed or tire pressure. Continue reading “OpenBikeSensor Measures Close Calls”

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”