Sound/Vibration sensitive LEDs for tonal drum - Page 1
Forum section: electronics / beginners

author: fpvrcjohn
author_rank: Contributor
timestamp: April 03, 2015, 08:18:59 am
content: Hi, I am working on art instalation project and have some difficulties with electronics, hope you guys can help meShortly about the project: Idea is to have 8 sets of leds with ADJUSTABLE sensitivity to 8 different notes on the percussion drum (drum:) The louder you play the note, the brigher the LEDs are shining. At least that's what I expect for..I was working on simple darlington transistor based circuits conetcted to piezo element that is glued on each note of the drum, it worked, but not well enough, the sensitivity was too low. I changed the transistors to AN6884 led driver circuit, the sensitivity is OK now, but LEDs do not fade out properly, they rather gradualy "blink out". Also they swich on to full power from any vibration, wich is not good as I want to have LEDs shining dim if I play silent on the drum and the louder it gets the brighter the LEDs shine. Other problem that I have with this scheme is that I can't connect as much leds as I need, because they get dimer.A I am quite short in time with this project (about 1 week for electronics) and have only beginer skills in electronics I hope you guys can suggest me some solutions to these problems. Maybe there is something already done for this? Or shall I use other sheme in general?Thanks, John

author: lapm
author_rank: Frequent Contributor
timestamp: April 03, 2015, 09:10:02 am
content: Sounds like you need three things atleast:Bandpass filters for individual channels to identify those channels (Assuming i have understand what you mean by note in this case)Proper amplifier for incoming signalPerhaps some sort of modular pwm system for leds, since you want a lots of leds???Personally i would probably try to generate analog signal based on those "notes" and use microcontroller with ad-converter to drive pwm-modulation for leds based on measured input value. Fading is easy to do with software..How ever this can be done with analog electronics as well..Brake overall project to sub modules you design. Easier then trying to design entire thing one go.

author: fpvrcjohn
author_rank: Contributor
timestamp: April 03, 2015, 10:53:03 am
content: Actual frequency of a note is irrelevant. I just want to pick up the vibration of a drum pad and use the signal to light up a led ( 48W 5m LED light strip). The led should either shine or dim, depending on the strenght of the vibration (amplitude). I suppose using a simple analog circuit for this would be the way to go. If I can build the circuit for one pad, then all I have to do is build one for each pad to complete the project. But it is important to have the adjustable sensitivity for the incoming signal as too sensitive scheme will pick up the vibrations from other notes, which I don't need. Maybe you could give some examples for what schemes I can use in this circuit, or even make a plan of the simple circuit as I am not very self confident in terms of electronics.Thanks, John

author: fpvrcjohn
author_rank: Contributor
timestamp: April 04, 2015, 10:38:21 am
content: So maybe anyone can help me out?

author: PeterFW
author_rank: Frequent Contributor
timestamp: April 04, 2015, 11:40:39 am
content: Quote from: fpvrcjohn on April 04, 2015, 10:38:21 amFrom my limited bit of experience with a bit of this stuff i would say you got two options, one in software and one in hardware.A microcontroller with a microphone and ADC, then run a FFT and pipe the output to a PWM LED driver.Basically something like that:But instead of mapping the output per frequency to a string of LEDs to indicate amplitude you map the output to the brightness of a single LED per band.The other one is a fairly old concept, the simple light organ (lichtorgel).A analog bandpass wich drives a transitor for each audio band.You may be able to use a single piezo instead of a microphone to minimise ambient noise input.With multiple piezos you will allways have crosstalk since the whole drum forms the resonance chamber.

author: fpvrcjohn
author_rank: Contributor
timestamp: April 04, 2015, 01:31:40 pm
content: I am afraid I won't be able to do something with software as I don't have much time and experience for that..The crosstalk is not the biggest problem now. I can't find the right scheme that could drive more LEDs, as with AN6884, 5m of LED lights strip shines very dim. I gues if there will be lots of crosstalk then I would try using the bandpass filters.Thanks, John

author: PeterFW
author_rank: Frequent Contributor
timestamp: April 04, 2015, 01:58:39 pm
content: Quote from: fpvrcjohn on April 04, 2015, 01:31:40 pmReady to use, looks like something you wanted:https://learn.adafruit.com/fft-fun-with-fourier-transforms/spectrum-analyzerAs for the brightness, show us the schematic of the working circuit, then we can tell you how you can make it brighter.

author: fpvrcjohn
author_rank: Contributor
timestamp: April 04, 2015, 02:35:06 pm
content: Quote from: PeterFW on April 04, 2015, 01:58:39 pmI guess this would be good option, but shipping will take too much time..Here is rought shematic of my circuit, sorry for the quality, but hope you will get the idea..The scheme used here is AN6884, but it does not power up the LED strip properly. Also it does not respond to the level of vibration as I want, it lights up the led to full power from low signal, altough it fades out normaly.Thanks, John

