Model Rocket with Avionics for Data Collection
In 11th grade, I designed, soldered, and programmed avionics for a model rocket. The miniature computer consisted of a microcontroller, an accelerometer, a barometer, and persistent memory, all powered by a LiPo battery. The full schematic is pictured below.
The two onboard sensors are both Adafruit breakout boards. One is a three-axis accelerometer, and the other is a barometer and temperature sensor. Next, the computer contains persistent memory in the form of an FRAM breakout board, which stores up to 32768 bytes, as well as a LiPo battery charging board. The Arduino microcontroller communicates with the sensors using the I2C protocol. You may notice the Mode Button lacks a pullup resistor; this is because I use one of the Arduino's internal ones.
I spent a few weeks assembling the rocket's avionics at my high school's science lab during the second half of lunch each day. First, I slid the LiPo battery into a flat cardboard tube and mounted the boards on both sides of it. I used enameled copper wire and solder to make connections. Then, I wrapped the assembly in electrical tape to make it look nicer. I also added a power switch (not shown in schematic) by cutting one of the battery's cables. The computer, pictured above, has a Micro USB port for charging its LiPo battery and another for transferring data. At the top is the status LED that is meant to help on launch day, and on the side is a button that I use to begin data collection.
When the computer turns on, it begins in its idle state. If the button is held for three to five seconds, a two-minute countdown begins, but if the button is released too early or too late, or if the button is pressed at all during the countdown, the computer reverts to its idle state. This feature is to prevent accidental data collection, which could overwrite a previous run. After the two-minute countdown, the computer begins data collection.
During the data collection state, the computer queries the sensors for the following datapoints every 50 milliseconds: acceleration X, acceleration Y, acceleration Z, temperature, and pressure. To save space, the acceleration X, Y, and Z values are compressed into one number: the magnitude of the 3D acceleration vector that they compose. Finally, the software converts these floating-point numbers into bytes (four bytes per float) and stores them in the FRAM board for recovery later. With that said, the computer can store just over two minutes of flight data.
View the flight computer's onboard C++ code on Github ↗
View the ground computer's Python data recovery code on Github ↗.
I got a membership for a local rocket club called Tripoli Houston and attended one of their monthly launches in Alvin, Texas. I launched my rocket twice, and above are a few frames of video from the first launch.
The rocket itself is a kit made by Estes called "Green Eggs". The rocket is meant to carry an egg safely to a few hundred feet up and back. I used the payload bay to store the flight computer instead of an egg. I assembled it, spray-painted it with primer, and used white and yellow acrylic paint to add color.
Above is the data I recovered from the second flight.
Looking at the acceleration graph, the rocket experienced a maximum acceleration of about 7g during its powered ascent, and it experienced a similar acceleration when the parachute deployed at apogee. The rocket reached apogee at 181 meters (593 feet) above the ground. The acceleration graph shows a steady value of roughly 9.8 meters per second squared when the rocket was on the ground (which corresponds to the acceleration due to gravity at sea level) and a value near 0 when the rocket was in its unpowered phase of ascent. The near-zero readings imply that the rocket experienced somewhat of a free fall between the motor burnout and the parachute deployment, which makes sense as there was no thrust and insignificant drag during that time.
The temperature graph shows a rise in temperature while the rocket was idle and waiting for ignition under the Texas sun. The temperature plateaued during flight as the fast-moving air cooled down the rocket, but the temperature began to decrease after impact. The rocket happened to land in a puddle of water surrounded by tall grass, which could explain that decrease in temperature.
View the full data on Github ↗.