Final Project¶
Vahan¶

My final project is Vahan — a CO/CO₂ gas monitoring safety device designed for forge environments. The name means “shield” in Armenian, which reflects what the device is meant to do: warn a metalworker before gas levels become dangerous.
The idea came directly from a real problem in my own lab. Forges and blacksmith workshops produce carbon monoxide through incomplete combustion of coal, coke, and gas, and there’s no simple, dedicated way to know when the air has become unsafe to breathe. Vahan reads gas concentration continuously and reacts with clear visual and audible alerts — no display to read, no app to check, just a system you can glance at or hear from across the room.
What does it do¶
Vahan continuously measures CO/CO₂ concentration using an MQ-7 gas sensor connected to a custom PCB built around a Seeed XIAO RP2040. Based on the reading, the system moves between three states:
- Safe — green LED on, buzzer silent
- Warning — yellow LED on, buzzer pulsing
- Danger — red LED on, buzzer continuous
The three states are designed so a forge worker can understand the situation without looking closely at the device — green means keep working, yellow means ventilate, red means stop and leave.
The electronics sit inside a 3D-printed enclosure with dedicated openings for the gas sensor and a separate LED traffic-light module, and the enclosure itself carries a decorative metal element cut from steel sheet, shaped to reference a shield — tying the physical form of the device back to its name.
Interesting work done by others¶
- Airable by Fab Academy 2021 student Nicole Bakker monitors air quality using a CO₂ sensor and displays the air status through RGB LEDs (green, orange, red) — a similar status-indication logic to the one I used for Vahan.
- Plant.Air by Ana Filipa Silva (Fab Academy 2017) was designed to monitor CO₂ levels in indoor environments and helped users understand whether an environment was healthy to work or live in.
- Beyond Fab Academy, CO₂ monitoring and automatic ventilation systems are common in schools, offices, and industrial spaces — Sander van Vliet, for example, combined a CO₂ sensor with a ventilation control system that automatically reacts to changes in air quality.
Materials and accessories used¶
| Qty | Description | Price | Origin |
|---|---|---|---|
| 1 | XIAO RP2040 microcontroller | 6.23 $ | Our Lab |
| 1 | MQ-7 gas sensor | 4 $ | Our Lab |
| 1 | Buzzer | 1 $ | Our Lab |
| 3 | LEDs (Green, Yellow, Red) | 1 $ | Our Lab |
| 1 | PCB board | 9.05 $ | Our Lab |
| - | Resistors, capacitors, headers, and other electronic components | 3 $ | Our Lab |
| - | Wires and connectors | 2–3 $ | Our Lab |
| 1 kg | PLA / PETG filament | 32.99 $ | Our Lab |
| 670 ml | Kapci Base Paint | 70 $ | Local Supplier |
| 1 L | Clear Lacquer | 16 $ | Local Supplier |
| 1 m² | Acrylic Sheet | 18 $ | Our Lab |
| 1 | Metal Sheet | 40 $ | Our Lab |
| Total | ~194 $ |
Sketch and Early Concept¶
The project started on paper, in Week 1, as a rough sketch and the first version of the idea — a system that would watch over air quality in a workshop and respond automatically as conditions worsened.
In Week 2, I turned that idea into an actual block diagram in Inkscape, mapping out the components and their connections, and modeled a first rough enclosure in FreeCAD to get a sense of the physical scale of the device. At that stage I was still planning around a CO₂ sensor (the MeSTEK CGD02A) rather than the MQ-7 I ended up using, and the response thresholds were sketched out conceptually — 20% normal, 40% sound alert, 50% strong alarm, 60% ventilation — long before I had real sensor data to calibrate against. Even though almost everything about the design changed afterward, this first rough pass was what turned the project from an idea into something I could actually start building toward.

Choosing the Gas Sensor¶
In Week 4, I tested an MQ-135 sensor that was available in the lab, and noticed it reacted to almost everything — breath, movement, any change in the air — without distinguishing between gases. For a safety device meant to warn specifically about CO, that was a real problem: if the sensor reacts to everything, you can’t know what it’s actually warning about.

That observation, together with guidance from my instructor Rudolf, pushed me toward the MQ-7 instead — a sensor specific to carbon monoxide, which is the actual danger in a forge environment.

This switch became the foundation for the rest of the electronics: the PCB, the firmware, and the alert logic were all built around the MQ-7’s analog output from this point forward.
Electronics Design and Production¶
The PCB went through two iterations. The first version, designed and milled in earlier weeks, could only be powered through the XIAO RP2040’s USB-C port and used SMD LEDs soldered directly onto the board.
In Week 9, I redesigned the board specifically for the final project. I added a 12V barrel jack and an NCP1117 voltage regulator so the board could be powered independently of a computer, replaced the SMD LEDs with a ready-made 5V LED Traffic Light Module (since the enclosure made SMD LEDs impractical to see clearly), and dedicated a proper 3-pin header for the MQ-7 (+5V, GND, analog output). I also added two I2C headers and a few spare sensor pins to keep the board flexible for future use, and used three 0 Ω “bridge” resistors to fix a GND-zone routing issue on the PCB.