author: flynwill
author_rank: Regular Contributor
timestamp: April 04, 2015, 03:24:42 pm
content: Quote from: fpvrcjohn on April 04, 2015, 02:35:06 pmSo you are saying that this circuit is too sensitive? If so the fix is easyIf you tie the currently open end of that pot to ground your circuit will be remarkably similar to the "application circuit" in the data sheet, and that will it to actually control the level of signal reaching the LED driver IC. With a Piezo sensor you can also lower the values of the pot to the 10k suggested in the application note and probably get more stable results.

author: PeterFW
author_rank: Frequent Contributor
timestamp: April 04, 2015, 04:11:13 pm
content: Quote from: fpvrcjohn on April 04, 2015, 02:35:06 pmYes, this driver does what it is supposed to do, it is designed to "flicker", that is a bar graph display driver.It only can output a few mA constant current and you want to drive a 12V led strip that eats a lot of more power and is most likely constant voltage and not constant current.Every solution i can come up with for this problem would involve at least an dual OpAmp per channel and some sort of very simple logic. Either a voltage controlled timer with PWM output or a µC with ADC and PWM output and a driver stage.

author: fpvrcjohn
author_rank: Contributor
timestamp: April 04, 2015, 04:37:21 pm
content: Quote from: flynwill on April 04, 2015, 03:24:42 pmI am not sure if I can say that the circuit is too sensitive. Basicaly now I have the led connected to the first pin of the sheme, and I have the led shining as long as I can hear the sound of the note, that is good. But it does not respond to vibration value as I need.If I play the drum silent it still lights up the led from 0 to 100, and I want to have sound level responsive LED's. But the biggest problem is that if I connect the 5m led strip it shines very dim, so I gues the an6884 sheme is not usable in general.

author: PeterFW
author_rank: Frequent Contributor
timestamp: April 04, 2015, 04:39:41 pm
content: It bugged me and i dit a bit of thinking... there are many components missing in this circuit that should be there, but this is the simplest solution i could come up with that might work. Lowest part count possible.This is provided without anny acounability and warranty, analog stuff my arch nemesis. This might work like you want it to, there may be a need to seriously lower the capacitor value for a faster response time.The piezo might put out too much or not enough voltage, there should be limiting there. If it is not sensitive enough you could add 3 additional resistors and turn the buffer opamp into a amplifier.

author: fpvrcjohn
author_rank: Contributor
timestamp: April 04, 2015, 04:45:45 pm
content: Quote from: PeterFW on April 04, 2015, 04:11:13 pmCan I expect that you could make some sort of schematics for this? Because I am not familiar with Pwm and timers, you would really save my day..

author: PeterFW
author_rank: Frequent Contributor
timestamp: April 04, 2015, 04:50:41 pm
content: Quote from: fpvrcjohn on April 04, 2015, 04:45:45 pmMy other post has a schematic attached...

author: flynwill
author_rank: Regular Contributor
timestamp: April 04, 2015, 04:53:28 pm
content: Quote from: fpvrcjohn on April 04, 2015, 04:37:21 pmIn that case no I don't think the an6884 will do what you want. It is intended to create a little bar-graph of LEDs. If you hooked up LEDs to all six of it's outputs then you will have a somewhat variable brightness (ie 6 levels depending on how many LEDs are turned on).A circuit like what Peter suggests might work, but I don't think it will work very well (if at all) as drawn. You probably need some gain before you attempt to rectify the signal and use it to drive the LEDs. I would setup the op-amp as a amplifier with a variable gain (possibly as high as 100, but maybe only about 10). The diode rectifier would come after the op-amp.

author: PeterFW
author_rank: Frequent Contributor
timestamp: April 04, 2015, 05:13:54 pm
content: Quote from: flynwill on April 04, 2015, 04:53:28 pmYes and no, i bought a bunch of slightly bigger then usual piezo buzzers years ago and i use them as body microphones to pic up vibrations/noise in a steel plates.They put out a serious amount of voltage, there is plenty of sensitivity to register a very slight tap with a screwdriver even with a 1n4148 instead of a shottky.There should be no problem with the amp behind the diode, that way you do not have to worry about the negative voltage.But you might be right, only try and error will solve that question

author: fpvrcjohn
author_rank: Contributor
timestamp: April 04, 2015, 08:24:42 pm
content: Quote from: PeterFW on April 04, 2015, 04:50:41 pmSorry. did not see it..Will try it on monday, as my local radioshack won't work tomorrow. Hope your circuit will work properly..Thanks alot!

