Design a machine that sorts objects into two bins by what a sensor sees: a light sensor (or a trained model) decides, a servo flap acts, and accuracy is measured on a test set.
Recycling centres sort millions of items a day with sensors and flaps. Can yours sort a box of mixed items, and how often is it right?
Client: the school's recycling team. Context: light and dark items (or paper and plastic) slide down a chute past a sensor.
Brief: a light sensor reads each item; light items (reading 400 or more) go to bin B, dark items to bin A; a servo flap moves within 0.5 s; the sorter must be at least 90% accurate on a test set of 20 items. Kit parts only; USB power.
How this lesson works: Inquire, Develop, Create, Test, Evaluate
Inquire: Read the brief: who it is for, what it must do (criteria) and the limits (constraints).
Develop: Plan before you build: parts, circuit, code and the tests you will run.
Create: Build it, first in the simulator, then for real if you have the kit. Expect a few tries; that is normal.
Test: Run your tests and record what happened, including what failed.
Evaluate: Judge it against each criterion, and say what you would change.
Make your prediction first. Help opens once you've locked it in.
InquireRead the brief: who it is for, what it must do (criteria) and the limits (constraints).
Inquire: the brief
Sort each line of the brief: a criterion (what it must do, which you can test) or a constraint (a limit you must work within)?
Light items (400 or more) go to bin B
The flap moves within 0.5 s
At least 90% accurate on 20 test items
Kit parts only
USB power
DevelopPlan before you build: parts, circuit, code and the tests you will run.
Develop: two ideas first
Before you plan one design, look at two. Most design choices are a trade: one idea is better on one criterion and worse on another, and the brief tells you which matters more.
Make them really different, not the same idea with one part changed. A quick sketch of each in your book helps.
Now two ideas of your own. For each one, say which criterion in the brief it's strongest on and which it's weakest on. Then say which you'll build, and why.
Your working
One way to write it
Idea 1: a flap hinged at the top of the chute, swung by the servo arm. Strongest on speed: it only moves 45°. Weakest on accuracy: a light item can bounce off it into the wrong bin. Idea 2: a tray under the chute that tips left or right. Strongest on accuracy: the item stops before it's sorted. Weakest on speed: it tips and comes back for every item, which could go past 0.5 s. I'll build idea 1 with a short divider below the flap, because speed has a number on it in the brief and the divider stops most of the bouncing.
Check your own working
DevelopPlan before you build: parts, circuit, code and the tests you will run.
Develop: plan before you build
Stretch route: replace the light sensor with a picture model trained in the Pattern Trainer and tested on the classifier board from Code › micro:bit and the computer, sending its label to the board over serial.
Try it yourselfYour edits are saved in this browser.
Here the LED stands in for the flap (on = bin B). Write the decision so all four tests pass.
Use the board. This ticks when you get there.
Your sorter puts 17 of 20 test items in the right bin. What is its accuracy, as a percentage?
CreateBuild it, first in the simulator, then for real if you have the kit. Expect a few tries; that is normal.
Create: build it
TestRun your tests and record what happened, including what failed.
Test: run your table
Before you run yours, read someone else's. Check each result against the brief, not against what looks close enough.
If everything passed first time, pick the test that came closest to failing and write about that instead.
Pick one test that failed. Write what happened, what caused it, what you changed, and what the test showed when you ran it again.
Your working
One way to write it
Test: items 7 and 15, both shiny. What happened: they went to bin B but should have gone to A. Cause: the shiny plastic reflected the LED back, so it read over 400 even though it's dark; I checked by reading the number for each one. Change: tilted the sensor box so the reflection goes past the sensor. Re-test: all 20 again, 19 right, and both shiny ones now in A.
Check your own working
EvaluateJudge it against each criterion, and say what you would change.
Evaluate: Against the brief
Lesson done. You've finished every step you need.
Now you can
Turn a sensor reading into a decision and an action.
Measure accuracy on a test set.
Explain why a design that passes its code tests may still sort badly.
A Years 9–10 design project: an automated sorter where a light sensor (or a trained model) decides and a servo flap acts, prototyped on the board, built, and measured for accuracy on a 20-item test set. About 250 minutes.
I can turn a sensor reading into a decision and an action.
I can measure accuracy on a test set.
I can explain why a design that passes its code tests may still sort badly.
Before class
Real light readings depend on room light and how the item passes the sensor; a shade or an LED lighting the item helps. The Servo library is a recipe until the class has met libraries. Links: Code › Train a recycling sorter (Pattern Trainer) for the stretch route.
If you assess with MYP Design, the steps line up with the criteria:
A Inquiring and analysing: the brief, its criteria and constraints, and research into parts (Inquire).
B Developing ideas: a design specification, the circuit and code plan, and the test table written before building (Develop).
C Creating the solution: building it (in the simulator, then for real), following the plan and justifying changes (Create).
D Evaluating: testing against the specification, recording failures, improvements and impact (Test, Evaluate).
Otherwise, use the same four headings as a simple rubric: each step's reflect checks are the evidence list.
Running the lesson
Develop: the code tests and the accuracy test answer different questions; ask which is which.
Test: someone else chooses the 20 items.
The hard part (on purpose)
Students treat 100% on their own five items as proof. Hold the 20-item test set back until Test.
When students get stuck
Accuracy is poor. Ask: What do the misses have in common? Fix: Calibrate the threshold with real items, or shield the sensor from room light.
Stretch and support
Stretch: The trained-model route: compare its accuracy with the light sensor's on the same 20 items.
Support: A servo recipe card and a results table for the 20 items.
Where it leads
Other Years 9–10 projects: Two-motor drive base, Lift.
What each step is for
Inquire: the brief: Separating what the design must do (criteria) from the limits it works within (constraints) is the first move of any design brief.
Develop: two ideas first: Comparing two concepts against the brief's criteria before planning one gives the range of ideas the Develop stage asks for (MYP Design B), and makes the choice something a student can defend.
Develop: plan before you build: Prototyping the decision against threshold tests, then planning a separate accuracy test with real items, separates "the code is right" from "the machine sorts well".
Create: build it: Building in the simulator first catches wiring and code slips cheaply; the real build then tests the design against the world.
Test: run your table: Judging another team's results against the brief first, then running the test table written in Develop and writing up one failure, is the evidence for the evaluation.
Evaluate: against the brief: Judging the design criterion by criterion, with evidence from the tests, is what separates an evaluation from a description.