How to make your own bike speedometer with Arduino

Make your own speedometer
Make your own speedometer

Today, in the 21st century, virtually every vehicle comes with its own speedometer and odometer. This is true for 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 are doing using the GPS of the mobile device. But what is the problem with these applications? They run on a device that is not always the cheapest. As in almost everything, a solution to the problem could be to ‘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 for my phone than for myself. Now I go with a Garmin, but any device of this brand has a price of hundreds of euros, something that many users can not or want to spend. If we know what we are doing, sometimes the best option is for us to assemble our own hardware and in this article we will show you how to ‘build from scratch’ our own odometer.

Speedometer and odometer for bicycles

Requirements

To mount our speedometer we’ll need:

  • Arduino UNO & Genuine 1 ().
  • 1 Adafruit RGB Blacklight LCD – 16×2 ().
  • 2 SparkFun Pushbutton Switches 12mm .
  • 1 Resistance of 221 ohm (buy).
  • 3 10k ohm resistances (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, nowadays almost any phone in the market has a GPS and has available some application like ‘Strong’, ‘Runtastic’ or ‘Strava’. Personally, I would not recommend this tutorial to anyone who already has a smartphone, unless you want to get a speedometer by yourself. Well, that and making sure you don’t break your phone in a crash.

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

What are we going to make

What we’re going to make is a bike odometer and speedometer that will tell us:

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

How to use this speedometer with all functions

Speedometer circuits
Speedometer circuits

Once we have finished making our bike speedometer we can start it up. The first time we start it up or reset it, 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/turn.

Next we’ll see a message that says “CYCLE SAFELY!” for 2 seconds, but in that time interval it’s already recording. When the message disappears we will be able to see the kilometers traveled, the speed next to the “S” (from “Speed”), the time already consumed in the second line and the average next to the “A” (from “Average”).

All the information is displayed in ‘real-time’. This is relatively important if we take into account that the mobile applications I mentioned before calculate the distance with the GPS, so it is not shown in real time. The difference is that, if we don’t have a sensor on the wheel, in mobiles we can see that the speed jumps, while in this device we will see that the values change gradually like in a car. The sensors mentioned have to be bluetooth and compatible with the mobile device. And buying them separately is usually not very economical.
<It shows information in its 4 corners

The “+” symbol will appear at the top left for 250ms when a wheel revolution is detected. Pressing the Display Mode button will change the “A” in the second line to “M”, which will show the maximum speed we have achieved so far in that lap/period.

Pressing the ‘Strong>Pause/Resume’ button will stop recording and save the current lap in memory. The message “PAUSE!” will then appear for 2 seconds and the results of the lap just completed will appear with the lap number in the top left of the display, followed by “Avg” showing the average speed for the whole lap and “Max” for the maximum speed of the lap. On 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

Speedometer electronics diagram
Speedometer electronics diagram (Click to enlarge).

If we press the Display Mode button while it is paused it will switch between the different recorded laps. The first time we press it will show the best lap of all with a “T” in the top 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 re-record, but a new lap, showing again the message that asks us to drive 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 the pause mode showing the data of the last lap we have done.

This speedometer can record 99 laps. If we reach lap number 100, the remaining data will be saved on top of lap 99. What won’t change is that the records made during our activity will be kept even if the data of lap 99 has been deleted. That is, if we set our record on lap 99 and do a lap number 100, only the average speed and distance data from lap 99 will be deleted, but the maximum speed will be maintained.

In the following video you can see how this bike speedometer works. The software code can be downloaded by clicking on THIS LINK and the scheme can be downloaded by right clicking and saving the image from your browser.

More information.

Leave a Comment

*

*