KS2 Classroom sound monitor

CAS
Supported by
KS2 Classroom sound monitor
Controlling physical systems with Scratch
Recommended Year Group: Any key stage 2 (science content from Year 4)
Activity Duration: 1 hour
Curriculum links: Design & Technology, Science
Concepts and approaches
Control
Inputs
Outputs
Programming
Introduction
In this activity pupils create a sound monitor for their classroom. The sound monitors they create are examples of control programs, since they take information
from an input sensor, in this case a microphone, and use this information to alter
the output of the program, for example a warning message being displayed if pupils are too noisy, or an arrow moving up a volume scale.
Optional: Schools with access to output devices such as Lego Education WeDo
hubs and motors may choose to use this equipment within this activity so that pupils’ control programs have an additional movement output, such as waving a flag
when pupils are too noisy. Guidance on using Lego Education WeDo equipment is
provided here.
Prior knowledge
It is expected pupils will have completed the inputs and outputs activities.
Pupil objectives
•I can write a control program
•I can create a control system
Before you start
•Ensure the microphones are working on the computers you are using.
•Organise pupils into pairs or groups of 3 depending on the number of computers.
Introduction (5 mins)
•Lead a discussion with pupils to explain that as some of the classes in their
school are too noisy (not them of course) their head teacher has asked them to
program a sound monitor. Can pupils think what they might use to create the
sound monitor?
Show the learning objectives (slide 2) if this is your normal practice. Note: this
learning objective is revised in the plenary when pupils are introduced to the term
control program.
•
KS2 activity: Classroom sound monitor - controlling physical systems with Scratch
page 1/6
CAS
Supported by
Designing the sound monitors (20 mins)
•Can pupils recall what an input device is? Ask pupils to think back to when they
worked with different input devices. Can they name some different input devices?
What input device do pupils think they might need to use for their sound monitor
and why? A microphone as this inputs information about the volume of sound.
Show slide 3 of the presentation which shows a microphone connected to a
computer. Ask if pupils can recall how sounds are made and travel? Sounds are
created when objects vibrate and these vibrations travel through the air (or other
mediums) to our ear – at which point we can hear them. We call these travelling
vibrations sound waves.
Indicate, as shown on slide 3, that the sound waves made by pupils in a class
will enter our microphone. Ask if pupils know what the word sensor means?
Discuss with pupils that a sensor detects something (just like our human senses
detect things), for example we can detect movement and light with motion and
light sensors. Which piece of equipment here is a sensor? What is it measuring?
Our input device – the microphone and it is detecting sound.
Ask if any pupils know why the computer is shown with a series of 0s and 1s inside it? What does this represent? Discuss with pupils that computers are digital
devices meaning the information they work with is made up of a series of 0s and
1s. Explain therefore that the job of the microphone system is to turn the sound
wave into a series of 0s and 1’s that the computer can understand. This process
is called digitisation – as we turn the information into a digital form, the 0s and
1s.
Ask if any pupils have used microphones with Scratch before? Can a pupil demonstrate how we use the input from a microphone in Scratch? Either ask a pupil
to demonstrate, or show pupils yourself, that within the ‘Sensing’ tab, there is a
‘Loudness’ block. Tick the box next to it so that the value of ‘Loudness’ is displayed on the stage, as shown below.
•
•
•
•
•Ask pupils what they think the number in ‘Loudness’ represents? When and why
is it changing? Can pupils remember what we call something in our program
which can store a number which can change? A variable.
Lead a discussion to explain that ‘Loudness’ is a variable storing the value of the
volume of sound being measured by the microphone – as the volume changes
the value in the variable changes. Reiterate that Scratch is able to measure the
volume because the microphone has turned the sound into digital data which the
computer system understands and can work with. Give the class a few minutes
•
KS2 activity: Classroom sound monitor - controlling physical systems with Scratch
page 2/6
CAS
Supported by
to make varying levels of noise and observe the value changing. Can pupils explain what the min and max number on this scale is? 0 and 100 representing the
minimum and maximum sound level detected respectively.
Explain that now we’ve learnt how we can get information about the volume of
sound into our programs using the ‘Loudness’ variable, you’d like pupils to consider with their partner what the output of the program will be. Can pupils recall
different types of output device? What output device could we use for our sound
monitor? It is anticipated pupils will use the monitor as the output device for their
sound monitors. If you have Lego Education WeDo equipment (hub and motor)
this could also be used – see here for more information.
Ask pupils to discuss with their partner what will happen when the volume increases? How will the class know they are getting louder or are too loud? Note:
if pupils need support at this point, you might show one of the example sound
monitors provided with this activity. However please remind pupils this is just one
example, and encourage them to think up their own ideas for how their sound
monitor will work.
Share a selection of pupils’ ideas and encourage pupils to explain how they are
similar/different.
Hand out paper and pens to each pair of pupils. Display slide 4 of the presentation. Explain to pupils that they will now have just 5 mins to design their sound
monitor. Their design should include:
• An annotated sketch showing what they will use for their sound monitor and
what will happen when the volume changes.
• A simple algorithm describing how their sound monitor will work e.g. ‘If
sound is too loud, say Be Quiet!’, or, ‘When the volume increases the arrow
moves up the scale and when the volume decreases the arrow moves down
the scale.’
• Ask pupils to think what commands might be useful to program the simulation and to jot these down under their design.
As pupils finish their designs, they can share these with other pupils who have
also finished. They can compare how their designs are similar/different and discuss how they might program them in Scratch.
•
•
•
•
•
KS2 activity: Classroom sound monitor - controlling physical systems with Scratch
page 3/6
CAS
Supported by
Main task: programming their sound monitors (20 mins)
•Display slide 5 of the presentation. Explain to pupils that they will now be given
20 mins to work with their partner to program their sound monitors in Scratch.
Remind pupils to regularly test and debug their program as they are creating it.
As pupils are programming their sound monitors, identify a selection of pupils
who are adopting different approaches for the following mini-plenary.
•
Mini plenary: approaches discussion (10 mins)
•Once pupils have had sufficient time to start programming their sound monitors,
ask those pupils you have identified as adopting different approaches to share
their work so far and explain the code they have used.
Encourage pupils to question each other about how they have implemented their
designs in Scratch. If some pupils are struggling to get their programs to work
as they hoped, can other groups offer advice – perhaps having worked through
similar issues themselves.
One distinction that might become apparent in pupils’ approaches is between a
sound monitor where the output follows the input, and one whereby a change
in output occurs once a certain level is reached (As discussed in the Teaching
Notes beneath).
Note: it is also possible some pupils might use both a follow and threshold approach, such as this example programmed by Miles Berry.
If you have examples of both approaches within your class, discuss this difference with pupils. Is one approach better/worse than the other? Why? Can pupils
identify what approach they have used in their own sound monitors? Could they
alter their code to try using a different approach?
Following this discussion, pupils should be given the opportunity to adapt,
change and finish programming their sound monitors.
•
•
•
•
•
Extension
•Challenge pupils to alter their programs so that they can set and adjust the level
of sound that is allowed, the threshold. Hint: they can create a variable called
threshold and use this within their program.
An ‘Extension help sheet’ has been provided if pupils require support with this
challenge. Alternatively, if pupils need further support still, you could provide
them access to one of the example teacher files labelled ‘variable threshold’ and
ask them to add comments to the code to explain how it works. Pupils could subsequently explain to the remainder of the class how the program works.
As an alternative extension activity, pupils could also be challenged to turn their
sound monitors into data loggers which record the volume at different times. The
extension help sheet provides support to get pupils started with this additional
challenge. If pupils need further support, an example sound data logger file has
been provided which pupils could add comments to – they could then feedback
to the remainder of the class how the program works.
•
•
Plenary (5 mins)
•Ask pupils to point to the input sensor and output devices for their sound moni-
tors and explain that a program such as the one that they have just created, in
which a sensor measures changes in the real world, and these changes are used
to alter the output of a program is called a control program.
Show slide 6 to pupils to reveal the revised learning intentions and explain that in
•
KS2 activity: Classroom sound monitor - controlling physical systems with Scratch
page 4/6
CAS
Supported by
this activity they have actually written a control program and created what is called
a control system.
Differentiation
Support:
Mixed ability pairing can be used to ensure less confident pupils are encouraged by
their peers. A ‘Scratch commands help sheet’ has also been provided. An additional
adult, if available, may work with a small group of pupils to provide additional support. They may plan a sound monitor as a group and work through implementing this
in Scratch as a more guided activity.
•
Stretch & Challenge:
A number of extension activities has been provided above for pupils completing the
main task.
•
Assessment opportunities
•Informal, teacher assessment of progress during main task, class discussions and
plenary. Key pupil knowledge and skills to identify detailed in the table beneath.
•Formal, summative assessment of designs and Scratch projects if required (note
however these are completed in pairs).
Teaching Notes
Approaches to creating a sound monitor
It is likely in this activity that pupils will adopt one of two approaches to creating their
sound monitor (though there are others too). Firstly, pupils might use the volume variable (Loudness) within an operator as the condition for a selection command. This
approach causes a ‘switch’ in the program’s output when a certain value of loudness
is reached, for example the sprite might switch from saying ‘That’s okay’ to ‘That’s too
noisy’. Alternatively pupils might use the value of ‘Loudness’ to continuously alter a parameter, such as a sprite’s position or size. One example of the code used for each of
these approaches appears below.
Example Sound Monitors:
A number of example sound monitors have been uploaded to our Barefoot Computing
Scratch account. See website for links.
Curriculum links
Computing:
design, write and debug programs that accomplish specific goals, including controlling physical systems
work with various forms of inputs and outputs
•
•
Design & Technology (optional)
generate, develop, model and communicate their ideas through discussion, annotated sketches, cross-sectional and exploded diagrams, prototypes, pattern pieces
and computer-aided design
apply their understanding of computing to program, monitor and control their products
•
•
KS2 activity: Classroom sound monitor - controlling physical systems with Scratch
page 5/6
CAS
Supported by
Science
recognise that sounds get fainter as the distance from the sound source
increases
making systematic and careful observations and, where appropriate, taking accurate
measurements using standard units, using a range of equipment, including thermometers
and data loggers
•
•
Concepts and approaches
Control
Control is creating instructions that cause changes to a physical system using real world
sensors to influence what needs to be done. In this activity the real world sensor is a microphone. The physical system that is changed is the control of onscreen activity such as the
sprite saying ‘Too Loud!’ or a pointer moving on a scale, or a flag being waved by a motor.
InputsI
Input devices enable information from the outside world to get into a computer. In this activity pupils use a microphone. This inputs information about the volume of sound it is detecting, it does this by turning the analogue sound wave into a digital signal. Pupils use this
information within their sound monitor control programs.
Outputs
Output devices enable information from computer systems to be transmitted to the outside
world. In this activity pupils use a screen as an output and, if available, Lego Education
WeDo motors. These devices output information by displaying a warning message, saying
‘Too Loud!’ for example, or by waving a flag
Programming
In this activity pupils create a sound monitor in Scratch. In doing so they use their knowledge of the Scratch programming language to implement the algorithm they have created
describing how their sound monitor will work. Programming is the process of implementing
an algorithm as code.
Resources
•A projector to display Scratch and the activity presentation as you work through the lesson
(see download link at end of webpage).
•MIT’s Scratch 2.0 (please refer to this guide on the ways to download and use our Scratch
resources in your school).
•Pupil access to the Scratch resources.
•The computers used for this activity must have microphones.
•Paper and pens for pupils’ annotated sketches of sound monitor designs.
•Scratch commands help sheet (up to one per pair if required – download from end of
page).
Extension activity help sheet (up to one per pair if required – download from end of page).
Sound monitor examples – see links above.
Optional: if your school has access to Lego Education WeDo equipment, pupils may wish
to use the hub and motor in this activity as an output for their control program. More information appears in this guide.
•
•
•
Related activities
KS2 Scoring system for maths quiz variables activity
KS2 Lego Education WeDo Motor with Scratch outputs activity
KS2 Investigating inputs Scratch activity
KS2 activity: Classroom sound monitor - controlling physical systems with Scratch
page 6/6