Bicycle odometer and speedometer showing distance traveled, average and current speed (in km/hr), time and can store up to 99 laps.

This is an odometer and speedometer for bicycles which keeps track of distance traveled (in km), time traveled in hours, minutes and seconds, average speed (in km/hr) and maximum speed attained during any one minute period (in km/hr). It can keep track of a maximum 99 laps/cycling periods. It can be built with parts from the Arduino Starter Kit, with the exception of a Hall sensor and enclosure box which need to be purchased separately.

I cycle quite a bit to stay in shape and want to know how far I cycle, average and current speed, etc. I can not justify buying a device that does this (with probably many features I don’t need!) so I decided to build this myself. I did not look to see if someone else created something similar as I wanted to challenge myself and stretch my newly acquired Arduino skills!

When the Arduino is initially powered on or reset, a “PRESS BUTTON TO START” message will appear on the 16 x 2 LCD screen.

Pressing either the Pause/Resume or Display Mode button will start the 1st lap/period. A “CYCLE SAFELY!” message will initially appear for a 2 second period during which recording is already ongoing (so wheel revolutions are already being counted). The display will then show the kilometers traveled, km/hr for last minute (to the right of the “1” on 1st line), elapsed time in hours, minutes and seconds (start of 2nd line) and average km/hr for lap/period (to the right of “A” on 2nd line). This is updated in real-time. Km/hr for last minute shown next to “1” will show a zero during first minute as it calculates this at the end of the first minute and every minute thereafter.

A “+” will appear in upper-left-hand corner of the display for 250 milliseconds when a wheel revolution has been sensed.

Pressing the Display Mode button will change the “A” on 2nd line to an “M” indicating maximum km/hr traveled during any one minute period. A zero will always appear for 1st minute as this is updated at the end of the first minute and every minute thereafter.

Pressing the Pause/Resume button will stop recording and save the current lap data into memory. The message “PAUSED!” will appear for 2 seconds and then the totals for the lap just finished will appear with the lap number shown in the upper-left-hand corner of the display, followed by “Avg” showing average km/hr for entire lap duration, “Max” for maximum km/hr traveled. On the second line the distance in kilometers is shown followed by duration of lap in hours, minutes and seconds.

Pressing the Display Mode button when in pause mode will cycle through the different laps recorded. The first press will show the grand totals for all laps (with a “T” shown in upper-left-hand corner of the display), while subsequent presses will take you sequentially through lap 1, 2, 3, etc. depending on how many laps you recorded.

Pressing the Pause/Resume button again will put the device back into recording mode, recording a new lap. A “CYCLE SAFELY!” message will appear for 2 seconds first and then the real-time lap information explained previously will appear. If the Pause/Resume button is pressed again while the “CYCLE SAFELY!” message appears (so during initial 2 seconds of new lap), no lap data will be recorded and the device will be put back into pause mode showing the data for the last lap traveled.

Only data for 99 laps/periods can be recorded. Once the 99th lap is recorded, any additional laps will be recorded into the slot for the 99th lap thus overriding the previous data stored. However, grand totals will still get properly updated reflecting duration, distance, etc. for all laps, including those overridden in 99th slot.

The below video is a demo showing all of this functionality.

The software has been tested and debugged quite thoroughly in its current state. Hardware is work in progress still as I have yet to receive the Arduino Nano, Hall sensor, enclosure and mountable push buttons I have ordered.

Thanks for taking an interest in my project. All feedback is appreciated. Have a great day!”