Close
0%
0%

Bicycle GPS

Turn your bike into a smart bike

Similar projects worth following
It is a simple GPS for bike, the user connects his smartphone to the GPS by Bluetooth and starts his GPS application. He chooses his destination on the application. Then the GPS shows him his way by using the LEDs. For example, if the user has to turn right, the right side of the LED ring lights up. If he has to turn left, it is the left side and if he has arrived all the LEDs light up in green.

Operation is simple, the user connects the phone to the GPS with Bluetooth. It connects to the GPS map. He writes his destination on the GPS OsmAnd application. Then the GPS shows him his way through the LEDs.

Here below are the GPS indications:

In this project, we will use a GPS application available on Android or IPhone, OsmAnd, a mapping application and navigation with access to free data OpenStreetMap. This application is available offline, that is to say that one can use this application without using the cellular data (3G or 4G).

We use an Arduino micro type microcontroller as it is quite simple to use and is inexpensive. It is connected with a Bluetooth headset.

This headset is the link between the Arduino board and telephone. To indicate the direction to the user, we use a ring of 24 LEDs connected to the Arduino board. These are Neopixel LEDs, they are the most efficient LEDs. We can control the color and light intensity of the LEDs.

To transmit information from the GPS map application OsmAnd and Arduino we used the audio signal. In fact, the GPS information data are send with an audio signal. This requires that the Arduino board recognizes the signal and transmit the information to LEDs to indicate the direction to the rider. There are several possible ways to analyze the audio signals. We can use the signal frequency to transmit information. For example, to turn left it is enough to send a signal with a frequency of 440 Hz and a frequency of 800Hz to turn right. We can also use the intensity of the signal or the amplitude. But we have chosen to use the signal frequency. This is the most reliable and most effective way we've found. From there we set frequencies for each direction of GPS. We modified the pack of voice present in the OsmAnd application. We replaced these sounds with our frequencies. With the Audacity software, we have created continuous frequency sounds. For example, instead of saying "turn right" the GPS will send a sound frequency 50Hz. The signal will be analyzed by the Arduino board and turn on the LEDs on the right (see Figure 2.b).

The signal sent by the phone arrives in the Bluetooth headset, the output of this headset, the sound signal is amplified. Without amplification, the Arduino board receive a signal between -0.8V and 0.8V. This signal is too weak to be analyzed. So we built an amplifier circuit which allows the Arduino board to receive a signal between 2V and 4.5V (see figure 3). Before to amplifying the signal we were unable to determine the frequency of this signal. We spent a lot of time trying to understand why, and we found this solution on a website. Arduino inputs are designed for positive voltages between 0 and 5 V. The function of the circuit that I present today is, first, to amplify the signal so that it is easier measuring by means of the Arduino and, secondly, to superimpose a DC voltage of 2.5 V so that the voltage received by the Arduino is never negative.

Figure 2. An example of amplified signal.

To determine the frequency of the received signal, we use the library function PULSEIN in Arduino. This function measures the period of the sound signal (see figure 4).

Figure 3. An example of period

The Frequency is the duty cycle multiplying by the inverse of the period. The duty cycle corresponds to 61 000 in our case. It is measured with an oscilloscope.

So we get the frequency of the audio signal. Now we can send the information to LEDs.

  • 2 × 10K Resistor Resistor
  • 1 × 20K Resistor Resistor
  • 1 × 22K Resistor Resistor
  • 1 × Operationnal amplifier LM358 Op-amp
  • 1 × 24 Leds Adafruit ring Leds from Adafruit

View all 9 components

  • 1
    Step 1

    I'm now going to explain how to create a Bike GPS step by step.

    Step one :

    Creation of the summing amplifier.

    To create it we need :

    • 2 resistors of 10K Ohm
    • 1 resistor of 1K Ohm
    • 1 resistor of 20K Ohm
    • 1 resistor of 22K Ohm
    • 1 operational amplifier (LM358 for this project)

    Electronic diagram of the summing amplifier :

    In this electronic diagram, the part connected to the positive input of the amplifier allows the addition of 2.5V. That is to say, to pass the voltage between 0.8V and -0.8V to 1.7V and 3.2V. The part connected to the positive input of the amplifier allows the amplification of the signal otherwise the arduino card can't receive the frequency sent by the smartphone.

  • 2
    Step 2

    Step two :

    Connect all the components to the summing amplifier.

    We need :

    Be carefull of the pins you use on your program and welded to the arduino card !!

    Electronic Diagram of all the components connected :

  • 3
    Step 3

    Step three :


    Creation of the source code. I've created a Github folder with the source code and the necessary libraries.

    Here is the link to see this : Source code on Github

    This program is recovered the frequencies send by the smartphone, it then made an average every 5 frequencies to have a better accuracy. Finally, depending on the frequency average, the leds light up in the desired direction.

View all 5 instructions

Enjoy this project?

Share

Discussions

Javed Ahmad wrote 12/30/2018 at 05:38 point

hi

Can I use an esp8266 or nrf24l01 module instead of Bluetooth headset?

What modifications to code required?

Thanks

  Are you sure? yes | no

lawliet2710 wrote 09/20/2020 at 03:20 point

Hello, did you do the project? I need help

  Are you sure? yes | no

Alexandra Mae C. D. wrote 07/17/2016 at 11:06 point

There is no longer an audio output to be heard instead, the LED's will serve as the only output? Right? Does this mean that the bluetooth headset will be connected to the circuit for the received signal to be amplified? How could I have both audio and light ouput at the same time?

  Are you sure? yes | no

PixJuan wrote 09/06/2016 at 08:39 point

Yes the sound output would just be used for the LED's.

I think you could just mix 1 second of the sound with the original sound. This can be done with Audacity. It will still be annoying to hear a bip each time . I think the best way to do it would be to use frequencies that can't be heard by humans, this way we could easily mix them without noticing anything. It would even be better if the mixing was done with by a script calling sox http://sox.sourceforge.net/ 

  Are you sure? yes | no

Vito wrote 06/16/2016 at 13:49 point

Good idea and good work!

I had the same in my mind, never had time to make it actually...

I guess audio bluetooth for semplicity? But if you use a digital module you could transmit a lot of more useful info (such if the GPS has a fix, etc...)

Some extra features that I thought about at that time:
- A way to show overall target direction. You could use a different colour for a single led showing where is your target in a straight line, sometimes you might choose to follow your instinct and proceed in that direction;

- Use servos as to drive an "analog gauge", like a compass. It would be static most of the time (and potentially use less power? Not sure about it).

- Add a vibration motor or an audio signal to tell you to look at the device because of new directions, as you're not looking at the handlebar the whole time.

- Dim function for night rides, or you'll be blinded when it's dark.

  Are you sure? yes | no

Martin wrote 06/16/2016 at 07:23 point

I can't see a summing amplifier in the schematic - which is not necessary anyway. It is just an ordinary buffer. Which would even not really be necessary as the AtMega32U4 has an analog comparator, which is perfectly suited for frequency discrimination tasks.

But why do you not use a bluetooth module with a digital, serial output instead of audio?

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates