Introduction: The Ultimate High Altitude Weather Balloon Data Logger

About: I'm passionate about building, coding, and space science. Join me as I collect data from near space, build experimental rocket motors, and overengineer solutions to simple problems.

Record high altitude weather balloon data with the ultimate high altitude weather balloon data logger.

A high altitude weather balloon, also known as a high altitude balloon or HAB, is a huge balloon filled with helium. These balloons are a platform, allowing experiments, data collectors, or practically anything to go to near space. Balloons frequently reach heights of 80,000 feet with some going over 100,000 feet. A hab typically has a payload containing a parachute, radar reflector, and a package. The package usually contains a camera and a GPS unit used to track and recover the balloon.

As the balloon gains altitude, the pressure drops. With less pressure outside the balloon, the balloon expands, eventually becoming so large, it pops! The parachute then returns the payload back to the ground, often many miles from where the balloon was launched.

My school uses these balloons regularly to capture video of the curvature of the earth. With extreme temperature and pressure changes, large amounts of radiation, and wind speed, lots of interesting data can be captured from these flights.

This project began four years ago with a socratic seminar about space. The seminar acted as inspiration. My peers decided they wanted to reach space. Touch the untouchable. They decided the way to reach space would be with weather balloons. Skip ahead four years later and we have launched 16 balloons. 15 have been recovered which is a very impressive track record for weather balloon retrievals. This year, I started high school and joined the weather balloon launching team. When I realized no data was being recorded, I set out to change that. My first data logger was The Easiest Arduino High Altitude Balloon Data Logger. This new version captures more data, earning it the title of ultimate. With this, altitude, temperature, wind speeds, ascent and descent rates, latitude, longitude, time, and date is captured and stored on a microSD card. This version also uses perf board to increase durability and lower risk. The design is made so that an Arduino Nano can be plugged in on top. The data collected from this data logger allows us, students to touch the edge of space. We can touch the untouchable!

This new data logger provides more data than most of the balloon loggers that can be purchased. It can also be built for less than $80 while a store bought one will cost you more than $200. Let's get started!

Step 1: Parts, Programs, Tools, and Libraries


Arduino - A Nano is best as it can be snapped on top. I've also used Arduino Uno's with wires attaching it.

I would advise you to use a genuine Arduino because many of the clones may not work at the cold temperatures the data logger is exposed to. The coldest temp recorded on our flight was -58 fahrenheit. With proper weather protection and hand warmers, a clone can work.

$5-$22 (depending on quality)

GPS Unit - This provides time, date, altitude, descent, ascent, and wind speed data!

I would highly recommend this unit. Most GPS units do not work above 60,000 feet. Since high altitude balloons go higher, those don't work. When in flight mode, this unit works to 160,000 feet.


MicroSD Data Logger - This holds a MicroSD card and allows us to store the data we collect.

There are many of these on the market and definitely some for cheaper. I went with this one because it is lightweight, Sparkfun has great documentation, and it is very easy to use. When attached to pins 0 and 1, the Serial.print function writes to it. It's that easy!


Temperature Sensor - I use one to provide outside temperature, but an additional can easily be added to provide temperature from inside the payload.

I used the tmp36 temperature sensor. This analog sensor runs without the delay command. The gps unit cannot work with delays therefore this sensor is ideal. Not to mention it is dirt cheap and only requires a single analog pin. Also, it works at 3.3 volts which is what the entire circuit runs on. This component is basically a perfect match!


1k Resistors (2x) - These are used for the receiving lines of the GPS and MicroSD Data Logger.

The Arduino provides 5 volts to these pins. A 1k resistor drops the voltage to a safe level for these units.


LED - This blinks every time data is collected (Optional).

The Arduino and MicroSd blink every time data is collected as well. This, however, makes it more obvious. The wires on this could be extended as well so that the led sticks out. This is used to ensure data logging is happening.

Perf Board - This allows a more permanent circuit and decreases risk as wires can't fall off. A breadboard or pcb could be used instead.


Battery connector - I use a 9v battery on my launches. This attaches the battery to the circuit. I solder the connection joint of jumper wires onto these to provide an easier connection.


Micro Toggle Switch - I use this to turn on the unit. This allows me to keep the battery plugged in while keeping the system turned off (Optional).

I salvaged mine from a moon lamp. Any micro switch will work.



Male and Female Headers - Use these to allow components such as the GPS and Arduino to detach from the circuit. (Recommended)


MicroSD Card - I would recommend a 4-16 gb card. The logs do not take up much space.

My data logger ran from 6:30 am to 1:30 pm and used only 88 kilobyte of space. That's less than 1/10 of a megabyte.


Powersource - Space is cold so liquid batteries will freeze. This means no alkaline batteries. Lithium batteries work great! I used a 9v battery.


