Dusk and dawn are great times to go for a run. Trouble is, dim light and glare on the horizon make it hard for motorists to see. If you want to increase your visibility—and make nerdy joggers envious—build this lightweight speed belt. A vibration sensor detects your pace, which an Arduino microcontroller converts into miles per hour and displays on a matrix of bright LEDs.
1) Assemble the LED matrix kit according to the manufacturer’s instructions.
2) Stick the six breakaway right-angle headers into the Arduino’s programming interface pads. Solder them in place.
3) Connect the LED matrix kit to the Arduino with five three-inch-long wires, according to the schematic here, and solder in place.
4) Solder the piezo vibration sensor to pins A0 and A1 of the Arduino.
5) Measure the length of a typical jogging stride (either of these sites are great: Johnson Outdoors Gear LLC or Walking with Attitude). This will ensure the Arduino calculates and displays an accurate estimated speed on the LED matrix.
6) Link the Arduino to your computer’s USB port via the programmer, add your stride length to the sketch at the correct variable, and then upload the code to the Arduino.
7) Use the screw holes on the LED matrix kit as guides and mark the inside of the plastic box for drilling two 1/8-inch holes. Drill the two holes. Also, drill an entrance hole big enough for the battery holder’s red and black wires.
8) Thread the red and black battery holder’s wires through the entrance holes.
9) Connect the coin cell battery holder to the Arduino using solder (follow the schematic).
10) Stuff all of the electronics into the plastic box and slide the Arduino underneath the LED matrix kit, holding it in place with your fingers while inserting the two 4-40 screws through the LED matrix kit’s screw holes.
11) Slip the two 4-40 standoffs between the LED matrix kit and the inside of the plastic box first, then guide the two screws through the two 4-40 standoffs and secure with the two 4-40 nuts on the outside of the plastic box.
12) Turn on the battery holder and slip it into the running belt’s zippered pouch, secure the plastic box to the belt (using the Velcro cable ties), and get moving.
How it works:
As you run, the piezo vibration sensor flexes. During a 30-second interval, each flex is counted. These flexes are then multiplied by two. This calculation tells the Arduino how many steps you took in one minute.
Each vibration or step is equal to your stride length. Your personal stride length (measured in inches) must be individually calculated (see Step 5, above) and inserted into the Arduino sketch in the “strideLength” variable (we’ve clearly marked this variable inside the code).
Our sketch then multiplies the stride length by the number of steps or vibrations that the piezo vibration sensor recorded. This results in your speed measured as inches per minute. We now divide the measurement by 12 for arriving at a calculation of feet per minute.
Finally, we divide our feet per minute figure by 5,280 feet (the number of feet in a mile) and multiply by 60 (the number of minutes in an hour) for obtaining a value in miles per hour or mph. This value is then displayed on our speed belt LED matrix kit.
Our calculations look like this:
•((# strides x 2) x stride length)/12 = feet/minute
•Convert to mph>
•(x feet/minute / 5280 feet) x 60 = speed mph
Now that you have an mph output on the speed belt, you should verify the speed being displayed. The easiest way to evaluate your speed belt output is by running on a treadmill that is equipped with an mph display. Compare the treadmill display with the speed belt display during a 30-minute testing period. Tweak your stride length value higher or lower depending upon the result of your testing.
•If the speed belt is too fast, then shorten your stride length.
•If the speed belt is too slow, lengthen your stride.
The two coin cell batteries powering the speed belt have a life expectancy of about three hours of operation. You should replace both cells when the LED matrix kit display begins to dim.
Now get out there and run safe.
Time: 3 hours
Cost: Less than $30
Download an Arduino sketch for the Speed Belt here (Note: Save the file with a .ino extension—not a .txt extension.)
WARNING: This project may make runners more visible, but it won’t eliminate distracted drivers. Please be aware of your surroundings.
This article originally appeared in the March 2014 issue of Popular Science.