Hallowe'en Quick and Dirty - Sensing audio input with BS2
Harry Stoner
Posts: 54
I am hoping to build a simple project for Hallowe'en using a BS2. I will use a motion detector to trigger a BS2 to flash some lights. I have that covered. What I also hoped to do (if it's easy enough - really time constrained here) would be to crudely sense speech or noise with a microphone (or even cruder, with headphones acting as a microphone!), and flash the lights in synch with that noise.
So someone shouts into the mic "Ha ha ha" in an evil voice and the lights pulse 3 times. That sort of thing.
I am clued out audio wise. Could I just hook up the microphone to an ADC0831 and detect voltage changes? I really only need to sense a couple of levels (e.g. silence or background noise versus someome speaking into the mic - don't care too much if it can detect volume levels accurately).
Is there anything simple I can do here?
Thanks.
Harry
So someone shouts into the mic "Ha ha ha" in an evil voice and the lights pulse 3 times. That sort of thing.
I am clued out audio wise. Could I just hook up the microphone to an ADC0831 and detect voltage changes? I really only need to sense a couple of levels (e.g. silence or background noise versus someome speaking into the mic - don't care too much if it can detect volume levels accurately).
Is there anything simple I can do here?
Thanks.
Harry
Comments
http://www.andrew.cmu.edu/user/fwinkler/SoundSens/
Good Luck! Please let us know if it works...
-Donivan
Donivans circuit is a good point to start with. What you will need is voltage divider with microphone and a resistor of 5 to 20 kOhm at the input. Then a capacitor of 0.1 uF indeed to any rail to rail OpAmp which is configurated for about 10x amplification.
At the output of the OpAmp I would suggest a diode into a capacitor of 10 uF with 10 kOhm in parallel to it. That way you have a simple rectifier and a buffer capacity to make reading by the Stamp more easy. (it takes samples every somany milli seconds)
An ADC0831 analog input would be fine to read the signal to the Stamp.
I tried a similar setup and it works, is reliable and fast enough for the purposes you intend. The only thing I found in my device was a strong response to very low frequency noise. If this is a problem to you you could try a capacitor of 0.01 uF at the input.
Regards and succes,
Klaus
Harry
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Knight Designs
324 West Main Street
P.O. Box 97
Montour Falls, NY 14865
(607) 535-6777
Business Page:·· http://www.knightdesigns.com
Personal Page:··· http://www.lightlink.com/dream/chris
Designs Page:··· http://www.lightlink.com/dream/designs
·
Thoughts?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Knight Designs
324 West Main Street
P.O. Box 97
Montour Falls, NY 14865
(607) 535-6777
Business Page:·· http://www.knightdesigns.com
Personal Page:··· http://www.lightlink.com/dream/chris
Designs Page:··· http://www.lightlink.com/dream/designs
·
I haven't had time to build anything myself yet (I am slow), but have acquired LM386 chips to build the test circuit that Donivan pointed to above.
Thanks.
Harry