What you learn today
- Filter CO₂, add oxygen
- Hold pressure
- Filter warning
This week was about gases: how pressure, temperature and amount are linked, how the mixer works, how filters operate and where exhaust gases belong. The project turns it into the habitat's air recycler.
The plant
| Device | Prefab | Name |
|---|---|---|
| Gas sensor in the room | StructureGasSensor | “Wohnraum” |
| Filtration with two CO₂ filters | StructureFiltration | “CO2Filter” |
| Active vent on the oxygen tank | StructureActiveVent | “Sauerstoff” |
| Flashing light | StructureFlashingLight | “Luftwarnung” |
| LED display | StructureConsoleLED5 | “Luft” |
A second vent sucks room air through the filtration and returns the rest – you do not control that one here.
The rules
| What | on | off |
|---|---|---|
| CO₂ filter | above 1 % CO₂ | below 0.5 % CO₂ |
| Oxygen feed | below 20 % O₂ | from 22 % O₂ or from 101.325 kPa |
The oxygen vent blows into the room with Vent.Outward. On top of that you set its PressureExternal to 101.325 kPa: then it also stops by itself when the room is full. Belt and braces.
slt tmp p PMAX
and feed feed tmp # the pressure limit beats everything
When the sensor fails
- CO₂ filter stays on – never hurts.
- Oxygen off – blowing blindly can overfill the room.
- Warning light on, display −1.
Milestones
- CO₂ filter with hysteresis (On and Mode)
- Oxygen feed with hysteresis and pressure limit
- Filter warning when a filter drops below 5
- Oxygen share in percent on the display
- Sensor gone: filter on, oxygen off, warning on, display −1
slt with NaN gives 0. That is why the oxygen vent switches off on its own without a sensor, while you have to keep the filter on explicitly with seqz tmp ok. Check for every rule which way NaN tips it.
Diagram
Project task
Task
Build the air recycler following the rules above. defines, aliases and reading the sensor are already there; the CO₂ filter, oxygen, filter warning and display are missing.
Milestones
- Milestone 1: CO₂ filter with hysteresis
- Milestone 2: add oxygen, hold the pressure
- Milestone 3: filter warning
- Milestone 4: oxygen in percent
- Milestone 5: sensor fails
Hints
Hint 1
CO₂ as in lesson 151: hysteresis, then “or” in seqz tmp ok, to On and Mode.
Hint 2
Oxygen with slt: first and with O2_OFF, then or with O2_ON, finally and with slt tmp p PMAX.
Hint 3
The vent needs Mode INTO, PressureExternal PMAX and On.
Hint 4
Filter warning: read both slots, min, slt warn q CHANGE, “or” in the missing sensor.
Quiz
2 questions. You pass from 60 % – the server does the grading.
Complete the day
- Passed all milestones of the project
- Passed the quiz with at least 60 %
Without an account progress is saved in this browser only.
Report a mistake in this lesson
Please sign in to report. Sign in