Is our classroom too loud?

Learners build a sound level meter with the micro:bit V2's microphone, measure their classroom and suggest ways to make it calmer.

Go to the code ↓

Lesson at a glance

45 to 60 minutes · Grades 5 to 9

maze.education/microbit/lessons/classroom-sound-meter

Grades
Grades 5 to 9
Time
45 to 60 minutes
The CAPS gives Coding and Robotics 2 hours a week (Coding and Robotics CAPS, Grades 4 to 6, page 22; Grades 7 to 9, page 22).
Level
Some experience
For classes that have used the micro:bit and MakeCode once or twice.
Board
micro:bit V2 only
This lesson needs a micro:bit V2, for its microphone.
Code with
MakeCode blocks, with Python as an extension
CAPS
Natural Sciences and Technology, Natural Sciences, Mathematics, Coding and Robotics
Fits: Grade 6, Term 1 · Where it fits

Learning intentions

Learners will learn to:

  1. Read the micro:bit V2's microphone and show the sound level as a bar.
  2. Measure and compare sound levels during different activities.
  3. Use evidence to suggest changes that make a classroom calmer.

Success criteria

Each learner can say:

  • I can program the micro:bit V2 to show the sound level as a bar, and a sad face above 128.
  • I can measure the sound level during three activities, three times each, and record it in a table.
  • I can use our measurements to back up a change that would make the classroom calmer.
  • Grades 7 to 9: I can trace level through the loop and say what the display shows at 128 and above it.

Competencies

From the Coding and Robotics CAPS places this lesson cites.

  • R.3Outline the different components of a robot
  • R.7Create, test and execute a set of robotic instructions

Key words

microphone
A sensor that picks up sound. The micro:bit V2 has one built in.
sound level
The micro:bit's measure of loudness, from 0 (silent) to 255 (very loud). It is not in decibels.
threshold
The value where a decision changes, such as too loud above 128.
echo
Sound bouncing back off hard surfaces like bare walls, floors and windows.
evidence
Measurements that support an idea.
trace table
A table that follows the value of each variable, step by step, as a program runs.

What you need

  • A micro:bit V2 for each group (the V1 has no microphone), with a USB cable and a battery holder
  • A computer with Chrome or Edge for each group
  • A results table with rows for silent reading, group work and a class discussion

From our shop: BBC micro:bit V2 Go, BBC micro:bit V2.21 Next Gen Classroom Pack

Safety

  • Measure everyday sound only. Do not shout or bang near anyone's ears to get a high reading.
  • Use the battery holder with two AAA batteries. Never mix old and new batteries, and take the batteries out before the kits are packed away.
  • Unplug the battery holder by holding its plug, never by pulling the wires.

The lesson plan

