micro:bit L3 - pH Water Quality Test

Lesson 3 - pH Water Quality Detection

Students learn how to use conditionals (if/else) to make the micro:bit decide whether the water is safe for plants.

I can measure pH with a digital sensor and a micro:bit

I can use if/else to compare pH values

I can show pH status with icons and LED lights
 

1. Engage: Is Our Water Plant-Friendly?

Display three hydroponic plant cups: the middle one is healthy, while the other two grow poorly with yellowed leaves. Question: Why are the left and right plants unhealthy?

The unhealthy plants were grown in overly acidic water or overly alkaline water. Although the water appeared identical, the plants could not absorb nutrients properly.

Introduce pH as a hidden number (0–14) that tells us if water is acidic (<7), neutral (=7), or alkaline (>7). Most hydroponic plants are happiest when pH is between 5.5 and 6.5.

Key Question

How can we measure the water pH value to protect our plants?

Today we will make our micro:bit a "pH detective"—dip the probe, read the number, and tell us: Is this water safe?

 

2. Explore: How Does the pH Sensor Measure Water?

Brief mention: Scientists can test pH with paper strips that change color or with liquid dye kits—but those are not very precise. The most accurate way is a digital pH sensor—just like the one we have!

 

 

How the sensor works (simple version):

Twist to open the protective cap.

Before testing each solution, thoroughly rinse the pH electrode and blot residual water with filter paper.

Immerse the pH meter into the test solution to the depth shown in the figure below.

 

Teacher Note:

Do not touch the sensitive glass bulb at the tip of the pH electrode with hard objects. Any crack or abrasion will render the electrode unusable.

 

After measurement and powering off the conversion board, disconnect the pH electrode promptly. Never leave the electrode connected to the unpowered conversion board for extended periods.
 

3. Engineer: Teacher Demo — Calibrate & Measure

The teacher demonstrates the full workflow while students observe and learn:

Step 1: Make hardware connections and add required extensions

 

 

Step 2: Build the program to measure the tap water

 

 

Click here to open program3-1

Connect device, download.

 

Dip (rinsed) the probe into tap water. Click “Show data Device” to read pH on the serial monitor.

 

Key Question

Does tap water make an ideal solution for hydroponics? What could we do if the pH is wrong?

Introduce the Hydroponics pH Up Down Solution, which can control the pH level of your hydroponics and nutrient solution.

 

Teacher Note:

The pH control kit can be bought from this link: https://a.co/d/04P6AzLa
 

4. Experience & Challenge: Detect pH with Conditionals

Key Question

We can read pH—but how does the micro:bit decide what to tell us?

 

Experience: If/Else pH Classification

Activity 1

Guide students to rebuild the program in MakeCode:

 

Click here to open program3-2

Ask students to test it with three samples:

✅ Vinegar → ⬆

✅ pH-controlled hydroponic solution → happy face

✅ Baking soda water → ⬇

Key Question

What if we’re not looking at the screen? How can we see the status from across the room?

 

Challenge: Add LED Indicators

Activity 2

Challenge students to explore the block library, then program the device to display different LED indicators corresponding to various pH readings.

 

Click here to open program3-3

TEACHER NOTE: the expansion board loaded 4 LEDs that could be used as indicators.

 

5. Elaborate: Different Range for Different Plants

Activity 3

Research: Find the ideal pH range for three different plants.

Make a class chart.

Here is a sample table:

Plant CategoryOptimal pH RangeExamples
Leafy Greens5.5 – 6.0Lettuce, spinach, kale, arugula
Fruiting Plants6.0 – 6.8Tomatoes, peppers, cucumbers, eggplant
Flowering Plants6.0 – 7.0Roses, petunias, marigolds

 

Next Lesson: Lesson 4

Cuurent Tutorial

icon Lesson 3.zip 3.04MB Download(0)
License
All Rights
Reserved
licensBg
0