High Altitude Balloon Flight computer -- with ambition

In my case, the desire to do the project came first -- I wanted to create my own "space-ish program" and go where thousands, including elementary school classes, had gone before, by building and launching a series of high altitude balloons and taking images from the edge of the atmosphere.

But I didn't quite want to stop there. Down the line, I want to create a platform attached to the balloon that will launch a small rocket, making this a rockin' rockoon project.

If you want to see the plans, plus get a look at the extremely messy Mega-based first draft of the flight computer, check out the posts at the bottom of this message.

Coming into this, I had zero experience with Arduino, and the last time I did anything with electronics, an individual transistor was a kind of large thing. In fact, there may have been tubes involved -- I'm that old. But I bought myself a cheap starter kit from elegoo, started picking up some other bits and pieces here and there, and eventually grabbed a solder gun and got to work.

The original mega-based comp, seen in one of the images below, has now been replaced with a nano-based version that lasts much longer on a $6 power pack from Dollar General Store. I've been driving it around in my car, testing it's ability to run for hours, to correct issues in flight, and to handle a few bumps and jostling. Things are looking pretty good.

This current version of the flight computer is pretty basic. It contains only a nano clone (this one happens to be a Lafvin, because it was cheap and they soldered the pins far more neatly than I can), a catalex SD card module, a uBlox GPS module, and a BMP180 barometer. It's all currently soldered, with a minimum of good planning and a maximum of criss-crossing leads, to a bit of protoboard. There's also another tiny board with a trio of LED indicators and a buzzer that start beeping after an hour of flight to make the package easier to find on the ground.

For this first draft, that's basically it -- it's a data logger. I'm counting on a Spot satellite-based tracker to help me locate my space capsule (styrofoam minnow bucket, $2 at the local farm supply). There's a cell-based tracker (read, old Android phone) that may also help with some coordinates once it's on the ground.

In phase 2, I intend to add an APRS radio beacon.

