Source: https://mokxi.com/teachers/plans/build-space-habitat
Updated: 2026-11-19

Lesson plan

# Build a space habitat controller lesson plan

Keep a Mars crew alive on one Uno: CO2 and its scrubber, cabin pressure and leaks, an interlocked airlock and alarms that latch.

3 chapters, 6 lessons, about 5 hours, on the Arduino Uno R3. Every lesson runs in the browser, with nothing to install.

Start a class from this course

The unit

## Objectives and materials

### By the end, students can

- CO2, the scrubber that removes it, and the pressure that holds it all in.
- An airlock that cannot be opened wrong, and alarms that get heard.
- Put it all together into one panel worth sharing.

### Materials for the whole unit

- Arduino Uno R3
- Buzzer
- CO2 sensor, SCD41
- Fan module, L9110
- OLED display, 128x64
- Pressure, humidity and temperature, BME280
- Relay module

Every part is already on the simulator’s bench, so there is nothing to buy or hand out. The counts are the most any one lesson uses, if you build it on real breadboards too.

Chapter 1. About 2 h 15 min

## The air we bring

CO2, the scrubber that removes it, and the pressure that holds it all in.

Lesson | Time | What students do

Air in a sealed room Count the CO2 in a cabin with an SCD41, learn why 5000 ppm is the limit, and work out how long a crew takes to reach it. | 45 min

- Life support on one board
- The first reading
- A stuffy room
- Why 5000 ppm is a limit
- The crew is the source

CO2 scrubbing Pull CO2 out of the air with a scrubber fan, switched by two thresholds so it never chatters, and work out the chemistry a mission has to carry. | 45 min

- The scrubber waits
- Switch it on
- Two thresholds
- Clean air
- What a mission carries

Pressure Read the cabin pressure, catch a leak from how fast it falls, and learn why oxygen is a share of the pressure, not a percentage. | 45 min

- A bubble of Earth
- A leak
- Too low
- Oxygen is a share
- Patched

### Materials

- Arduino Uno R3
- Buzzer
- CO2 sensor, SCD41
- Fan module, L9110
- OLED display, 128x64
- Pressure, humidity and temperature, BME280
- Relay module

### Check for understanding

Each student finishes "Pressure" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Patched".

Chapter 2. About 1 h 50 min

## Doors and alarms

An airlock that cannot be opened wrong, and alarms that get heard.

Lesson | Time | What students do

Airlock logic Two doors that are never open together: an interlock in one function, a state machine for pumping and filling, and the relay that runs the pump. | 55 min

- A room between two worlds
- Step in
- The interlock
- Pump it down
- Out onto Mars
- Come home

Alarms CAUTION and WARNING levels, alarms that latch until someone acknowledges them, and the worst problem always at the top. | 55 min

- An alarm is a conversation
- A warning
- Hear it
- Acknowledge
- Latching
- The worst one first

### Materials

- Arduino Uno R3
- Buzzer
- CO2 sensor, SCD41
- Fan module, L9110
- OLED display, 128x64
- Pressure, humidity and temperature, BME280
- Relay module

### Check for understanding

Each student finishes "Alarms" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "The worst one first".

Chapter 3. About 1 h

## A Mars hab panel

Put it all together into one panel worth sharing.

Lesson | Time | What students do

Project: a Mars hab panel Put it all together: CO2, pressure, the scrubber, the airlock and the alarms on one panel that keeps a crew alive. | 60 min

- Panel online
- Status report
- A long shift
- An EVA
- A micrometeorite
- Acknowledge it
- Make it yours

### Materials

- Arduino Uno R3
- Buzzer
- CO2 sensor, SCD41
- Fan module, L9110
- OLED display, 128x64
- Pressure, humidity and temperature, BME280
- Relay module

### Check for understanding

Each student finishes "Project: a Mars hab panel" on their own, without opening the hints. The simulator checks 7 of its 7 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Make it yours".

Your class

## Teach this unit as a class

Start a class from this course and its 6 lessons are assigned in one go, in order. Students join with a six-character code or printed login cards, and each one’s work comes back to you.

The class tools are free for 30 days for one class of up to 20 students, with no card. The lessons themselves are free either way.

Start a class from this course See the demo class

More units

## Other lesson plans

Electronics basics 20 lessons, about 10 h. Embedded on the Arduino Uno 16 lessons, about 12 h. Embedded on the ESP32-C3 13 lessons, about 11 h. Embedded on the Raspberry Pi Pico 7 lessons, about 6 h. Build your own fight stick 5 lessons, about 4 h. Embedded on the STM32F411 6 lessons, about 6 h. C++ on a board 13 lessons, about 10 h. Digital logic and memory 4 lessons, about 4 h. Interactive devices on the Uno 9 lessons, about 8 h. From gates to a computer 23 lessons, about 16 h. Build a claw machine 8 lessons, about 6 h. Every unit All the courses as ready-made units, on the teachers page.
