Introduction: Arduino GPS Reciever in a Tin
Welcome to my tutorial on how to build a GPS Receiver!
I have entered this Instructable into a few competitions that I think it is applicable to. If you feel it is worth a vote into the above contests, please do click the vote button. Thank you!
Ever wanted to know your exact location? Perhaps the exact time in GMT? Or even your speed?
With this project you can know all of the above. I wanted to create a very simple and cheap GPS receiver so that I can know my exact location. This receiver can be used for many things such as geocaching, model R/C, navigation and more!The receiver uses a simple touch-screen interface and all the GPS data refreshes every second. It is also powered of a LiPoly battery to make it portable and easier to use.
The GPS Receiver will get and display the following information:
-Time and Date
This project has been published 'as is' and therefore I accept no responsibility for any loss or damage.
So, with that out he way, on with the build...
Step 1: Parts List:
To make the receiver you need:
1) GPS module - I re-used mine from a different project, but any module that supports the NMEA protocol over serial should work. I also added an external LED to report fix status.
2) 500mA LiPo battery
3) Adafruit Power Boost 500
4) 2.2 Inch Nextion LCD display
5) Arduino Micro using AtMega 32u4 (I used this over an Arduino mini or micro as it was small, and had on board USB)
6) DC barrel jack
7) Enclosure - I used a cigarette tin, but a mint tin would work. I also used some rubber sleeve for the edges.
8) Automatic wire strippers
9) 22AWG hook-up wire.
10) Soldering station and solder
11) Helping hands (optional but very helpful)
12) Wire cutters
13) Micro SD card (not shown)
14) Hot glue gun (optional for insulation, not shown)
15) Heat shrink tubing (not shown)
16) Cardboard and Scissors (not shown)
17) Toggle switch (not shown)
18) LED for fix indication and 330 ohm resistor (optional and not shown)
Step 2: Enclosure
First, cut a rectangle in your enclosure 2mm bigger than your screen, leaving enough room for the connector on the side.
Drill two holes suitable for your toggle switch and LED, if you decide to use them.
Afterwards, line the edges with rubber sleeve but cut the sleeve at right angles (as shown) to cover the corners.
Press fit the screen gently into place to verify it that it fits.
Step 3: Battery Connector
It is a good idea to allow the battery to be removable, in case it needs to be replaced.
To do this, cut two headers off the strip (included with the Power Boost and Arduino) and solder both wires from the JST cable to them.
Insulate with tape around the contacts and then heat shrink over the top.
Step 4: Power
Cut, strip and solder two appropriate lengths of wire. Solder one wire to 5v on the Power Boost and RAW on the Arduino. Solder the other piece to GND on the Power Boost and GND on the Arduino.
As well as this, solder the 5v from the GPS to another available 5v output on the Power Boost. Also wire the GPS's GND and Power Boost GND connection together.
Lastly, solder the Nextion Display's 5v wire to a 5v output on the Power Boost. Also, solder the GND wire from the Nextion Display to a GND output on the Power Boost. (Notice I used headers on the Power Boost for the display so that I could easily remove it.)
Step 5: Toggle Switch
A toggle switch can be added to power on or off the unit.
First, solder two wires to each terminal.
Then solder one to EN and the other to GND on the Power Boost.
Lastly, mount the toggle switch on the enclosure.
Step 6: Signal Connections
Solder the Rx wire from the GPS to pin 10, and the Tx to pin 7 on the Arduino.
Connect the Rx pin of the Nextion display to pin 8 and the Tx to pin 9 on the Arduino. Again, I used headers on the Arduino for the display.
Also, if your module supports it, solder a 330 ohm resistor and LED to the fix output on your GPS module.
Step 7: DC Barrel Jack
Mark out a hole for the barrel jack on your enclosure, then remove all components from the case.
Drill the hole and glue the jack in place. Also optionally insulate the barrel jack's contacts with hot glue.
Step 8: Final Assembly
Cut out a rough patch of cardboard that covers the back of the display.
Gently press-fit the screen back into place, and layer the cardboard over the back of it.
Now place the rest of the components in. This process will vary dependent on your enclosure. I stacked the Power Boost and Arduino with insulation tape between them.
Next, I inserted the battery and then followed up with the GPS receiver.
Insert the LED into the hole (if you used one) and glue it in place.
Lastly, connect the battery to the adapter that was made earlier on.
Ensure the polarity is correct (The two Red wires should be connected, likewise with the black)!!
Step 9: Programming
Install these libraries into the Arduino IDE. You can find out how to do this here. Look for installing .zip libraries.
To program the display, copy the file attached below to a Micro SD card. Insert it into the display and power on the unit. The display will copy the code of the card. When it is done (it will report success), turn of the unit and remove the SD card.
To program the Arduino, plug it into the computer using a USB cable and select Arduino Leonardo from Tools > Board
Then select the appropriate Com port from Tools > Port. (It should say Com x (Arduino Leonardo), where x is the com port number)
When finished, remove the USB cable.
Step 10: Testing and Operation
Turn the unit on with the toggle switch.
Once greeted by the splash-screen, tap the screen once.
Now wait until the GPS gets a fix. This is denoted by the GPS's fix LED flashing.
Once there is a fix, tap the red cross. The GPS data is now displayed. If it the data is invalid, there are not enough fixes or there is another error, 'NO FIX' will be displayed. Restart the unit and try again if this happens.
To see the time, tap the top title on the screen, and to get back, tap the title again.
Note: For long uses, where the unit will not be in use, unplug the battery to prevent any discharge.
Thank you for reading this Instructable, and I hope you have enjoyed reading it and good luck with your build :)
Participated in the
Arduino Contest 2016
Participated in the
Trash to Treasure Contest 2017
Participated in the
Epilog Contest 8
Participated in the
Green Electronics Contest 2016