Skip to content
Tactiverge

BUILD 007: Design a Smart Greenhouse

Facilitator guide · 60 minutes · free to reuse with attribution

The objective

Design the measurement and control system for a virtual greenhouse: decide where and how to measure, make sense of noisy readings, and choose a controller that holds the temperature steady when the weather changes.

Safety. Browser simulation and paper design only. Never open, rewire or modify heaters, fans, thermostats or any mains-powered equipment, and never put electronics near water. Any physical extension needs an adult's safety review and supervision before anyone starts.

Before the session

  • Open /build/smart-greenhouse/?level=3 and play the default night once: the thermostat keeps the seedlings warm but clicks the heater 348 times. Then try Level 4 with P control at 18 °C and Kp = 400 W/°C so you have seen the offset (about 14.6 °C at 03:00).
  • Prepare or share the ten-reading data table for Level 2.
  • Decide teams of three in advance. Learners who join alone can pair with the facilitator.
  • Check the live room link works, chat is off and the moderated question box is on.

Run of show

  1. 5 minHook. Play the night with the vent left open and P control settling short of 18 °C. Ask: the heater is on, so why doesn't it come back?
  2. 8 minInside the greenhouse. Walk through the four intro beats. Level 1 learners label the loop now.
  3. 10 minThe ideas. Heat balance, noise and averaging, hysteresis, and offset. Work the P-only formula together for Kp = 400 W/°C at 03:00 (14.6 °C).
  4. 12 minGroup challenge. Teams get through the open-vent night. Ask each team what they expected the integral term (or the hysteresis gap) to do before they tried it.
  5. 12 minDesign task. Individually, least energy within the band. Learners on other levels work on their own level task.
  6. 8 minQuestions. Answer moderated questions, then set the humidity extension.
  7. 5 minReflect & save. Everyone saves their work and writes one sentence: what would you measure that we did not?
Team challenge
Teams of three get the same greenhouse and the same open-vent disturbance. Each team finds a controller that recovers the temperature, then explains the one change that removed the offset. No leaderboard: every team that gets there explains how.
Individual design task
On your own: find the controller that keeps the seedlings comfortable on the least energy you can. Write down what you gave up to get there: margin above 16 °C, relay wear, or reaction speed.
Questions
Moderated questions in the live room. Questions are answered on screen without names, and chat stays off.
Extension
A real greenhouse also has humidity and soil moisture to manage, and venting to cool it can dry it out. Sketch how two control loops might fight each other, and one rule that would stop it.

Five levels, one project

LevelTaskEvidence
ExplorerMatch the six labelled parts of the greenhouse (thermometer, setpoint, controller, heater, vent and glass, cold night) to their jobs, then put one turn of the control loop (measure, compare, decide, act) in order.
Makes: A correct part map and loop order.
Checked by the facilitator against the answer key
BuilderFrom ten noisy thermometer readings, find the glitch and the mean without it. Then use the heat balance Q = UA·(T − T_out) and τ = C/UA to predict where the greenhouse settles, how quickly it responds, and how much heater power the open vent demands.
Makes: Five answers, each within tolerance.
Answer key: Reading 5 (24.6 °C); 18.09 °C; 18 °C; 100 minutes; 180 W/K × 15 °C = 2,700 W.
Checked by the facilitator against the answer key
InnovatorIn the greenhouse simulator the vent is left open from 22:00 to 01:00 and the thermometer is noisy. Set the on/off thermostat (switch-on and switch-off temperatures, and smoothing) so the seedlings spend no more than 10 minutes outside 16–24 °C and the heater switches no more than 80 times all night.
Makes: A passing thermostat with its energy use, and a sentence on what the gap between on and off does.
Answer key: The default 17.0/17.2 °C keeps the plants warm but switches 348 times. A gap of about 1.5–2 °C with the bottom near 16.3–16.6 °C passes, e.g. on below 16.5, off above 18.5, no smoothing: 0 min outside, 62 switches, about 21 kWh. Heavy smoothing delays the reaction and can let the vent dip go below 16 °C.
Checked by the facilitator against the answer key
Systems EngineerSwap the thermostat for a heater that can run at part power, with P or PI control. Meet the same comfort limit on no more than 20.3 kWh, predict from the heat balance where your controller holds the temperature at 03:00, and explain the offset and the energy trade-off.
Makes: A passing controller, a 03:00 prediction within 0.25 °C and an explanation of at least 30 words.
Answer key: P control settles at T = (UA·T_out + Kp·r)/(UA + Kp), below its setpoint: r = 18 °C, Kp = 400 W/°C gives 14.6 °C at 03:00 and fails comfort. PI removes the offset: r = 17 °C, Kp = 1,500, Ki = 1,000 holds 17.0 °C, 0 min outside, about 20.1 kWh. PI at 18 °C or any thermostat costs more than the budget. High-gain P (e.g. r = 18 °C, Kp = 1,500) can pass because its offset holds it below its setpoint; its 03:00 prediction then needs the offset formula (16.9 °C).
Checked by the facilitator against the answer key
Research EngineerAsk one question (for example, how does the hysteresis gap trade heater switches against comfort, or how many kWh does each hour of open vent cost?). Change one variable across at least four runs, keep the noise seed and everything else fixed, and write a short technical report.
Makes: Four or more runs recomputed on our server and a report with a hypothesis, method, results and limits, reviewed by a person.
Reviewed by an adult

Common misconceptions

  • ✗ “A sensor tells you the temperature of the greenhouse.”
    ✓ It tells you the temperature at the sensor, which may be in sun, shade or a draught. Placement is part of the measurement.
  • ✗ “Turning the heater up full is the fastest way to warm up, so it is best.”
    ✓ It may be fastest, but it overshoots and wastes energy. A good controller slows down as it gets close.
  • ✗ “More proportional gain will get rid of the offset.”
    ✓ It shrinks the offset but never removes it, and too much gain makes the system twitchy. Integral action removes it.
  • ✗ “More averaging is always better.”
    ✓ Heavy averaging hides noise but also delays the controller's reaction to real changes.

Accessibility

Every chart and the animated greenhouse have a text summary (coldest temperature, minutes outside the band, energy, switches), and colours are always named in words. The simulator works by keyboard, with a time slider to inspect any moment; with reduced motion it shows the end of the night without playback. It runs on a low-cost phone, and data tables are real tables that screen readers can read.

BUILD 007 worksheet: a greenhouse that responds

Name: ______________________ Level: ____________

  1. Draw the control loop: sensor, controller, heater, greenhouse, disturbance. Which arrow carries the error?
  2. Readings: 19.8, 20.1, 19.9, 27.4, 20.0 °C. Which looks like a glitch? What is the mean with and without it?
  3. A thermostat turns on at 18 °C and off at 20 °C. Why not on and off at exactly 19 °C?
  4. With UA = 100 W/K, T_out = 1 °C, r = 18 °C and Kp = 400 W/°C, use T = (UA·T_out + Kp·r) / (UA + Kp) to find where P control settles.
  5. In the simulator, record the 03:00 temperature for P-only and for PI with the same setpoint. Explain the difference.
  6. Give one reason a real greenhouse controller might deliberately let the temperature drift a little.

Follow-up

  • Try BUILD 002 (Engineer an Elevator) to see the same feedback ideas stop a lift on a floor.
  • Playground: feedback control. The same P and PI ideas on a general first-order plant, with PID added.
  • Atlas: noise filtering, for smarter ways than averaging to steady a reading.
  • Try BUILD 005 (Build a Traffic Management System) for a smart environment that runs on logic instead.