SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By nikt0
#20362
I've been working on a PIC16F88-based multifunction camera shutter trigger for high speed photography. So far I have light activated triggering, time lapse, and self timer functionality implemented, but I'm having difficulty devising a good sound activated trigger.

My idea so far is to amplify an electret microphone and bridge rectify the signal I get from it since I don't care about the waveform, only the peaks. I'll feed that output into the PIC's ADC. There will be a user controlled threshold signal level, and when the PIC detects a voltage that meets or exceeds this threshold, it will trigger a relay to snap a photograph.

I'm wondering, though, if there are any potential problems or pitfalls I could encounter if I were to build this device this way. Are there any better solutions you guys know of that I have missed? I realize that Make Magazine has an analog based high speed photo kit that has most of the functionality I'm looking for, but I would like to build my own PIC-based solution so I can learn more about microcontroller projects and have a nifty looking LCD screen on my trigger device.
By riden
#20373
The problem with using an ADC is the time it takes to sample the sound level. By the time the PIC is done sampling, your event may have come and gone. I think that if I were using a PIC (so I could have programmable delays or something like that), I'd use a dual op amp with the first half amplifying the signal and the second half as a comparator whose output is connected to the PIC. Once the comparator fires, the PIC can "immediately" detect the transistion and perform the necessary processing. A number of PICs (the 16F88 included) have built in comparators which could simply things as well.

Of course, determining the threshold would have to be a manual adjustment unless you use a electronic pot (level control). These generally are inexpensive (~$1-2). have 256 levels, and can be controlled by the PIC.