The Bike History
This is a collection of my notes and writings relating to my exercise bike project that I developed between August 2010 and January 2011.
This project stemmed from a number of factors. First, I live in Alaska, whose weather makes for pretty severe limitations on the biking season. I had biked to work for most of the summer, but come mid-July we experienced a period of an unseasonably rainy 2 months, effectively killing my routine. As I settled back into my winter routine with the indoor exercise bike, I started noticing that I'd stop biking and just sit and watch whatever was on the TV. This was less than ideal if I was really wanting to exercise.
So I devised a system to provide incentive to keep a steady pace.
See here for my first mention of the project.
What I wanted to do was find a way to hook up my exercise bike to my computer, and have the computer pay enough attention such that it would only play video normally if it found that I was biking a reasonable amount. When I wasn’t biking a reasonable amount, then it would be able to alter playback such that it was frustrating enough for me to bike more.
When doing my research, I poked around and found this guy, who had pretty much put together my basic idea on how to measure revolutions from a stationary bike wheel. Working from his design and code, I began working to improve upon and add the driving piece that would control video playback over the course of a workout.
My initial design:
-
August 28th: Putting the breadboard on the "forks" of the bike, improved water-resistant bike-mounted box, discovered an insect problem.
-
August 31st: LED signal, "pause mode" to pause both the exercise and the video if you hold the magnet over the sensor for more than 5 seconds.
Modified microcontroller code to check the length of time that has passed since it saw the magnet, but before it saw the magnet disappear. If this time is greater than 5 seconds [...] the controller will issue a "pause" signal. This lets me, if I want to spend time getting the magnet in the exact right position, pause both the video and the program if I need to stop, or, if I want to alternate to another exercise without losing my place in the video / desired revolutions.
-
September 9th: Successfully tested an "over the network" configuration.
-
October 3rd: Humility, magnet repositioning, and "no read" periods to improve RPM measurement.
After some careful rewiring, poring over some documentation, and some recreational coding, I found that due to the position of the magnet on my wheel, I was actually receiving not one but up to four signals for every single pass by the sensor.
-
October 20th: Logging mechanism.
-
December 31st: Reprogrammed Arduino controller to use interrupts, added another sensor for more accurate RPM measurement and "other exercise" mode.
In the meantime, what I'd like to do is set up the bike to be able to both a) pause the exercise entirely including the video ("phone call" mode), and b) pause the exercise, but keep the video going ("other exercise" mode).
-
January 4th: Begrudgingly ported to Windows.
I'm... I'm angry and frustrated. I want to be angry at something. At someone. At people who use Windows to get anything done.
-
January 15th: Reality check with existing patents.
Googling around initially I knew that some companies had done things to provide metrics on bicycles. I didn't think people had already patented things so absolutely specific to what I'm trying to do here.
-
January 17th: "Come to Jesus" moment.
Three times I've been able to rebuild and/or replicate my setup in the span of about two hours. It works on Linux, Mac OS X, and Windows (mostly). While it's not the most user friendly, it's educational, and pretty cheap to implement (compared to gym memberships, new and expensive intelligent exercise equipment, or a personal trainer). Most homes in the U.S. (or every house I've been into in the last 5+ years) have larger LCD screens to view things, some have spare/old computers that can play movies, and have equipment that, if you can glue something to it, it will most likely apply pretty well to the exercise.
There may be some philosophical problems with the idea, though, which may speak to why I've only had a few people show interest in the project (either on idkfa, or elsewhere).
Final design:
When the LEDs are working: