← Teacher guide

Automated sorter

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.

Capstone projects · Years 9–10: move it · about 250 minutes · Open the student lesson

Classroom resources

Open these in Waypoints Prepare with one click. To share a file another way, copy its address and paste it into Load URL, or download the file and import it. In Prepare, the worksheet's Teacher edition shows the answers; the student copy hides them.

Students will be able to

Timing

About 4 to 6 lessons (around 250 minutes). Inquire part lesson · Develop 1 · Create 2–3 · Test and evaluate 1

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:

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

What you will seeA question to askThe fix
Accuracy is poor.What do the misses have in common?Calibrate the threshold with real items, or shield the sensor from room light.

Answers to the checks

  1. 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 → Criterion; The flap moves within 0.5 s → Criterion; At least 90% accurate on 20 test items → Criterion; Kit parts only → Constraint; USB power → Constraint
    Criteria are what you will test at the end; constraints decide what you are allowed to build with.
  2. Two ways to do it: Two ideas for where the light sensor goes. A: on the side of the chute, in the room's light. B: in a small box over the chute, with its own LED shining down. Which is more likely to meet the 90% accuracy criterion?
    B: with its own light, the reading depends on the item, not on the room
    A box with its own LED keeps the light the same for every item, so the reading changes only when the item does.
  3. Your own two ideas: 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.
    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.
  4. Prototype the decision: Here the LED stands in for the flap (on = bin B). Write the decision so all four tests pass.

    if (level >= 400) flap to B (LED on), else A (off).
  5. Accuracy: Your sorter puts 17 of 20 test items in the right bin. What is its accuracy, as a percentage?
    85
    17 ÷ 20 = 0.85 = 85%: under the 90% the brief needs.
  6. Another team's results: Another team's sorter put 18 of 20 items in the right bin, the flap took 0.6 s, and both wrong items were shiny plastic. Which criteria does it meet?
    90% accuracy, but not the 0.5 s one
    18 ÷ 20 = 90%, so accuracy just passes, but 0.6 s is over 0.5 s. And both misses being shiny plastic says what to test next: the sensor's reading on shiny things, not the code.
  7. Fix and re-test: Pick one test that failed. Write what happened, what caused it, what you changed, and what the test showed when you ran it again.
    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.
  8. Which is evidence?: Which is the strongest evidence that the design meets a criterion?
    A planned test with its recorded result
    A planned test from your table sets the input the criterion is about and records what happened; that is evidence. Everything else is a feeling.

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.

Exit ticket

Your sorter scores 18 of 20. Does it meet a 90% criterion?

Yes: 18 ÷ 20 = 90%, exactly the criterion.

What each step is for

Where it leads

Other Years 9–10 projects: Two-motor drive base, Lift.