High Altitude Balloon Instrument Pack
One of the biggest projects my schools amateur radio club, K2CC, has taken on this semester is launching a High-Altitude Weather Balloon to capture photos and sensor data from altitudes as high as 20 miles. I have been working with a team of people to design, build and program a microcontroller powered instrument pack. Over the last several weeks we have selected numerous sensors and ordered most of them, and last night we had our first prototyping work session to work with this equipment. We’ve decided to include the following components:
- Atmel ATmega328P microcontroller – this is the brains for the entire system, this communicates with the various sensors and forms a telemetry packet to be logged to an SD card and transmitted over 1200 bps packet radio link.
- Venus GPS with SMA Connector – this will be used to track the location of the payload while it climbs with the balloon and descends back down on the parachute, both for logging where the data was taken and for recovery. It will be used as the primary altimeter until we reach it’s effective ceiling of 11 miles.
- Antenna GPS 3V Magnetic Mount SMA – this antenna is actively powered by the GPS unit to increase the receptivity of signals, and comes with a 5 meter cord terminating in the SMA connector the GPS requires.
- MEMs Barometric Pressure Sensor – SCP1000 Breakout – this will be used to measure the air pressure during the travel up to determine altitude as a back up to the GPS. There is also a high accuracy temperature sensor integrated in to this sensor used to monitor the external air temperature.
- Humidity Sensor – HIH-4030 Breakout – this will be used to measure humidity outside the payload along with the barometer’s temperature and pressure readings to complete the trifecta of atmospheric data.
- Geiger Counter – this is my personal favorite, this SparkFun device is powered by another AVR, and counts radiation ticks. Out of the box, it draws power from USB and and sends the counts back over it. However the ISP headers are made available, and I intend to modify the SFE example code to send the data over the SPI port, accessible through those headers. I also intend to use those headers to deliver power.
- Polymer Lithium Ion Batteries – 6Ah – this monster of a battery pack will deliver power at a nominal 3.7V to all devices including a step-up regulator to provide the needed 5V for the Geiger Counter. It should also have plenty of juice left over when the pack lands so it can be found well before it runs out of power.
- Bionics TinyTrak3+ – this is a TNC (Terminal Node Controller) used to modulate serial data in to 1200 bps packet radio traffic. We’re replacing the stock firmware with DataTrak custom firmware to make the device a general purpose TNC, instead of it’s original purpose of directly operating with a GPS.
Likely we’ll be adding another component or two before we’re finished, and it should be a pretty impressive little package when it’s done. Now that you’re familiar with the gear, let’s go over what was accomplished at the work session yesterday.
First, I got a head start before everyone arrived and soldered up the headers on the GPS receiver, then I plunked it down on a breadboard with a BBUSB breakout board and the antenna and started testing. I was able to chuck the antenna out the door and get a cold fix in just over 30 seconds. Then I whipped up a perl script really fast to parse the output and give me awesome feedback. Yes, awesome, that’s a scientific term. Then everyone started arriving so we split up the work. Mark, Phil and Jonathon took turns soldering things up, including the other breakout boards and I made a sandwich.
Once I’d been suitably fed I started working with Phil and Mark on rigging a UART/SPI bridge together out of the AVR and the breadboard. For the uninitiated, a UART (Universal Asynchronous Receiver/Transmitter) is a basic serial port, the kind old PDAs use, and SPI (Serial Peripheral Interface) is a different type of serial port that is used with embedded systems. The principle difference is that SPI is synchronous, meaning that there is an included clock signal, and the data is transmitted and received one bit at a time every time the clock pulses. A UART on the contrary sends data at a known rate with no clock signal, and transmission and receiving do not have to run simultaneously. It also tends to be more error prone because of different clocks in the devices communicating drifting slightly. Computers don’t generally have SPI connections, but USB UARTs and regular UARTs are pretty common, hence why I wanted to rig this bridge. I set up the firmware so that it simply repeats every byte it receives from the UART out the SPI port, which in turn reads in a byte through SPI and repeats it back out the UART. I ran in to several bugs with this, and ended up working on it through out the night to get it fully working, but around 3 am I got it up and running and then wired in the barometer. Using the datasheet, and a button on the breadboard controlling the Chip Select line on the the barometer, I manually communicated with the barometer over a terminal program using my bridge. I was sucessfully able to initialize, configure and read data back from the barometer. Around this point, I decided it was finally time for sleep
.
That was kind of long winded and techy, so I’ll also give my loyal readers a quick summary of what was accomplished:
- GPS, Barometer, Humidity sensor and TinyTrak3 soldered up.
- GPS tested successfully with active antenna
- Simple parser used to format GPS data nicely
- ATmega328P development/test environment set up on breadboard, running off USB 3.3V power. Available USB serial port and flash programming connection. This is a little messy and temporary.
- With Mark and Phil’s help I’ve written a UART to SPI bridge program for the AVR and used it to test the barometer. I also intend to use it to interface to the Geiger counter.
- Got the barometer working, haven’t done any in depth testing with it yet.
- Took lots of photos of the prototyping set up and the barometer test setup
As I said, I took lots of photos from the UART/SPI bridge test setup and the barometer test setup, you can see them here:
![]() |
| Balloon Controller |
EDIT: I noticed I had some of the terminal output from the GPS test still around, so I thought it might be interesting to show:
---------------------------- Time: 234745.213 Latitude: 4439.6364 N Longitude: 07500.0351 W Altitude: 166.3 meters Satellites: 07 HDOP: 1.1 Accuracy: 3.3 meters ---------------------------- ---------------------------- Time: 234746.213 Latitude: 4439.6364 N Longitude: 07500.0351 W Altitude: 166.3 meters Satellites: 07 HDOP: 1.1 Accuracy: 3.3 meters ---------------------------- ---------------------------- Time: 234747.213 Latitude: 4439.6364 N Longitude: 07500.0351 W Altitude: 166.3 meters Satellites: 07 HDOP: 1.1 Accuracy: 3.3 meters ----------------------------
