How to Build a Lightweight GPS Datalogger for Model Rocket Applications





Introduction: How to Build a Lightweight GPS Datalogger for Model Rocket Applications

About: Embedded programmer that doesn't have the time to go to work.--I have too many important projects to work on!

February 2009


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 1:

My first step was to familiarize myself with the parts chosen to work with by reading the data sheet for the GPS antennae and spending some time online learning how to use the free IDE that Parallax provides to develop and download code from my PC to the BS2p microcontroller via a serial port. This is quite simple and you can learn how to do this in an evening. If you want to just cut and paste my code onto your microcontroller that is about all you need to know code-wise to get the circuit running. If you want to customize my code or roll your own, PBASIC, which is the language that the BS2p runs on, is probably the easiest language to learn. There are multiple online forums catering to the Basic Stamp where help is available if you need it.

Step 2:

Next, I breadboarded the circuit. Then I perched my breadboard monstrosity on my windowsill to get a good GPS signal and developed the code by trial and error.

Step 3:

After getting the code developed and the circuit running quite nicely on a breadboard, I had to duplicate it on a PCB small and light enough for rocket work. It was not necessary, but I etched a custom PCB for my circuit.

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

Unfortunately, I have not been able to test the GPSDL with an actual rocket launch. That will happen in the weeks to come. To run the GPSDL I shake it by hand to trip the accelerometer switch and take data from my dashboard as I drive. The GPSDL works flawlessly at this point. I will post not only real flight data but a video of its maiden flight to my website soon. I would appreciate any feedback on improvements to my source code or circuit, particularly in reducing its size or weight.

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.

Parts List:
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

Online Resources:



    • Woodworking Contest

      Woodworking Contest
    • Make it Move Contest

      Make it Move Contest
    • Casting Contest

      Casting Contest

    We have a be nice policy.
    Please be positive and constructive.




    I am doing similar project. Just The GPS data logger part.
    i am using a garmin 15l receiver and a GA25mcx antenna and Atmega32 micro controller.. I have developed code for for displaying the values[data] from GPS onto a LCD display.. but am not able to code for logging part onto a SD/MMC card. So cud pls help me with the source code for this.. Thanks in advance..
    u can also mail me at dare4351 @ gmail . com

    Hi, Did you have a successful launch, where can I find more updates on your project/experiments ? Very interesting what you are doing. Thanks for posting the article.

    1 reply

    Hello, Yes I had successful multiple launches with my GPSDL, but I have since been working on a VTS or vertical trajectory system that uses 4 forward active fins to keep the rocket flying "straight up" or vertical. I will return to the GPSDL and make it a full featured datalogger, but I have more important fish to fry right now! All of this and then some are explained on my webpage: My email address is for questions or info. Thank you for the interest

    Hello. I am a student, I have a small project, I want a simple GPS: Is the type of programmable Has the ability to determine the location and the receiving and sending data. Contains a link USB. Include the presentation CD Drive to the computer. Cheers

    Hello. I am a student, I have a small project, I want a simple GPS: Is the type of programmable Has the ability to determine the location and the receiving and sending data. Contains a link USB. Include the presentation CD Drive to the computer. Cheers

    i cant wait to see this thing fly'n! the big rocket sounds good too :D


    Hello, A "space freighter" design with 15 cubic inches of payload space powered with any combination of: 4 18mm motors and a single 24 mm motor (5 motors max total) is being built as we speak. The maiden flight for this airframe and the GPSDL should be the 3rd or 4th weekend of March 09. I plan on getting video/pics of the build/launch. I have already alerted the local news media. Thanks for responding, wwgd


    When you start running with this project....I would switch to a 20 Channel MN5010HS GPS Receiver. It's very tiny, can be run on 3.3v (coin cell battery) and can use a smt chip antenna. It should use the same commands as your EM-406 and will be just as sensitive too. I have a built a project very similar to yours for my graduating senior design project and am continuing to improve it as well. I have also designed PCBs. If you need any advice you can email me. Great work!!

    2 replies

    Hello Kurf, I casually checked out the receiver you suggested on the web. Have you used this antennae? I think it has a serial interface/protocol and no physical antennae? If so, I do not see an antennae jack anywhere on the unit? I have a few specs on another antennae I was checking out; micro small "can style" antennae with through hole mounting. I cannot find the specsheet/name right now. In a nutshell, I am curious as to what types of GPS antennae/receivers you have worked with. My next step is to upgrade the antennae.--Smaller, lighter and with maybe a pressure sensor to fuse w/ GPS altitude data. ?? Thanks for responding to my article, wwgd


    Your right there is no antenna on the actual receiver. It's a surface mount component. You'll need to make PCB for it. The antenna will connect to the receiver via a trace on the PCB, just like a surface mount resistor or cap would. I do have a lot of experience with surface mount components and have built a few antennas. If you want small you'll need to go with surface mount. I have worked with helical, ceramic and surface mount type antennas. All of them should do well in keeping a lock for you. Here's an example of a surface mount chip antenna.

    Pressure sensor sounds great. This one is a SPI interface and has temperature reading as well.

    Keep looking out there I'm sure you can find something cheap. Let me know if you have any specific questions.


    . Good job. Keep us updated. . You forgot "hole reinforcements for wire labels" in the parts list. :)

    1 reply

    Hello NachoMahma, I also forgot to list the "4 pin plug cut out of an old P3" for the GPS antennae. OR the old car battery acid I used to etch the circuit board. OR how I had to cut a 40 pin DIP socket down to 24 pin because my local radio shack refuses to acknowledge that 24 pin DIP sockets DO exist. I find that hole reinforcements come in quite handy every now and then. I use them primarily for reinforcing the shrouds/holes on my homemade parasheets for rocket recovery I make out of those silver emergency/space blankets. Thanks for reading my article, wwgd


    it will be good if you can list all of your components for your data-logger. from what i seen in the figure, i'm not so sure on the "Antenna" and the specific u-controller that you are using.

    wow a reason to use my old rocket againit has no fins (I broke them off hum....)