Tutorial - GPS To Google Earth
Tutorial - GPS To Google Earth
In this tutorial, you will use an Arduino Uno, GPS Receiver, and an
XBee RF downlink to track your rockets location and altitude in real
time on you PC.
PC
Version 1.0 May 26, 2014
AIAA OC Rocketry
AIAA OC Section NAR #718
Hardware
H d
R
Required
i d (P
(Partt I)
Schematic: http://arduino.cc/en/uploads/Main/Arduino_Uno_Rev3-schematic.pdf
- A PC or laptop
AIAA OC Rocketry
AIAA OC Section NAR #718
Software
Required
Arduino Integrated Development Environment (IDE):
http://arduino.cc/en/main/software#.Uy4WgU1OUpA
Google Earth
http://www.google.com/earth/explore/products/desktop.html
http://aiaaocrocketry.org/AIAAOCRocketryDocs/SPARC2014/Sketches/GPSPass_Through.zip
https://github.com/mikalhart/TinyGPS
p
g
y
((select Download .zip
p on the right
g below the list of files))
Install the .zip file as the TinyGPS Library
Test_with_gps_device is in the examples folder
Note that this also uses the SoftwareSerial library that is included in the Arduino IDE V1.0 & later
Version 1.1 May 26, 2014
AIAA OC Rocketry
AIAA OC Section NAR #718
AIAA OC Rocketry
AIAA OC Section NAR #718
C
Connecting
ti th
the EM506GPS tto th
the A
Arduino
d i U
Uno
Schematic
EM-506 Pinout
AIAA OC Rocketry
AIAA OC Section NAR #718
It may
y make prototyping
p
yp g easier for the GPS if you
y
modify
y the GPS cable by
y cutting
g the
jumpers in half and soldering them to the ends of the cable
6 pin JST for GPS to bare wire: https://www.sparkfun.com/products/10361
Male to Male jumpers: https://www.sparkfun.com/products/12795
Note: There are many options for jumper wires
AIAA OC Rocketry
AIAA OC Section NAR #718
AIAA OC Rocketry
AIAA OC Section NAR #718
Download and run the GPS_Passthrough sketch from the AIAA OC Rocketry Website:
http://aiaaocrocketry.org/AIAAOCRocketryDocs/SPARC2014/Sketches/GPSPass_Through.zip
Unzip the folder with the .ino file into the Sketches folder under Arduino in (My)Documents.
This program will just pass the data from the GPS receiver to the PC via the USB cable. It
uses a software UART on pins 2 and 3 on the Arduino to talk to the GPS receiver and the
hardware UART to talk to the PC via USB
#include <SoftwareSerial.h>
// GPS Baud Rate is 4800
#define GPSBAUD 4800
#define RXPIN 2
#define TXPIN 3
SoftwareSerial uart_gps(RXPIN, TXPIN);
void setup()
{
uart_gps.begin(GPSBAUD);
Serial.begin(4800);
}
void loop()
{
byte a;
if ( uart_gps.available() > 0 )
{
a = uart_gps.read(); // get the byte of data from the GPS
Serial.write(a);
}
}
AIAA OC Rocketry
AIAA OC Section NAR #718
D t
Determining
i i
GPS Virtual
Vi t l COMM Port
P t
You will need to specify the COM port used for the GooPs program.
The Arduino IDE used that same COM port when downloading your
sketch. Or you can go to Start
Start->Control
>Control Panel
Panel->Device
>Device Manager,
then click on Ports
Version 1.0 May 26, 2014
AIAA OC Rocketry
AIAA OC Section NAR #718
S t up the
Set
th GooPs
G P program
Install and start the GooPs program. Click on Options and set the COM port,
Baud rate should be 4800, select autoconnect and autoscan (if you question the
COM port),
t) and
d turn
t
OFF demo
d
mode.
d
Select
S l t AutoStart
A t St t Google
G
l Earth
E th since
i
youll always want that running as well
Version 1.0 May 26, 2014
10
AIAA OC Rocketry
AIAA OC Section NAR #718
G
Google
l E
Earth
th Via
Vi USB C
Cable
bl
Google Earth should now be reporting your location. And as you and your PC walk,
Google Earth should show your track. Your speed of travel is reported at your current
location and that latitude and longitude is reported in the lower right of the screen along
location,
with your altitude. You will need to maintain internet access via a mobile hot spot to
update the map
Version 1.0 May 26, 2014
11
AIAA OC Rocketry
AIAA OC Section NAR #718
Hardware
H d
R
Required
i d (P
(Partt II)
-XBee Shield for Arduino Uno
- Purchase: http://www.sainsmart.com/sainsmart
http://www sainsmart com/sainsmart-xbee-shield-module-for-zigbee-arduino-uno-duemilanove-megaxbee shield module for zigbee arduino uno duemilanove mega
1280-2560.html
- Schematic: http://www.sainsmart.com/zen/documents/20-011-902/Libelium-Xbee-Shield.pdf
-Rubber
Rubber Duck Antenna
- Purchase: https://www.sparkfun.com/products/9143
12
AIAA OC Rocketry
AIAA OC Section NAR #718
U
Uno,
GPS
GPS, and
d XBee
XB
Remove your wiring directly to
the Uno and plug in the XBee
shield with Xbee (power
should be off). Then replace
re-attach the wires to the
XBee Shield
13
AIAA OC Rocketry
AIAA OC Section NAR #718
Uno GPS
Uno,
GPS, and XBee
14
AIAA OC Rocketry
AIAA OC Section NAR #718
XB Series
XBee
S i 1S
Setup
t
1 Download the XCTU Next Generation Software and install
http://www.digi.com/support/productdetail?pid=3352&osvid=57&type=utilities
2 Plug one of the XBee modules into the USB Explorer dongle and
plug that into the PC
3 - Set up the XBee modules for 4800 Baud
A Start the XCTU Software
B Click on the search Icon to find your module (you will need
to specify the COM port and BAUD rate
C Click
Cli k on Add Selected
S l t d Device
D i
D After the module is found click on the module name (the
configuration tab should already be selected)
E Set the module BAUD rate to 4800 Baud
F Click on the write icon to write to the module
G Verify that the BAUD rate changed in the description block
that originally appeared when you discovered the module
4 - Repeat for the second module
Version 1.0 May 26, 2014
15
AIAA OC Rocketry
AIAA OC Section NAR #718
XB XCTU Configuration
XBee
C fi
ti
16
AIAA OC Rocketry
AIAA OC Section NAR #718
R t t the
Restart
th GooPs
G P program
17
AIAA OC Rocketry
AIAA OC Section NAR #718
G
Google
l E
Earth
th Via
Vi XBee
XB RF
Once again, Google Earth should now be reporting your location. But this time you can
leave your PC in one location and walk with the Arduino connected to the GPS and
powered by a battery. You will see your track on the Google Earth map. If you were
flying a rocket instead of walking, you can see your altitude on the 3D track
Version 1.1 May 19, 2014
18