DualSport Tracker – Sync Your Biking and Running Routes
by vicenzobit in Circuits > Gadgets
29 Views, 1 Favorites, 0 Comments
DualSport Tracker – Sync Your Biking and Running Routes
Hi! My name is Vicenzo, a 15-year-old teenager who enjoys art and sports, especially mountain biking and running. After a bike ride through the forests where I usually train, I asked myself: "How many kilometers have I covered, and how many calories have I burned?" I wanted to be more aware of my physical performance.
While searching for a solution, I came across several GPS apps that promised to track this information. However, in the areas where I train, the GPS signal is very weak or nonexistent, making these apps useless. That's when I decided that instead of relying on limited technology, I could design my own solution.
Thus, the DualSport Tracker was born. My goal was to create a device that could measure the distance traveled and calories burned on a bike ride without using GPS. But why stop there? I also added the ability to measure time and speed, and even included a heart rate sensor to monitor my health during exercise. Additionally, I wanted the device to be portable, easy to remove from the bike, and also usable as a pedometer while running. In short, my DualSport Tracker combines my two favorite sports into one multifunctional device. All of this is possible thanks to the power of the Unihiker board, which serves as the brain of the device.
How Does DualSport Tracker Work?
The first question you might have is: "If you don't use GPS, how do you measure distance, speed, and other factors?" The heart of the system is a Hall effect sensor, which, combined with a magnet attached to the bike wheel, detects every time the wheel completes a revolution. Since the perimeter of the wheel is constant, we can multiply the number of revolutions by the perimeter to calculate the total distance traveled.
The Hall effect sensor acts as a proximity detector. Every time the magnet passes near the sensor, it generates a signal, indicating that the wheel has completed a revolution. Using this information, the device calculates distance, speed, and calories burned. I also added a KY-039 heart rate sensor to provide a more complete picture of physical exertion by monitoring my heart rate during exercise.
In summary, the DualSport Tracker has the following features:
1.Distance measurement:
- Bicycle mode: Uses a Hall effect sensor and the wheel perimeter to calculate the distance traveled.
- Pedometer mode: Uses an accelerometer to count steps and calculate distance by multiplying steps by an average stride length
2.Speed calculation (bike only):
- Calculates speed in km/h by measuring the time between each turn of the wheel.
3. Heart Rate Monitor (Bicycle Only):
- Use the KY-039 sensor to measure beats per minute (BPM), providing data on physical effort.
4. Calculation of calories burned:
- Bicycle mode: Estimates calories based on the distance traveled and the heart rate.
- Pedometer Mode: Calculates calories burned based on the number of steps taken and an estimate of calories per step.
5.Versatility:
- The device can be removed from the bike and used as a pedometer, allowing it to be used for cycling, running or walking
without further ado let's get started building!
Supplies
- 3D printed parts (attached files)
- Unihiker board
- Hall effect sensor
- KY-039 heart rate sensor
- Cylindrical portable battery (Power bank)
- USB type A to USB type C cable
- M3 x 3 cm screw with nut
- Dupont cables
- Zip ties
- Electrical tape
Base Assembly
Once the 3D printed parts are ready, start by assembling the base, which includes the Unihiker board, the portable battery, and the USB cable. This step is crucial for both the pedometer and bike modes. You can follow the attached video for guidance during the assembly. This base securely connects to the bike or can be used directly as a pedometer.
Bike Assembly
For bike mode, install the sensors (Hall effect sensor and heart rate sensor), the magnet, and the mount for the Unihiker board. The Hall effect sensor is mounted on the bike fork, while the magnet is attached to one of the wheel spokes with zip ties. Make sure to secure the sensors and cables with electrical tape for added safety. Connect the Hall sensor to pin 22 and the heart rate sensor to pin 21 through the Unihiker's external ports.
Project Code
In this section, I'll explain how the code works so that you can understand the calculations behind the device. I have commented on each part of the code to make it easier to follow and modify if needed. Here's an overview of how sensor readings are handled in both modes.
Bike mode
The Hall effect sensor detects each time the wheel completes a revolution. With this information, we calculate speed by dividing the distance traveled by the time elapsed between revolutions. Based on the speed and distance, we estimate the calories burned during the activity. Pedometer mode: The accelerometer integrated into the board detects steps while running or walking. Based on an average stride length, we calculate the distance traveled. Calories burned are estimated based on the number of steps and an approximate calorie-per-step value.
Mathematical calculations used in the device:
Speed (km/h) = (Wheel perimeter / time per revolution) * 3.6
Calories burned (bike) = Distance traveled (km) * 40
Distance traveled (pedometer) = Number of steps * average stride length
The complete code is attached and available in both English and Spanish versions for download from GitHub. To load the code onto your device and add image files, I recommend using Mind+, the editor I used for this project.
Ready to Use Your DualSport Tracker!
🎉Congratulations! You have assembled your DualSport Tracker, and now it's ready to use. You can use it on your bike rides or during your running sessions. The main menu will allow you to easily switch between bike and pedometer modes, depending on the exercise you prefer.
The device will display key real-time information such as speed, distance traveled, calories burned, heart rate, and total exercise time. If you want to switch from bike mode to pedometer mode, simply disconnect the two sensors and detach the device from the bike (this is easy thanks to the simple design of the device). To mount it back on the bike, just reverse the process.
Using the Menu
Start Activity: Press button 'A' to start recording your activity.
End Activity: Press button 'B' to stop recording and display the total data of your exercise, including distance, max speed, calories burned, and time.
Switch Modes: Use the menu to toggle between bike and pedometer modes depending on the activity you're doing.
Conclusion and Potential of the DualSport Tracker
The DualSport Tracker has great potential for those who enjoy mountain biking, running, or simply want to monitor their physical activity without relying on GPS or internet connections. The flexibility of the device, which allows it to be used both while cycling and running, and the ability to customize its parameters according to the user's needs, make it a practical and versatile tool, ideal for both athletes and makers.
This project combines technology, creativity, and a passion for sports, providing an efficient solution for measuring distances, speeds, calories burned, and heart rate. It's perfect for those who train in areas without GPS coverage or are looking for a portable and easy-to-use tool to improve their performance.
I encourage you to experiment with the DualSport Tracker, adjust it to your needs, and explore new features. If you have any questions or ideas for your own version of the device, I would be happy to help.
Without further ado, see you next time! 👋