What Goes Up, Must Get Logged: What I Learned by Building a Rocket


TLDR;

this blog is long, so for those that want the quick version:

I spent the past few months designing and building FlightScope, a model rocket equipped with a custom flight computer that logs altitude and orientation data for post-flight analysis. Along the way, I designed a custom rocket in OpenRocket and Onshape, developed a Python dashboard to visualize flight data, and built four iterations of a custom avionics bay powered by a Raspberry Pi Pico 2, BMP388 altimeter, and some other various electronics.

The project involved plenty of trial and error, from troubleshooting wiring and soldering issues to redesigning the rocket’s internal structure and flight computer packaging. I also learned some new electronics along the way, including using an N-channel MOSFET as a GPIO-controlled switch for the recovery system.

After several months of CAD, programming, 3D printing, laser cutting, and testing, the rocket is finally built! Now, all that’s left is the launch.

want to see closer? here are some important links!

  • View the CAD on Onshape
  • View the FlightScope dashboard on GitHub
  • View FlightCore firmware, also on GitHub
  • Rocket launch on YouTube (coming soon!)

Welcome to Flightscope!

Starting this past summer, I had the grand idea to build a rocket. I named the project Flightscope, and of course, what I actually accomplished is much more than the simple statement. I’m happy to share my journey below!

Table of Contents

  1. The Plan
  2. Defining the system
    1. The Dashboard
    2. The Rocket
    3. The Flight Computer
  3. Build and Testing
  4. Rocket Design (Part 2)
  5. Results

Planning the Rocket


Defining the Dashboard

Making a rocket and all of that was great, I thought. If you dont think so too, hopefully I’ll change your mind by the end of this. But, I didn’t want this to be something that would just fly up in the air and be done. This led me to the criteria that the rocket must collect data about its flight. That way, I could look back at it through a custom dashboard.

Picture of my custom flight data dashboard, named Flightscope Capture of the main screen of the Flightscope dashboard, my custom Python analysis dashboard for flight data.

The way it works is simple. After a flight, take a flight log formatted in CSV, upload it, and allow the dashboard to detect flight events and create a draggable replay of the flight.

gif

I designed the dashboard before the rocket, and so it drove a majority of the rest of my design process. Because of the analysis pieces that I included in the dashboard, I knew that the rocket needed to collect at least:

  1. Rocket altitude
  2. Rocket orientation (Roll, pitch yaw)

My summary on the dashboard was certainly brief, but thats mostly because it’s not what I want to focus as I recall this journey. Starting with the dashboard was an excellent step as it really got the project rolling. Of course, if there is a dashboard and no rocket, that’s really no fun.


Defining the Rocket

In my opinion, the largest defining factor about a rocket is its motor class. As this is my first rocket (and I started this project at 16, with no licenses), I decided to build around an estes D12 motor. Low power, but enough power to work with.

Version One

Version one of the rocket, modeled in the OpenRocket software Capture of version one of the rocket, modeled in the OpenRocket software.

If you know a thing or two about rockets, You know that there are a few parts that you really do need:

  1. A body tube - I went with Rocketarium’s BT-60 18 inch body tube
  2. A nose cone - For me, that would be a 5.5 inch ogive nose cone, also from Rocketarium
  3. Recovery and Parachute - I’m using just a basic Kevlar shock cord tied to a 30“ Parachute, which is all going to be shoved inside my body tube
  4. Motor & Mount - In Rocket V1, I went with an Estes D12-5 motor and this rocketarium motor mount
  5. Fins. We are going to get to these a little later, as they’re going to need to be the most customized.
  6. (Optionally) A payload - For me, this is my flight computer, which at this stage, is just an arbitrary box with a weight component in OpenRocket.

Together, The parts I did know were going to be used were going to weigh ~ 170 grams all together. With a maximum lift weight of 360 grams on a D12 Estes motor, we have another ~ 190 grams to work with for this payload. Thats pretty good!

Fins

Something great about OpenRocket is that it can help greatly when trying to find fin shapes to ensure stability. Rocket stability is measured in calibers (cal). For a rocket like mine, a rocket stability of 1-2 cals is sufficient; Too low will cause the rocket to tumble, and too high will cause the rocket to do something called weathercocking. The goal is that with fin shape, we have a simple shape that allows for >1 cal of stability. Ultimately, I landed on a triangle-on-a-square shape, which keeps simplicity for manufacturing later and gives a nice 1.36 Cals of stability. Fin picture in cad CAD of fin, including longer piece for internal attachment

