Hardware selection help: control digital RGB strips on hitting a bass drum

Hi there,

I'm a computer scientist (doing Java, C++ and other high-level things) who wants to dive into the world of "hacking" with a project I'll now describe. Please bear with me that I have little to no knowledge about this world, and I've spent this afternoon reading up on many different topics, getting myself confused a bit more on the process :D.

Being a drummer, I want to attach a couple (3-5) RGB LED strips to the drum set, each strip could e.g. ~1m long. Whenever I hit the bass drum (kick drum), I want all strips to do a "lightning" animation in parallel. The characteristics of lightning should work well with the way these LED strips work, because from what I understand you tell the strip controller a pattern and then drive a clock to punch it through (i.e. the flow is always in the direction of the strip). However, lightnings are fast, i.e. I would want such an animation to be short, e.g. have the flash pass through 1m of cable in, I dunno, 100ms maybe? Anyways, the setup should be used live on stage during gigs.

The micro-controller would have the following tasks:

  • T1: process the analog input signal from the transducer that translates the vibration of the batter head into voltage, analyze it for peaks (the "trigger moments"). It should also be capable of doing some analysis, e.g. to do re-trigger protection. Either way, even just for peak analysis I have to store the past values in a buffer in memory
  • T2: Whenever a trigger was detected, a new lightning animation should be sent to the LED strips. Depending on the intervals between the past and the recent triggers, I'd like to change the color of the lightning animation (example: if I don't hit the drum often, the animation is dark blue, but if I hit it very frequently, it is red). I'm just mentioning this so that you know that, again, I have to store trigger timestamps in memory
  • T3 (optional, but nice-2-have): Be able to use my Android phone to adjust what the program does, e.g. set the tresholds used in signal analysis, or whether to start/stop the lightning animations (exchange them with some pre-made idle animations)

What I already know:

  • I would need digital RGB LED strips, because I want that animation (I could have used analog strips otherwise)
  • I would need a BlueTooth module so that I can pair the microcontroller with my phone
  • The Roland RT-10k seems to be such a transducer which I need. Unfortunately I'm unable to figure out what the output actually looks like. Even from the manual I downloaded, the only thing I can see is that the physical connector is a 1/4", the one also used for electric guitars etc, so maybe it's an instrument level signal?

What I have no idea about (help needed)

  • What specific hardware to buy. For example, which Arduino board should I use? Is an Uno enough for this project (especially considering processing power)? [btw, I live in the EU]. Similar I'm unsure about which specific LED strip to buy. With the specific model you propose, what is the update rate of that LED strips I can achieve with it?
  • How do I get the signal from the transducer into the Arduino? From what I understand, such 1/4" cables are simply 1-conductor 1-ground (tip/sleeve) cables, so can I "just cut the cable and shove in the wires"??

Best regards! NZ

If it's a kick drum, why not put a switch on the pedal to act as a trigger for your light system? That would be a heck of a lot easier to implement that acoustic sensing.

For the LED side of things, you just need to research the best way to drive LEDs to do what you want, but there are plenty of examples of driving large numbers of LEDs and that part of the requirements doesn't seem like a big problem.

Hi,

yes such a switch would make things a lot easier. I checked my foot pedal and although it might generally work, it seems to me that such a construction would be a bit feeble. Plus, I don't mind the challenge of doing the signal processing, I already have experience with this.

I've done some research on the hardware. I found a retailer who sells the LED strips I need and I'm thinking about getting an Arduino starter kit anyway. However, I still don't understand one thing about these LED strips (assume the most recent ones as adafruit sells them, with that LPD8806 chip): they say you need a lot of memory to address them. Let's say I have a 5 meter strip connected and I want to send a flash animation through that strip, which is effectively something like a short(!) pattern of, say, 9 LEDs being on (all others being off) that is "sent through" the strip. Now, do I need enough memory to save the pattern of the 9 LEDs, or do I have to generate a COMPLETE pattern (that tells all other ~140 LEDs to be off)? I'm sorry, I simply don't have any conceptual understand how these strips work, and I want these details to be sorted out BEFORE I buy anything. I don't want to waste money on hardware which won't be able to do what I need because of having too little memory...

NameZero912:
I found a retailer who sells the LED strips I need

In that case you should be in a position to find out what’s involved in driving them, probably with examples.

We aren’t, because we have no idea what LED strips you’re thinking of.

This link on using piezo discs for drum pickup might be of interest to you: http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/f2012/asj42_gs368_ln226_awh49/asj42_gs368_ln226_awh49/index.html I'm sure it's identical in function to the Roland RT-10K, but the RT-10K must have some kind of proprietary protocol to communicate the drum hits to a head end. YMMV figuring that out.

NameZero912: I've done some research on the hardware. I found a retailer who sells the LED strips I need and I'm thinking about getting an Arduino starter kit anyway. However, I still don't understand one thing about these LED strips (assume the most recent ones as adafruit sells them, with that LPD8806 chip): they say you need a lot of memory to address them...