author: PeterFW
author_rank: Frequent Contributor
timestamp: April 05, 2015, 09:06:55 pm
content: Quote from: flynwill on April 04, 2015, 04:53:28 pmYou were right, it does not workSince i am in a good mood and had a blast cooking today i will be way too nice, now.I had a bit of fun poking things in my breadboard, i gave up on the "soft start" feature, i do not know why but i could not get it to work triggered of the piezo and OpAmp. My scope was no help either, i suspect that my test rig was the fault.I could not cobble together a rudamentary drum without going to the shed.And it is cold and dark in the shed now and i am in my PJs allready.Video:Edit: You can not see it that well in the video but the circuit will respond with varying brightness to the sound level. The louder the brighter.Schematic:I still suspect the piezo to put out way more voltage then the circuit can handle but without a real drum i can not be shure.The the body harmonics in the drum body are loud, very loud.You should at least put two clamping diodes on the input, i think, i had piezos blow circuits more then once.In the above circuit you have to replace the second BC337 (T2) with a fairly big NPN or a darlington transistor that can handle the power the LED strip requires.The BD679 from my other schematic should work, but it depends on what you can buy.But again i advice you, i am barely more then a monkey poking wires. But since nobody else had a suggestion i guess you are stuck with me :-PExplanation what the circuit does:IC1A is a non inverting amplifier to amplifiy the piezo output, there is no rectification or negative voltage protection, you should put two clamping diodes on the input but i omited them to simplifiy things.The amplification is set by the potentiometer, the pot value is not that important, annything above 10K is good. It does not have to be a pot, two resitors will to as well but a pot gives you something to tweek.Since the opamp can not source enough current T1 will charge the capacitor wich serves the purpose to "fade out" the led.The LED in the circuit has no resistor, it should have one but your LED string should has them build in. Check that before powering up.Why i choose those components and values you ask? They were in my used parts bin...

author: fpvrcjohn
author_rank: Contributor
timestamp: April 07, 2015, 11:11:29 am
content: Hi Peter, thanks alot!Just tried your scheme with the drum, and it actualy works! I played with different values of condensator and the fading is just perfect:) But maybe you have some ideas howcan I use full potential of my LED strip. It shines bright with the and BD679 but not as bright as connected to 12v. I have lowered the R1 value to 500oms and its beter that 10k but there is still way to go.. I am using 20k pot and its very sensitive, any sygestions?:Either way, I am very thankful for your help!

author: PeterFW
author_rank: Frequent Contributor
timestamp: April 07, 2015, 09:17:29 pm
content: I suspected that it might be overly sensitive, lets try and ditch the OpAmp.The LED connection was in the wrong place too... i allways get NPN/PNP mixed upThe resistor R2 and the potentiometer R3 should have that value, idealy the pot should be bigger but a 20K should work.If not replace R2 with 500 Ohm.Be careful to put the diodes in the right way, otherwise bad things might happen.They are there to protect T1 from too much voltage, R1/R2 are a voltage divider to set the sensitivity.In theory you should be able to get a "fade in" with a charge current limiting resistor on the cap.I think i deserve at least a decent video of the working installation, this should work now...

author: fpvrcjohn
author_rank: Contributor
timestamp: April 08, 2015, 08:14:51 am
content: QuoteYou probably missunderstood me, the sensitivity of the sheme is good, its just that 20k pot is very sensitive so it is kinda hard to set the the value right, but overall its good!And after changing the placement of led it shines brightQuoteCan you please explain this in more detail? But as long as I will keep with the previous scheme I will try to do this on that one. As I uderstand I must place resistor of some value in between the cap and the transistor (BC337) ?QuoteYou for shure will! Now I just need to get everything together

author: PeterFW
author_rank: Frequent Contributor
timestamp: April 08, 2015, 11:42:42 am
content: Quote from: fpvrcjohn on April 08, 2015, 08:14:51 amYea... i now know why it dit not work now!Because i am utterly stupid!Remember that PNP/PNP thing i allways get mixed up, the BC337 is wired wrong, thats why it dit not work, the opamp too.Wich schematic are you using right now? Then i can tell you how to fix it, i got the "fade in" working now too

author: fpvrcjohn
author_rank: Contributor
timestamp: April 08, 2015, 01:48:24 pm
content: QuoteI am using second scheme with the LM324. I have the diodes in the incoming signal just like in latest scheme, also I coneted the piezo signal to 50k pot so I can regulate the fade in:) As I am short in time I have already started designing it on the board, so I am not shure if its worth refixing it again

author: PeterFW
author_rank: Frequent Contributor
timestamp: April 08, 2015, 05:13:52 pm
content: [quote author=fpvrcjohn link=topic=45613.msg647485#msg647485 As I am short in time I have already started designing it on the board, so I am not shure if its worth refixing it againWell then... if it works...The one transistor is wired wrong but it should not release the magic blue smoke.If it works now, it should continue to keep working.This is my last attempt at this, the BC337 is replaced with a simple Diode and one additional resistor.The bottom one works the same, just a bit more fancy...Well then, ill be waiting for the video, i love blinky stuff :-)