Android speedo on bike using Arduino and Bluetooth.

Android Display for Arduino Speedometer Using Bluetooth

If you haven’t done so already, please review the Android and Arduino Coding Fun page before continuing.

With this project the reader can use an Android device to display the speed and distance travelled by a small vehicle, such as bicycle, go kart or scooter. It features a speed limit setting that can be used to activate a beeper if the speed limit is exceeded. The speedometer logic is all in the Arduino, and the Android app is used for display and configuration.

For the speedometer you will need the following items, in addition to the core items:

  • a reed switch,
  • a magnet

Note, the Arduino digital pin 5 and GND are connected to the reed switch for measuring wheel rotations.

The source code is available for download as follows:

The video below demonstrates how to configure and use the speedometer Android app.

Don’t forget to like, share or comment!

Share on LinkedInShare on Google+Tweet about this on TwitterShare on Facebook

15 thoughts on “Android Display for Arduino Speedometer Using Bluetooth

  1. Charles Harris

    Hi
    I am retired with interest in model railways. I would love to use the speedometer with BT . Just learning Arduino.
    With model railways not much room. What sensor to find number of revolutions of the axle made, and using distance travelled on track per rev, calculate speed and show on Android. yuo
    Could your speedometer be used for above project ?
    Thanks
    Charles

    Reply
    1. Kashif Baig Post author

      Hi Charles. It might be possible to use an optical sensor and a wheel encoder on the motor itself to calculate speed/distance. The Arduino code for reading the sensor and calculating the speed/distance would need some modification, but rest of the code you could use as is. You may also be able to get the code to work on a scaled down Arduino, e.g. Adafruit Pro Trinket. Hope that helps.

      Reply
  2. Charles Harris

    Thanks Kashif. I will give it a try.

    Is there a Fritzing or similar drawing of the Arduino and the Bluetooth module connections etc.

    Thanks

    Charles

    Reply
  3. kenneth sørensen

    Hello
    I think your project looks very exciting.
    Will it be possible to use a bluetooth bike sensor (BLE) instead of the Arduino?

    Thanks Kenneth

    Reply
    1. Kashif Baig Post author

      Hi Daniel

      This project focuses mainly on the software side of things. The actual magnet and reed switch are from a bicycle speedometer product which broke, and so were used here. One connection of the reed switch is connected to GND, the other to Arduino pin 5.

      Reply
  4. Audrey

    Hi, does the arduino board require a power source to function? If yes, what did you use and would powering it from 3V batteries be enough? Sorry for the basic question but I’m a newbie with Arduino and am using this project to implement in my Final year project. Thanks you in advance

    Reply
    1. Kashif Baig Post author

      Yes, the Arduino does require its own power source. The actual power requirements will depend of which variant you use – there are some variants that can run off 3.3v, which makes the usage of LIPO batteries feasible.

      Reply
      1. Audrey

        Hello again and thanks for the reply, I was wondering if I could use the Arduino source code provided and not use the Andriod studio as I intend to use the project with a reed switch and magnet for a speedometer (just like the project) but to display it on an LCD Display instead of a phone. Would I have to do any changes within the code to do as such?

        Reply
  5. Faqih

    Hi sir, i wanna know how are you can get the currentspeed ? because i was comparing with the real speedometer of my motorcycle it is different results, i was input the diameter of wheel as your suggestion in CM, but still got different result, example : 27KM/h in my app but in the real speedometer 35KM/h.
    thanks in advance

    Reply
    1. Kashif Baig Post author

      Hi. Have you tried comparing against another speedo reading from another vehicle, or perhaps another type of speedometer? The Arduino speedometer wont be perfect, but are you sure your motorcycle speedo is calibrated?

      Reply
      1. Faqih

        oh thanks for your suggestion, i will comparing with another speedometer of the any motorcycle sir. the last question from me sir, if we have the wheeldiameter on inch what should we do ? converting in cm ? then we put in the wheel diameter example 14inch after converted 35,6cm ?

        Reply
        1. Kashif Baig Post author

          Yes, inches need to be converted to cm first. Just one other point to note which could be affecting your speed reading: this particular arduino code uses polling for reading the sensor, which means that if a (small) wheel rotates very quickly, you may not get a reliable reading. In which case you will need to change to interrupt based code. You will also need to have a debounce circuit in that case.

          Reply
  6. Nech

    Hi Kasif, I am so interested with your project.
    But I still confused with the reed switch.

    Could you show how is the diagram schematics ? Since I was a newbie in Arduino and micro controller, I slightly did not understand about your explain above.

    Thank you so much

    Reply

Leave a Reply

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