stationeers.de Mod workshop · Dominik1199
DE Sign in
  1. Home
  2. IC10 academy
  3. Day 255

Day 255 of 365 · Pro · Month 9: Logistics and greenhouse

Greenhouse climate

What plants need and what the chip can measure: temperature, CO₂ and light, target ranges with hysteresis and limits for the alarm.

Lesson 18 min Week 37

What you learn today

  • Temperature, CO₂ and light for plants
  • Limits
  • Target ranges

A potato in a cold greenhouse grows more slowly, without CO₂ hardly at all. Before you control anything, you need to know what the plant wants and what the chip can measure of it.

What plants need

The game data (plantliferequirements.xml) describes a comfort range for every plant. For most crops:

Quantitygame dataa target range from it
Temperaturecentre at 25 °C20 to 30 °C
Pressurecentre at 75 kPa50 to 100 kPa
CO₂is breathed inat least 1 % of the air
Lightlight and dark time per daygrow light or sun

There are exceptions: cocoa likes it warmer with a centre at 35 °C, switchgrass sits at 30 °C. Mushrooms work the other way round, breathing in oxygen and out CO₂, and need no light. The exact limits also depend on the genes of the individual plant. The Stationpedia shows them on the plant's page.

Plants breathe the room air. So a gas sensor in the greenhouse measures what matters. Then there is the water in the tray: its temperature has to be in the growth range as well.

CO₂: when is it enough?

In the game code a plant breathes in nothing below 0.1 % CO₂ and fully from 1 %, in between it rises evenly. A greenhouse with plain breathing air therefore slows the plants down. A digital valve on a CO₂ line keeps the share up:

slt tmp co2 CO2_CLOSE      # below 4 %: stay open
and valve valve tmp
slt tmp co2 CO2_OPEN     # below 2 %: open
or valve valve tmp
sbn VALVE HASH("CO2") On valve

Light

A grow light (StructureGrowLight) needs 70 W and lights the trays near it, sun through windows counts as well. How long the light should be on comes next week.

Target range and limit

Tell two kinds of limits apart:

  • Target range: this is where the value should be. The control works with hysteresis inside this range, for example heater on below 20 °C and off above 24 °C.
  • Limit: beyond it things get dangerous. Below 15 °C or above 35 °C there is an alarm, whatever the control is doing.
slt alarm temp T_MIN     # too cold
sgt tmp temp T_MAX       # too warm
or alarm alarm tmp
Warning

If the gas sensor fails, lbn with Average returns NaN. Every comparison with NaN gives 0 – the heater would simply stay off and nobody would notice. Check the sensor with snanz and switch on the alarm on a failure.

Diagram

Temperature curve with hysteresis 21 °C 19 °C band: state is kept Heater on on off off On at 19 °C, off only at 21 °C – nothing switches in between.
Inside the target range the hysteresis controls, beyond the limits the alarm goes off.

Exercise

Task

Control the greenhouse with the gas sensor “Gewaechshaus”:

  • heater “Gewaechshaus” on below 20 °C, off above 24 °C
  • valve “CO2” open below 2 % CO₂, closed from 4 %
  • light “Klima” on below 15 °C, above 35 °C or when the sensor is missing
  • without the sensor: heater off, valve closed

Hints

Hint 1

Both hystereses follow the same pattern: slt/and with the upper limit, slt/or with the lower one.

Hint 2

Then and … ok so that everything is off without the sensor.

Hint 3

Alarm: slt with T_MIN, sgt with T_MAX and seqz tmp ok, all with or.

Quiz

4 questions. You pass from 60 % – the server does the grading.

Complete the day

  • Passed the simulator exercise
  • 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

Esc
↑ ↓ selectEnter open/ opens search anywhere