Introduction: 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:
We will use the speed from the GPS and log it in files on the micro SD card for future reference.
- LinkIt ONE Board(Includes battery and antennas!)
- Project Box - a card board one will work(if you can't find one around the house click the link :-) )
- 16x2 I2C Display
Lets get started!
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Getting Started
It's time to setup your LinkIt ONE board! MediaTek Labs has a great tutorial here but I will summarize...
- 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
- Install the LinkIt ONE SDK in Arduino Folder(usually in C:\Program Files\Arduino\) - a plugin that gives us access to the API calls
- Update your board's Firmware - Straight from the site:
Set the board to Mass Storage Boot-up mode
Connect the LinkIt ONE development board to your computer using a
Launch the LinkIt ONE Firmware Updater application that is located in the Arduino IDE folder under hardware/tools/mtk
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
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
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!