Introduction: MEDIATEK LinkIt ONE Speedometer

Picture of MEDIATEK LinkIt ONE Speedometer

Have you ever wondered how fast you were going while riding a bike? Do you want a super accurate speedometer for your car? Here it is! It uses the LinkIt ONE board!

The LinkIt ONE is a board a lot like the Arduino Uno, except with the the additional features of just about every type of connectivity in the world, not to mention audio and sd card support, a battery and 5 times the memory, all for a great price! See the picture for the Arduino equivelant!

This instructable features the on-board GPS and allows us to obtain an object's speed over time. You may ask, "How is speed related to GPS?" .Well, actually, GPS stands for Global Positioning System and is a collection of 31 satellites that transmit among other things:

  1. Latitude/Longitude
  2. Date/Time
  3. Speed

We will use the speed from the GPS and log it in files on the micro SD card for future reference.

Materials

  1. LinkIt ONE Board(Includes battery and antennas!)
  2. Project Box - a card board one will work(if you can't find one around the house click the link :-) )
  3. 16x2 I2C Display

Software

  1. Arduino IDE
  2. LinkIt ONE SDK(a plugin that gives us access to the API calls used for the GPS)

Lets get started!

Step 1: Getting Started

Picture of Getting Started

It's time to setup your LinkIt ONE board! MediaTek Labs has a great tutorial here but I will summarize...

Steps

  1. Install the Arduino IDE - for users who already have the IDE installed...make sure it is version 1.5.6-r2 because the latest version is not yet supported
  2. Install the LinkIt ONE SDK in Arduino Folder(usually in C:\Program Files\Arduino\) - a plugin that gives us access to the API calls
  3. Update your board's Firmware - Straight from the site:
    1. Set the board to Mass Storage Boot-up mode

    2. Connect the LinkIt ONE development board to your computer using a
      micro-USB cable

    3. Launch the LinkIt ONE Firmware Updater application that is located in the Arduino IDE folder under hardware/tools/mtk

  4. Select the LinkIt ONE in Tools--> Board and the LinkIt ONE port under Tools-->Port
  5. Run the "Hello World!" Blink Example in the Arduino IDE to guarantee your setup worked(Make sure your board is in SPI mode before trying to upload)

This sounds complicated and like a lot of steps but go to the tutorial I linked and you will change your mind! It is really very easy! However, I had some issues installing the SDK unique to my computer so I decided to try a method that uses a more recent version of the Arduino IDE. You can find out how to do that here.

Step 2: GPS

The on-board GPS is the center of our project. It allows us to get the speed data we need. In order to access it we use the provided API calls given in the LGPS.h header file. Satellites send out many different strings of data called sentences. The sentence we want is the RMC sentence because it contains speed data. The example given for the library parses the GGA sentence which does not contain speed data. I found the code here very useful and used the RMC parsing function there in my project.

Information about each of that sentences can be found at this site. Here is the GPS code.

Step 3: LCD

I had a cheap serial LCD on hand, one of those 16x2 displays with a backpack to convert it to I2C, and I decided I would try to make it work with my ONE board. I connected the 5v, SDA, SCL, and GND pins to those on the board. It worked like a charm! If you need more help wiring check out my instructable specific to the screen!

Step 4: Project Enclosure

Picture of Project Enclosure

I used a cardboard box I had but there is a lot of room for improvement in that regard. 3d print a case or carve one out of wood!

Step 5: Testing

Picture of Testing

When you first upload the code the data on the screen will be incorrect. That is because the the GPS has to get a fix before it displays the correct data. Usually, this takes less than 15 seconds but you must be patient. Keep the USB cable plugged in your board and open the serial monitor. It will be spitting out the GPS sentence. Wait until the second value(the value after the first comma) turns from a "V" to an "A". That means you are receiving correct data.

Now, mount it on your bike or take it on a run! There is a lot of things you can do with this! Thanks to this little guy I can tell you I was able to get up to 20MPH on my bike! Put it in your car and compare the speedometers' readings!

Don't hesitate to post in the comments section! Happy making!

Comments

SwampyN (author)2015-10-21

All it does is display/log the speed, so one turn of the wheel resolution. There's no code to calculate distance yet. I hope to get the pro mini demo I have as an instructable up soon but I'm hoping to expand on that project.

SwampyN (author)2015-10-20

Cool. This would be a great addition to my bicycle tacho.

https://github.com/swampyness/linkit_apps/tree/master/linkit_tacho

About This Instructable

1,276views

11favorites

License:

Bio: One of my hobbies is taking stuff apart and seeing how I can customize it.
More by tinker_thinker:LinkIt ONE - LIPO Charging ReminderHome Automation - RC LightingMP3 Player
Add instructable to: