TrackMe GPS Tracker

TrackMe is a portable and wearable GPS Tracker. The device uses an Arduino, a GPS Module, and an HM-10 Bluetooth Module to record and transmit user location data over the course of a day via a custom-built iOS Application.

Engineer

Anisha B.

Area of Interest

Computer Science

School

Fremont High

12th grade

Incoming Senior

Reflection

I chose to build this project to determine if engineering is an interest I’d like to pursue even after BlueStamp. Through BlueStamp, I was exposed to multiple fields of engineering– mechanical, electrical, and I was even able to expand upon my existing computer science knowledge. Although I struggled with the mechanical assembly of many of my components, the challenges only increased my interest in engineering. Through this project, I was able to combine coding, an element I’m familiar with, alongside mechanical and electrical engineering, and in the process, experiment with different styles of coding (Arduino and Swift). In terms of future engineering projects, I am interested in creating more mechanical engineering heavy projects, such as robots, which require a more construction based design. This project was a demanding process, but I am proud of the final project, and its applications to everyday life. I’ll be using my Tracker on my next run!

All my code, documentation, schematics, and planning is available on my Github and Build of Materials. View my presentation video below!

Presentation Video

Final Milestone

TrackMe Overview (sped- up)

TrackMe is a portable and wearable GPS Tracker. The device uses an Arduino, a GPS Module, and a HM-10 Bluetooth Module to record and transmit user location data to a Serial Monitor, log data onto an SD Card, or transmit data via the TrackMe App, an IOS Application built specifically for the Tracker.

The Arduino uses the TinyGPS++ library to record user data. TinyGPS++ parses NMEA data streams provided by GPS modules and can extract arbitrary data from any of the myriad NMEA sentences available.

The TrackMe IOS Application relies on two frameworks: Mapkit JS and Core Bluetooth. Mapkit JS creates a map displaying user location and the user’s exact coordinates. Core Bluetooth, more importantly, creates a serial that allows communication between the User and the Arduino through a HM-10 Bluetooth Module.

Lastly, the Arduino uses both Hardware and Software Ports in order to keep the tracker functional. A SoftwareSerial Port is used to relay information from the GPS to the Arduino, and a Hardware Port (HW-UART) is used to relay information from the Arduino to the Bluetooth Module.

GPS Features + Statistics

The GPS Tracker records

  • longitude
  • latitude
  • altitude
  • speed
  • date (DD/MM/YY)
  • time (GMT)
  • SD Card Logging
  • Navigational Direction

Accuracy and Statistics

Measurements recorded by the GPS are accurate up to 4 decimal points. The tracker takes 30-60 seconds to establish a fix when placed outdoors. When placed indoors, the Tracker may take up to 5 minutes to find a fix.

Arduino Libraries + Quick Links

Libraries used 

  • TinyGps++
  • SD Card Library
  • SoftwareSerial
  • SPI

Quick Links

TrackMe App Features + Statistics

TrackMe consists of

  • About Page
  • Contact Page
  • Map View
  • Bluetooth Serial

Additional information about each of the page’s features can be found on the page below.

Frameworks Used

  • Core Bluetooth Framework
    • provides the classes needed to communicate with devices that are equipped with Bluetooth low energy wireless technology.
  • Mapkit JS Framework
    • The JavaScript API for embedding Apple maps on your website.

Accuracy and Statistics

The application can communicate with the Tracker from a distance of up to 100 meters.

ABOUT TRACKME

The TrackMe IOS App consists of 4 new features: About, Contact, Features, and Map Pages. The About Page provides the User with an introduction to the Tracker itself and the Tracker’s compatibility with external devices via Bluetooth. The Contact Page contains a hyperlink to this BlueStamp Website and an additional hyperlink that opens up an email draft directly in Gmail, with the recipient and the subject specified. The Features Page lists all the GPS’s features and  what exactly the device records when powered up. The Page additionally lists all the different possible outlets to transmit information to. Lastly, the Map Page displays a rendering of the user’s current location.

TrackMe IOS Application

FRAMEWORKS USED

The IOS Application utilizes the built-in Mapkit JS Framework, the JavaScript API for embedding Apple maps onto applications. This framework was used to create a map of the user’s current location and a pinpoint was added to mark the user’s exact coordinates. Additionally, the app uses the Core Bluetooth Framework, which provides the classes needed for TrackMe to communicate with the Tracker using Bluetooth low energy wireless technology. The Framework was used to create a “serial” to enable communication to and fro both devices.

Final Milestone

My final milestone consisted of mostly software modifications, but in an entirely new language: Swift. My goal for this milestone was to modify the code for the existing Bluetooth App to personalize the Tracker as more of  a commercial product. As a result, the new TrackMe app is entirely built to meet the needs of a user utilizing the GPS Tracker.
Moreover, I was able to add more features onto the GPS itself. Now, instead of basic navigational directions to a target location, the GPS is able to record and transmit direction and distance to the Serial. Lastly, the GPS is able to now log data onto a SD card through commands sent via Bluetooth.
Additionally, in order to productize the Tracker, velcro and stretchable material was added onto the base of the Tracker. As a result, the tracker is now both portable and wearable and can be worn on the go!
During the App building process, I had significant trouble with coding the app itself. As I was new to Swift, learning how to navigate Xcode, as well as the actual coding, proved to be a challenging process. After a considerable amount of trial and failures, I learned to connect the Navigation Controllers with the View Controllers by declaring the View Controller as a Root View Controller. That way, all the pages contained buttons to transport the user back to the Home Page. Furthermore, I was able to pick up on implementing built in Xcode features onto the app. I used a package called MapKit in order to display a real time view of my current location, which is fed by the GPS. Pinpoints were then coded in to display my exact location and the map was set to satellite for easier understanding. Likewise, the hyperlink and email contact form on the Contact Page had to be coded in as well.

Third Milestone

My third milestone required both hardware and software modifications. The Tracker has now been modified to transfer data to an IOS application instead of previously logging information into an SD Card. Using an app, the user can now receive data from a GPS Tracker, as well as send commands to the Tracker to get specific data. The commands available include longitude, latitude, speed, altitude, time, date, and cardinal directions to a specific location.

Bluetooth Attachment

A HM-10 Bluetooth Module was attached to the Shield in order to enable Serial Communication. The Module has 4 pins: RX (receive), TX (transmit), 5V, and VCC, all of which were connected to the Shield.  More specifically, the TX and RX pins were connected to the ShieLD’S Hardware Ports (Digital pins 0 and 1).

code rewrite

Next, the original GPS code was entirely rewritten to consider user input. Instead of logging all of the information at once, the user can now send commands to retrieve one or multiple pieces of information at one time.

GOALS

For my next milestone, I hope to modify the code for the Bluetooth App to personalize the tracker as more of a service and product.

Third Milestone

SHIELD + Bluetooth WIRING

I had trouble with the wiring of the shield to match the flow of information coming back and forth from the GPS, Arduino, and the Bluetooth Module. I solved this problem by troubleshooting and checking each aspect of my project for functionality: I attempted creating multiple SoftwareSerial ports for the Bluetooth module and the GPS. However, in the end, I realized that the module would only send commands to the Arduino when connected to the hardware port (Digital Pins 0 and 1), and that the GPS information would only display when connected to a Software Serial Port (Digital pins 8 and 9). This wiring works because the module sends and receives data from the Arduino. The Arduino then sends the commands to the Software Serial Port, which receives GPS data that is sent to the module, eventually appearing on the phone.

Bluetooth Serial Communication

Second Milestone

Second Milestone

After soldering, I observed that it was no longer necessary to connect  a jumper cable between the 3V3 pin on the Arduino to the 3V3 pin on the GPS, as the Shield now powers up without additional sources of energy.

code rewrite

Next, the code for the program had to be changed in order to create files in the SD Card and transport the information from the GPS Directly into the SD Card. The new GPS information is logged into a brand new CSV file on the SD Card, with 8 columns detailing current longitude, latitude, speed, altitude, date, time, course, as well as the amount of satellites that the GPS is currently connected to.

Logging Data into an SD Card

First Modification

For my first modification, I altered the code to make it adaptable to google fusion tables. As a result, the data from the SD card is now integrated into a satellite map, displaying the entire path taken during a trip. Each recorded location is represented by an icon that displays the user’s current longitude, latitude, speed, altitude, course (in degrees), date, and time. The format of time was changed from milliseconds to standard military time, and the date was changed from DDMMYY to MM/DD/YY to increase readability. The information is also used to generate a heatmap, that  represents repeated locations recorded over one specific area during a period of time. Lastly, this same information can be transferred over to Google Earth as well if wanted.

Satellite Maps, Heatmaps, and Google Earth

My second milestone contains both hardware and software modifications. This prototype is what I expected to have completed by the end of the BlueStamp program, along with one extra modification: adding Google Fusion tables to my path.  I will be adding additional modifications to enhance the features on the device.
First off, I decided to solder all of the headers on the GPS Shield in order to establish a more secure connection. The reason for this change was due to the lack of reliability in the Shield powering on after being attached to the Arduino. 

Shield wiring

Delving into the wiring of the Shield, the Shield requires the wiring of three necessary pins: TX, RX, and the CS pin. TX and RX stand for Transmit and Receive, respectively, which are essential for the GPS to receive instructions from the Arduino and to send data to the SD card. The CS pin checks if the card is present and can be initialized, and sends the data to the SD Card. I had trouble with the wiring of the shield to match the flow of information coming back and forth from the GPS, Arduino, and the SD Card. I solved this problem by troubleshooting and checking each aspect of my project: my code, the Arduino, the SD Card, the Shield, and the headers attached to the shield. In the end, I realized that as long as the Arduino and the GPS were connected using the TX and RX pins and Pin 10 was connected to the CS pin, the data from the GPS could be accurately saved.

