The circuit is is working ok, but i want to add a RC low pass filter because I want to detect only frecuencies below 700Hz. So doing the math looks like a 2.2k resistor and a 100nF capacitor will do the trick. The question is, where should I put the filter? I've tried putting it after C2, and it killed all output.
Is it better to put it at the transistor base, or at the microphone output?
Well, one way to try different things out is to use the Falstad circuit analyzer. It runs on Java. At least you then have an idea what should work. I would also consider doing the signal conditioning in software. There may even be examples in the archives.
I've tried putting it after C2, and it killed all output.
That should have worked unless you are driving a low impedance, which would mean voltage is getting dropped across the 2.2k resistor.
Without th efilter, what is the output (C2) normally connected to? With a 2.2k series resistor, you'd like to have a load of 22k or more.
If you remove the filter capacitor, you should get the full-bandwidth signal through (with some signal loss depending on the load resistance). A shorted capacitor would kill the signal.
Double-check your component values.
Try different components in case something is bad.
Make sure you've made a low-pass filter, and not a high-pass filter.
The output is connected to a 555 schmitt trigger following this circuit:
I've just changed the value of R1(56K) and R2(100k) to change the thresholds. And I've skipped the C1 capacitor, since the output of the amplifier was already decoupled.
It should be OK. R1 & R2 are effectively in parallel, and they are also in parallel with the 555 inputs. I didn't calculate the 555 input impedance, but the spec sheet shows microamps, which indicates high impedance (megohms).
And I've skipped the C1 capacitor, since the output of the amplifier was already decoupled
That's a good idea... 10nF into ~50k is creating a high-pass filter (~200Hz), which you don't really want.
I want to detect only frecuencies below 700Hz.
As you may know, a simple RC filter has a slope of 6dB/octave... It doesn't "kill" everything above 700Hz, it attenuates it.
As you may know, a simple RC filter has a slope of 6dB/octave... It doesn't "kill" everything above 700Hz, it attenuates it.
I'm trying to filter a buzzer sound, that is 5kHz, the attenuation should be enough to keep it under the Schmitt Trigger thresholds.
The goal of this sensor it to get a digital signal for loud sounds picked by the microphone. The minimal loudness required will be determined by the R1 and R2 voltage divider of the Schmitt Trigger circuit. I know i can filter the signal digitally in the arduino, but if I was able to get it with 2 small componets, that was much better than any line of code
Increase C2, it forms voltage divider with RC filter. 10-100 uF would be O'K.
Also try to decrease R3, lowering output impedance of the amplifier. ~1 kOHm or even less.
Try a 22nF from the transistor's collector to ground - the output impedance of the collector is basically high so the 10k load resistor dominates, and 10k together with 22nF should give you your desired roll-off...
You could even try a capacitor across the electret mic.
BTW a single RC filter isn't going to be especially selective, 6dB / octave roll-off in the limit, soft knee...
Increase C2, it forms voltage divider with RC filter. 10-100 uF would be O'K.
I've increased C2 up to 4,7uf (was the biggest non electrolytic capacitor at hand, and it is really big because is rated at 250V XD ) and got better results.
I'll still have to try the other suggestions.
By the way, since many comments say that a single low pass filter won't be enough, what kind of circuit do you suggest to get better filtering? Active low pass?
Just give me a hint and I'll enjoy exploring and learning.
Regards