How to make your own bike speedometer with Arduino

Make your own speedometer

Make your own speedometer

Today, in the XNUMXst century, practically any vehicle comes with its own speedometer and odometer. So it is in cars, motorcycles, some e-Bikes, etc. In addition, there are also many applications in the different App Stores that will allow us to know how fast we are going and how many kilometers we do using the GPS of the mobile device. But what is the problem with these applications? Running on a device that is not always the cheapest. As in almost everything, a solution to the problem could be create our own speedometer.

Everyone knows what an iPhone costs. Personally, I have one and for months I was afraid of falling off my bike, more because of my phone than myself. Now I go with a Garmin, but any device of this brand has a price of hundreds of euros, something that many users cannot or want to spend. If we know what we do, sometimes the best option is for us to assemble our own hardware and in this article we will show you how build from scratch our own odometer.

Speedometer and odometer for bicycles


To mount our speedometer we will need:

  • Arduino UNO & Genuine 1 (No products found.).
  • 1 Adafruit RGB Blacklight LCD - 16 × 2 (buy).
  • 2 SparkFun 12mm Pushbutton Switches buy.
  • 1 221 ohm resistor (buy).
  • 3 10k ohm resistors (buy).
  • 1 10k ohm single turn potentiometer (buy).
  • 1 Hall effect sensor (buy).
  • Hands, time and patience.

Who is this tutorial for?

As we have mentioned before, today practically any phone on the market has a GPS and has an application available such as Runtastic or Strava. Personally, I would not recommend this tutorial to anyone who already owns a smartphone, unless you want to create a speedometer yourself. Well, that and making sure you don't break your phone in an accident.

It can also be aimed at those who already have the Arduino Starter Kit for another reason and do not want to fork out what a basic cycle computer. This speedometer will have a total price of just over € 30, so the target of this tutorial has to be in people who do not want to spend a lot of money and want to have a kilometer account created with their own hands.

What are we going to manufacture

What we are going to manufacture is an odometer and speedometer for bikes that will tell us:

  • Distance traveled in kilometers.
  • Activity time in hours, minutes and seconds.
  • Average speed in km / h.
  • Maximum speed achieved.
  • Ability to record up to 99 laps.

How to use this full-featured speedometer

Speedometer circuits

Speedometer circuits

Once we have finished manufacturing our speedometer for bikes we can turn it on. The first time we start it or we do a reset A message with the text “PRESS BUTTON TO START” will appear on the 16 × 2 LCD screen. Pressing one of the Pause / Resume or Display Mode buttons will start the first period / lap.

The next thing we will see is a message that says "CYCLE SAFELY!" (circulate carefully) for 2 seconds, but in that time interval it is already recording. When the message disappears we will be able to see the kilometers traveled, the speed next to the "S" (for "Speed"), the time already consumed in the second line and the average next to the "A" (for "Average") .

All information is displayed in real time. This is relatively important considering that the mobile applications I mentioned above calculate the distance with the GPS, so it is not displayed in real time. The difference is that, if we do not have a sensor on the wheel, in mobile phones we can see that the speed jumps, while in this device we will see that the values ​​change gradually as in a car. The mentioned sensors must be bluetooth and compatible with the mobile device. And buying them separately is usually not very cheap.

Displays information in its 4 corners

The "+" symbol will appear in the upper left for 250ms when it detects one revolution of the wheel. Pressing the Display Mode button will change the «A» of the second line to «M», which will show us the maximum speed that we have achieved so far in that lap / period.

By pressing the button Pause / Resume will stop recording and will save the current lap to memory. The message "PAUSE!" Will then appear. for 2 seconds and the results of the lap we just finished will appear with the lap number in the upper left of the screen, followed by "Avg" showing the average speed of the entire lap and "Max" for the maximum speed of the tour. In the second line we will see the distance in kilometers followed by the lap in hours, minutes and seconds.

Capable of saving up to 99 laps

Electronic diagram of the Speedometer

Electronic diagram of the Speedometer (Click to enlarge).

If we press the Display Mode button while it is paused it will go switching between the different recorded laps. The first time we press it, it will show us the best lap of all with a "T" in the upper left, while the other presses will take us to lap 1, 2, 3, etc, depending on how many laps we have recorded.

If we press the Pause button again, it will record again, but a new lap, again showing the message that asks us to circulate carefully. If we press the Pause button again while we see the message "CYCLE SAFELY!" no lap will be recorded and the device will return to pause mode showing the data of the last lap we have made.

This speedometer can record 99 laps. If we get to lap 100, the remaining data will be saved on top of lap 99. What will not change is that the records achieved during our activity will be maintained even if the data from lap 99 has been erased. In other words, if on lap 99 we achieve our record and do a 100th lap, only the average speed and distance data for lap 99 will be erased, but the maximum speed will remain.

In the following video you can see how this speedometer for bikes works. The software code You can download it by clicking on THIS LINK and you can download the scheme by right clicking and saving the image from your browser.

More information.

The content of the article adheres to our principles of editorial ethics. To report an error click here!.

3 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *



  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Javier Iriarte said

    Does anyone know a way to connect an arduino via USB or Bluetooth something like a clone of a speed and cadence sensor for the Zwift cycling simulator…. ???

  2.   daniel said

    hello from the pandemic and its subsequent quarantine my mtb was forced to convert the cousin into a stationary bike with a roller
    The first problem was how to keep a rhythm, what I came up with is you pass the sensor to the rear wheel when I disassemble the sensor it stopped working I started to test with everything I had at home inductive optical hall effect sensors and nothing then I discover a small sensor that is used in home alarms door and window sensors that is nothing other than a small tube with a metal inside that when a magnet passes by leads with that solve the HAORA speedometer the idea is with my arduino to do something more complete and assemble A team that gives me pedaling cadence, speed and work time, so there we go

  3.   Tomas said

    Could you pass the link / email the code for this program?