Separation

To preface, I will admit that the v1 rocket separation is a little goofy. In V1, my rocket was using a D12-5 motor. As a quick reminder of what that actually means, the rocket has a motor of type D12 that propels it into the air. But, it also contains an ejection charge that fires upwards into the rocket after five seconds. This is nice, because now we have a force to separate our rocket and release our parachute. But there is one problem.

The flight computer is big - and acts as a giant bulkhead in the middle of the rocket. Because of this, the separation point of the rocket has to be lower than, or in the length that, the avionics bay is placed. The separation point on v1 of the rocket assembly Shot of the separation joint on version one of the rocket. The red coupler contains the avionics bay.

As you can see above, version one of the rocket packaged the avionics bay towards the top of the rocket, above the parachute. There is a couple things I didn’t really like about this version:

  1. It puts a lot of weight right near the top of the rocket. This pushes up our COG and makes weathercocking a larger worry.
  2. It means that the Avionics bay would need to be secured completely behind of the anchor point that connects to the parachute, which makes keeping the rocket in the correct amount of pieces upon separation more difficult.
  3. It would require that I make an additional anchor point on the bottom part of the rocket, which requires more weight and complication.

Adjusted rocket with new payload placement Version 2 viewed in OpenRocket, with adjusted avionics bay placement and fin shapes.

So, along with a redesign of the avionics bay (which we will get to later!), came a design shift from a unified motor and ejection charge to a separated charge, allowing the payload to be placed much lower in the rocket. With the new COG also came a new fin design:

Fin v2

Fin Version 2, including a smaller fin surface and lower profile.

And that is a wrap on understanding how this rocket is going to be put together. The insides of the avionics coupler has been a black box thus far in this post, and as it is the next step in this project, perhaps even the meat and potatoes of it, lets move on to that now.


Defining the Flight Computer

Version 1

The flight computer is more or less the heart and brain of this project. To start, we have to remember the 2 pieces of information that the rocket must collect:

  1. Rocket altitude,
  2. Rocket orientation (roll, pitch, yaw),

plus a few additional requirements that the flight computer needs to satisfy,

  1. A source of power that will last more than a flight duration,
  2. A form factor that fits inside the 1.5-inch diameter body tube,
  3. A method to log the data from the flight and recover it after,
  4. A weight of less than 190 grams.
  5. And a high enough frequency that it doesn’t look like the rocket is teleporting through the sky.

With these requirements, we get some hardware that ultimately makes up version one of the flight computer.

Adafruit BMP388 Altimeter & LSM6DSO32 IMU / Accelerometer

These two Adafruit sensors are extremely optimal for the project. They’re small enough that they’ll fit nicely within the space constraints, light enough that it’s basically irrelevant, and with sensor frequencies anywhere from 1.6 Hz to 6.7 KHz, there will be no issue with collecting data in a timely manner.

Adafruit SD Breakout Board+

Sticking on the theme of Adafruit, this board is more than enough to handle all of our data logging needs. Now, as long as we load up the board with a MicroSD, we can get all of the data we want in our very own log file for every flight.

Raspberry Pi Pico 2

This little guy is more than enough for all of the computational needs of this project. Compact enough that it won’t take up too much space in the avionics bay, and compatible with all of the boards at 3.3v.

All that hardware, plus a couple little guys including a 500mah lipo and a slide switch to toggle power, v1 of the flight computer comes together.


Sled

Perhaps the point of greatest iteration on this project is certainly the packaging of the avionics bay.

v1 sketch of the avionics sled Sketch for v1 of the electronics sled. Mounting order goes SD Breakout (left), pico, BMP, IMU (right)

Because of the custom nature of the avionics bay, We will be using 3d printed parts to assemble it. At this point in the project, the plan is that the main sled along with the coupler will be 3d printed in the final version. Although I had some initial concerns as to how structurally sound this would be, I was hopeful and had plans to add some stronger support to the system. More on that in a later version.

So, when considering we needed a place for our switch, battery, and a way to secure it to the avionics coupler, the sled quickly evolved: View of the v2 electronics bay

