Arduino Skateboard Speedometer

Skateboard Speedometer (1)

Using an Arduino, it is easy to make a speedometer/tachometer for virtually any man-powered vehicle. I made one for my skateboard that used a small magnet to count revolutions and utilized an LCD display screen.  This Instructable will show you how you can do the same step by step.Skateboard Speedometer (1)

You will need a few things before we get started.

1) A man-powered vehicle (I will be using a skateboard)
2) An Arduino
3) A plastic Arduino protective box (pictured)
4) A small magnet (mine is 1/4 inch in diameter and about 0.2 inches tall)
5) A magnetic relay switch
6) A 9V battery and an adapter that connects this battery to the Arduino plug (pictured above plugged into an Arduino)
7) A small LCD screen (16 x 2 character display)
8) 10K and 47 Ohm resistors
9) Wires
10) A soldering iron and solder
11) Gorilla glue, super glue, crazy glue, or some adhesive of the sort
12) 10K Potentiometer

Step 1: Putting the Magnet on the Wheel

The first thing I did was embed the small magnet in my rubber skateboard wheel. I drilled a small hole (1/4″ diameter to fit the magnet snugly) on the inside of one of my back wheels toward the edge of the wheel. I then dropped some gorilla glue in this hole and fit the magnet in it so about half of the magnet’s height was imbedded in the wheel and half was sticking out of the wheel. Later this magnet will allow the magnetic relay switch to count the wheel’s revolutions when the relay switch is near the spinning magnet.

Step 2: The Electronics

The next step is to get all the electronics functioning. The circuit diagram can be seen here. The red connections indicate attachment to the Arduino’s +5V pin and the green connections are to the Arduino’s ground pin.  You will want to solder (and probably also heat shrink) your connection points to ensure that the circuit doesn’t short itself out. This will also ensure that the connections (and thus speedometer) don’t fail while it is being used. You may want to wire everything up through a small piece of board separate from the Arduino. You can wire the pot, ground and +5V components to this board to minimize the connections into the actual Arduino pins. This will keep your electronics more organized and easier to work with. It is also important to consider where you will be mounting the LCD before you wire it all up. Depending on where you choose to mount your display, it may be necessary to take steps to ensure this connection is possible once the LCD is wired up. For example, since I mounted the LCD in my board and had the wiring go through a small hole I had to put the LCD in place and run the wiring through the hole to the LCD before I connected everything.

Step 3: The Arduino Code

With the electronics all wired up and secured, the next step is to code the Arduino. There are tons of codes out there for Arduino tachometers, so it shouldn’t be hard to find. The code I used for my speedometer/tachometer is attached.Schematic Skateboard Speedometer (1)

One thing to note is the line that says “Serial.print(rpm*0.0080622311).” This line will be different for everyone. This line of code calculates the speed in MPH from the RPM value the relay and Arduino read. To do this you take:

rpm*(circumference of your wheel in inches)*(60 min/hr)*(1/63,360 miles/inches)=speed in MPH

One you’ve calculated what this constant is that the RPM must be multiplied by to convert to MPH, you can just insert it in the code in place of the 0.0080622311 that is in there now.

Step 4: Protecting the Electronics

Next, you will want to put all your electronics in the plastic Arduino case. This case can easily fit the Aruino and the 9V as well as a fair amount of wiring. The inside of my protective box is pictured. Having the electronics in this box will not only keep the electronics together in one place, but will also make sure the electronics are protected as you travel. You might have to cut small holes in the side of the plastic box so that the wires that need to leave the box have a way out without being pinched by the top cover of the case. I also advise taping this box shut so that you don’t have to worry about it opening and spilling all the electronics while you’re riding.

Read more: Arduino Skateboard Speedometer

Leave a Comment

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