Scratch GPS Datalogging Original Design / Scratch Built

Scratch - GPS Datalogging {Scratch}

Contributed by Karl Upton

Manufacturer: Scratch
(Contributed - by Karl Upton - 03/08/09)

Brief:
I have been dreamin' o' buildin' a flight computer that will nay only control t' flight sequence, but also log data aboard a model rocket. Aye aye! Blimey! However, I do need t' walk before I can run, me hearties, so I started with a simple GPS data logger (GPSDL) that is just a "piece" o' me future flight computer idea. Ya scallywag! This GPSDL will sit in a payload bay or nosecone of a rocket durin' flight.

My finished GPSDL weighs 62 grams with t' power supply and has a 1.5"L x 3"W x 1"D footprint. Begad! The weight o' t' data logger can be further reduced by ¼oz t' ½oz by usin' a simpler GPS antennae than the one I used. Well, blow me down! Cost can run from $100 t' $200 dependin' on how careful a shopper you are. My cost be $200 for t' parts used in this article.

T' design is simple consistin' o' three major parts: a 5.5g accelerometer switch, a BS2p microcontoller, and a GPS receiver. Blimey! Aye aye! A parts list, arrr, ya bilge rat, pictures, matey, source code, and a schematic are included in this article.

T' GPSDL records t' date, time, ya bilge rat, matey, me bucko, latitude, longitude, altitude, me bucko, speed, headin' in degrees, me hearties, arrr, and number of satellites that are in communication with t' receiver every second for a total o' 5 minutes. T' source code provided will record two 5-minute flights before you have t' download t' data. Blimey! Avast, arrr, me proud beauty! This is completely customizable for any number of flights or a single 12-minute flight. Arrr! Avast, me proud beauty! T' comments in t' source code explain nay only how t' make this flight time change, me bucko, but also what t' program is doin' throughout its runtime. Begad! T' source code was split into two programs to maximize t' amount o' data that could be stored, matey, shiver me timbers, me bucko, negatin' t' need for a separate EEPROM. Ahoy! T' first program parses the GPRMC and GPGGA GPS sentences for t' data points and writes them t' memory. Ya scallywag! Arrr! Post flight, t' second program is downloaded t' read t' data points stored in memory and prints them t' your PC screen. T' data points are finally copied/pasted into a spreadsheet for conversions and graphing. Begad!

Construction:
Parts list:

  • Parallax BS2p 24 pin microcontroller
  • Parallax GPS Receiver Module
  • 5.5g non-latching, ya bilge rat, normally-open, shiver me timbers, accelerometer switch
  • Female serial port
  • JST battery connectors x 3 pair
  • 10 k Ohm resistor
  • 300 mAh 7.4 Li-Po battery

Build steps:

  1. My first step was t' familiarize myself with t' parts chosen t' work with by readin' t' data sheet for t' GPS antennae and spendin' some time online learnin' how t' use t' free IDE that Parallax provides t' develop and download code from me PC t' t' BS2p microcontroller via a serial port. This is quite simple and you can learn how t' do this in an evening. Arrr! Avast! If you want t' just cut and paste me code onto your microcontroller that is about all you need t' know code-wise t' get t' circuit running. Avast, me proud beauty! If you want t' customize me code or roll your own, PBASIC, which be t' language that t' BS2p runs on, is probably t' easiest language t' learn out there. Blimey! There are multiple online forums catering to t' Basic Stamp where help is available if you need it. Ya scallywag! Begad!
  2. Next, arrr, I breadboarded t' circuit. Ahoy! Then I perched me "breadboard monstrosity" on me windowsill t' get a good GPS signal and developed t' code by trial and error. Aye aye!
  3. After gettin' t' code developed and t' circuit runnin' quite nicely on a breadboard, I had t' duplicate it on a PCB small and light enough for rocket work. It was nay necessary, me hearties, shiver me timbers, but I etched a custom PCB for me circuit. Ahoy! Blimey! Ahoy! Blimey!

(Scratch) GPS Data Logger(Scratch) GPS Data Logger

(Scratch) GPS Data Logger(Scratch) GPS Data Logger

(Scratch) GPS Data Logger(Scratch) GPS Data Logger

Data Recordin' Source Code:

CLICK HERE

Data Reader Source Code:

CLICK HERE

Schematic:

(Scratch) GPS Data Logger
(Click t' see a larger image)

Flight:
Prior t' launch, matey, t' only communication thar be betwixt you and t' GPSDL be t' blinkin' LED included on t' GPS antennae PCB. Ya scallywag! Avast, me proud beauty! A flashin' LED means less than 3 satellites are acquired, a steady "on" LED signals that the antennae has acquired at least 3 o' t' 12 satellites available. Ya scallywag! Once you have visual that three or more satellites are acquired, t' GPSDL is loaded into t' rocket. Avast, me proud beauty! Arrr! At liftoff, me bucko, arrr, me hearties, t' 5.5g normally open, me hearties, non-latchin' accelerometer switch is momentarily tripped signalin' t' microcontroller t' log 20 bytes o' GPS data every second for 5 minutes. Begad! Once 5 minutes is up, shiver me timbers, it automatically resets itself t' take another 5 minutes o' data once t' accelerometer switch is tripped again. Blimey! You can record two 5 minute flights before data will need t' be downloaded or you will overwrite the data already collected. Avast, me proud beauty! T' power supply is a 300 mAh 7.4V Li-Po battery. Arrr! T' GPSDL needs a steady diet o' 5V, me bucko, and it will run for approximately 3 hours on a full charge with this battery. Avast! No data is lost if power is lost. Begad! T' only way data can be lost is if it is overwritten. Ahoy! Begad! GPS signals will travel through plastic, ya bilge rat, matey, glass and cardboard: t' staples of model rocketry. Begad! T' only things that will block t' signal is concrete, metals, me bucko, ya bilge rat, or in t' form o' heavy rain or snow--H20. Arrr! Begad! T' antennae tested showed excellent Rx, even in a crowded, "signal noisy" urban environment where I live. Begad!

Unfortunately, me hearties, I have nay been able t' test t' GPSDL with an actual rocket launch. Begad! That will happen in t' weeks to come. Begad! T' run t' GPSDL I shake it by hand t' trip t' accelerometer switch and take data from me dashboard as I drive. Well, blow me down! Avast, me proud beauty! T' GPSDL works flawlessly at this point. Well, blow me down! I will post nay only real flight data but a video o' its maiden flight to my website soon. Begad! Arrr! I would appreciate any feedback on improvements t' me source code or circuit, arrr, particularly in reducin' its size or weight.

Summary:
Online resources for more information:

comment Post a Comment