One lesson of 45 to 60 minutes in three parts: introduction, lesson development and consolidation. The CAPS gives Coding and Robotics 2 hours a week, so it fits one of the week's lessons. Times are a guide.

  1. Introduction

    5 to 10 minutes
    Retrieval practice

    What is a sensor? (A part that measures something in the world, such as light, temperature or sound, and gives the program an input.)

    Problem statement

    In a full classroom with bare walls and a hard floor, group work can get so loud that learners struggle to hear each other or the teacher. Build a sound meter with the micro:bit V2, measure the room during different activities, and use the evidence to suggest how the school could make it calmer.

    1. Ask: when is our classroom too loud to think? What does it feel like by the last lesson of the day?
    2. Read the problem statement. Explain that sound bounces off hard surfaces. Clap once in the classroom and once outside: which clap seems to last longer?
  2. Lesson development

    35 to 40 minutes
    1. Unplugged first. Sit in silence for 30 seconds and list every sound you hear. Sort the list: sounds from inside the room or outside, from people or from things. Which could the class change, and which not?
    2. Plan on paper first. Groups fill in the IPO table for the sound meter and write its algorithm. Learners in Grades 7 to 9 add the trace table for four passes of the loop.
    3. Predict. Ask: what will the display show for a sound level of 100? Of exactly 128? Of 129? Which of our three activities will light the most of the bar? Groups write their predictions at the top of the results table.
    4. Build in blocks. Two learners in each group build at a time. The driver builds the meter from the Blocks tab; the navigator checks each block against the algorithm, especially the 128 in two places. Swap roles halfway, after step 3, so two others take over.
    5. Test and debug. Test in the simulator with its sound control: drag it past 128 and back. Did it match your predictions? Then download it to a micro:bit V2 and whisper, talk and clap. The microphone listens through the small hole on the front, next to the logo. If the bar never moves, check that the board is a V2.
    6. Groups record how many rows of the bar light up during silent reading, group work and a class discussion, three times each, with the board in the same place every time. If you can, measure another space at school, such as the hall or the library, at a quiet time.
    7. Groups suggest two changes that could make the room calmer, and name the measurement that supports each one.

    Plan on paper: a model answer

    In groups, fill in the IPO table for the sound meter and write its algorithm. Grades 7 to 9 also trace level through four passes of the loop.

    Algorithm
    1. Read the sound level from the microphone into level.
    2. If level is more than 128, show the sad face.
    3. Otherwise, show level as a bar graph that is full at 128.
    4. Go back to step 1, forever.
    IPO table
    InputProcessingOutput
    Sound reaching the microphoneRead the sound level (0 to 255) into level, then ask: is level more than 128?More than 128: a sad face. Otherwise: a bar that grows with the sound
    Trace table
    Grades 7 to 9: four passes of the forever loop as the room gets louder. The levels are examples.
    PassIn the roomlevellevel > 128?The display shows
    1Silent reading20NoA short bar at the bottom
    2Group work64NoAbout half the bar
    3A class discussion128NoThe full bar
    4Someone claps200YesThe sad face
  3. Consolidation

    5 to 10 minutes
    1. Compare the results. Which activity was loudest? Was anyone surprised?
    2. Ask: why can we compare our numbers with each other, but not with decibel readings from a sound meter app?
    3. Back to the problem: which change would you suggest to the school first, and which measurement backs it up? Talk about what soaks up sound: curtains, pinboards, carpets and soft panels. See how schools do this on our Spaces page, or read how to check a classroom's echo with a clap. Learners check themselves against the success criteria.

Build it, step by step

Pairs build the program in blocks, following the numbered steps, with the same program as text beside them to check against or paste. Test in the simulator before sending it to a board.

Four grids: sound level 0 lights one light, 64 fills the bottom three rows, 128 fills the display, and over 128 shows a sad face. A scale marks the threshold at 128 out of 255.
plot bar graph up to 128 turns the sound level into a bar; anything over the threshold of 128 shows the sad face instead.

These are the MakeCode steps. The other routes are on the lesson's web page.

Build it in MakeCode blocks

  1. Start a New Project and make a variable called level in Variables.
  2. In forever, add set level to with sound level from Input (it is in the micro:bit (V2) group).
  3. From Logic, add an if then else: if level > 128.
  4. In the then part, put show icon with the sad face.
  5. In the else part, put plot bar graph of from Led, with level and up to 128.
  6. Test in the simulator with its sound control, then Download to a micro:bit V2.
The same blocks as text (to paste into MakeCode)
let level = 0
basic.forever(function () {
    level = input.soundLevel()
    if (level > 128) {
        basic.showIcon(IconNames.Sad)
    } else {
        led.plotBarGraph(level, 128)
    }
})

To use the text instead: open MakeCode, start a new project, click JavaScript at the top, replace what is there with this code, then click Blocks to see it as blocks.

To send it to the board, click Download. In Chrome or Edge, MakeCode can connect to the micro:bit by USB so the program goes straight onto it. Otherwise a .hex file downloads: drag it onto the MICROBIT drive.

Extension or homework

Challenges for learners who finish early, or to take further in a club or as homework.

  1. Challenge 1

    Graph a whole lesson's sound in the How loud is our classroom? A sound graph lesson.

  2. Challenge 2

    Count how many times in five minutes the room goes over your threshold, with a variable and on loud sound.

  3. Challenge 3

    Compare the same activity in two rooms, one with soft things on the walls and one without.

Support and extension

Support

For learners who need more help

  • Give groups a table with the activities already filled in, and ask them only to count the rows that light up.
  • Use one board for the whole class, held up where everyone can see it, and record together.

Extension

For learners who are ready for more

  • Record the sound level every few seconds with the data logger (see the Data logger lesson) and draw a line graph of a whole lesson.
  • Find a threshold that suits your class: which number is loud enough to need a reminder?

Informal assessment

Ask these as learners work. Informal assessment happens every day and is not recorded.

  1. What range of numbers does the micro:bit's sound level use?
  2. What will the display show if the level is exactly 128, and why?
  3. Which activity was loudest in your results, and by how much?
  4. Why did we repeat each measurement three times?