Total Cost Comes In At $79.66! Commercial loggers cost about $250 so consider this a 68% discount. You also probably have many of these items such as the Arduino, Sd Card, etc which drive down the cost. Let's get to building!


The only program needed is the Arduino IDE. This is the native Arduino language and is used to upload the code, write code, and for testing. You can download the software for free here:


We use two libraries in this sketch. The NeoGPS library is used to interact with the GPS unit. The software serial library allows serial communication on additional pins. We connect to both the GPS and MicroSd data logger using serial communications.


SoftwareSerial - Any software serial library can be used. I already had this one downloaded so I used it.

Need help installing a library? Read this:


Soldering Iron - Headers will need to be attached to multiple components and a soldering iron is used to attach components to perf board and make tracks.

Solder - Used in combination with soldering iron.

Step 2: Putting the Circuit Together

You will need to solder headers onto a few components. Learn how to do that here:

Follow the breadboard or perf board schematic above. Do not attach ground of temp sensor to ground of GPS or microSD data logger as it will ruin your temperature data. If you are using a perf board, watch this tutorial on how to make tracks. This is one technique:

Be careful when attaching components. Make sure you have the correct polarity and pins. Check your connections twice!

Arduino - GPS
3.3v --- VCC


D3 ----- 1k resistor----- RX

D4 ------ TX

Arduino -- OpenLog

Reset --- GRN

D0 ---- TX
D1 ---- 1k resistor---- RX

3.3v ----- VCC

GND ---- GND

GND ---- BLK

Arduino -- Temp Sensor - Use the above photo to identify which leg is which

3.3v ------ VCC

GND ---- GND (This should either be on its own Arduino pin or attached to the power supply GND. If attached to GPS or logger it will skew temp data.)

Signal --- A5

Arduino -- LED

D13 ------ + (longer leg)

GND ------ - (shorter leg)

Arduino -- Battery Connector

Vin ---- Micro Toggle Switch ---- Positive(Red)

GND ----- Negative(Black)

Step 3: Programming

We use two libraries in this program, NeoGPS and SoftwareSerial. They can both be downloaded from the parts page of this Instructable. When interfacing GPS into an Arduino program, the TinyGPS library is typically used. However, I could not get it to work with the GPS we use.

The SoftwareSerial library allows us to connect two devices to the Arduino via software serial connection. Both the GPS and MicroSD data logger use this. Other libraries can do this as well and should work with the code. I already had this one on my computer and it works, so I used it.

The code is based off of my last data logger. The main change being the addition of the temperature sensor. GPS is based off of satellites. This means the GPS must first connect to satellites before it can display data. A lock consists of the GPS being connected to four satellites. A quick note being that the more satellites the GPS is connected to, the more accurate the data being provided is. The program prints the number of satellites connected on each line of data. It was connected to twelve satellites for most of my flight.

The program may need to be changed so that it works for you. While all of the code can be altered, I would recommend changing the timezone, time between readings, and unit of measurement for the temperature. A typical weather balloon is airborne for about two hours. The GPS receives data from the satellites every second. This means, if we store every piece of data sent, we will have 7,000 readings. Because I have no interest in graphing 7,000 data entries, I opt to log every 30th reading. This provides me with 240 data points. A little more reasonable of a number.

You may be wondering why we use a variable i and an if statement to save every 30th reading rather than than just using a delay command and waiting 30 seconds. The answer is that GPS readings are very delicate. A 30 second delay means the GPS is not capturing every data set and causes our data to be messed up.

You'll need to change these values to your offset from Coordinated Universal Time (UTC).

If you don't know yours you can find it here

static const int32_t

zone_hours = -8L; // PST

static const int32_t

zone_minutes = 0L; // usually zero

This line should be changed to how often you want a reading recorded. I set mine for a reading every 30 seconds.

