Lessons and the learning game

Build a high-altitude balloon tracker

A high-altitude balloon tracker on an Uno: GPS in flight mode, pressure and cold, LoRa tracking, a flight log, a cutdown and a simulated flight.

The rules, first

In the US, unmanned free balloons are covered by FAA 14 CFR Part 101. Light payloads fall outside most of its Subpart D, which covers heavier ones (for example any single package over 6 lb, or a total payload over 12 lb) with notice to the FAA before launch, position reports and at least two independent ways to terminate the flight. No flight may create a hazard to people, property or aircraft. Telemetry on 433 MHz is in the 70 cm amateur band in the US: it needs an amateur radio license, your callsign in what you send, and no encryption. Fly with a club the first time.

The tracker

Every lesson opens on the same wiring:

  • GPS: a NEO-6M on SoftwareSerial pin 4.
  • Pressure and temperature: a BMP280 on I2C at 0x76.
  • Telemetry: an SX1278 LoRa module at 433 MHz.
  • The log: a microSD card on the same SPI pins, chip select on pin 8.
  • The cutdown: an IRLZ44N MOSFET on pin 6 with a 10k gate pull-down, switching a 6 V battery pack through a lamp that stands in for nichrome wire.

The catalog lists this course on an ESP32. It is built on the Uno, whose firmware has every library it needs.

How it works

Flight mode. A u-blox GPS in its default PORTABLE dynamic model gives up above 12 km. The tracker sends UBX CFG-NAV5 at power-up to switch it to AIRBORNE, good to 50 km. The command's Fletcher checksum is 16 DC. Mokxi's module accepts it and does not model the limit.

The standard atmosphere. Pressure becomes altitude through three layers: 6.5 C colder every km to 11 km, a steady -56.5 C to 20 km, then slowly warmer. The BMP280 is rated to 300 hPa, about 9.2 km, and -40 C, so up high the GPS takes over.

Telemetry. A UKHAS sentence every five seconds, $$CALLSIGN,count,time,lat,lon,alt,sats*CRC, with a CRC-16/CCITT (check value 29B1) so any receiver can throw away a corrupted one.

The log. A CSV line every two seconds on the card, flushed every five lines, and a flight that carries on without a card.

The cutdown. It arms only 1000 m above the launch site, then fires once, for 4 s, on a ceiling, a geofence, a flight timer or a command.

The simulated flight. Run 300 times faster than life and labeled SIM in every sentence: a 5 m/s climb through the standard atmosphere, burst at 30,000 m (11.7 hPa, -46.5 C), a parachute that falls faster in thin air, and a west wind strongest near 11 km.

The course

Build a high-altitude balloon tracker gets there in six lessons, each a sketch on the same wiring:

  1. GPS altitude: flight mode, and a UBX checksum.
  2. Pressure and cold: the standard atmosphere and the BMP280's limits.
  3. LoRa tracking: UKHAS sentences with a CRC16.
  4. Logging: CSV on microSD, flushed often.
  5. A cutdown: ceiling, geofence, command, and never on the ground.
  6. Project: a simulated flight: launch to landing, with a log to download.

Every step but the last is checked against the running circuit.