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

Day 48 of 365 · Beginner · Month 2: Order and data network

Project: room climate

Project: a room with heating and cooling in a dead band, a traffic-light display and an alarm on limit violations or sensor failure – all in one chip.

Project 35 min Week 7

What you learn today

  • Heating and cooling with a dead band
  • Traffic-light display
  • Alarm when limits are exceeded

The greenhouse on Mars is freezing in the morning and too warm at noon. This week you built everything it needs. Now it comes together in one chip.

The devices

DeviceName
gas sensor“Klima”
wall heater“Klimaheizung”
wall cooler“Klimakuehler”
LED display“Klimaanzeige”
klaxon“Klimaalarm”

The rules

Temperature: target 21 °C. Heater on below 19 °C, off from 20 °C. Cooler on above 23 °C, off from 22 °C downwards. Never both at once.

Display: temperature in °C, Mode Celsius. Colour:

SituationColour
19 to 23 °Cgreen
otherwiseyellow
alarmred

Alarm: below 15 °C, above 30 °C or sensor gone. Then red on the display and the klaxon on, sound Sound.Danger.

How to go about it

  1. Compute the limits from the target before the loop – as in the dead band lesson.
  2. The two hystereses including the interlock.
  3. The alarm: two comparisons, one snan, two or.
  4. The colour as a select cascade: green, then yellow, then red for the alarm.
  5. Output.

For the traffic-light band you need the distance to the target without a sign:

sub tmp temp TARGET
abs tmp tmp
sgt tmp tmp 2               # more than 2 degrees off
select colour tmp Color.Yellow colour

Milestones

  1. Cold: heater on, cooler off.
  2. Hot: cooler on, heater off.
  3. In the dead band: both off, display green.
  4. Display in °C, Mode Celsius.
  5. Yellow outside 19 to 23 °C.
  6. Alarm on frost and heat: klaxon on, display red.
  7. Sensor gone: heater and cooler off, alarm.
Tip

The program gets a good 50 lines long. Number the sections, then on a red test you find the right spot right away.

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.
Heating and cooling band with a dead band in between. Beyond the alarm limits it gets loud.

Project task

Task

Build the climate control from the lesson. Devices: gas sensor “Klima”, wall heater “Klimaheizung”, wall cooler “Klimakuehler”, LED display “Klimaanzeige”, klaxon “Klimaalarm”.

  • Dead band around 21 °C: heater 19/20 °C, cooler 23/22 °C, never both.
  • Display: °C, Mode Celsius; green 19–23 °C, otherwise yellow, red on alarm.
  • Alarm below 15 °C, above 30 °C or without sensor: klaxon on with Sound.Danger.

Milestones

  1. Milestone 1: cold – heater on
  2. Milestone 2: hot – cooler on
  3. Milestone 3: dead band – both off, green
  4. Milestone 4: display in °C
  5. Milestone 5: yellow outside 19 to 23 °C
  6. Milestone 6: alarm on frost and heat
  7. Milestone 7: sensor gone – all off, alarm

Hints

Hint 1

Limits and sound before start: – as in the dead band lesson.

Hint 2

Alarm: slt alarm temp FROST, sgt for HEAT, snan, an or each.

Hint 3

Colour: green, yellow beyond 2 degrees, red on alarm – in that order.

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

Esc
↑ ↓ selectEnter open/ opens search anywhere