Address

Author Topic: Flashing LED Cover for Bass Drum  (Read 2529 times)

bethjaneway

  • FamiLAB Member
  • Sr. Member
  • *
  • Posts: 331
    • View Profile
Flashing LED Cover for Bass Drum
« on: March 18, 2013, 02:05:01 AM »
My bagpipe band plays a lot of pubs for St. Patrick's Day, and thought it would be fun to have a bass drum cover that lit up and responded to sound.

TL/DR: I programmed an Arduino UNO to control two Radio Shack tricolor LED trips. Piezo sensors didn't provide a good signal for triggering these strips, which seems due to the several-millisecond serial communication time. So I made my own sensor which worked, but could be improved. Overall the brightness and changing colors were a hit with the audience, and the project inspired another bandmember to expand on the idea with a single-color sound-responsive light that was simple and cheap enough to put on 7 additional snare and tenor drums. 

-----------

Radio Shack makes these 1-meter color-programmable LED strips you can plug into an Arduino.

Another band member sewed a cover for the drum, and put two narrow sleeves in the center for the light strips, plus a couple pockets at the top to hold the Arduino and the battery pack.

The LED strip requires 12V. So you need a special battery pack, since the Arduino usually runs off 9 (but an handle 12). I also got this from Radio Shack, it holds 8 AA batteries and has a snap connector on the end like a 9V battery. I also got a snap connector and soldered the wire to an Arduino-size plug. Red to center, black to shield.

WARNING: it's easy to fry the LED strip!! It has 3 wires, power ground & signal, and I accidentally fried one by plugging the signal wire into the Arduino power socket :( Only thing worse was that it took an hour to figure out that's why it didn't light up anymore :p

So to prevent this, I had some Molex jacks and a crimp tool, so I cut off the pin connectors on the LED strip wire and attached keyed connectors. No more accidental swapping.

Then to program the colors. For St, Patrick's Day, I wanted green white and orange stripes.  The Radio Shack website provided some sample code for programming the colors. It worked well. However, programming custom colors was a pain because you had to type in hexadecimal codes. Also I expected the codes to be like website color codes, they are similar but the RGB codes, the R and G are swapped. GRB. Rather than type endlessly to find the right shade, I wrote a Matlab script where you could type in the HTML-format hex color, and it would generate a text file containing formatted color code to paste in the Arduino code. Complicated but easier than the endless typing.
https://github.com/jbzurn/radioshack_LED_strip_color_generator_matlab

Once I had the colors, I wanted to make it respond to tapping. First tried a piezo sensor. After hours of trial and error, finally figured out that the signal from the piezo was too short to trigger the LED strip to change color. The Arduino uses a serial code to communicate the hex sequence to the strip, which takes a couple milliseconds.

There are probably several solutions to this. Possibly some sort of code-based averager, maybe a diode&transisor, or even a capacitor? 

But the simplest solution for me was to design a new sensor. I found that touching a wire/resistor between the 5V socket and an analog input, had a long enough duration to trigger the LED strip. So I connected one end of the wire to a thin 2" metal plate wrapped in aluminum foil, and taped it to the outside frame of the drum. The other end of the wire, I bent a little circle in it and curved it so it was suspended above the plate (solid-core wire so it held a curve).

This responded surprisingly well to vibration. The drum shakes a lot when struck, and the wire would move and tap the plate, completing the circuit.

The main improvement this could use, adding a small weight to the floating wire end so it would swing/bounce better to the drum beat. Probably attaching a small fishing line weight would work well.

I programmed the colors so it would advance the green/white/orange sequence one block for each strike, so it looked like it was circling.

I also attached a switch between the battery and arduino for power, and cut two pieces of plastic to cover the top and bottom of the arduino. They screwed together to sandwich it. The screws were just barely long enough, and fit better after making cutouts for the power and USB jacks, drilling some insets for the pins of those jacks, and drilling countersinks for the screw heads.

Overall the project was a huge success. The audience loved it at our pub events because it was bright and flashy.

Also, seeing the design inspired another band member. He got a bunch of the Radio Shack Velleman Sound to Light kits, and replaced the LEDs with battery-powered green Christmas lights, and the microphone with a loose piezo sensor. Wrapped the lights around the drum. These worked REALLY well. In retrospect I may have preferred this in the first place, it was much cheaper and easier. But... you couldn't control the exact color, or change the colors in different spots. Also it was nowhere near as bright. So both systems had their advantages.

So it was fun learning about sensors, and it made the audience happy!
Note: To improve mood, administer chocolate.

bethjaneway

  • FamiLAB Member
  • Sr. Member
  • *
  • Posts: 331
    • View Profile
Flashing LED Cover for Bass Drum
« Reply #1 on: March 18, 2013, 02:10:04 AM »
Pics
Note: To improve mood, administer chocolate.

bethjaneway

  • FamiLAB Member
  • Sr. Member
  • *
  • Posts: 331
    • View Profile
Flashing LED Cover for Bass Drum
« Reply #2 on: March 18, 2013, 02:15:17 AM »
Will post a video of it in action when I get one. Also a picture of the sensor.
Note: To improve mood, administer chocolate.

bethjaneway

  • FamiLAB Member
  • Sr. Member
  • *
  • Posts: 331
    • View Profile
Flashing LED Cover for Bass Drum
« Reply #3 on: March 18, 2013, 02:22:48 AM »
Hmm the radio shack Velleman sound-to-light kit used capacitors and transistors. Maybe that's how they got around the short piezo signal problem.

At one point I tried using the Velleman circuit to trigger the arduino directly without success. I wanted the LED voltage to trigger the analog input, but haven't figured out how to do that. So I moved onto making my own sensor.
Note: To improve mood, administer chocolate.

tetsuharu

  • FamiLAB Member
  • Sr. Member
  • *
  • Posts: 487
  • My sincerest contrafibularities.
    • View Profile
Re: Flashing LED Cover for Bass Drum
« Reply #4 on: March 18, 2013, 03:08:54 AM »
I am so jealous of every project with RGB LED strips!!

darkmoonsinger

  • Treasurer
  • Administrator
  • Hero Member
  • *****
  • Posts: 741
  • I am no one but all that I am.
    • View Profile
Re: Flashing LED Cover for Bass Drum
« Reply #5 on: March 18, 2013, 10:14:00 AM »
Good job!  Thanks for posting this. :)

Lensman

  • Administrator
  • Full Member
  • *****
  • Posts: 163
    • View Profile
Re: Flashing LED Cover for Bass Drum
« Reply #6 on: March 18, 2013, 02:34:10 PM »
Looks great!

digitalman2112

  • Lab Dad (ex-treasurer)
  • FamiLAB Member
  • Hero Member
  • *
  • Posts: 1096
  • Work Hard, Play Hard!
    • View Profile
    • Raising Geeks
Re: Flashing LED Cover for Bass Drum
« Reply #7 on: March 18, 2013, 10:34:11 PM »
This is awesome, and would make a great blog post on FamiLAB.org

Not sure if you have blogging credentials, but if you need them, or just want someone else to do it, let me know.

tomlong74

  • FamiLAB Member
  • Full Member
  • *
  • Posts: 127
    • View Profile
Re: Flashing LED Cover for Bass Drum
« Reply #8 on: March 19, 2013, 01:50:39 AM »
Super Cool!  8)