Exit question

Which change would you suggest for our classroom, and which measurement supports it?

Observation checklist

Watch pairs as they plan, build and test. Write each pair's initials under the level you see.

Watch forBeginningDevelopingAccomplishedExemplary
Fills in the IPO table: sound in, a comparison with 128, a bar or a face out.
Builds the if then else with 128 in both places, as driver or navigator.
Measures fairly: the same distance and place, three times for each activity.
Backs up a suggestion with a measurement from the results table.
Beginning:
not yet, even with help
Developing:
with help
Accomplished:
on their own
Exemplary:
on their own, and explains it or takes it further

The four levels are the CAPS rubric levels (Coding and Robotics CAPS, Grades 4 to 6, page 176; Grades 7 to 9, page 163). The short descriptions are ours.

This lesson is not a formal task, but it is good practice for the term's practical task in Grades 4 to 6 (Coding and Robotics CAPS, Grades 4 to 6, page 170), and for the mini-PATs in Grades 7 to 9 (Coding and Robotics CAPS, Grades 7 to 9, page 157).

Common mistakes and fixes

  • Problem: The bar never moves.Fix: You need a micro:bit V2: look for the gold logo on the front and the small microphone hole. A V1 has no microphone.
  • Problem: The sad face shows all the time.Fix: Something near the board is noisy, or the threshold is too low for your room. Try 150.
  • Problem: Our numbers are different from another group's.Fix: Distance matters: keep the board the same distance from the people talking, and in the same place each time.

Where it sits in CAPS

  • Coding and RoboticsFitsGrade 6, Term 1: the microphone is a sound sensor, an input the program can measure.Source: Coding and Robotics CAPS, Grades 4 to 6 (opens in a new tab), Grade 6, Term 1, Robotics, R.3 Outline the different components of a robot, page 132: Sound sensors (microphones) allow the robot to perceive
  • Coding and RoboticsFitsGrade 6, Term 3: a program that reacts to sound (the CAPS sound-controlled light pole).Source: Coding and Robotics CAPS, Grades 4 to 6 (opens in a new tab), Grade 6, Term 3, Robotics, R.7 Create, test and execute a set of robotic instructions, page 155: Develop a project to turn on the light and set off the alarm when you clap your hands.
  • MathematicsGrades 5 and 6 Mathematics: interpreting data and making predictions from it.Source: CAPS Mathematics, Grades 4 to 6 (opens in a new tab), Section 3, topic 5.3 Analysing, interpreting and reporting data (Grades 5 and 6): making predictions based on the data
  • Natural Sciences and TechnologyFits Natural Sciences and Technology, Energy and Change: sound, and how it travels and reflects.

Coding and Robotics quotes come from the Department of Basic Education's final CAPS, with the page number of the 2024 printed edition (the Department's October 2025 library copies number their pages differently). Schools may teach a topic in another term: the CAPS leaves the order to each school's annual teaching plan.

Ready to teach it?

Get a micro:bit for every learner or pair, and let us train your staff to run lessons like this one.

More lessons

All lessons →
  • Grades 5 to 8

    Grades 5 to 845 to 60 minLevel: Some experience

    Radio hot potato

    A secret timer travels by radio between two boards: shake to throw the potato before it bursts. Learners build a game on random numbers and messages.

    Subjects: Coding and Robotics · Natural Sciences and Technology · Technology · Mathematics

    Code with: MakeCodePython

  • Grades 6 to 9

    Grades 6 to 945 to 60 minLevel: Some experience

    Reaction timer

    Wait for the dot, then press A as fast as you can: learners time their reactions in milliseconds and analyse the class's data.

    Subjects: Mathematics · Coding and Robotics

    Code with: MakeCodePython

  • Grades 6 to 9

    Grades 6 to 945 to 60 minLevel: Some experience

    Plant moisture checker

    Two crocodile clip leads and a pot plant: the micro:bit measures how damp the soil is and asks for water when it is dry.

    Subjects: Natural Sciences and Technology · Technology · Natural Sciences · Coding and Robotics

    Code with: MakeCodePurple MashPython

micro:bit is a trade mark of the Micro:bit Educational Foundation, and BBC is a trade mark of the British Broadcasting Corporation. Maze Education is an independent reseller of genuine BBC micro:bit products. Our teacher training and our other products and services are our own, and are not endorsed by the Foundation or the BBC.

WhatsApp