Tactiverge BuildBUILD 007
Design a Smart Greenhouse
Someone has left the greenhouse vent open on a cold night. Can your controller notice, keep the seedlings warm, and do it without wasting a fortune on heating?
Live build-along: not scheduled yet. Everything here works on your own, any time.
Why it matters
Greenhouses let people grow food in climates and seasons that would otherwise be too cold, and smart control helps them do it with less energy and water. The same loop, measure, compare, act, runs in central heating, fridges, incubators, data centres and the human body.
Your 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.
- 1.
The sensor
Measures the air temperature, but where you put it matters: in direct sun it reads warmer than the air around the plants.
- 2.
The setpoint
The temperature you want. The difference between it and the reading is the error.
- 3.
The heater and vent
The actuators. One adds heat, one lets it out.
- 4.
The disturbance
A cold night, a sunny afternoon, an open vent. The controller cannot stop them; it has to respond to them.
Watch (optional, short)
Hand-picked explainers from their creators. Each one has a reason to watch it. Skip them if you’d rather just build.
Opens up classic thermostats to show the clever mechanical tricks behind simple on/off temperature control.
17 min 3 s · captions on YouTube · source
Nothing loads from YouTube until you press play.
Covers conduction, convection and radiation, the three ways a greenhouse gains and loses heat.
8 min 36 s · captions on YouTube · source
Nothing loads from YouTube until you press play.
Real factory examples of why feedback loops matter and what happens when they fail.
11 min 1 s · captions on YouTube · source
Nothing loads from YouTube until you press play.
The engineering you’ll use
Measurement and noise
Every reading wobbles. Averaging several readings steadies the number but makes it slower to react.
moving average = (y₁ + y₂ + … + yₙ) / n
On/off with hysteresis
A simple thermostat switches the heater on below one temperature and off above a slightly higher one. The gap stops it clicking on and off constantly.
Heat balance
The greenhouse warms when heat comes in faster than it leaks out through the glass and vent. When nothing is changing, heat in equals heat out, so a fixed heater settles at a fixed temperature above the outside.
C·dT/dt = Q_heater + Q_sun − UA·(T − T_out), steady: T = T_out + Q/UA
Thermal time constant
A heated space warms gradually: it gets 63% of the way to its new temperature in one time constant. In our illustrative greenhouse, 0.6 MJ/K ÷ 100 W/K = 6,000 s = 100 minutes.
τ = C / UA
Proportional control and offset
Heat in proportion to the error. But the heater only gives Kp × error, and on a cold night it needs a lot of heat, so P-only control settles short of the setpoint.
T = (UA·T_out + Kp·r) / (UA + Kp)
Integral action
Keep adding up the error over time. As long as any error remains the heat keeps increasing, so the offset is removed.
u = Kp·e + Ki·∫e dt
Connects to: How sensors measure · Measurement error and uncertainty · Noise and filtering · Describing data · Open-loop and closed-loop control · Proportional control · Steady-state error and integral action · Electrical power and energy budgets · Constraints, budgets and trade-offs · Experimental design and test protocols
Same machine. Five ways in.
Pick the level that feels like a stretch, not a wall. You can switch any time, and your work saves to your Workshop.
◇ Explorer · Map the loop
Match 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.
You’ll make: A correct part map and loop order.
Checked instantly on our server
At the live build-along
60 minutes, building together
- 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.
- Your own design
- 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.
- You leave with
- A saved controller with its disturbance response, an interpreted data set and a written explanation of why integral action removes offset, stored in your Workshop and counted toward your Passport.
For educators & facilitators
A complete run of show, misconceptions, safety notes and a printable worksheet.
Open the facilitator guideSafety: 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.
Go further
- → Respond in proportion (Robotics Expedition, Level 2)
- → Playground: feedback control
- → Atlas: steady-state error and integral action
- → Atlas: noise filtering
- → 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.