Source: https://mokxi.com/teachers/plans/build-greenhouse-controller
Updated: 2026-11-19

Lesson plan

# Build a greenhouse controller lesson plan

Build the controller that runs a greenhouse: climate and VPD, fans with hysteresis, safe watering, a photoperiod, schedules and a season log.

3 chapters, 6 lessons, about 5 hours, on the Arduino Uno R3. Every lesson runs in the browser, with nothing to install.

Start a class from this course

The unit

## Objectives and materials

### By the end, students can

- Read the climate, and move air when it goes wrong.
- A pump with limits, and a grow light on the clock.
- Schedules from a table, then the whole house with a log.

### Materials for the whole unit

- Arduino Uno R3
- Battery: AA, coin cell, LiPo
- Fan module, L9110
- Filament lamp
- Full-size breadboard
- Mini water pump
- Real-time clock, DS3231
- Relay board, four channels
- Soil moisture sensor, capacitive
- Temperature and humidity, SHT31

Every part is already on the simulator’s bench, so there is nothing to buy or hand out. The counts are the most any one lesson uses, if you build it on real breadboards too.

Chapter 1. About 1 h 40 min

## The air

Read the climate, and move air when it goes wrong.

Lesson | Time | What students do

Climate sensing Read a greenhouse's air with an SHT31 and turn temperature and humidity into the one number growers steer by: the vapor pressure deficit. | 45 min

- The air in the house
- Too humid
- Too dry
- Seedling weather

Fans and vents Run a fan with hysteresis: on at 28 C, off only under 26 C, faster as it gets hotter, and on for damp air too. | 55 min

- Two thresholds
- A hot afternoon
- Spinning
- Cooling, but not off
- Damp air

### Materials

- Arduino Uno R3
- Battery: AA, coin cell, LiPo
- Fan module, L9110
- Filament lamp
- Full-size breadboard
- Mini water pump
- Real-time clock, DS3231
- Relay board, four channels
- Soil moisture sensor, capacitive
- Temperature and humidity, SHT31

### Check for understanding

Each student finishes "Fans and vents" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Damp air".

Chapter 2. About 1 h 40 min

## Water and light

A pump with limits, and a grow light on the clock.

Lesson | Time | What students do

Watering Water from a soil probe through an active-low relay and a pump: start under 35 percent, stop at 50, never run longer than 10 seconds, and catch an empty reservoir. | 55 min

- Active low
- Thirsty
- Water flows
- Wet enough
- An empty reservoir

Lights Run a grow light on a 16 hour photoperiod from a DS3231, with its state worked out from the clock so a power cut cannot leave it wrong. | 45 min

- It is noon
- Light
- Nightfall
- Sunrise

### Materials

- Arduino Uno R3
- Battery: AA, coin cell, LiPo
- Fan module, L9110
- Filament lamp
- Full-size breadboard
- Mini water pump
- Real-time clock, DS3231
- Relay board, four channels
- Soil moisture sensor, capacitive
- Temperature and humidity, SHT31

### Check for understanding

Each student finishes "Lights" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Sunrise".

Chapter 3. About 1 h 40 min

## Run the season

Schedules from a table, then the whole house with a log.

Lesson | Time | What students do

Schedules Water only in morning and evening windows from a schedule table, work out the next event from the clock, and keep the photoperiod going. | 45 min

- A table, not a tangle
- The morning window
- Watering in the window
- Evening

Project: a season log The whole controller: climate, fan, scheduled watering and lights, an hourly log line, and a summary of every day. | 55 min

- The logbook
- Heat
- Morning watering
- End of the day
- Your season

### Materials

- Arduino Uno R3
- Battery: AA, coin cell, LiPo
- Fan module, L9110
- Filament lamp
- Full-size breadboard
- Mini water pump
- Real-time clock, DS3231
- Relay board, four channels
- Soil moisture sensor, capacitive
- Temperature and humidity, SHT31

### Check for understanding

Each student finishes "Project: a season log" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.

Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Your season".

Your class

## Teach this unit as a class

Start a class from this course and its 6 lessons are assigned in one go, in order. Students join with a six-character code or printed login cards, and each one’s work comes back to you.

The class tools are free for 30 days for one class of up to 20 students, with no card. The lessons themselves are free either way.

Start a class from this course See the demo class

More units

## Other lesson plans

Electronics basics 20 lessons, about 10 h. Embedded on the Arduino Uno 16 lessons, about 12 h. Embedded on the ESP32-C3 13 lessons, about 11 h. Embedded on the Raspberry Pi Pico 7 lessons, about 6 h. Build your own fight stick 5 lessons, about 4 h. Embedded on the STM32F411 6 lessons, about 6 h. C++ on a board 13 lessons, about 10 h. Digital logic and memory 4 lessons, about 4 h. Interactive devices on the Uno 9 lessons, about 8 h. From gates to a computer 23 lessons, about 16 h. Build a claw machine 8 lessons, about 6 h. Every unit All the courses as ready-made units, on the teachers page.
