Lesson 6 - Fully Automated Hydroponic System
Students learn how to break a big problem into smaller modules, then combine sensors and actuators to make their own hydroponic helper.
I can break a big problem into smaller, testable modules.
I can combine temperature, light, pH, water level, and pump modules into one automated system.
I can test, optimize, and present my own hydroponic helper.
1. Engage: Build a 24/7 Plant Caretaker
Over the last five lessons, we built one helper at a time. Each helper solved one small job. But a real plant needs someone to take care of it all day, every day - watering when the tank gets low, giving it light, and making sure the water stays plant-friendly.

What if we could join all our helpers together, so the micro:bit watches everything at once and takes care of the plant by itself - with nobody standing there? Today we become system designers and build our own all-round hydroponic helper.
2. Explore: Breaking Down the Big Problem
The Big Problem: Build a system that takes care of a plant all by itself.
That sounds too hard to do all at once — so we don't try to. Instead, we use a powerful idea called task decomposition: we split the big problem into several small, simple jobs, build and test each one on its own, and then join them together.
Key Question
What jobs can we split our big problem into?
Step 1: Think about the plant.What does a plant need to survive? List 3–4 essential needs.
Let students brainstorm. Possible answers: water, nutrients, light, warmth.
Step 2: Match each need to your hardware.For each plant need, which sensor and which actuator work together to meet that need?
| Plant Need | Sensor | Actuator |
| Water at the right level | Water level sensor | Peristaltic pump |
| Safe growing solution | pH sensor | Speaker |
| Light for photosynthesis | Light sensor | Full-spectrum LED strip |
| Good temperature | micro:bit temp sensor | LED indicator |
Activity 1
• Ask students to divide the whole project into two tasks that interest them.
For example:
Group One chooses lighting and water level management. They will build a plant helper that automatically adjusts light intensity and refills water when the level is too low.
Activity 2
• Follow the building instructions to put the whole system together.

3. Engineer: Teacher Demo - A Working Hydroponic Helper
Step 1: Display these 4 functions on the screen.

Click the here to open this project in the micro:bit MakeCode editor
Explain: Each function does ONE job. We wrote and tested each one separately — just like you planned in Explore.
Step 2: Demonstrate "Drag the function I need”

Step 3: Build a demo
To build a system, I just drag the functions I need into the forever block.

Step 4: Demonstrate "Debugging" (What to do when it doesn't work)
Guide students to check the raw sensor first. Cover the sensor. Watch the RAW number. Does it go below 100? No? Then your threshold is wrong — adjust it.
Then test the actuator alone. Is the pump working? Is the wire plugged in? If it works here, the problem is in your sensor logic — not the hardware.
4. Experience & Challenge: Build, Test & Upgrade Your Plant Helper
Students have planned their system and watched the teacher demonstrate how to turn a rule into code. Now it's their turn to build.
Activity 3
• Guide students to build their system.
• Step 1: Connect the Hardware
• Refer to the hardware connection table below and connect the sensors and actuators for the chosen jobs.
| Water level sensor | C0 |
| pH sensor | P0 |
| Grow light strip | P1 |
| Peristaltic pump | M3 |
• Here is a diagram with all the modules:

• Step 2: Start with the Function Library
• The program6-1 should already include all four functions — students only need to keep the ones they need and comment out or remove the rest.
• Step 3: Run and debug
• Students download the program to their micro:bit and debug following the teacher’s guide.
Challenge: Add an extra job of your own
Activity 4
• Challenge students to choose ONE extra job to add. For example: show the temperature on the screen, blink a warning LED when the water is unsafe, play a small sound, or show a bar graph of the light level.
5. Elaborate: How Computing Changed Agriculture

Key Question
How does computing technology change agriculture and the food supply?
Our little hydroponic helper is a miniature version of a real idea. Modern greenhouses and vertical farms use sensors and programs to control light, water, temperature, and nutrients for thousands of plants at once, growing food close to cities with much less water.
Discuss in groups: If computing can grow plants 24/7 with little water, how could that help feed more people around the world? What could go wrong if a system fails? Present one idea to the class.









