กลับไปหน้ารวมไฟล์
arduino-sound-detection-sensor-project-ec201b-en.md

Acoustic Levels: The Sound Detection Meter

The Sound Detection Project turns invisible acoustic energy into a striking visual display. Whether you want to monitor the noise in a library or build a pulsing music visualizer for your speakers, the analog sound sensor makes it incredibly easy.

button_led_basic_interaction_1772681969235.png

Reading the Envelope

The LM393 Sound Sensor provides both a Digital and an Analog output.

  1. Digital: Good for Claps (binary on/off).
  2. Analog: Good for Volume. It outputs a voltage waveform representing the loudness of the sound (the audio envelope).
  3. The Bar Graph: The Arduino reads the Analog pin (0-1023) and scales it. Low volumes light up 1 Green LED. Medium volumes light up 3 Yellow LEDs. High volumes push it into the Red LEDs.

Essential Components

  • Arduino Uno/Nano: The processor.
  • LM393/KY-037 Sound Sensor: The microphone circuit.
  • LEDs (e.g., 3 Green, 2 Yellow, 2 Red): To act as the volume-level bar graph.
  • 220-ohm Resistors: One for each LED.

Creating a Smooth Display

Because sound fluctuates wildly in milliseconds, reading the sensor directly will cause the LEDs to flicker aggressively. You will learn a software technique called Signal Smoothing/Averaging—storing the last 10 readings in an array and taking the average—to make your LED bar graph rise and fall beautifully.

ข้อมูล Frontmatter ดั้งเดิม

title: "Arduino Sound Detection Sensor Project"
description: "Visualize the volume! Use a sound sensor module and a strip of LEDs to build a noise-level meter (VU meter) for your desk."
category: "Sensors & Environment"
difficulty: "Easy"