Background: I am currently using a SparkFun Electret Microphone and I need to both filter and amplify the signal before turning it into a square wave to be interpreted by an FPGA.
The mic itself has a ~1.65 VDC offset and the signal amplitude is in the range of 200 mV. The mic is powered off of 3.3 V.
For amplification I am utilizing an LM324 powered off +/-2.5 V. For the conversion of the signal, I am using an LM339 comparator with a low pass "averaging" circuit and it is powered off of 3.3 V.
Issue: Both of these circuits work just fine independently of each other. The active filter does a pretty good job of attenuating room noise below the 8 kHz cutoff I had specified when I built it.
The LM339 with the "averaging" filter works just fine to convert the sine wave from the mic to a square wave as well.
The problem I am encountering is trying to integrate the two of them. When the output from the LM324 is fed into the comparator, I cannot seem to get any output out of the comparator.
I have simulated the circuit in LTSpice and the output is what I would expect to see in reality, but I cannot for the life of me get this to work. Images of the simulation are attached below.
- Red trace is the simulated mic input
- Green trace is the output from the active filter
- Blue trace is the output from the comparator
Thanks in advance, any help is appreciated!