Firmware and Output Logic¶
The core alert logic was developed in Week 10, built in three stages: first just reading the MQ-7 and logging values to find realistic thresholds, then mapping those thresholds to the three LEDs, and finally adding the buzzer with different behavior per state — silent when safe, pulsing at warning, continuous at danger.
#define MQ7_PIN A0
#define RED_LED D1
#define YELLOW_LED D2
#define GREEN_LED D3
#define BUZZER_PIN D6
void setup() {
Serial.begin(115200);
pinMode(RED_LED, OUTPUT);
pinMode(YELLOW_LED, OUTPUT);
pinMode(GREEN_LED, OUTPUT);
pinMode(BUZZER_PIN, OUTPUT);
}
void loop() {
int gas = analogRead(MQ7_PIN);
Serial.println(gas);
digitalWrite(RED_LED, LOW);
digitalWrite(YELLOW_LED, LOW);
digitalWrite(GREEN_LED, LOW);
digitalWrite(BUZZER_PIN, LOW);
if (gas < 200) {
// SAFE — green LED on, no buzzer
digitalWrite(GREEN_LED, HIGH);
delay(300);
}
else if (gas < 600) {
// WARNING — yellow LED, pulsing buzzer
digitalWrite(YELLOW_LED, HIGH);
digitalWrite(BUZZER_PIN, HIGH);
delay(300);
digitalWrite(BUZZER_PIN, LOW);
delay(300);
}
else {
// DANGER — red LED, continuous buzzer
digitalWrite(RED_LED, HIGH);
digitalWrite(BUZZER_PIN, HIGH);
delay(300);
}
}
The 200/600 thresholds aren’t arbitrary — they came from watching the sensor’s raw readings in normal air and then deliberately introducing gas near it, to get a feel for the range before committing to specific numbers.
Interface Experiments¶
Week 14 extended this same firmware with a Processing-based visualization: the MQ-7 readings are sent over Serial and drawn as a live panel with colored LED indicators, a status label, and a real-time ppm value, using the same SAFE/WARNING/DANGER thresholds as the physical LEDs. This isn’t part of the device itself yet, but it’s the planned interface for a second version of Vahan — letting the same alert logic also be monitored remotely from a screen, not just from across the workshop.
Enclosure Design and Assembly¶
Week 15 brought everything together into a finished physical product. The enclosure was modeled in FreeCAD, using real component models from GrabCAD (PCB, sensors, and other parts) placed directly inside the design so I could check clearances and fit before printing anything.

All parts were printed in PETG on a Prusa MK4S — chosen specifically because it handles heat better than PLA and resists the fumes and conditions present in a forge environment, which is exactly where Vahan is meant to live.

After printing, the surfaces were finished with putty and sanding to remove visible layer lines, then primed and painted in a dark asphalt grey to suit the industrial context of a forge workshop.

With the enclosure cured, the PCB was screwed into its mounting points, the gas sensor was seated into its dedicated opening in the enclosure wall, and all wiring was routed neatly inside the housing through proper headers rather than loose wires.

The Metal Shield Element¶
The enclosure also carries a decorative metal element cut from 1.2 mm steel sheet, shaped to reference a shield — directly connecting the physical device to its name. This part was produced during Wildcard Week using metal laser cutting, a process not covered elsewhere in the program. The flat pattern was unfolded in FreeCAD accounting for bend allowance, cut on a 6 kW fiber laser with a 1.2 mm nozzle, and then bent to its final angle on a press brake.

What Worked, What Didn’t¶
The electronics side of Vahan works reliably: sensor readings, the LED/buzzer alert logic, and the power path through the redesigned board have all been tested and behave as expected. The enclosure design, 3D printing, finishing, and final assembly are also complete, with all components properly mounted and wired.
What’s still in progress is long-term calibration — the current 200/600 thresholds were set from short, informal exposure tests, not from extended real-world monitoring in an actual forge. Proper calibration, along with evaluating alarm response speed and the practical effectiveness of the LED/buzzer alerts under real working conditions, is the main piece of testing still ahead. The Processing-based visualization interface from Week 14 also isn’t integrated into the device yet — it currently runs as a separate experiment, intended for a future second version of the project.
Files¶
License¶
My project is licensed under the Creative Commons Attribution–ShareAlike 4.0 International (CC BY-SA 4.0) License.
I chose this license because I want the project to remain open and accessible — especially for educational institutions, workshops, and laboratories where gas safety is a real concern. Anyone can use, adapt, and share it, as long as they credit the original work and keep the same open license.