Tag Archives: Edge of Space

LESSON 27: Instrument Package

In this lesson we bring together a lot of the material from the first 26 lessons to create an instrument package that could be deployed in a demonstration project. We will wire wrap up an Arduino Nano, a Virtuabotix SD card reader, and the Adafruit Ultimate GPS to create a system that will track and log position and altitude, and save the data in a format that can be displayed on Google Earth.

Wire Wrapping tools and Perforated Board

You will want to place the Adafruit GPS, the SD Card Reader, and the Arduino Nano into a perf board.  Then, you will want to carefully wire wrap the components as follows:

Connecting the Adafruit Ultimate GPS Unit to Arduino
GPS Pin Arduino Pin
Vin 5V
GND GND
RX Pin 2
TX Pin 3

 

Connecting the SD Card Reader
Sd Card Reader Pin Arduino Pin Details
GND GND Common Ground
3.3 V – (NOT USED)
+5 5V Power
CS 4 Chip Select
MOSI 11 SPI Data
SCK 13 Clock
MISO 12 SPI Data
GND GND Common Ground

 

Now the code you developed in LESSON 26 should run on this prototype. The code creates a Google Earth friendly set of coordinates. Just put a KML wrapper on the coordinates as described in LESSON 26.  Putting it all together, I took the system outside and walked around, and this is the data track I got.

GPS track generated by my wire wrapped prototype

 

LESSON 23: Arduino GPS with Data Logger

In this lesson we will extend what we did in lesson 22 to include a data logger with our GPS. You should be sure and do lesson 22 first, as that shows you how to hook up and program the GPS. In this project we will connect an SD Card Reader/Writer, and will power the whole thing with a 9 Volt battery. With this, you can walk around, and the device will constantly monitor and log your position. You can then bring it back inside, and look at where you have been using Google Earth.

Arduino connected to Adafruit ultimate GPS and a n SD card Data Logger

To start with, lets talk about what you will need to do this project. As described earlier, you need to start by doing lesson 22 which will get you going on the GPS hookup and initial software. Now, to move forward, you will need an Arduino, Adafruit Ultimate GPS, Virtuabotix SD card reader, and a Battery Clip to power the arduino during your mobile jaunts.  You will need a 9V battery. If you are going to be doing a lot of mobile work, it is probably worth it to invest in a good 9v Rechargable battery system.

When you get your gear gathered up, you will be ready to get this project going. First, hook the GPS up to the arduino as we did in lesson 22:

Connecting the Adafruit Ultimate GPS Unit to Arduino
GPS Pin Arduino Pin
Vin 5V
GND GND
RX Pin 2
TX Pin 3

You also need to hook up the SC Card Reader/Writer. You should be familiar with this from lesson 21.

Connecting the SD Card Reader
Sd Card Reader Pin Arduino Pin Details
GND GND Common Ground
3.3 V – (NOT USED)
+5 5V Power
CS 4 Chip Select
MOSI 11 SPI Data
SCK 13 Clock
MISO 12 SPI Data
GND GND Common Ground

Remember that this SD card reader has two rows of pins. Don’t let that confuse you, both rows are equivalent. You can connect to either row.

Most of the code has already been written in Lesson  22. In this lesson, the main thing we will be doing is to write the GPS data to the SD card. This way, as we walk around outside, it will log our positions to the SD card.  We will create two files. One will hold the raw NMEA sentences, and the other our location data, as parsed by the adafruit GPS library. You should be able to figure most of this out from what you already know from lesson 22 and lesson 21. In the video above, we take you through this code step-by-step, so watch the video to understand what we are doing. If you get stuck, you can look at the code below.

 

LESSON 22: Build an Arduino GPS Tracker

OK, it is time for us to take our projects up to that next level. We are going to build a GPS tracker from scratch. This is going to take several lessons to complete, but it will build on what you already know, and is really not going to be that difficult of a project. We will be using the most excellent Adafruit Ultimate GPS module. This is an excellent GPS. I like it because it is affordable, easy to use, and is one of the few that will work at extreme elevations, making it ideal for our Edge of Space/High Altitude Balloon work.

We are using the Adafruit Ultimate GPS

This unit is pretty easy to hook up, as you can see in the Table below:

Connecting the Adafruit Ultimate GPS Unit to Arduino
GPS Pin Arduino Pin
Vin 5V
GND GND
RX Pin 2
TX Pin 3

Our goal in this lesson is to get the GPS connected, and get it reading NMEA sentences. NMEA is a data format used by GPS and mapping devices and software to keep track of position coordinates. There are lots of different NMEA sentences, but the two that contain the most useful information are the $GPRMC and $GPGGA sentences.

Our interest is in creating a location tracker for our High Altitude Balloon work, and the $GPRMC and $GPGGA sentences contain all the information and data we would need for that work. These sentences contain the lattitude, longitude, time, altitude, and velocity.

The GPS modules are pretty easy to work with. When you apply power to the GPS, it immediately starts spitting out NMEA sentences to its serial port. Our job on the arduino side is to simply read these data strings, and then parse them into useful data. The thing that is a challenge is that they constantly spit out data, whether you want it, or whether you are ready for it or not. In developing the software, we have to be mindful the the data is always spewing out of the GPS. Typically, we will have other components on our package, like temperature, pressure and inertial sensors. While our arduino is out making measurements on these other sensors, data continues to stream in from the GPS, likely overflowing our serial buffer. When we return to make a GPS measurement, it is very likely that the serial buffer will have old or corrupt GPS data in it. Hence,  we must be mindful to deal with this issue in developing our software.

The video above takes you step-by-step through connecting and reading the NMEA sentences step-by-step. Then in the next lesson we will parse and log the data to create a portable GPS tracker. The code below is explained in the video. You need to watch the video to understand this code, and so you will be able to begin to work with this code to create a portable GPS tracker.

In order for this software to work, you need to download and install the Adafruit GPS Library.

 

From the Edge of Space

I want to whet your appetite a little today about the types of projects we will be covering in this blog. One of the things I love to do is send instrument packages to the edge of space. As this blog develops, I hope to be able to share with you lots of the technology, logistics and rules associated with this fascinating endeavor. For now, let me share a video from our last flight. Enjoy the serenity as our probe hovers at 120,000 feet. At this altitude, you can see the blackness of space and the curvature of the earth. The thin blue line is the earth’s atmosphere. Enjoy!