My microphone trigger circuit works, but i do not know why. - Page 1
Forum section: electronics / projects

author: PeterFW
author_rank: Frequent Contributor
timestamp: January 16, 2015, 03:24:46 am
content: Hello!This is new to me, my circuit works but i do not know why, but i would like to know why it works.Or maybe it just barely works and will relase the magic smoke in 10 minutes, maybe the OP-Amp is faulty...I am terrible with electronics, maybe someone would be so kind to help me...It is cobbeled together on a breadboard, maybe that is the problem but i could not find a loose connection.The last two evenings i spend with my scope and a electret capsule.The goal was to get a useable debounced signal out of a series of explosions for a rising edge triggered interrupt on a micro with a gain/threshold that was controllable over I2C.In the big box were i keep my ics i found a DAC5571 (I2C DAC), TL072 and a LM324.I setteled with the LM324 because the circuit can only be single supply and should run 5V for now.The decision was made to contruct a non inverting amplifier with a gain of 10, a low pass filter and a comparator with a reference voltage set by the DAC.Nothing worked excatly as i wanted until one resistor came loose, this is what i have created...For now the potentiometer acts as a stand-in for the DAC.This circuit works extremely well, at least under test conditions, i can not blow something up at home.I got ear protection on and i use a big hammer and a dampend plate to get a approximation of the sound level and signal shape.Channel 1 at TP1Channel 2 at TP3Channel 1 at TP2Channel 2 at TP3I can adjust the sensitivity with the potentiometer.Only short and sharp sounds are registered at the lowest setting.Talking does not trigger it nor does banging the furniture around (normal background noise).But a sharp tap on the table with the screwdriver and the output swings high.And a heavy blow with the hammer works equally well after the sensitivity is decreased, if not the room response (echo) triggers it again after a few milliseconds.And since this is supposed to be a low power handheld thingy, even the current draw does not register on my power supply, awesome!This works like a charm, i would be very proud of myself but this is just dumb luck.What have i created?Greetings,Peter

author: sherrellbc
author_rank: Newbie
timestamp: January 16, 2015, 04:38:52 pm
content: One thing I noticed is that you are injecting your signal directly into the inverting terminal of the op-amp rather than threw an input resistor. You have set your feedback resistor as 100k, but doing so does not have the intended effect; since you are driving the input directly, the feedback mechanism can never respond in such a way to make V+ = V- since V- is grounded.

author: dannyf
author_rank: Super Contributor
timestamp: January 16, 2015, 04:44:49 pm
content: IC1B is a high gain amplifier - it really converts output from the mic into a square wave, charging up the capacitor. If the mic's output signal stays high long enough, the capacitor will be charged to a point that it triggers the comparator (IC1A).

author: PeterFW
author_rank: Frequent Contributor
timestamp: January 19, 2015, 01:11:41 am
content: Hello and thanks for your reply, both of you!Quote from: dannyf on January 16, 2015, 04:44:49 pmI think i got it, at least a bit.IC1A has such a high gain that it starts to clip badly, C1 and C2 form a band pass.Both to the comparators liking.Quote from: sherrellbc on January 16, 2015, 04:38:52 pmI started withe the "correct" way to do it, wich dit not work as i wanted.The above circuit is what was left over after i removed a bunch of components and wires.The input resistor was removed intentionally.Tomorrow i will give it another try, the correct way, with decent bandpass and amplifier.Greetings,Peter

author: PeterFW
author_rank: Frequent Contributor
timestamp: January 21, 2015, 08:39:50 pm
content: Hello!After searching for the right component values and a bit of measuring and calculating i am now a little bit more satisfied with the result.This is not the circuit i wanted but it is the circuit wich works, it could have been constructed different but my experiments with a sallen key filter and different feedback bandpass designs dit not work.I ditched the DAC in favor of a PWM signal from the µC wich counts the pulses.Now i can tune the sensitivity digitally and the pulses are countet with a edge triggered interrupt that is only called 1-3 times in 10 milliseconds but that can be taken care of in the software.And the whole circuit is not triggered by the 2.5Khz buzzer wich signals the start of the measuring cycle.Greetings,Peter