Mountain Biking Electronics Wearable: Maintenance Reminders, Hours Ridden.
by chazgolin in Circuits > Arduino
253 Views, 1 Favorites, 0 Comments
Mountain Biking Electronics Wearable: Maintenance Reminders, Hours Ridden.
Modern mountain bikes have a number of important maintenance needs that must be satisfied for the bike to ride at its designed performance. Suspension needs to be rebuilt, pivots need lubrication, and hydraulic brakes need bleeds, among many other services. Each service roughly corresponds to a period of riding hours. For example: basic maintenance should be performed after every 2-3 hours of riding, and suspension should be serviced after 50 hours of riding. It can be difficult to keep track of hours ridden, the unique schedules for each maintenance service, and when the last service was performed.
The plan for this project is to hack an existing mountain biking hip pack and embed an attractive electronics system that will track riding hours and provide visual reminders to the rider when maintenance services are due, while allowing the pack to serve its original storage functions. The visual reminders will be laser-cut acrylic symbols backlit by Arduino-controlled LEDs. Aesthetically, the hip pack will mimic a car dashboard's system of warning lights (check engine, low oil, etc.).
When the user puts on the hip pack before a ride, they'll flip a switch to turn on the wearable. During the ride, the electronics will track riding time, and illuminate any maintenance reminders that are reached. After the user finishes riding, they'll remove the hip pack, take note of any illuminated reminders, and turn off the wearable. When maintenance has been completed and the wearable is turned on for another ride, the user will use another switch to reset the illuminated reminders.
tl;dr
Problem: Mountain bike maintenance schedules can be difficult to keep track of.
Project: Mountain bike hip pack that tracks riding hours and provides visual maintenance reminders.
Service images from: https://enduro-mtb.com/en/mtb-service-bike-maintenance/
Supplies
CIRCUIT PROTOTYPING
- Arduino Uno
- Breadboard
- Jumper Wires
WEARABLE
- Conductive Thread
- Sewing Needles
- Lilypad Arduino USB
- LiPO Rechargeable Battery
- Mountain Biking Hip Pack
- Slide Switches
- Resistors
- LEDs
- Black Acrylic Sheet
- Translucent Acrylic Sheet
Code and Circuit
CODE PLANNING
The main challenge with the code is storing the total hours ridden, and tracking hours for each maintenance variable. The system needs to be able to remember the variable values after power turns off and back on again. Normally, all variable data would be erased as soon as the power is turned off.
For this prototyping stage, I'm using the Arduino Uno. I'll transition the code later to the Lilypad Arduino USB.
EEPROM
It should be possible to carefully store a variable by using the 1kb of EEPROM permanent storage on the Lilypad Arduino's ATmega32u4 chip. This website helped me understand EEPROM usage, which I haven't worked with before: https://randomnerdtutorials.com/arduino-eeprom-explained-remember-last-led-state/
Basically, the permanent storage can only handle a finite number of write cycles (~100,000), so we need to be strategic with our coding. I plan on only writing to EEPROM about every 30 minutes, which should give plenty of time to work with. 30 * 100,000 / 60 = 50,000 hours of program runtime before we run out of EEPROM.
See attached for code using EEPROM to store an integer value for total number of quarter hours that the program has run.
MAIN CODE
There are 6 LEDs and 3 switches. The 3 green LEDs illuminate progressively as the program reaches 0-33 hours of runtime, 34-66 hours, and 67-100 hours. After 100 hours, the LEDs reset. The maintenance LEDs illuminate when a specific time period is reached. For example, Warning #1 illuminates at 15 hours, to indicate brake pads should be checked. When the user flips Switch #1, Warning #1 will begin flashing, and its time variable will be reset. When Switch #1 is flipped back to its original position, the time variable will begin recording again.
See attached for full code.
Testing Acrylic
I tested this piece of translucent acrylic to see if my red LED would pass enough light through it. The cardboard placed on top is a rough example of a symbol. The cardboard will later be replaced with a piece of laser-cut black acrylic.
Digital Design and Laser Cutting
I used Adobe Illustrator to make a file for laser cutting the acrylic. The rectangular holes on the right sides are for the slide switches, and the corner holes are pilot holes for some small brass screws that will be used to connect the black acrylic to the translucent.
LEDs, Switches, and Conductive Thread
Each LED has its ground leg connected to the slide switch, with a conductive thread trailing off. The power leg of the LED is wrapped to a resistor, and then a conductive thread. Finally, conductive thread is connected to the opposite side of the slide switch, for the input pin connection. Hot glue insulates the components and adheres them to the acrylic.
So, the 3 conductive threads seen in the single-LED photos are:
- Upper left: slide switch INPUT_PULLUP connection
- Lower left: slide switch and LED to Ground connection
- Lower right: LED to power connection
Installing Leds
I cut holes into the bag, between the outer and inner lining fabrics. The translucent acrylic is placed inside, and the conductive threads are sewn into the lining fabric. The outer acrylic is fixed to the inner with #1x3/8" wood screws, through the 1/16" pilot holes with added CA glue for durability.
The conductive threads were sewn into the lining fabric and into the main pocket, where they were connected to the Lilypad Arduino USB.
Final
At this point, there are two failing connections out of the total 10: Switch #2 and LED #3. These problems could be in the conductive thread connections or the hot-glued connections to the components.