I have been dreaming of building a flight computer that will not only control the flight sequence, but also log data aboard a model rocket. But I do need to walk before I can run, so I started with a simple GPS data logger (GPSDL) that is just a piece of my future flight computer idea. This GPSDL will sit in a payload bay or nosecone of a rocket during flight.
My finished GPSDL weighs 62 grams with the power supply and has a 1.5 inch W x 3 inch L x 1 inch D footprint. The weight of the data logger can be further reduced by .25 to .75 oz. by using a simpler GPS antennae than the one I used. Cost can run from $100 to $200 depending on how careful a shopper you are. My cost was $200 for the parts used in this article.
The design is simple consisting of three major parts: a 5.5g accelerometer switch, a BS2p microcontoller and a GPS receiver. A parts list, pictures, source code and a schematic are included in this article.
The GPSDL records the date, time, latitude, longitude, altitude, speed, heading in degrees and number of satellites that are in communication with the receiver every second for a total of 5 minutes. The source code provided will record two 5 minute flights before you have to download the data. This is completely customizable for any number of flights or a single 12 minute flight. The comments in the source code explain not only how to make this flight time change, but also what the program is doing throughout its runtime. The source code was split into two programs to maximize the amount of data that could be stored, negating the need for a separate EEPROM. The first program parses the GPRMC and GPGGA GPS sentences for the data points and writes them to memory. Post flight, the second program is downloaded to read the data points stored in memory and prints them to your PC screen. The data points are finally copied/pasted into a spreadsheet for conversions and graphing.
Step 4: Operation
Prior to launch, the only communication there is between you and the GPSDL is the blinking LED included on the GPS antennae PCB. A flashing LED means less than 3 satellites are acquired, a steady on LED signals that the antennae has acquired at least 3 of the 12 satellites available. Once you have visual that three or more satellites are acquired, the GPSDL is loaded into the rocket. At liftoff the 5.5g normally open, non-latching accelerometer switch is momentarily tripped signaling the microcontroller to log 20 bytes of GPS data every second for 5 minutes. Once 5 minutes is up it automatically resets itself to take another 5 minutes of data once the accelerometer switch is tripped again. You can record two 5 minute flights before data will need to be downloaded or you will overwrite the data already collected. The power supply is a 300 mAh 7.4V Li-Po battery. The GPSDL needs a steady diet of 5V, and it will run for approximately 3 hours on a full charge with this battery. No data is lost if power is lost. The only way data can be lost is if it is overwritten. GPS signals will travel through plastic, glass and cardboard.--The staples of model rocketry. The only things that will block the signal is concrete, metal or in the form of heavy rain or snow--H20. The antennae tested showed excellent Rx, even in a crowed, signal noisy, urban environment where I live.
Step 5: Ready for Flight
The .bsp sourcecode files are posted. You need to download the free IDE from Parallax to read them properly. They might open as a .txt file. ? I have also posted a .pdf file of this article that includes the source code.
Parallax BS2p 24 pin microcontroller
Parallax GPS Receiver Module
5.5g non-latching, normally-open, accelerometer switch
Female serial port
JST battery connectors x 3 pair
10 k Ohm resistor
300 mAh 7.4 Li-Po battery