Phase 3 will be equipped to fire the rocket (this is to be a small model rocket using standard Estes igniters, but the darn things are notoriously unreliable in cold weather, and since I want to launch around 90k feet, it's always cold weather). A transistor and a relay are the obvious bet, but there's some research on this point still to come.

Finally, in phase 4, I want to get this all down to a neat PCB once I learn exactly which components I need and have some assurance that I've got all the functionality -- and some flexibility -- required for future flights. To that end, I'm also fighting my way through KiCAD.

I've just rewritten the flight comp software, stealing heavily from Tiny GPS ++ examples. I've dumped the String library use I had in the first edition, and that seemed to solve the memory corruption errors that were setting in after prolonged recording.

My only issue at the moment is that the BMP180 has stopped working. As in ... at all. As in, trying to even initialize it with a .begin brings the whole program to a rock solid lockup in fact, if I try to even run the BMP180 examples, I get nuttin'.

#include <SFE_BMP180.h>
#include <Wire.h>

SFE_BMP180 pressure;

void setup()
{
  Serial.begin(115200);
  Serial.println("STARTING...");

  if (pressure.begin())
    Serial.println("Good!");
  else
  {
    Serial.println("Bad!");
    while(1); // Pause forever.
  }
}

void loop()
{

  
}

Will get me "Starting" and no more. I don't get good. I don't get bad. I just get ... stopped. So that's an issue. And since I'm the one that soldered this chip to the board, I suspect I'm the issue.

In any case, it continues to be cold and snowy here, so my intentions to launch this month have pretty well been thwarted. But that's given me the chance to build, rebuild, and rebuild again. And code, and recode.

I even splurged on a Feather Express M0 and a GPS featherwing which would allow me to make a considerably smaller flight com and store the info in flash. But for now, I'm sticking with the Nano, at least through the first flight. After all, the Spot cost $99, so I'd like to see if I can get this thing back before I add another $50 worth of chips.

Right now, the flight com costs are:

Lafin Nano: $3.60
Catalex SD module: $0.97
uBlox GPS: $18.00
BMP180: $1.95

Some of those prices were reduced because I bought some items in quantity. After all, I figured I'd ruin some (and I am at least one Nano and possibly that BMP180 in the "oops" category). But throw in some PCB board and assorted wire and the price, except when you add the solder burns on my hands, is pretty low.

Anyway, if you have a clue on the BMP180 issue, that would be great. Otherwise, I'm going to keep working away, likely building another version in a nice little project box while I wait for the weather to clear. If you want to check out the project plans, or see images of the work in progress, try these links:

My only issue at the moment is that the BMP180 has stopped working. As in ... at all. As in, trying to even initialize it with a .begin brings the whole program to a rock solid lockup in fact, if I try to even run the BMP180 examples, I get nuttin'.

Likely a wiring problem. The I2C library on the Arduino is rather simple and if either line is shorted to ground or lacks a pullup then the program will wait forever for it to go high.

You do have pullups?

Actually, none of the examples I'd seen in the base library, or SparkFun, or AdaFruit's version included a pullup so ... nope, I hadn't included one.

But I'm confident you're correct on the issue -- my soldering at this point is more a matter "whoops" and trying to wick away the excess than it is putting on just the right amount.

As I was digging out in my big box o' sensors that I got in my initial kit, it seems there is also a MPL3115A2 to be had. So, if I've irretrievably killed the BMP180, I'll give that one a go.

Just going to note that last night I left the nano based flight com out in the 10 degree weather running off that $6 1250ma power pack feeding juice in via USB.

It successfully recorded data for seven hours, after which I picked it up and drove it around in a car until it finally stopped.

Checked the micro SD and all the data looks good (well, over the course of over 25,000 records, the GPS did fail checksum 1,800 times. But the good news is that it recovered and went on recording good data. Pasting the data into Google Maps shows that it was accurate, at least on the lat / long front.

Now I'm going to risk the whole thing to try and un-solder and resolve the issue with the BMP180. The reason I think it is worth it is that some GPS chips stop recording above 50,000 feet. This particular chip is not supposed to have that issue, but just in case I want to be able to calculate barometric altitude as a backup.

Devilstower:
Now I'm going to risk the whole thing to try and un-solder and resolve the issue with the BMP180. The reason I think it is worth it is that some GPS chips stop recording above 50,000 feet. This particular chip is not supposed to have that issue, but just in case I want to be able to calculate barometric altitude as a backup.

You'll have to do your homework better. The BMP180 data sheet says:

Pressure range: 300 ... 1100hPa (+9000m ... -500m relating to sea level)

Pressure at 50,000 ft altitude is about 110 hPa. Note: it's successor, the BMP280, also won't help. Same range.

Hmm. As far as balloon goes in regards permission I don't know but I do know that the US has strict laws regarding 'space' launches. I would look into that first before you finally commit.

Admitted is probably a fun excercise for you though.

I wonder what will happen to styrofoam at 100,000 feet.

There's a long tradition of doing high-altitude balloon flights using software called CHDK installed in a Canon point-and-shoot camera. CHDK permits running a script on the camera, which can let it take a few pictures, then a couple minutes of video, or basically whatever you want to do. Of course even better cameras are a lot smaller now, but I don't know how many can run a script or be remotely controlled by the flight computer.

My memory of the videos from these flights is that one big problem is that everything hanging from the balloon is spinning. And another is finding a wide-angle camera that doesn't also distort (as GoPro does).

Anyway, it sounds like you're making good progress.

Might be worth considering a dual tracker system to mitigate against failures.

Two completely seperate trackers and batteries, different model GPS, radio device etc.

If your concerned about ground range searching then LoRa would be an idea for one tracker, extended range and not dependant on the balloon by chance happening to land within the relativly short range of a handy APRS node.

Raspberry Pis are popular in the UK for HABs as in Pi in the Sky;

Pi in the Sky

Download of 'live' pictures using LoRa too ........................