You can see above that the rounded rails on the sides of the bay would allow it to slide nicely into a circular tube. However, we get a problem when I realized that this electronics bay is also supposed to be a structural element. There needs to be an attachment point at the top and bottom so our parachute shock cord has a place to hold on to. As such, We needed a redesign.

Version 3

I made a few design choices in this version that I really think makes it much better than the rest:

  • Steel Rods through the body for clamping support from cap to cap and load dispersion through the entire rocket rather than on one coupler face.
  • Balsa “cap” bulkheads to provide more structure along the attachment faces.
  • Improvement on the “slide in” aspect of the V1 sled. Now, it’s more like an avionics core. As I write this, I realize that avionics core is actually a pretty cool name.

Adding a mixture of strength and realism, I was quite happy with this version of the flight computer.

The stowed V3 Avionics sled (coupler has transparency for visibility)

The stowed V3 Avionics sled (coupler has transparency for visibility)

The stowed V3 Avionics sled (coupler has transparency for visibility)

360 view of the avionics core (aren’t the 360’s cool!)


Building and Testing

Pausing on flight computer design for a moment, this was about the time I was fortunate enough to get funding for the project! As such, parts were ordered, and I started building the project in real life!

small sensors A few of the boards pictured with a quarter for scale. I knew these were small, but they are small.

First Tests

Developing the firmware for my hardware in this project was quite straightforward. After some wiring diagrams, figuring out where to solder the Stemma QT connectors from the Adafruit sensors to the pico, and definitely not burning my fingers on the iron, we had the first wire-up of the system up and ready to go.

flight computer is wired!

Powering on

Now that we were wired up, it was time to turn this thing on. But first, here is how the program works:


  1. I turn the flight computer on using the SPDT Switch.
  2. From that moment onwards, the pico begins counting, keeping track of the last few hundred ticks of data.
  3. At the first altitude jump, signaling a launch, the pico begins dumping all the data onto a CSV with the SD module. It will continue to do this until landing.
  4. The rocket flies all the way up and back down, stopping as it hits the ground
  5. Detecting the stop, the pico begins counting again, saving and exiting the log file after a few loops, and shutting off the rest of the system for data recovery by me later on.

Maybe it would be fun to be a rocket. I’ll have to write that down as a new project idea.

Issues begin

After flicking the switch for the first time, it’s hard not to notice the fact that no sensors came to life. As is engineering, it was time to figure out what I did wrong this time.

A view of no power to the sensors A view of the powerless SD board.

Luckily, after re-examining the wires, it was easy to find. To turn off and on the system, I’m metering the connection of the positive battery terminal with an SPDT slide switch. This switch has 3 terminals, one throw and two poles. On my switch, the middle pin is the throw and the outer pins are the poles. In other words, to correctly power the pico, the battery positive line must be connected to a throw, and the switch > pico wire must be connected a pole.

picture of the switch The SPDT slide switch pictured next to a dime. The 2 poles and 1 throw can be seen above.

Luckily for me, my issue was simple. The orginal soldering was done with both the battery > switch lead and the switch > pico lead on poles. Switching the board to the throw was all we needed to fix the issue. So, it was time to power on again.

