Campus Noise Level Monitor - shalan/CSCE4301-WiKi GitHub Wiki
Campus Noise Level Monitor
Course: CSCE 4301 — Embedded Systems
Semester: Spring 2026
Team members:
| Name | ID |
|---|---|
| Mohab Bahnassy | 900212050 |
| Kirollos Zikry | 900213037 |
| Farida Said | 900221087 |
Primary contact: [Mohab Bahnassy· [email protected]]
The Proposal
The Campus Noise Level Monitor is a TM4C123-based embedded system that continuously samples ambient sound in a room, classifies it into one of three states (QUIET, WARN, ALARM), and responds with coordinated visual, audio, and display feedback. A push-button allows occupants to cycle through threshold presets suited to different room types (Library, Study Room, Lab), while a UART interface lets facility staff log data and fine-tune thresholds from a connected PC.
Proposed features
- ADC-based continuous sound sampling at 10 Hz via KY-038 microphone module
- Three-state system (QUIET / WARN / ALARM)
- 16×2 LCD display showing live noise index and active preset name
- Red/green LED indicators and passive buzzer with distinct patterns per state
- Push-button preset cycling — Library (quietest) · Study Room · Lab (loudest)
- UART logging of every sample to PC terminal
- UART runtime command (
SET THR WARN <n>/SET THR ALARM <n>) to override thresholds without reflashing
Hardware block diagram
System flowchart
Proposed components
| Component | Role | Interface | Source | Image |
|---|---|---|---|---|
| TM4C123 LaunchPad | Main MCU | — | CSCE workshop | |
| KY-038 sound sensor | Analog mic + amplifier | ADC0 / PE3 | RAM Electronics | |
| LCD 16×2 with I2C backpack | Live noise display | I2C / PB2–PB3 | RAM / Makers Electronics | |
| Passive buzzer | Audio alert | GPIO / PB6 | CSCE workshop | |
| Push-button | Preset cycling | GPIO / PE0 | CSCE workshop | |
| Red LED (PF1, on-board) | WARN/ALARM indicator | GPIO | On-board | |
| Green LED (PF3, on-board) | QUIET indicator | GPIO | On-board | |
| USB cable | Power + UART | UART0 / PA0–PA1 | On hand |
Functional requirements
| ID | Requirement |
|---|---|
| FR-1 | Sample ambient sound at ≥ 10 Hz (SysTick 100 ms interval) |
| FR-2 | Apply 8-sample moving-average filter before threshold comparison |
| FR-3 | Maintain QUIET / WARN / ALARM states with defined transitions |
| FR-4 | Drive green LED in QUIET; red LED + short beep in WARN; blinking LED + sustained buzzer in ALARM |
| FR-5 | Display noise index and preset name on LCD |
| FR-6 | Escalate to ALARM only after ≥ 5 s sustained above alarm threshold |
| FR-7 | Return to QUIET after ≥ 3 s calm following ALARM |
| FR-8 | Cycle three presets on button press (Library / Study Room / Lab) |
| FR-9 | Accept SET THR UART commands to override thresholds at runtime |
| FR-10 | Transmit UART log entry for every sample |
Peripherals used
| Peripheral | Purpose |
|---|---|
| ADC0 (PE3) | Analog sound level input from KY-038 |
| SysTick | 100 ms periodic sampling interrupt |
| GPIO in (PE0) | Push-button with software debounce |
| GPIO out (PF1, PF3, PB6) | Red/green LEDs + passive buzzer |
| I2C1 (PB2/PB3) | LCD 16×2 communication |
| UART0 (PA0/PA1) | 115200 baud logging + command input |
Status log
Apr 15, 2026 — ???