Lesson3(micro:bit) - Know Your Soil Moisture Sensor: The Distress Signals of Plants
1. Engage: Discovering Plant SOS Signals
Start the lesson by showing short photos of plants in distress: Leaves that are yellow or pale green, the plant that is likely shorter (e.g., Nitrogen deficiency), or leaves with brown curled-up edges (e.g., potassium deficiency).


Introduce the importance of essential nutrients and water for plant growth.
Plants need water and nutrients to survive, grow, and reproduce. Watering plants is a delicate balance, as too much water can cause root rot, while too little water can cause a plant to wilt and die.

Key Questions
Which of these two potted plants is unhealthy, and what might be the reasons? (e.g., the left one is unhealthy, might because of lacking water)
2.Explore: How to Check Soil Moisture?
Ask: “How do you usually know if your houseplant needs water?”
Encourage students to share their life experiences with the class (e.g., touching soil, checking leaf firmness). Guide students to think about the drawbacks of the two traditional methods.
Activity 1
Complete the multiple-choice question on the Activity Sheet.
Display several common instruments for measuring soil moisture on the market.

3.Engineer: Meet the Soil Moisture Sensor
Introduce the Soil Moisture Sensor we will use today.
Explain: “It measures how much water is in the soil and gives us a number—reliable and specific!”

Demonstrate how to use this sensor following the steps below:
Prepare two pots of soil with different soil moisture levels.

Step 1: Connect the Sensor.

Insert Micro:bit into the expansion board and plug the sensor into the A0 port on the expansion board, and then connect the Micro:bit to the computer.
Don't forget to install the 18650 battery and switch the expansion board to ON.
Step 2: Import project
Go to the MakeCode editor and import project by following steps:
Import->Import File->Choose File->Go ahead.


Step 3: Connect and pair your Micro:bit to your browser.


Step 4: Download the code.

Show students how the number changes when I put the sensor in dry soil.


Key Question
What happens to the number if we put the sensor in very wet soil? Let’s make a guess before testing!
Measure soils with different moisture levels to see if your previous hypotheses are correct.

4.Experience: Test and Calibrate
Students will learn to calibrate a soil moisture sensor by measuring two extreme conditions—dry air (0% soil moisture) and water (100% soil moisture). They’ll record these two key values, then calculate how to map sensor readings to moisture percentages.
Activity 2
Calibrate Your Soil Moisture Sensor
Preparation:
A pot with water for each group.

Steps:
Provide the code above. Let students upload it to their Micro:bit.
Guide students to measure two conditions: dry air and water.
Use these two values to determine what any sensor reading represents in percentage, and complete the table in the Activity Sheet.
Table Example:

Activity 3
Plant ID Card
Each group picks a plant (e.g., succulent, basil, fern).
Research:
The plant's name, type, and preferences for light, temperature, and soil moisture.
Fill in the information on the Activity Sheet, then cut out the plant ID card and paste it in the corresponding position on the background board.

5.Challenge: Modify Your Code
Generally, a soil moisture percentage between 20% and 60% is considered optimal for most plants. Let's build a Plant Monitor to monitor your plant.

Activity 4
Build a Plant Watering Monitor
Design and create a program that makes the LEDs show different colors to represent the level of soil moisture.
Steps to modify the code:
① Drag another “forever” block out.

② Drag an “if” block out and put in “forever”.

③ Insert comparison block into “if” block, and set the value as below.

④ Import the extension to light up LEDs.
Go Extensions->select neopixel


⑤ Combine “on start” and “set strip” together, and change the pin to “P1” and the number of LEDs to 4.


⑥ Add the “strip show color” and the “strip show” blocks under “If”.

⑦ Complete the rest blocks as below.

⑧ Download and test.



Key Question
How could this monitor help in real life? (e.g., reminding us to water plants when we’re away)
6. Elaborate: Saving Water with Sensors
Discussion & Design
How can soil moisture sensors help us save water? (e.g., avoid over-watering, water only when needed!)
Imagine designing a ‘Smart Garden’ for our school. How would the sensor make it more efficient? Draw a sketch!
Conclusion: Soil moisture sensors help plants “speak” their needs, and with a little coding, we can turn their needs into actions that keep them healthy and save water!
Answer
① No
② Generally between 20% and 60%
③ 100%
④