if (i == 30) {

If you don't live in the U.S.A, you probably want temperature measurements in celsius. To do this, uncomment this line:

// Serial.print("Degrees C "); //uncomment if you want celsius

// Serial.println(degreesC); //uncomment if you want celsius

If you don't want fahrenheit readings, comment this:

Serial.print("Degrees F "); //comment if you do not want fahrenheit
Serial.println(degreesF); //comment if you do not want fahrenheit

Code Not Uploading?

The Arduino must be disconnected from the circuit while new code is being uploaded. The Arduino is sent the new code via Serial Communication on pins D0 and D1. These two pins are also the pins used for the MicroSd data logger. This means the MicroSD data logger must be disconnected for code to upload.

Step 4: Testing

Once all connections are made and the code is uploaded, it is time to test our data logger. To do this, plug the Arduino into the computer the same way you would to upload code. Ensure the serial port is correct and then open the Serial Monitor. If all connections are made correctly, this will be displayed:

NMEAloc.INO: started
fix object size = 31 NMEAGPS object size = 84 Looking for GPS device on SoftwareSerial( RX pin 4, TX pin 3 ) High Altitude Weather Balloon Data Logger by Aaron Price

Time Latitude Longitude SAT Wind Speed Wind Speed Altitude (deg) (deg) knotts mph cm ----------------------------------------------------------------------------------------------------------------

If the GPS is plugged in incorrectly, this will be displayed:

Setting uBlox flight mode:
B562624240FFFF63000010270050FA0FA06402C10000000000000016DC * Reading ACK response: (FAILED!)

Ensure the led blinks every time a new piece of data enters the Serial Monitor. The MicroSd data logger will also blink every time data is recorded.

You will notice that the GPS is sending you a single question mark. This is because GPS units take time to start up and connect to satelites. This unit typically takes about eight minutes to start sending me the full string of data. Within about five it will begin sending you date and time data followed by a question mark. The first few points will probably be incorrect but then it will display the correct date and time. If you are not recieving your date and time, refer to the code to ensure the right timezone is corrected. Read the programming section of this Instructable to learn how to do that.

Eventually the Serial Monitor will display all of the data. Copy and paste the latitude and longitude and prepare to be shocked by the results. The accuracy is remarkable!

Check the temperature data to make sure it is correct. If the temperature is being read as a grossly unrealistic number (160+) the temperature sensor is either not plugged in or plugged in incorrectly. Refer to the schematic. If the temperature reading is volatile or higher than it should be (i.e. the temperature is 65 fahrenheight and the sensor reports it as 85) then the sensor is likely sharing a ground pin with the GPS, microSD data logger, or both. The temp sensor should either have its own ground pin or share a ground pin with only the input ground.

You now need to format and clear your microSD card. We need a fat16 or fat32 file type. I followed this tutorial by GoPro:

Next, test the circuit without the computer attached. Plug a microSD card into the data logger and use a power source to give the Arduino power. Let it run for twenty minutes then disconnect power. Unplug the microSD card and plug it into your computer. You should see a config file was created (this only happens when a prior config file is not made). Each time the Arduino is reset or plugged in, it creates a new file.

New libraries and versions of the Arduino IDE have been released since the conception of this project. Because of this, multiple users were getting nasty error messages. User RahilV2 was having this issue and found a solution!

"I have fixed the initial error and it was because the .INO uses the old gps port name which is 'gpsPort' instead of 'gps_port'. The preprocessor symbol has also changed. All the example programs now use 'GPS_PORT_NAME' instead of 'USING_GPS_PORT'."

Thanks RahilV2!

Step 5: Protecting the Electronics

A note to people using perf board, placing the circuit on a metal surface will short the circuit. I used a plastic pipe around some bolts to hang my perf board above a plastic sheet. You could hot glue the bottom, attach it to some cardboard or foam, or use a package that does not conduct electricity. You can 3d print these plastic pipes to slip over your bolts from here:

I attached female headers to the perf board where the GPS sits to allow the GPS to be easily snapped off the circuit. The GPS unit is fragile. The chip antennae can break and the unit is sensitive to static electricity. I haven't had any of these units break. I store the GPS in the static shielded bag it comes in to keep the GPS protected.

Whether you are using a breadboard or just jumper wires for the battery connector, I recommend using hot glue to ensure the jumper wires stick in their sockets. It would be a bummer for you to recover your balloon to find it didn't log because a jumper wire detached.

Hand warmers are advised as they will keep everything warm and functioning. I typically extend the length of my battery connectors allowing me to store the battery in a separate compartment from the electronics. I put hand warmers directly on the battery. While the electronics should be able to function without hand warmers, I would recommend using them. Put a hand warmer or two near the electronics, securing the hand warmer so that it will not touch the electronics. The radiant heat from the hand warmers is sufficient in keeping the electronics in good condition.

Step 6: Launch

I typically plug the data logger into my computer about twenty minutes before we plan to let the balloon go. Plugging the logger into the computer is not necessary. I do this to ensure the GPS is running and that I have a satellite lock. Once the logger is displaying all of the data, I flip the toggle switch and disconnect the computer. Because the circuit always has a source of power, the GPS stays hot and continues logging with a satellite lock. This will create a new file on the microSD card.

We launched the balloon at 6:58 am. We planned to launch earlier but our first balloon developed a rip. We had forgotten our tubing to attach the balloon to the helium tank. So, we attached the balloon directly to the nozzle of the helium tank. The vibrations on the nozzle put a rip in the balloon. Luckily, we brought a spare balloon. We used a cut garden hose as our improvised tubing and it worked!

The package consisted of an insulated lunchbox. The data logger sat inside with the hand warmers. A hole cut in the lunchbox provided a way for the camera to be inside the lunchbox while maintaining an unobstructed view. We used a GoPro Session for this launch. It took photos of the journey! Attached to the side and top of the lunch box were two SPOT GPS units. We used these to track our package. A small slit was made in the side of the lunchbox to allow the temperature sensor to stick out, exposing it to the outside air.

Step 7: Recovery

I used a Duracell 9v battery on my last launch. I measured the voltage of the battery as 9.56 volts before plugging it into the data logger. I plugged the battery in at around 6:30 am. After the balloon landed, was recovered, driven back to school, and the package opened, it was 1:30 pm. I opened up the payload to find the data logger was still logging! I then measured the voltage of the 9v battery. As a battery is used, the voltage lowers. The battery was now at 7.5 volts. After seven hours of data logging, the battery was still in decent shape.

The balloon and package landed south of Ramona in a small canyon. The recovery team drove about an hour and then hiked the rest of the way. Poison ivy and hot temperatures were an obstacle, yet they persevered and were able to recover the balloon. They returned to the school and handed me the package. I was surprised the data logger was still running. This made me optimistic. I unplugged the battery and carefully took out the microSD card. I then ran to my computer. This is the most nerve racking and exciting part of the journey for me. Did the data logger work? I rummaged through my backpack to find the SD card adapter. The last two flights the logger had stopped working at 40,000 feet because I had incorrectly put the GPS in flight mode. Being that the only way I can reach heights over 40,000 feet is with weather balloons, I had no idea if my new code would work.

I plugged the microSD card into my computer, opened the file, and saw a log full of data. I began scrolling through the data... SUCCESS!! The log continued through the entire flight.

Step 8: Analysis and Science

The expression "third times the charm" rings true. We logged data for the entire flight! The balloon reached a max altitude of 91,087 feet and the coldest temperature was -58 degrees fahrenheit.

Our data confirms and aligns with much of known science. For example, the bottom of the stratosphere was -40 to -58 degrees fahrenheit while at apogee of the flight, the temperature was -1.75 degrees fahrenheit. Humans live in the lowest layer of the Earth's atmosphere, the troposphere. In the troposphere, the temperature lowers as one gains in altitude. The opposite is true in the stratosphere. In fact, the top of the stratosphere can be five degrees above zero.

I was surprised that the balloon ascended in such a linear fashion. I would think as the atmosphere thinned the balloons ascent speed would change. I was not surprised, however, by the curve in the descent speed of the balloon. My hypothesis as to why the balloon falls quickly then gradually slows down has to do with the parachute. At apogee, there is so little air that I think the parachute was not as effective. Parachutes use air resistance and friction to slowly fall to the ground so if there is little air, the parachute is not as effective. As the package lowers, the air resistance increases because there is more air pressure and more air. This results in the parachute being more effective and the package descending slower.

Due to temperature and wind speeds, I declare the worst altitude to live in to be 45,551 feet. At this altitude, the package experienced a chilly -58 degrees fahrenheit. If this was not enough, winds were blowing 45 miles per hour. While I had trouble finding data for the effect of wind on windchill at this temperature, I found that -25 degree fahrenheit weather with a 45 mile per hour wind results in a windchill of -95 degrees. I also discovered that windchill temperatures of -60 degrees freeze exposed flesh in 30 seconds. Nonetheless, this is probably not an ideal vacation spot. As seen in the photo above, there is a great view from this altitude! Learn more about windchill here:

I could not have displayed and studied this data without help from my sister who did data entry of all 240 lines of data. Perks of having younger siblings :)

Step 9: Conclusion

This is a definite success. We logged altitude, temperature, wind speed, ascent rate, descent rate, time, date, latitude, and longitude data on the entire flight. This is a must have for experienced high altitude ballooners and first time launchers!

After four years of balloon launching, we finally data logged an entire flight. We finally found out how high our balloons fly. We got a little closer to experiencing space. We got a little closer to touching the untouchable!

Another cool aspect of the data logger is that all the data is time stamped. This means you can line up the data with photos taken on the journey which allows you to know the altitude and exact location in which each photo was taken!

This project is easy to replicate and modify for your own purposes. Easily add additional temperature sensors, pressure and humidity sensors, geiger counters, the opportunities are endless. As long as the sensor can be used without a delay, it should work!

Thank you for taking time to read this Instructable. I enjoy answering questions, replying to comments, and helpful tips and ideas, so shoot away in the comments section below.

This Instructable is also in some contests, please vote if you enjoyed or learned something new! Winning prizes allows me to earn new tools to make better and more advanced projects.

Untouchable Challenge

Runner Up in the
Untouchable Challenge

Explore Science Contest 2017

Grand Prize in the
Explore Science Contest 2017

Invention Challenge 2017

Participated in the
Invention Challenge 2017