IDEA: A simple bike odograph based on external IMU hardware

I found a cool application in GitHub for an air mouse that requires external hardware support (hardware designed by the author and is small and delicate), the link is here FlippAirMouse (

I just suddenly had a new idea (based on the hardware developed by the author) to develop a simple bicycle odograph for flipper, but I don’t know much about electrical engineering, so I can’t give a more detailed design.

I don’t know if this idea is feasible and if it’s a good one, so let’s discuss it!

I have started to learn about hardware, but it still takes a long time

The author is using a BMI160 as an IMU chip. It is assumed that without the help of GPS hardware, the acceleration time integration can get the velocity change value, the velocity time integration gets the distance through the acceleration and other information provided by the IMU. Just make sure the velocity is 0 when start recording, then we can get a current velocity by the acceleration time integration, and that solves the problem of getting the velocity and distance of the odograph.
But as time goes on the error in this is definitely getting bigger and bigger. :smiling_face_with_tear:

1 Like

I have a different implementation idea that I’ve seen used on treadmill tracker add-ons. They use IR to read a reflective line. In this case the line would go on the tire instead of a treadmill belt. The User would need to calibrate it. It couldn’t track path without a GPS though. The upside is the same app and hardware could be used to track both bicycle and treadmill exercise. Each one would require different calibration. The app could even switch between treadmill and bicycle mode using RFID tags to identify the device if someone wanted to log both.

Side note: They make GPS modules that would probably work with the Flipper through GPIO.

just take a reed switch and attach it to the bike fork and a neodymium magnet to the spoke.
Connect the reed switch to the 5V pin and use one pin as input for the signal.
Maybe a small resistor would not be wrong to not short circuit the 5V every time.
The bouncing of the reed switch could still prove to be problematic.
Either you try to counteract it with a small software delay or with a capacitor between input pin and ground.

Rather then a reed switch use a coil so you don’t have to deal with debounce. You can buy the coil used in treadmills. Treadmills operate almost exactly how you describe. Then I might use an opto-isolator to protect the Flipper from over voltage or spikes.