Animated LED Drum Lights
My daughter and I added interactive leds to her drum set for fun and a learning experience. This is our project we setup for us to take it from concept to reality.
Note: I originally used the Arduino IDE for this project but switched to PlatformIO for VSCode when I updated/refactored the project for use with an Adafruit Trinket Pro 5v instead of the regular Trinket 5v.
I was not aware of PlatformIO when I orginally started this project and stumbled opon it. I'm so glad I did! PlatformIO is night and day better than the Arduino IDE. If you have not yet, make the change to PlatformIO with VSCode.
- Pro(s): This is a great arduino learning project and will be awesome when implemented.
- Con(s): Expensive, when making one for every drum/cymbal in the set. You could probably use fewer trinkets if powering from an external source instead of USB. I thought about this later but just went ahead with one trinket per drum/cymbal.
Current Status
We finished the first version of the project and very happy how it worked out. We are currently working on an upgraded version of it. The second iteration uses adafruit trinket pro and includes a potentiometer to provide the user the ability control the sensitivity of the piezo sensor on the fly w/o additional programming, and powered via a switching power supply instead of the usb input.
Latest Testing Video(s) |
---|
Testing sensor sensitivity and code changes |
New version using Trinket Pro, added an animation mode button, and a knob/potentiometer to control sensitivity of piezo sensor |
Story:
- As a drummer, she wants the drums to blink colored lights when she hits a drum, for entertainment and a wow factor.
Task(s):
- See our Scrum Board, if you need a list of tasks to complete this project.
Diagrams | |
---|---|
Version 1 with Trinket 5v powered via Micro USB Cable | |
Version 2 with Trinket Pro 5v powered by 5.5/2.1 barrel connector and power brick - added Potentiometer (adjust piezo sensitivity) and Button for animation modes. | |
Drum sketch for reference |
- Click here for amazon shopping list. If you have time to wait on delivery, you might consider searching for parts on Aliexpress to save money.
Parts List | Notes | Qty | |
---|---|---|---|
8 | |||
1 | Adafruit Trinket 5v, if not adding a POT and/or Button. I used a Trinket Pro in version 2 of my build since it has more power, memory, and available pins. | 5v | 8 |
2 | Plugable 7-Port USB Hub. I ended up including the Floor Tom in the project so get an 8-10 port instead for expansion. For my Trinket Pro version, I used barrel power connectors instead and this brick | Optional | 1 |
3 | Adafruit Mini Skinny NeoPixel Digital RGB LED Strip - 60 LED - WHITE OR ALITOVE 5m WS2812B Individually Addressable LED Strip Light 16.4ft . I like the ALITOVE better because they are cheaper and work really well. I am using them for my upgraded version of the project. I used the circumference of the drum heads to calculate the length/number of led strips needed for drums and height of cymbal stands for cymbals. meters of led strip needed = ( (drum * 3.14) * 0.0254 ). e.g., 22" Bass Drum -> round( ( ( 22*3.14 ) * 0.0254 ) ) = 2 | 9-11m | 9-11 |
4 | 10 Proto Boards. | Pkg 5 | 2 |
5 | Multiple colors of 22 AWG Solid Core Wire | 1 | |
6 | Multiple colors of 22 AWG Stranded Wire | 1 | |
7 | Micro-USB Cable | Pkg 10 | 1 |
8 | Panasonic FC 1000uF 35v 105c Radial Electrolytic Capacitor Low ESR - Pkg 10. I found these later which are a little cheaper. | Pkg 10 | 1 |
9 | Tenma Solder Wire, 0.04 | 1 | |
10 | 1M 0hm resistor - Pkg 25 | Pkg 25 | 1 |
11 | 470 Ohm Resistors - Pkg 25 | Pkg 25 | 1 |
12 | RGBZONE 20Pairs JST SM 3PIN Plug Male to Female EL Wire Cable Connector Adapter for WS2811 WS2812B Dream color LED Stip Light | Pkg 20 | 1 |
13 | RGBZONE 20Pairs JST SM 2Pin Plug Male to Female EL Wire Cable Connector Adapter For 3528 5050 LED Light Strip | Pkg 20 | 1 |
14 | Flex cable wrap Cable wrap in an attempt to make the wires less obvious. | 1 | |
15 | 15 20mm Piezo Disc Elements - Knock Sensors | Pkg 15 | 1 |
16 | I ordered these knock sensors also. I replaced my 20mm ones with these. | 8 | |
17 | AVR Programmer Consider this if you need to address more than 80-90 neopixels to get access to more memory on the ATTiny85 the trinket uses. If you have a trinket pro or trinket mo; then you do not need this. | 1 |
Guesstimates:
Option A | Option B | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
drum | diameter / length | Estimated length of LEDs needed in meters | Microcontroller (Trinket 5v) | Protoboard | Guesstimate on stranded and solid core 22awg wire used | Guesstimate on solder used | 1000uF 35V Capacitor | Piezo Sensor | JST Connectors-2&3pin | 1M 0hm Resistor | 470 0hm Resistor | Automotive LED Strip - Amazon (WS2812B) | Adafruit NeoPixels (WS2812B) |
Snare | 14.00 | 1.12 | $6.95 | $1.92 | $1.50 | $0.32 | $1.00 | $0.50 | $0.78 | $0.06 | $0.23 | $7.21 | $24.95 |
Middle Tom | 12.00 | 0.96 | $6.95 | $1.92 | $1.50 | $0.32 | $1.00 | $0.50 | $0.78 | $0.06 | $0.23 | $7.21 | $24.95 |
Hi Tom | 10.00 | 0.80 | $6.95 | $1.92 | $1.50 | $0.32 | $1.00 | $0.50 | $0.78 | $0.06 | $0.23 | $7.21 | $24.95 |
Bass / Kick | 22.00 | 1.75 | $6.95 | $1.92 | $1.50 | $0.32 | $1.00 | $0.50 | $0.78 | $0.06 | $0.23 | $14.42 | $49.90 |
Floor Tom | 16.00 | 1.28 | $6.95 | $1.92 | $1.50 | $0.32 | $1.00 | $0.50 | $0.78 | $0.06 | $0.23 | $7.21 | $24.95 |
Hi Hat Cymbal | 65.62 | 1.67 | $6.95 | $1.92 | $1.50 | $0.32 | $1.00 | $0.50 | $0.78 | $0.06 | $0.23 | $14.42 | $49.90 |
Crash Cymbal | 65.62 | 1.67 | $6.95 | $1.92 | $1.50 | $0.32 | $1.00 | $0.50 | $0.78 | $0.06 | $0.23 | $14.42 | $49.90 |
Ride Cymbal | 65.62 | 1.67 | $6.95 | $1.92 | $1.50 | $0.32 | $1.00 | $0.50 | $0.78 | $0.06 | $0.23 | $14.42 | $49.90 |
Total(s) | 11 | $55.60 | $15.33 | $11.98 | $2.55 | $8.00 | $4.00 | $6.23 | $0.48 | $1.85 | $78.60 | $272.01 |
Option (assuming 11m of led strips) | Total $ | $ / Drum |
---|---|---|
Option A - Automotive LEDs | $184.62 | $23.08 |
Option B - Neopixels | $378.03 | $47.25 |
Difference | -$193.40 | -$24.18 |
Guides:
-
1. Projects found while researching online:
- cassettepunk drum lights. Uses trinket and piezo sensors.
- tomatoskins LED Drum Setup. Uses piezo sensors and a 555 Timer IC.
- Measuring trigger hit duration and velocity
- Adafruit uses Mic instead of knock sensor.
- Knock sensor tutorial
- LED Strip Animation Examples
- We also considered using "EL-Wire" instead of neopixels. This may be something to consider in your own project.
Software:
-
4. Arduino IDE to program "trinket"
- Note: You will also need to install the adafruit neopixel library in the IDE after installing the Arduino IDE.
Enclosure Designs:
- 1.Enclosure Design - I did not have any white plastic to print with so I am just going to spray paint the enclosures with white spray paint when done to match the color of the drum set.
Version 1 - Trinket |
Version 2 - Trinket Pro |
Videos:
Lessons Learned:
-
1. If the sketched code goes beyond 58% program storage, the trinkety/ATTiny85 appears to not have enough ram to address more than 90 neopixels/leds at runtime. Going to try an AVR Programmer to see if I can reclaim some memory by removing the bootloader. When I tried to add some more animation effects, the code was too large to power the 107 pixels I needed on the KICK. The strip would not turn on due to lack of memory/heap dump. I kept the code minimal so I could address all the pixels on the KICK drum for now.
-
2. The piezo sensors are a lot more sensitive than I thought they would be. A threshold of around 65 seems to be the magic number to prevent false knocks/vibrations from other drums in the kit. Considering doing a while loop to only count a "hit" if so many occur within a few milliseconds but that makes code somewhat large/memory constraints.
-
3. Would be nice to add a potentiometer to control the piezo "sensitivity" from the controller instead of having to reprogram to try different settings. I am going to add this feature in future builds but looks like a Trinket Pro 5v might be a better controller to use since it has more analog inputs than the regular Trinket 5v.
- Prototyping using a potentiometer knob with a Trinket Pro to allow for adjusting drumstick hit sensitivity realtime.
-
4. I considered using an ATTiny85 chip by itself thinking it would be cheaper but hard to beat the features of the trinket 5v when comparing bang for your buck and less soldering. The trinket 5v worked out really well but would use a Trinket Pro in the future for the kick drum to make addressing more pixels easier. Trinket 5v was plenty for the other drums since they used less pixels/leds on the strip.
-
5. I think it would be nice to just build one big enclosure with all 8 trinkets in it in the future instead of 8 individual ones and just run wires from it under the kick drum to each drum in the set. It might be easier to hide the wires that way. I would consider cable management more in the next version of this project.