Most libraries (including the LPD8806 library created by Adafruit) create an array for the state of all of the LEDs in the LED strip and thus use three bytes for each RGB LED in the strip. The LEDs are then set to their state by pushing the entire array into the strip -- the LEDs act like a big FIFO pushing the data from LED to LED until you "latch" the data and tell everyone to reset to the color currently held in their memory. I'd recommend reading http://arduino.cc/en/Tutorial/ShiftOut for an understanding of how this works.

It would be possible to not save the state of the LEDs in a big array and create your lighting sequences using a few different algorithms and thus save the memory previously used to hold state. It's obviously not as straightforward but for some tasks might not be a bad idea, but anticipate writing your own versions of the common LED strip libraries (like that for the LPD8806).

Like any project, just take it one step at a time. Build the hardware & write some code to detect the drum hit. Connect the LED strip & write some code to light it up. Combine the two functions. Add the bluetooth stuff, etc.

What specific hardware to buy. For example, which Arduino board should I use? Is an Uno enough for this project (especially considering processing power)?

Any Arduino should work... Just make sure that the bluetooth shield is compatible. You are not processing real-time digitized audio (i.e. 44,100 samples per second). You are processing a few beats per second. And, with a serial interface to your LED strips, you don't need a lot of I/O ports.

However, I still don't understand one thing about these LED strips...

... or do I have to generate a COMPLETE pattern (that tells all other ~140 LEDs to be off)? I'm sorry, I simply don't have any conceptual understand how these strips work, and I want these details to be sorted out BEFORE I buy anything. I don't want to waste money on hardware which won't be able to do what I need because of having too little memory...

The specs are not that clear or detailed, so you might have to jump-in and buy some stuff to experiment with. If you study the [u]SPI Protocol[/u], that should give you a good start.

I've built a lighting effect that uses 3 cascaded 8-bit shift registers and a similar 3-wire serial interface. There is an SPI library, but I didn't use it... I just 'bit-bang" the data & clocks. (I'm not using RGB or PWM, and with only 24 LEDs my project is a bit simpler.)

Since the LED strip contains shift registers, it has some "memory" built-in. If you are generating the patterns with an algorithm, it may not take much memory at all! In my application, I store my 24-bit display-pattern in ONE type-long variable, and some of my effects shift the bits past the "end" and back again, so I have another variable as a storage buffer. (Plus it's stereo, so that doubes everything.)

The Roland RT-10k seems to be such a transducer which I need. Unfortunately I'm unable to figure out what the output actually looks like.

I would assume the trigger output is somewhere in the range for the Arduino's analog input (0 - 5V). As you probably know, the Arduino has a 10-bit ADC, so with the default 5V reference you can get down to about 5mV.

SparkFun makes a little [u]microphone board[/u] that's very popular. You'd get plenty of signal out of that, in fact you'd probably need to modify it to knock-down the signal. You don't need much amplification... You can get about 1V from an SM57 in front of a kick drum, so you almost don't need a preamp!

No matter what sensor/trigger you use, you'll need to do some experiments to see what kind of ADC readings you are getting.

It should also be capable of doing some analysis, e.g. to do re-trigger protection. Either way, even just for peak analysis I have to store the past values in a buffer in memory

Take a look at the [u]Smoothing Example[/u] (a circular buffer and/or moving average). I have some lighting effects that run off audio line-level (about 1V peak). In my application, I take a 20-second moving-average, and from that I can extract the peak or the average depending on what's needed for the particular lighting effect. I also switch between the 1.1V and 5V ADC reference depending on the signal level. So, it "auto-calibrates" and continuously adjusts for any volume changes.

I also have a very-crude "beat detector". After triggering, it waits (maybe 1/10th of a second or more), then it looks for another equal peak. As the milliseconds tick-by, the trigger threshold starts dropping in case the next beat/peak isn't as strong as the previous one. (This doesn't use the data in the circular buffer except for the 1st initial beat detection.)

I'm reading the input as fast as the processor runs/loops, but I only store 20 readings (1 per second) because I'm looking for the approximate average & peak of a continuous audio signal... You'd have to do something different to "catch" all of the drum-hits (and you can basically ignore the "space" in-between).

Hi again,

thanks for the detailed responses, I really appreciate it :). I'll get myself an Arduino starker kit and 1m of the adafruit weather (beer) proof RGB LED strips with the LPD8806 chip (remember that I want to use this on stage :)). The starter kit will have a piezo sensor as well as push-buttons, so I can experiment with these. A friend of mine told me I might also just use old speakers or even some old in-ear plugs as microphone-alike sensors. Either way, I might need to first test the voltage any of these devices do output, so that not to fry the A/D converter (of course the push button and the piezo sensor should not be of any trouble there).