Another view of no sensor power :(

Rats. No power again, and I truly do not understand what the issue could be at this point. Swapping the battery and checking for short-circuits led no avail. What could be wrong?


The solution comes in flipping the pico diagram 180 degrees.

upside down pinout of pico 2w An upside-down view of a pico 2w pinout map, courtesy of pinouthub.com

If you look to the top righthand corner of this drawing, you will see a Ground pin third from the top. Ground pins are unique, with a square profile instead of a circular one. Now, look at the board the right way around:

correct way around pico2w pinout Now we are the right way around! Image courtesy of pinouthub.com

Either way, we have a ground pin third from the top right! The difference is that a pico 2 W is not powered through the GP14 pin, an unfortunate realization I made after pointing the pico the right way around. Sometimes it really is the simple things. After flipping the board, correctly this time, and soldering to the correct pins, we get a result that is a little greener.

bingo! Success at long last!

After ironing out some minor software errors, I was able to swing the flight computer around in the air, simulating a flight, and was even able to view the data in my dashboard app.

view of flight data View of the first flight test, visually displaying the movement taken by the altimeter as I waved it up and down, finishing by putting it onto a table.

Rocket Design (Part 2)

After that detour for testing, let’s get back into the design for this rocket. So far we have:

  • An avionics coupler
  • An avionics core
  • Everything else

And the current plan is to have the rocket separate like this:

The separation point on v1 of the rocket assembly

By now, I realize this obviously isn’t going to work, and I explained why earlier. With the electronics now much lower in the rocket, and the swap from a D12-5 to a D12-0 motor (no ejection charge built in!), we need a new way to eject this parachute. I could only really think of two ways to do this:

  1. Add a servo that pushes the nose cone off of the rocket from the inside, releasing the parachute
  2. Explode the top off with a custom ejection charge, triggered by the flight computer

In the end, I went with option 2. First, it was going to be less weight, a stronger separation, and it would let me learn a little more. Firing a servo is easy, firing black powder isn’t something I’ve done yet. So, How will we get this done?

What in the world is a MOSFET?

If we have some black powder that we intend to explode, we need a way to ignite it. Since our electronics bay already has a battery, I decided to use an electronic lighter, all it needs is current in one side, and ground out the other. Of course, it isn’t quite that easy.

What we don’t want to do here is hook this thing up to a pico GPIO pin, and thats for the main reason of, lighting an igniter can take some serious current. Hook it up straight to the pico, and we risk starving the sensors, or the pico itself, and causing a brownout mid-flight which would almost certainly ruin our log data. So, I want to power it directly from VSYS. allowing us to bypass the whole circuit and feed directly off the battery. Of course, we still need to be able to control when voltage is recieved. So, enter a MOSFET:

Image of a mosfet

This photo I snagged from Digikey looks very similar to the MOSFET I used in my flight computer. Nameley, it includes 3 pins and a mounting hole.

A MOSFET is a component used like an electronic switch. With the N-Channel MOSFET I used, current was allowed to flow through when the gate pin had high voltage compared to the source pin. Thus, when the gate pin had a similar voltage compared to source (zero, in my case) no voltage was allowed through and the ejection trigger wouldnt light.

Diagram of an N-channel mosfet

Diagram of a N-channel Mosfet

To complete my circuit, I wired a GPIO from the pico to gate to vary between HIGH (3.3 volts) and LOW (0 volts). To complete the circuit, source was connected straight to ground, an drain was connected to the ground side of the igniter, creating a low-side switch. I also connected gate and source with a 10k Ohm resistor to pull gate towards ground during startup, as testing revealed some false-fires that I didn’t want to have to deal with on launch day. Add that in, along with a limit switch as a physical safety for the igniter and an LED for status signals, and we have an electronics bay ready to blow the top off this place!

View of the new MOSFET Circiut

View of the new MOSFET circuit, and some spoilers for the final avionics bay design.

3D Prints

With the CAD done, I started doing some physical printing, specifically of the avionics coupler. Several iterations through, it was Heavy, and while it would have been cool to keep optimizing it, I ultimately abandoned it to be replaced by laser-cut wood bulkheads, which I’ll get into in the next section.

3d Prints used in the rocket

Various 3D prints for my rocket, including the abandoned coupler, and a couple of rigs for fin alignment.

By the way, all of my CAD can be found online within Onshape!

Laser Cutting

Without the coupler, I needed a new mechanism to hold the avionics bay within the rocket, with two requirements:

  1. Protect electronics from hot ejection gas
  2. Maintain rigidity to be used as an anchor point for the parachute

Being lucky and having access to a laser cutter at school, cutting myself some balsa bulkheads and clamping the whole thing together on some threaded steel rods gave the rigidity and protection I was looking for.

lasercut parts

Using the laser cutter, I was also able to knock out the rocket fins.

V4 of the flight computer

Full spinning view of everything integrated into the electronics bay. This also marks V4, the final version!

Now, all the pieces had vcome together. All that was left was putting the whole thing together!

Final Build

Comparison between finalized CAD and the real rocket

A lot of work went in, and a CAD-accurate rocket came out! A quick trip to the post office informed me that the whole rocket without the ejection charge weighs in at 9 ounces, leaving plenty of headroom above before I reached my original constraint. All that’s left is the launch itself, where I hope the rocket lives up to the effort that went into it.

Results (Coming Soon)

For now, you have reached the end of the blog! Now, I’m awaiting a launch, but when that happens, I’ll be updating the end of this blog. If you like what you have read, come back soon! I might have already launched it :)