← Capstone projects

Parking assistant

Design a distance warning: an ultrasonic sensor and a buzzer or LED that warns sooner and harder as something gets closer, tested at each band edge.

Reversing cars beep faster as they get closer to a wall. Can you build one, and prove it warns at the right distances?

Client: a family whose car has no reversing sensor. Context: a model on the bench (a ruler and a box stand in for the car and the wall).

Brief: an ultrasonic distance sensor measures in centimetres. Off when the distance is over 100 cm, beeping (blinking) from 30 to 100 cm, steady under 30 cm. Kit parts only (HC-SR04 sensor, piezo buzzer or LED); 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)?

Off over 100 cm
Blinks or beeps from 30 to 100 cm
Steady under 30 cm
HC-SR04 sensor and a buzzer or LED from the kit
USB power

DevelopPlan before you build: parts, circuit, code and the tests you will run.

Develop: plan before you build

On the real sensor, pulseIn measures the echo time; distance in cm ≈ time (µs) ÷ 58. Tinkercad's ultrasonic sensor lets you drag the object to set the distance.

Try it yourselfYour edits are saved in this browser.
How many test readings do you need at minimum to check every band edge (30 and 100), on both sides?

Here the knob reading stands in for the distance in cm. Write the bands so all six tests pass.

Use the board. This ticks when you get there.

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 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. About 180 minutes.

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

Students will be able to

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:

Running the lesson

  1. Develop: ask how many edges three bands have.
  2. 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

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.

Where it leads

Other Years 8–9 projects: Smart plant monitor, Reaction game.

Sources

What each step is for

Now you can
Next lesson3. Reaction gameDesign a reaction timer: an LED lights after a random wait, the player presses a button, and the game shows their time in milliseconds, fairly.