← Capstone projects

Automated sorter

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.

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: plan before you build

Stretch route: replace the light sensor with the Teachable Machine classifier 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

EvaluateJudge it against each criterion, and say what you would change.

Evaluate: against the brief

Which is the strongest evidence that the design meets a criterion?

For teachers

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.

Open the teacher guide: answers, solutions, slides and a worksheet.

Students will be able to

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 (Teachable Machine) for the stretch route.

If you assess with MYP Design, the steps line up with the criteria:

Running the lesson

  1. Develop: the code tests and the accuracy test answer different questions; ask which is which.
  2. 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

Stretch and support

Stretch: The Teachable Machine 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

Now you can
Next lesson6. LiftDesign a motor-driven lift that raises a load to a height within a time: choose a gear ratio against the brief, drive the motor through a driver, and compare the measured result with the prediction.