First Milestone

My Intensive Project is a GPS Tracker that logs information into an SD Card without the use of external memory sources such as an iPhone. 
The goal of this product was to see more of the behind the scene work of fit bits, smart watches, GPS, and other modern day trackers. My first milestone was to prove that the GPS sensor was transmitting data to the computer. 

Features + Statistics

The GPS Tracker records

  • longitude
  • latitude
  • altitude
  • speed
  • date (MM/DD/YY)
  • time (GMT)

Accuracy and Statistics

Measurements recorded by the GPS are accurate up to 4 decimal points. The tracker takes 30-60 seconds to establish a fix when placed outdoors. When placed indoors, the Tracker may take up to 5 minutes to find a fix.

Quick Links + Parts Used

Quick Links

Parts Used

I used an Arduino Elegoo (Uno), and a Sparkfun GPS Logger Shield to collect data, and the TinyGPS++ library for my code.

Images can be clicked for enlargement.

Wiring

I first attached the Arduino and the Shield using headers. However, I later ended up soldering all of the headers onto the logger shield itself to establish a stronger connection. I was fortunate enough to find sample code to work off of (Serial Transmitting Code), but faced the challenge of wiring the proper pins to make them both work together. As I did not have a battery to fit into my shield, I soldered a 3v3 jumper in order to provide enough energy to keep the shield functional. The shield has three jumper cables. The first cable connects the GND pin to the Arduino’s GND. The second jumper cable connects the GPS’s TX pin (transmit) to Pin 9, the Arduino’s RX pin. Finally, the last jumper connects the GPS’s RX (receive) pin to Pin 8, the Arduino’s TX pin. Through this wiring, the Arduino is able to send instructions to the GPS and later receive information from the GPS, which is displayed on the computer.
As I used an Arduino Uno, I chose to use my software serial port (SW-UART). However, the same result can be achieved through the Hardware Serial Port (pins 0 and 1) on the shield and Arduino. However, the code can be modified in order to achieve the same result (Hardware Code here).
When all the cables are connected, the Power Led on the Shield will light up and the GPS LED will start blinking, showing proof that the GPS is attempting to connect to nearby satellites for data. Due to size and capacity constraints of the GPS, it can take between 1-2 minutes for the GPS to establish a connection with the satellites. Once a fix is reached, the GPS LED will stop blinking and simply be turned on.

The goal of this product is to see more of the behind the scenes work of fit bits, smart watches, GPS, and other modern day trackers.

Starter Project

CAPABILITIES

Charges:

  • Iphones, Androids
  • Cameras
  • MP3 Players

Requires:

  • 2 AA Batteries
  • USB Cable
I faced multiple challenges throughout the building process. As I had no previous experience with soldering, it took me a while to learn how to properly solder my components onto my circuit board. Towards the end of my project building, one of the wires connecting the battery holder to the circuit broke off.  To fix the problem, I de-soldered, melded new wires together and secured them with electrical tape, and soldered the new wire to the circuit board. By the end of this process, the other wire had broken off the circuit too! After fixing and re-soldering both the wires, I learned the importance of patience and checking to make sure all of the components in a project are secure.
My starter project is the MintyBoost USB charger. The device charges mp3 players, cameras, phones, and any gadgets that can be plugged into a USB port using 2 AA batteries.
The primary components of the charger include resistors, capacitors, a 5v boost converter, a Schottky Diode, a IC socket, and a 10uH power inductor. These components are soldered to a Printed Circuit Board (PCB).

Images can be clicked for enlargement.

The project works because all the components play a part in transferring the charge from the batteries to the gadget. The resistors reduce the flow of the current through the circuit, preventing energy overflow that could fry the circuit. The ceramic capacitors store potential energy and filter undesirable frequency noise in order to equalize the output of the boost converter chip. The diode forces the electric current to pass in one direction and blocks the current from moving in the opposite direction, compelling the current to move to the gadget from the battery and not vice versa. The IC socket protects the boost converter chip. The power inductor stores power and converts power to different voltages. As a result, energy from the 3V input from the AA batteries can be converted into a 5V input to charge the gadget. Lastly, the most important component is the 5V boost converter chip, which steps up a voltage from the input to the output. Together, all these components work together to create a USB charger.
This starter project helped me grow as an engineer. I learned about how different components function together to make the device work as a whole. However, most importantly, I learned how to think like an engineer—planning, building, and determining the cause of problems and how to solve them. I’m excited to see what I build in the future!

Leave a Comment

Start typing and press Enter to search

Bluestamp Engineering