Arduino Bicycle Speedometer Using GPS

by RonFrtek in Circuits > Arduino

4698 Views, 8 Favorites, 0 Comments

Arduino Bicycle Speedometer Using GPS

[Almost crashed] Arduino SPEEDOMETER without any wheel sensor!
20191017_134746.jpg
20191017_135940.jpg
20191017_135448.jpg
DSCN8231.JPG
20191017_135347.jpg

In this tutorial we will use Arduino and Visuino to display a current Bicycle Speed from GPS on ST7735 display.

Watch a demonstration video.

What You Will Need

arduino-uno.jpg
gps.jpg
11026-Jumper_Wires_Standard_7in._M_M_-_30_AWG__30_Pack_-01.jpg
breadboard.jpg
Visuino Logo PNG.png
plastic-small-container-500x500.jpg
MY19-Escape-2_Color-A.jpg
FB5QPHVK1MOHCZR.LARGE (1).jpg
  1. Arduino UNO (Or any other Arduino)
  2. LCD Display TFT 7735
  3. GPS Neo M6 V2 module
  4. Jumper wires
  5. Breadboard
  6. Visuino program: Download Visuino
  7. Battery to power Arduino (In my case I was just using a powerbank)
  8. Some box to put it all in.
  9. A Bike to test it out

The Circuit

FB5QPHVK1MOHCZR.LARGE (1).jpg
neonway-300x300.jpg
F1FYQVOK1MOHCZT.LARGE.jpg
FB5QPHVK1MOHCZR.LARGE.jpg

LCD TFT ST7735

Connect:

1.8 TFT Display PIN [LED] to Arduino PIN [3.3 V]

1.8 TFT Display PIN [SCK] to Arduino PIN [13]

1.8 TFT Display PIN [SDA] to Arduino PIN [11]

1.8 TFT Display PIN [A0 or DC] to Arduino PIN [9]

1.8 TFT Display PIN [RESET] to Arduino PIN [8]

1.8 TFT Display PIN [CS] to Arduino PIN [10]

1.8 TFT Display PIN [GND] to Arduino PIN [GND]

1.8 TFT Display PIN [VCC] to Arduino PIN [5V]

NOTE: Some Arduino boards have different SPI pins so make sure you check your board documentation.

GPS neo 6m:

CONNECT gps neo 6m PIN [TXD] to Arduino PIN [RX]

Start Visuino, and Select the Arduino UNO Board Type

F9V4VH7K1FCIC79.LARGE.jpg
F92BMOZK1FCIC78.LARGE.jpg

o start programming the Arduino, you will need to have the Arduino IDE installed from here: https://www.arduino.cc/.

Please be aware that there are some critical bugs in Arduino IDE 1.6.6. Make sure that you install 1.6.7 or higher, otherwise this Instructable will not work! If you have not done follow the steps in this Instructable to setup the Arduino IDE to program Arduino UNO! The Visuino: https://www.visuino.eu also needs to be installed. Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "Arduino UNO" as shown on Picture 2

In Visuino Add Components

2019-10-26_17-28-06.jpg
2019-10-26_17-27-42.jpg
2019-10-26_17-27-27.jpg

  • Add "Serial GPS" component
  • Add "TFT Color Display ST7735" component

In Visuino Set Components

2019-10-26_17-29-15.jpg
2019-10-26_17-29-42.jpg
2019-10-26_17-29-32.jpg
  • Select "Display1" component and set "Type" to "dtST7735R_BlackTab"
    NOTE: Some Displays have diferent properties so experiment by selecting diferent types to find the one that works best, in my case I choose "dtST7735R_BlackTab"

  • Double click on "Display1" component and in "Elements" dialog drag 2x "Text Field" to the left side

Select "Text Field1" (on the left side) and under "Properties" window set:

  • Size:3
  • Initial Value:SPEED
  • width:6
  • X:10
  • Y:10

Select "Text Field2" (on the left side) and under "Properties" window set:

  • Size:5
  • width:6
  • X:5
  • Y:80

In Visuino Connect Components

bike-gps.png

  • Connect "GPS1" component pin[Out] to Arduino pin In [Serial 0]
  • Connect "GPS1" component pin[Speed] to "Display1" component Text Field2 pin [In]
  • Connect "Display1" component pin [Out] to Arduino pin SPI [In]
  • Connect "Display1" component pin [Chip Select] to Arduino Digital pin[10]
  • Connect "Display1" component pin [Reset] to Arduino Digital pin[8]
  • Connect "Display1" component pin [Register Select] to Arduino Digital pin[9]

Generate, Compile, and Upload the Arduino Code

FAAEWOFJOWSMLZS.LARGE.jpg
FDQU641JLMKOKCS.LARGE.jpg
  • In Visuino, Press F9 or click on the button shown on Picture 1 to generate the Arduino code, and open the Arduino IDE
  • In the Arduino IDE, click on the Upload button, to compile and upload the code (Picture 2)

Note: Make sure when you are uploading the code to Arduino to Disconnect Arduino pin[RX]

Mount and Play

Put the Arduino and the GPS module to some plastic box, power it with a battery, mount it on the bicycle, make sure that the GPS antena is visible and turned to the sky.


If you power the Arduino UNO module, the Display will start to show a current speed of the bicycle.

Congratulations! You have completed your Speedometer project with Visuino. Also attached is the Visuino project, that I created for this Instructable. You can download and open it in Visuino: https://www.visuino.eu

There is a lot of possible updates for this project like adding distance, average speed,etc Use your imagination and creativity!