> For the complete documentation index, see [llms.txt](https://yasmin.gitbook.io/first_fc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yasmin.gitbook.io/first_fc/my-first-flight-computer.md).

# My First Flight Computer

From Schematic to Screams (of Joy... and Sometimes Despair)

## **Introduction**

One year ago, when I applied to join my college’s rocketry team, we were handed a challenge that felt like being thrown into deep water with floaties still in the packaging:

> “Form your own team and build a fully functional model rocket. You’ll figure it out.”

So I did. I was responsible for developing the **avionics system** — the brain of the rocket that decides what happens, when. With no prior hands-on experience in aerospace systems and just enough knowledge of microcontrollers to feel dangerous, I dove headfirst into the unknown.

This is the story of how I designed, built, and launched my first **Flight Computer (FC)** — what worked, what broke (literally), and what it taught me about engineering, failure, and curiosity.

***

### **The Objective and Challenge Setup**

To get selected as a permanent member of our college’s rocketry team, all applicants were required to form sub-teams and **build a single-stage model rocket from scratch**. The idea was not just to test knowledge, but to assess hands-on skills, teamwork, and the ability to think and debug independently.

#### **Key Competition Rules**

* Rockets must be self-designed and fabricated (no commercial kits).
* The **avionics system must detect liftoff and apogee**.
* The system must **eject a parachute** at the right time.
* **In-house PCB fabrication** was encouraged and rewarded.
* Post-launch **flight data logging** was a bonus.

***

### **What Is a Flight Computer (FC)?**

For those unfamiliar with rocketry, a **Flight Computer** is a small embedded system installed inside the rocket. It is responsible for:

* Measuring real-time sensor data (such as altitude and acceleration),
* Making decisions during flight (like when to eject the parachute),
* Controlling electrical systems (like igniters),
* Logging data if needed, and
* Providing system status using LEDs or signals.

In simpler terms, it’s the **onboard decision-maker** — a tiny computer that does everything automatically once the rocket launches.

***

### **Project Goal: What I Wanted My FC to Do**

* **Detect liftoff** when altitude crosses a certain threshold.
* **Identify apogee** (the point where the rocket stops rising and begins to fall).
* **Trigger parachute ejection** using an igniter circuit.
* Show system status via **3 LED indicators**.
* **Log flight data** to internal memory (this didn’t quite work out — more on that later).
* Survive the launch and landing (this also… didn’t go as planned).

***

## **The Hardware Setup**

<figure><img src="https://2869069888-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIBwm6opt3iTVQrnHb9U4%2Fuploads%2FUPScRVnrO6yUrizgd1Qe%2Ftwo%20stage%20rocket%20flight%20computer%20-%20visual%20selection%20(4).png?alt=media&amp;token=34f8110c-c59e-44c1-a079-736158e78988" alt="" width="563"><figcaption><p>Hardware Breakdown </p></figcaption></figure>

#### **1. Microcontroller – ESP8266**

* Small, affordable, and powerful enough for basic sensing and control tasks.
* Has built-in Wi-Fi (not used here), but it’s compact and suitable for rockets.

#### **2. Sensor – BMP280**

* A barometric pressure sensor used to estimate **altitude**.
* Measures air pressure and converts it to altitude using the standard atmospheric model.
* Selected for its low cost and availability, although it’s **not very reliable at higher altitudes or during rapid motion**.

#### **3. Ejection System**

* Used a **screw terminal** connected to an **igniter** (nichrome wire).
* This igniter would heat up when triggered, causing the parachute bay to open.
* The system was activated using a **transistor switch**, controlled by the flight computer.

#### **4. Status Indicators (LEDs)**

* **LED 1**: Always ON — confirms BMP280 is active.
* **LED 2**: Blinks — indicates apogee has been detected.
* **LED 3**: Turns ON — parachute ejection signal has been sent.

#### **5. Power Supply**

* A small **LiPo battery** connected via screw terminal.
* Chosen for its compact size, stable voltage output, and light weight.

***

## **Software & Algorithm: How the Brain Worked**

This flight computer ran a state machine programmed in **Arduino C++**. Here’s a simplified explanation of how it worked:

#### **Step-by-Step Process:**

1. **Calibration on Startup**
   * When the system powers up, the BMP280 sensor records multiple altitude readings.
   * These readings are averaged to set the **ground level reference**. This step ensures that future altitude readings are relative to the launch pad and not absolute sea-level altitude.
2. **Liftoff Detection**
   * Once the rocket is launched, if the current altitude exceeds **10 meters above the baseline**, the FC detects it as **liftoff**.
   * It switches the internal state to "Powered Flight".
3. **Maximum Altitude Tracking**
   * During the flight, the system constantly updates and stores the **maximum altitude reached so far**.
   * It compares the current altitude to this value every cycle.
4. **Apogee Detection**
   * If the altitude starts to **drop by more than 2 meters** compared to the recorded maximum, the system assumes the rocket has reached apogee and is now falling.
   * The state is switched to "Descent", and the **ejection signal is triggered**.
5. **Parachute Ejection**
   * A signal is sent to the **transistor switch**, which allows current to flow to the igniter.
   * The igniter heats up and triggers the parachute mechanism.
6. **LED Feedback**
   * Throughout the flight, the system uses LEDs to indicate critical moments:
     * BMP working (startup),
     * Apogee detected,
     * Parachute triggered.

#### **Libraries Used:**

* `Adafruit_BMP280.h` for sensor communication
* `Wire.h` for I2C protocol
* `LittleFS.h` for data storage (although the memory wasn’t successfully retrieved due to crash damage)

<figure><img src="https://2869069888-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIBwm6opt3iTVQrnHb9U4%2Fuploads%2FVbEVzGOKabsYeKMtD2EX%2Ftwo%20stage%20rocket%20flight%20computer%20-%20visual%20selection%20(3).png?alt=media&amp;token=4d88182c-159c-475e-9b48-aea791883962" alt="" width="210"><figcaption><p>Flight Algorithm</p></figcaption></figure>

***

## **The PCB Manufacturing Process**

One of the most important — and challenging — parts of the project was **designing and fabricating the PCB (Printed Circuit Board)**. Here’s a breakdown of the entire process:

#### **1. Schematic Design**

* Created a circuit diagram using KiCAD.
* Included components like ESP8266, BMP280, screw terminals, transistor, and LEDs.
* Verified connections through simulation or rule checks to avoid wiring errors.

#### **2. Component Placement**

* Created footprints for all components and placed them logically on the board layout.
* Ensured that important terminals (like the parachute ejection output) were placed near the top, as they’d physically connect to the ejection system.
* Tried to make the layout **as compact as possible**, balancing size with accessibility.

#### **3. Trace Routing**

* Connected all the components using copper traces.
* Avoided sharp **90° corners**, which can cause signal reflection or stress concentrations.
* Ensured proper spacing between power and signal lines to reduce interference.

#### **4. Fabrication (In-House Method)**

* Printed the PCB layout on **glossy paper**.
* Ironed the paper onto a copper-clad board, transferring the ink as an etch-resistant layer.
* Dipped the board into **Ferric Chloride (FeCl₃)** solution to etch away unwanted copper.
  * **Chemical reaction:**

    ```
    Cu + 2FeCl₃ → CuCl₂ + 2FeCl₂
    ```
  * The copper under the printed traces remains; the rest dissolves.

#### **5. Drilling and Soldering**

* Used a hand drill to make holes at each pad.
* Placed components and **soldered** them onto the board.
* Checked all connections manually with a multimeter.

The result was a **fully working flight computer**, made entirely in-house. It felt like building a tiny satellite with my own hands.

***

## **The Launch**

Launch day was filled with excitement. The rocket was mounted, FC was powered on, the BMP LED glowed as expected. Countdown started, and… liftoff!

The rocket soared up — nearly **80 meters** into the sky. But then… silence.

We never saw the parachute deploy.

Eventually, we found the rocket. It had **crashed straight into the ground**. The flight computer was **broken beyond repair**, and no data could be recovered.

Despite all the disappointment, it felt like a huge milestone. My first PCB. My first embedded system. My first real rocket launch. Even with the crash, I had done something from scratch — something that worked, even if not fully.

***

### **Lessons Learned**

* **Redundancy is critical** — especially for the parachute ejection system.
* Don’t trust BMP280 too much. It’s temperamental.
* Test everything **repeatedly**, especially under real conditions.
* **Logging data** to non-volatile memory is valuable — if the system survives.
* PCB design is an art — and mistakes are expensive.

***

### **What’s Next?**

After this experience, I went on to work on a much more complex project — a **two-stage rocket named Vanessa**, equipped with **two flight computers**, **backup systems**, and smarter logic.

That rocket? It flew, screamed, and gave us the data we’d been chasing. I’ll be writing about that in my next post — stay tuned.

&#x20;                                                                                   *Written By* [*Yasmin*](https://www.linkedin.com/in/yasmin-qureshi-9603a8289/)&#x20;
