Sound Activate Switch Project

Thread Starter

DC_Kid

Joined Feb 25, 2008
796
i am onto a new project. i need to make or buy a sound activated switch. i need NO momentary functionality and the sound would be like a hard/loud clap. having adjustable threshold would also be good (a pot, etc). the relay is very low amps, on the order of 0.5mA(max). its just a trigger for a DSLR camera.

so, anything COTS i can modify, or perhaps a suggested schematic to build? i was initially thinking ATmega micro controller, which can be done, but probably too much for the need.

maybe something like this where the output is connected to the cathode side of a LED in a opto relay or a 1shot IC?

 
Last edited:

AnalogKid

Joined Aug 1, 2013
8,708
ebay. There is a module that is a sound detector shield for an Arduino that is basically a mic, preamp, and comparator. No relay on board, but an ebay relay module also is cheap.

ak
 

Thread Starter

DC_Kid

Joined Feb 25, 2008
796
ebay. There is a module that is a sound detector shield for an Arduino that is basically a mic, preamp, and comparator. No relay on board, but an ebay relay module also is cheap.

ak
i will check that out. i really need a one shot with some dwell time to reset, and thats why i was looking at ATmega (Trinket) to program the functionality.

edit: i found a few sound boards for cheap, i should be able to adapt one directly to adafruit trinket. i will program the threshold, one shot, and reset dwell time into the atmega.
 
Last edited:

Thread Starter

DC_Kid

Joined Feb 25, 2008
796
so, i went off and got a mic board from ebay. this specific one sold by a vendor in US, but its a MIC item. based on lm358, and uses one amp for threshold output (DO), and the other amp as a analog amp (AO).

i will integrate it with a ATtiny85 board for the logic end of control. my project works better with a directional mic so i did some testing. the mic itself (electret) is kinda crappy on response, has most sensitivity in the 900-5000Hz area (maybe due to the caps and resistors used on this board), below and above that is dismal. without digging heavy into the physics of sound waves, i put a funnel over the mic (trimmed just so it fits nice and snug). i find that the funnel provides a directional characteristic, and, seems to increase sensitivity (more spl being directed into the mic, but not sure if the funnel itself is vibrating the body of the mic and that appears to be more sensitivity). the funnel should also act as a bandpass filter, but because the cheap mic itself is dismal i didnt really notice the filter characteristic.

the analog of mic will feed a A/D input on ATtiny85, and a threshold voltage via a pot will feed a 2nd A/D input on ATtiny85. adjusting pot to proper level, when the threshold is hit the ATtiny will trigger a opto relay for 10ms, which closes ckt on camera shutter cable to take a pic, then dwells in a off state for 1min to "reset" things before the next pic can be taken. the threshold can be set from about a very light tap on table from about 6ft away, to a hard clap about 2ft away.



 

GopherT

Joined Nov 23, 2012
8,012
so, i went off and got a mic board from ebay. this specific one sold by a vendor in US, but its a MIC item. based on lm358, and uses one amp for threshold output (DO), and the other amp as a analog amp (AO).

i will integrate it with a ATtiny85 board for the logic end of control. my project works better with a directional mic so i did some testing. the mic itself (electret) is kinda crappy on response, has most sensitivity in the 900-5000Hz area (maybe due to the caps and resistors used on this board), below and above that is dismal. without digging heavy into the physics of sound waves, i put a funnel over the mic (trimmed just so it fits nice and snug). i find that the funnel provides a directional characteristic, and, seems to increase sensitivity (more spl being directed into the mic, but not sure if the funnel itself is vibrating the body of the mic and that appears to be more sensitivity). the funnel should also act as a bandpass filter, but because the cheap mic itself is dismal i didnt really notice the filter characteristic.

the analog of mic will feed a A/D input on ATtiny85, and a threshold voltage via a pot will feed a 2nd A/D input on ATtiny85. adjusting pot to proper level, when the threshold is hit the ATtiny will trigger a opto relay for 10ms, which closes ckt on camera shutter cable to take a pic, then dwells in a off state for 1min to "reset" things before the next pic can be taken. the threshold can be set from about a very light tap on table from about 6ft away, to a hard clap about 2ft away.
If you need more sensitivity, try a parabolic reflector - point the little mic at the reflector.

https://www.videomaker.com/article/f20/17144-how-to-build-a-parabolic-mic-dish
 

Thread Starter

DC_Kid

Joined Feb 25, 2008
796
i saw parabolic reflector as an option, but that wont suit the size constraints. the electronics fits into a small Hammond handheld project box w/ 9v batt compartment, approx 3x4.5x1"
the mic will be flush with an end plate, and the funnel can just push on when used. i'll figure out a way to provide some sort of spring clamp so i can attach it to the camera tripod leg, or something like that.
 
I built a project to trigger an external flash (with a DSLR) using sound and tested several sound input devices not dissimilar to the one you used (see project here). I was able to trigger the flash from the sound of a water drop. Of course, the ambient sound level was as quiet as I could get. Using a programmable value in the program helped with the whole process.

As has already been mentioned, a parabolic dish would probably be the gold standard for directionality, but I could never find one cheaply or build one easily. I did have in mind to try to use one of these, but they are not truly parabolic.

I ended up using a simple paper cone (same idea as your funnel) and it worked quite well. This site was a helpful resource for the issue.

Hope it helps.
 

Audioguru

Joined Dec 20, 2007
11,249
The electret mic picks up sounds from all directions (Omni-directional). The reflector cone focuses high frequencies so that the mic is more sensitive. The size of the opening in the reflector determines the lowest frequency that is focused. For low audio frequencies it must be huge.

The very cheap amplifier circuit with the mic probably uses the smallest cheapest capacitors because larger capacitors that help amplify low frequencies cost more. The cheap LM358 is awful for audio because it has hiss noise, crossover distortion and trouble with frequencies above 2kHz.
 
Top