High-Altitude Balloon Payload Logger
Send a Pi Zero to the edge of space: log GPS, pressure and temperature, take photos and track it with LoRa until you recover it.
Weather-style balloons can lift a small payload above 30 km, where the sky turns black. It is a classic school and club project — but it is aviation, so planning, legal limits and recovery matter as much as the electronics.
Follow FAA Part 101 (or your country's rules), never launch near airports, in bad weather or when it could create a hazard, and plan a safe recovery away from roads, power lines and water. Use a parachute. Lithium cells lose capacity in the cold; test the whole system at freezing temperatures first.
Mission steps
Check the rules
In the U.S., FAA Part 101 covers unmanned free balloons. Small payloads are exempt from most requirements only if they stay under its weight and density limits (for example, no single package over 4 lb with high density, none over 6 lb and no more than 12 lb in total) and the suspension line breaks under 50 lb of force. Read the current rule before you build.
Set the GPS for altitude
Many GPS modules stop reporting above about 18 km unless you set the dynamic model to an airborne mode using u-blox's u-center software.
Log the sensors
The Pi records GPS position, BME280 pressure and temperature, and a photo every minute to the SD card.
Track it
A LoRa radio sends position packets to a receiver on the ground; ISM-band LoRa modules do not need a ham license.
Insulate and test
Use a foam box and hand warmers, run the full system in a freezer for hours, and predict the landing site with a flight-path predictor before launch day.
Code
import time, csv, subprocess, serial, pynmea2, smbus2, bme280
bus = smbus2.SMBus(1)
cal = bme280.load_calibration_params(bus, 0x76)
gps = serial.Serial('/dev/serial0', 9600, timeout=1)
fix = {'lat': None, 'lon': None, 'alt': None}
last_photo = 0
while True:
line = gps.readline().decode(errors='ignore')
if 'GGA' in line:
try:
m = pynmea2.parse(line)
fix = {'lat': m.latitude, 'lon': m.longitude, 'alt': m.altitude}
except pynmea2.ParseError:
pass
env = bme280.sample(bus, 0x76, cal)
with open('/home/pi/flight.csv', 'a', newline='') as f:
csv.writer(f).writerow([time.time(), fix['lat'], fix['lon'], fix['alt'],
round(env.pressure, 1), round(env.temperature, 1)])
if time.time() - last_photo > 60:
last_photo = time.time()
subprocess.Popen(['rpicam-still', '-n', '--immediate',
'-o', '/home/pi/img_%d.jpg' % last_photo])Tip: test every script on the bench before installing it in a moving machine.
Questions
Can I use APRS instead of LoRa?
Yes, if you hold an amateur radio license. APRS on a balloon is popular because ground stations all over relay your position.
How high will it go?
It depends on balloon size, gas fill and payload weight. Small latex balloons usually burst somewhere between 20 and 35 km.