Turn every cymbal hit into a light show.
This project uses a piezo sensor mounted under a ride cymbal to detect hits and control a 120V power relay in real time, lighting up two household bulbs on every strong hit.
Live performance with the ride cymbal triggering the lights:
drum_trigger_light_bulbs_demo.mp4
๐ Click the unmute button (๐) to hear the cymbal hits sync with the lights!
I wanted a cheap, DIY way to sync drum hits with stage lights without buying an expensive commercial drum trigger + DMX lighting system.
Goals:
- Trigger real 120V bulbs directly from a cymbal
- Keep latency low enough to feel "instant"
- Use simple, hobby-friendly parts (Arduino + relay module)
- Add visual impact to live performances on a budget
Signal path:
- Piezo sensor under ride cymbal converts vibration โ voltage
- Arduino reads analog input and compares to a threshold
- When the threshold is exceeded:
- Turn on digital output pin
- Drive a 120V relay module
- Relay closes the circuit to power two light bulbs
Two-stage control:
- Stage 1 (Piezo): Toggles the system on/off with 2-second debouncing
- Stage 2 (Sound sensor): Modulates light brightness based on volume
When you hit the ride cymbal hard enough, the piezo triggers the Arduino, which instantly activates the relay. The lights respond in real-time, creating a synchronized visual effect with your drumming.
- Real-time drum detection using piezo sensor technology
- Sound-reactive lighting with Parallax Sound Impact Sensor
- Two-stage control system:
- Piezo sensor toggles the system on/off
- Volume sensor controls light brightness dynamically
- 120V power relay control for professional lighting
- Debouncing logic to prevent false triggers
- Dual light bulb support with independent PWM control
- Serial monitoring for debugging and threshold calibration
๐ For complete hardware documentation, assembly instructions, and wiring diagrams, see HARDWARE.md
| Component | Quantity | Notes |
|---|---|---|
| Arduino Board (Uno/Nano) | 1 | Any Arduino with analog inputs |
| Piezo Element/Sensor | 1 | For drum hit detection |
| Parallax Sound Impact Sensor | 1 | For volume-based control |
| 120V Power Relay Module | 1 | |
| Light Bulbs (120V) | 2 | Incandescent or compatible |
| Resistors | As needed | For piezo sensor circuit |
| Jumper Wires | Multiple | Male-to-male and male-to-female |
| Breadboard or PCB | 1 | Optional for prototyping |
| Power Supply for Arduino | 1 | 5V USB or 7-12V DC |
| Pin | Component | Type |
|---|---|---|
| A0 | Piezo Sensor | Analog Input |
| 7 | Parallax Sound Impact Sensor (SIG) | Digital Input |
| 9 | Light Bulb 1 Control | PWM Output |
| 11 | Light Bulb 2 Control | PWM Output |
| 13 | Status LED | Digital Output |
๐ง Note: Circuit diagram will be added in future updates. Please refer to the pin configuration table above for wiring guidance.
Basic Wiring Overview:
- Connect piezo sensor to analog pin A0 (with appropriate voltage divider if needed)
- Connect Parallax Sound Impact Sensor signal pin to digital pin 7
- Connect relay control pins to PWM pins 9 and 11
- Connect 120V light bulbs through relay switches
- Arduino IDE 1.8.x or higher
- USB cable for Arduino programming
- Basic Arduino programming
- Understanding of electrical circuits
- Safety precautions for 120V AC wiring
- Assemble the circuit following the pin configuration table
- Mount the piezo sensor under your drum or cymbal
- Position the sound sensor near the drum set
- Connect the relay module to control the light bulbs
- Double-check all connections before powering on
-
Clone this repository:
git clone https://github.com/antigenius0910/lightbulb_drumtrigger.git cd lightbulb_drumtrigger -
Open
Drum_trigger_light_bulbs.inoin Arduino IDE -
Connect your Arduino board via USB
-
Select your board and port:
- Tools โ Board โ Select your Arduino model
- Tools โ Port โ Select the correct COM/USB port
-
Upload the sketch:
- Click Upload button or press
Ctrl+U(Windows/Linux) /Cmd+U(Mac)
- Click Upload button or press
- Power on the Arduino and ensure the relay module has power
- Hit the piezo-equipped drum to toggle the system on/off
- The system uses a 2-second interval debouncing
- When system is ON:
- Light bulbs respond to drum hits detected by the volume sensor
- Lights dim momentarily when sound is detected, then return to full brightness
- When system is OFF:
- Light bulbs remain off regardless of sound input
The default threshold for drum hit detection is set to 180. To adjust:
- Open the Serial Monitor (
ToolsโSerial MonitororCtrl+Shift+M) - Set baud rate to 9600
- Hit your drum and observe the sensor readings
- Adjust the
thresholdconstant in the code:const int threshold = 180; // Modify this value
- Re-upload the sketch after changes
Tuning Tips:
- Higher threshold = less sensitive (harder hits required)
- Lower threshold = more sensitive (softer hits trigger)
- Typical range: 100-300 depending on your setup
- Reads analog input from piezo sensor on pin A0
- Compares reading against threshold (default: 180)
- Toggles system state with 2-second debouncing to prevent rapid switching
- State is stored in
lightswitchstateboolean variable
- When system is active, reads digital signal from Parallax sensor
- Sound detected (HIGH): Dims lights to 0 (off)
- No sound (LOW): Sets lights to full brightness (255)
- Uses PWM on pins 9 and 11 for smooth dimming control
- Debouncing: Prevents false triggers using
millis()timing instead ofdelay() - Non-blocking code: Main loop runs continuously without delays
- PWM Control:
analogWrite()provides 0-255 brightness levels - Serial debugging: Outputs sensor readings for calibration
- Add detailed circuit schematic diagram
- Create Fritzing diagram for easy replication
- Add photos of completed project setup
- Implement adjustable sensitivity via potentiometer
- Add MIDI trigger capability
- Support for more light channels
- Web interface for wireless control
- Add audio sync visualization modes
Contributions are welcome! This is a public domain project, so feel free to fork, modify, and improve.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
See CONTRIBUTING.md for more details.
This project is in the public domain. You are free to use, modify, and distribute this code for any purpose without restriction.
See the LICENSE file for details.
Yen Chuang
- GitHub: @antigenius0910
- Project Link: https://github.com/antigenius0910/lightbulb_drumtrigger
- Arduino community for excellent documentation and libraries
- Parallax Inc. for the Sound Impact Sensor
- Inspiration from interactive art installations and music visualization projects
- Created: June 25, 2017
โก Made with โค๏ธ and Arduino | โญ Star this repo if you found it helpful!