How To Make DIY Music Visualizer using Arduino & Sound Sensor by WTC Zone
Creating a music-reactive LED project using an Arduino Uno, a microphone module, and colorful LEDs is a fantastic and fun project. Here's the complete breakdown of the circuit, parts, connections, and code.
Parts Required
- Arduino Uno R3 - 1 unit
- Colorful LEDs (9 or more) - Different colors
- Microphone Sound Sensor Module (e.g., KY-038 or LM393) - 1 unit
- Resistors (220 ohm) - 9 units (one for each LED)
- Connecting Wires
- Breadboard - 1 unit
- USB Cable (for programming the Arduino) - 1 unit
- Power Source (optional, if not connected via USB)
Circuit Connections
Microphone Sound Sensor Module:
- VCC → Arduino 5V
- GND → Arduino GND
- OUT → Arduino A0
9 LEDs:
- LED 1 → Arduino Pin 3
- LED 2 → Arduino Pin 4
- LED 3 → Arduino Pin 5
- LED 4 → Arduino Pin 6
- LED 5 → Arduino Pin 7
- LED 6 → Arduino Pin 8
- LED 7 → Arduino Pin 9
- LED 8 → Arduino Pin 10
- LED 9 → Arduino Pin 11
- Each LED’s negative leg → Resistor → Arduino GND
Working Principle
- The microphone module detects sound intensity in the environment.
- The output voltage of the microphone changes based on the sound intensity.
- The Arduino reads this voltage using the analog pin A0.
- Depending on the voltage level, different LEDs are turned ON/OFF, creating a visual effect that corresponds to the music's rhythm and beats.
The Arduino Uno will send HIGH and LOW signals to each relay in a specific sequence, causing each relay to click in turn. Different delays between each relay activation create a varied rhythm. We’ll program some example rhythms you can modify as desired.
Video Link: - Click Here For Video
How To Make DIY Music Visualizer using Arduino & Sound Sensor by WTC Zone simple Circuit: -
Arduino IDE Program
Code for DIY Music Visualizer using Arduino & Sound Sensor by WTC Zone
-----------------------------------------------------------------------------------------------------------------------------
Description
LED Pin Setup:
- LEDs are connected to pins D3 to D11 on the Arduino.
- These pins are defined in the
ledPins[]
array, which the code iterates through.
Sound Sensor:
- The microphone/sound sensor is connected to the analog pin A0.
- The sensor's output (
soundLevel
) is read and mapped to the range of available LEDs (0–9).
LED Glowing Effect:
- The
map()
function scales the sound intensity (0–1023) to the number of LEDs (0–9). - LEDs light up incrementally as sound intensity increases, starting from D3 for low beats to D11 for high beats.
- The
Dynamic Visualizer:
- As the music beats rise and fall, the LEDs light up or turn off, creating a bar-like visualizer effect.
How It Works
- Low Beats: Only LEDs near D3 light up.
- Moderate Beats: LEDs in the middle (e.g., D5–D7) glow.
- High Beats: All LEDs up to D11 turn on.
Circuit Connections
Sound Sensor:
- VCC → Arduino 5V
- GND → Arduino GND
- OUT → Arduino A0
LEDs:
- Each LED's positive leg connects to pins D3 through D11.
- Each LED's negative leg connects to GND via a 220-ohm resistor.
Customization
- Adjust the
delay(50)
for faster or slower transitions. - Change the mapping range in the
map()
function to fine-tune how LEDs respond to sound intensity.
This setup creates a satisfying music visualizer effect where LEDs glow according to the intensity of the sound, ranging from low beats to high beats! 🎵✨
Share, Support, and Subscribe!!! 1. PRO KAM EXPLAINED 2. Knowledge KAM 3. PRO KAM Follow us on 1. Facebook 2. Instagram 3. Pinterest 4. Blogspot 5 Twitter If you have any other ideas to make me design, you can describe them in the comment section and if I can, I will make a designing video on it. So I am waiting #prokam #wtc #Arduino #ideas #projects #diy #how #to #ArduinoProjects #UltrasonicSensor #HeightMeasurement #TechDIY #WeTechCreators
0 Comments