A Years 8–9 design project: a parking assistant with an ultrasonic sensor and three warning bands, planned with band-edge tests, prototyped on the board, built in Tinkercad and optionally on hardware, tested with a ruler and evaluated.
Capstone projects · Years 8–9: sense and respond · about 180 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.
WorksheetOpen in PrintDownload Print the student copy; the Teacher edition has the answers.
Students will be able to
I can plan tests for every edge of a set of bands.
I can read a distance sensor and act on it.
I can evaluate my design against each criterion with evidence.
Timing
About 3 to 4 lessons (around 180 minutes). Inquire part lesson · Develop 1 · Create 1–2 · Test and evaluate 1
Before class
The sensor code (pulseIn and ÷ 58) is new: give it as a recipe card. HC-SR04 sensors are unreliable on soft or angled surfaces and under about 2 cm; good evaluations mention it. Builds on Arduino › A small system.
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: ask how many edges three bands have.
Test: rulers out; record the real distance and what the device did.
The hard part (on purpose)
Real ultrasonic readings jump around; students blame their code. Print the readings first.
When students get stuck
What you will see
A question to ask
The fix
The readings jump around.
What does the sensor read when nothing moves?
Average three readings, or aim at a flat, hard surface.
Answers to the checks
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)? Off over 100 cm → Criterion; Blinks or beeps from 30 to 100 cm → Criterion; Steady under 30 cm → Criterion; HC-SR04 sensor and a buzzer or LED from the kit → Constraint; USB power → Constraint Criteria are what you will test at the end; constraints decide what you are allowed to build with.
Two ways to do it: Two ideas for the beeping. A: one steady beep rate from 30 to 100 cm. B: beeping that speeds up as the car gets closer. B is nicer to use. Does the brief ask for it? No: it's extra, and it still has to pass the brief's tests at 30 and 100 cm Extras are welcome, but they don't replace the criteria: whatever the beep does, it still has to start at exactly 100 cm and turn steady below 30.
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: one beep rate from 30 to 100 cm. Strongest on the tests: three bands with clear edges. Weakest on use: it doesn't tell you how close you're getting inside the band. Idea 2: the beep speeds up as the distance drops. Strongest on use. Weakest on testing: the edges are harder to hear when the rate keeps changing. I'll build idea 1 first, pass every test, then add idea 2 as an improvement and run the same tests again.
Band edges: How many test readings do you need at minimum to check every band edge (30 and 100), on both sides? 4: 29, 30, 100, 101 Each edge needs the reading just inside and just outside it.
Prototype the bands: Here the knob reading stands in for the distance in cm. Write the bands so all six tests pass.
if (cm < 30) steady; else if (cm <= 100) blink; else off.
Another team's results: Another team's results: 101 cm off, 100 cm beeping, 60 cm beeping, 30 cm steady, 29 cm steady, 10 cm steady. Which result doesn't match the brief? 30 cm: it should still be beeping Beeping runs from 30 to 100, so at exactly 30 it should still beep; steady starts below 30. Their code probably says distance <= 30 where it needs distance < 30.
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: 30 cm. What happened: steady instead of beeping. Cause: my code said if (distance <= 30) for steady, so 30 landed in the wrong band; I checked by printing the distance and the band. Change: if (distance < 30). Re-test: 30 cm beeps and 29 cm is steady, and I ran 100 and 101 cm again in case the change broke them.
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: Beep faster as it gets closer, with the delay worked out from the distance (map).
Support: A recipe card for reading the HC-SR04, and the band table half filled.
Exit ticket
Give the four test distances that check your band edges.
29, 30, 100 and 101 cm.
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: Three bands mean four edges to test; prototyping the bands on the board, with the knob as the distance in cm, gets the logic right before the sensor code.
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.
Where it leads
Other Years 8–9 projects: Smart plant monitor, Reaction game.