Noise in corridors and classrooms is more than a nuisance. The World Health Organization recommends that background noise in a classroom should not exceed 35 dB during lessons, so that pupils can hear and understand what is said. It also notes that long-term exposure to noise in early childhood appears to impair learning to read (Guidelines for Community Noise, WHO, 1999).
In this hands-on project, we explain how to use the P-Bit's native microphone (Mic) and comfort sensors to build a sound traffic light and an acoustic health map of the school.
1. The Hardware: The P-Bit's Microphone and How It Works
Unlike digital sensors such as the DHT11, the P-Bit's microphone is analogue. It produces a signal that rises and falls with the sound wave, and the P-Bit reads it with its analogue-to-digital converter (ADC). The firmware measures the peak-to-peak amplitude of that signal over 20 ms windows and turns it into a relative level from 0 to 100%.
These are not decibels. The P-Bit is not a calibrated sound level meter, and it cannot tell whether a sound is high or low pitched. It is for comparing places and moments with each other. A reading of 100% means the microphone has saturated, so all you know is that the sound is at least that loud.
Visualization on the TFT Screen
On the P-Bit's screen, the sound level is shown as a VU meter, and the RGB LED shifts from violet to red as it rises. The green, amber and red traffic light is not built in. Students program it in the next activity.
2. Classroom Activity: The Acoustic Traffic Light
Using the P-Blocks visual coding platform, students build the sound traffic light code in just 5 minutes:
READ Microphone (Analog)in a continuous loop.IF Noise < Silence_Level→ Turn on Green LED (Calm).IF Silence_Level < Noise < Alert_Level→ Turn on Yellow LED.IF Noise > Alert_Level→ Turn on Red LED.
Leave the buzzer out. The microphone would pick up its own warning and the light could get stuck on red, which is why the P-Bit's firmware never uses the buzzer for sound alerts. Choose the silence and alert levels by first measuring the classroom when it is calm and when it is noisy. They are relative values for that P-Bit, not decibels.
3. Creating the School's Sound Map
Each team moves its P-Bit to different areas throughout the school day (cafeteria, library, gym, hallways during class changes) to gather real sound level readings and note the typical level and the peaks in each area.
For a fair comparison between areas, use the same P-Bit, at the same height and for the same length of time in each area. If each team has a different P-Bit, compare the devices side by side in the same place first. The microphone's amplification is adjusted on each board, so the relative level can differ from one device to another.
4. Results and Community Awareness
The project concludes with a collective analysis where students design informational posters and present noise self-regulation recommendations to the school community.