Smart Classroom Noise Monitor

by angasailakshmi in Teachers > 12

16 Views, 0 Favorites, 0 Comments

Smart Classroom Noise Monitor

The Smart Classroom Noise Monitor is a Python-based innovation project that monitors surrounding sound through a computer microphone. It displays the current noise condition using a graphical interface with green, yellow, and red indicators.

The system helps students understand classroom noise levels and encourages them to maintain a suitable learning environment. It also introduces students to audio processing, real-time data visualization, and Python programming.

Supplies

  1. Pictoblox Software: Download PictoBlox | Windows, MacOS, Linux, Chromebook, Android & iOS
  2. Laptop/PC
  3. Inbuilt or External Camera Setup
  4. Speaker or Headphones


Objectives

  1. Monitor sound captured by a computer microphone.
  2. Display a live relative noise-level indicator.
  3. Classify the environment as Quiet, Moderate Noise, or Too Noisy.
  4. Provide visual feedback through color-coded messages.
  5. Store periodic readings in a CSV file for later analysis.


Key Concepts

  1. Python programming
  2. Microphone input
  3. Digital audio signals
  4. Root-mean-square (RMS) calculation
  5. Conditional statements
  6. Real-time graphical user interfaces
  7. CSV data logging


Programming

Step 1: Install Python

Install Python 3 and verify the installation using the command python --version.

Step 2: Install the Libraries

Open Command Prompt or a terminal and run:

python -m pip install sounddevice numpy

These libraries provide microphone access and numerical calculations.

Step 3: Create the Program

Create a Python file named smart_classroom_noise_monitor.py. Copy the complete project code into the file and save it.

Step 4: Capture Microphone Input

The program uses the sounddevice library to receive audio samples from the microphone. It processes the samples in small blocks instead of recording and storing complete conversations.

Step 5: Calculate the Relative Noise Level

The program calculates the RMS amplitude of each audio block. It converts the amplitude into a relative 0–100 display value for easier visualization.

This value is not a calibrated decibel measurement.

Step 6: Classify the Noise

The program compares the relative level with two configured thresholds.

  1. Below 35: Quiet
  2. From 35 to 64: Moderate Noise
  3. 65 or above: Too Noisy

The thresholds can be adjusted after testing the microphone in the intended environment.

Step 7: Display the Result

The graphical interface shows the current status, a relative-level bar, and a short message.

  1. Green indicates Quiet.
  2. Yellow indicates Moderate Noise.
  3. Red indicates Too Noisy.

Step 8: Save Noise Readings

The program periodically appends a timestamp, relative level, and status to a CSV file named noise_monitor_log.csv.

This file can be opened in a spreadsheet application for further analysis.



Test the Project

un the program and click Start Monitoring.

Test the monitor in a quiet environment, during normal conversation, and during a louder group activity. Compare the readings and adjust the thresholds if necessary.

Click Stop Monitoring when testing is complete.

Applications

  1. School classrooms
  2. Computer laboratories
  3. Libraries and reading rooms
  4. Meeting and training rooms
  5. Study areas and educational institutions


Conclusion

The Smart Classroom Noise Monitor demonstrates how Python can process microphone input and display real-time sound-level feedback. By combining audio processing, a graphical interface, and data logging, the project provides an engaging introduction to programming and practical problem-solving.