Pages: [1] 2   Go Down
Author Topic: Detect bass drum hit  (Read 756 times)
0 Members and 1 Guest are viewing this topic.
Estonia
Offline Offline
Full Member
***
Karma: 0
Posts: 167
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

My friends band asked me to make them an LED version of their logo. This is no problem, simple wiring and then a battery.

But, since they are putting it on their bass drum, I thought it would be cool to detect every time the drum is hit and using that, initiate some quick brightness fade. When they hit the drum, it goes to max brightness and fades to its standard "low" level in about half a second where it will stay until it is hit again.

So, my question is what can I use to detect that drum hit? Since it is on a stage to begin with, there will be lots of vibration going on at all times so whatever does the detecting has to be durable enough to handle this without giving the "it was hit" signal.

What would be the best tool for this job?
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 46090
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
So, my question is what can I use to detect that drum hit?
How hard is the drum hit? With what? Have you bothered to search? Seems to me that there have been a lot of threads on this topic - none all that satisfactory, since the definition of hitting a drum and hitting a switch are two completely different concepts.
Logged

Atlanta, USA
Offline Offline
Edison Member
*
Karma: 33
Posts: 1429
AKA: Ray Burne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You may want to consider FFT analysis.  It would be fairly straight forward to light LEDs based upon the values of the "buckets".  This code will compile on an UNO and all that is needed is a small microphone/preamp to drive the inputs.

http://forum.arduino.cc/index.php?topic=182169.0

Sparkfun has a non-assembled board and a list of parts for a mic/pre-amp: https://www.sparkfun.com/products/8872
although you can likely find assembled units easily.


Ray
Logged

Estonia
Offline Offline
Full Member
***
Karma: 0
Posts: 167
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I did do some basic searches but came up empty. The drum is a bass drum, it is hit with a foot pedal - the standard bass drum like this http://www.acquris.se/images/small/184.png

I was thinking of using some sort of pressure sensitive resistor taped behind the drum where the foot pedal would strike. Then I could measure that resistance and if it hits a certain level, it would be called a "hit" and go through the fade code.

The other idea I had was to use a Piezo to detect the sound but I am worried that it would be difficult to have tweaked enough threshold to filter out all the other sounds from the other drums, guitars, and general vibrations while on a live-concert stage.

Since I have never used either of these, what would your advice be if I would like to have this done within a few days (concert is coming up) and getting parts can be a bit of a pain where I live?
Logged

Atlanta, USA
Offline Offline
Edison Member
*
Karma: 33
Posts: 1429
AKA: Ray Burne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The drum is a bass drum, it is hit with a foot pedal

Possibly a phototransistor?
https://sites.google.com/site/therobotronics/arduino/connect-a-phototransistor-to-arduino
Logged

Estonia
Offline Offline
Full Member
***
Karma: 0
Posts: 167
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A phototransistor seams a little too much for something so simple. I was thinking of trying to pick up a Piezo today but I have a question about those.

At my local shop, they have a "Piezo signal generator" - is there a difference between a piezo that emits a noise compared to one that reacts to it? From what I could see they are all the same but if you output to them, they make noise and if you input from them then you can detect noise - would this be correct?
Logged

Grand Rapids, MI, USA
Offline Offline
Sr. Member
****
Karma: 6
Posts: 256
Yes, I remember
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yep, that is correct. 

When flexed a piezo generates a small voltage and when given a small voltage a piezo flexes.  If you give a piezo a 2KHz signal, it will flex at 2KHz and make a quite effective speaker.  I once used the piezo off the back of an old wristwatch (beeper) to sense a flexing spring, but it did involve hours of grinding the steel case off of the back of the piezo, so I would probably order one if I had to do it again.

The difference may be in how the piezo is mounted.  Sensors are typically mounted to some sort of lever to pick up vibration while speaker generators tend to be mounted to something that will resonate and amplify the sound.  You can use them in reverse just fine, but they may be a bit harder to work with.

It will pick up a lot of noise, but you can mitigate this by setting a high trigger threshold in the code and only looking for low frequency signals.  You can do this with an FFT, but it might be more efficient to do it with a digital low pass filter.
Logged

Estonia
Offline Offline
Full Member
***
Karma: 0
Posts: 167
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, good I understand the piezo. They are cheap and my shop has a few I can get.

What is a FFT and a "digital low pass filter"? Is there a way for a piezo to detect only certain frequencies of sound?
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 46090
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Is there a way for a piezo to detect only certain frequencies of sound?
No, but the FFT (http://en.wikipedia.org/wiki/Fast_Fourier_transform) can.
Logged

USA
Offline Offline
Newbie
*
Karma: 0
Posts: 38
Chasing dreams
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi, I am a drummer my self and have used something similar to what you want to do ( but not with the Arduino ). Why don't you just use a simple sound sensor. Then, you could adjust the sensitivity of the sound and with some testing you would be able to get it to go off only when the drum is hit. The bass drum is going to be much louder than everything else (if you put the system inside or at leas the sensor inside the drum) so you should have to worry about it going off on snare or cymbal hits; assuming you adjusted the sensitivity once you completed the system.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 49
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I was kinda thinking of contact microphone hooked up with arduino and max/msp could do the work smiley It is possible to place that little mic right behind the skin on the drum where the drummer would kick it. Analyse the incoming sound level and define a threshold to trigger the LED's on whatever output pin. I think a contact mic would eliminate the LEDs from being trigger from other sound sources, i.e. in a live situation (would be lame to not show the cool thing to an audience anyways smiley-grin).
Logged

Chicago
Offline Offline
Sr. Member
****
Karma: 5
Posts: 456
With every answer comes more questions.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://forum.arduino.cc/index.php?topic=175143.0
Logged

Maine
Offline Offline
Sr. Member
****
Karma: 10
Posts: 413
Caution: Explosives in use.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Just tape one of these to the drum somewhere: https://www.sparkfun.com/products/9196.
Logged

"Anyone who isn't confused really doesn't understand the situation."

Electronic props for Airsoft, paintball, and laser tag -> www.nightscapetech.com

Chicago
Offline Offline
Sr. Member
****
Karma: 5
Posts: 456
With every answer comes more questions.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yep.
Or, put this where pedal hits drum.....or, where foot meets pedal.

(Force Sensitive Resistor)
http://www.adafruit.com/products/1075


* image.jpg (122.43 KB, 1000x769 - viewed 12 times.)
Logged

Maine
Offline Offline
Sr. Member
****
Karma: 10
Posts: 413
Caution: Explosives in use.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Actually, you might be able to get away with something like this:
http://www.adafruit.com/products/819

Just a microswitch with a long metal arm on it, placed under the pedal. No calibration required, no false positives, no interfering with the sound of the instrument.
Logged

"Anyone who isn't confused really doesn't understand the situation."

Electronic props for Airsoft, paintball, and laser tag -> www.nightscapetech.com

Pages: [1] 2   Go Up
Jump to: