New
New
Year 11

Ultrasonic sensors to measure distance

I can describe and use ultrasonic sensors to calculate distance.

New
New
Year 11

Ultrasonic sensors to measure distance

I can describe and use ultrasonic sensors to calculate distance.

These resources will be removed by end of Summer Term 2025.

Switch to our new teaching resources now - designed by teachers and leading subject experts, and tested in classrooms.

These resources were created for remote use during the pandemic and are not designed for classroom teaching.

Lesson details

Key learning points

  1. Ultrasonic sensors measure distance using sound waves.
  2. Ultrasonic sensors gather data from the environment and send that data to the microcontroller to make decisions.
  3. Ultrasonic sensors are used to calculate distance using the formula distance = time x speed of sound.

Keywords

  • Ultrasonic - sound waves that have a frequency higher than the upper limit of human hearing

  • Distance - the length of the space between two points

  • Sensor - a device which detects or measures a physical property such as sound or light

Common misconception

Ultrasonic sensors work like cameras and detect objects visually.

Ultrasonic sensors use sound not light to detect objects.


To help you plan your year 11 computing lesson on: Ultrasonic sensors to measure distance, download all teaching resources for free and adapt to suit your pupils' needs...

Explain the concept using the examples of bats or dolphins, which use echolocation to "see" by sending out sound waves and listening for echoes. This helps students understand how ultrasonic sensors work.
Teacher tip

Equipment

Raspberry Pi Pico microcontroller, HC-SR04 ultrasonic sensor, breadboard, jumper wires, Thonny software.

Licence

This content is © Oak National Academy Limited (2025), licensed on Open Government Licence version 3.0 except where otherwise stated. See Oak's terms & conditions (Collection 2).

Lesson video

Loading...

Prior knowledge starter quiz

Download quiz pdf

6 Questions

Q1.
What is the main purpose of a buggy chassis?

to power the buggy
to control the motors
Correct answer: to provide structural support
to store code

Q2.
Why must a chassis be strong?

Correct answer: to withstand force and function reliably
to look more attractive
to store extra batteries
to make the buggy faster

Q3.
When should you perform a visual inspection?

Correct answer: after every use
only before coding
never
only when there’s a problem

Q4.
Place these steps in order for checking a buggy before use:

1 - perform a visual inspection
2 - identify any issues
3 - fix any problems found
4 - test the fixes

Q5.
Match each scenario to the correct keyword:

Correct Answer:visual inspection,checking for loose wires

checking for loose wires

Correct Answer:chassis,the buggy holds all parts together

the buggy holds all parts together

Correct Answer:strong,the buggy does not break when bumped

the buggy does not break when bumped

Correct Answer:code,changing motor direction using instructions

changing motor direction using instructions

Q6.
What is the small computer on a circuit board that controls the actions of devices like a programmable buggy?

Correct Answer: microcontroller

Assessment exit quiz

Download quiz pdf

6 Questions

Q1.
Place these steps in the correct order for how an ultrasonic sensor measures distance:

1 - The sensor emits a sound wave.
2 - The sound wave bounces off an object.
3 - The sensor detects the echo.
4 - The time taken for the echo to return is measured.

Q2.
What type of waves do ultrasonic sensors use to detect objects?

Correct Answer: sound

Q3.
What formula is used to calculate distance with an ultrasonic sensor?

distance = mass × acceleration
Correct answer: distance = time × speed of sound
distance = voltage × current
distance = area × height

Q4.
Match each keyword to its correct description:

Correct Answer:ultrasonic,sound waves above human hearing

sound waves above human hearing

Correct Answer:distance,the length between two points

the length between two points

Correct Answer:sensor,device that detects or measures properties

device that detects or measures properties

Correct Answer:microcontroller,the “brain” that makes decisions

the “brain” that makes decisions

Q5.
Order these actions for how the buggy uses sensor data:

1 - ultrasonic sensor gathers data
2 - microcontroller receives the data
3 - microcontroller decides what to do
4 - buggy changes its movement

Q6.
What happens after the ultrasonic sensor gathers data?

Correct answer: the microcontroller makes a decision
the battery charges
the wheels stop moving
the chassis changes shape

Additional material

Download additional material