Background: I am currently using a SparkFun Electret Microphone and am needing to both filter and amplify the signal before turning it into a square wave to be interpreted by a FPGA. The mic itself has a ~1.65V DC offset and the signal amplitude is in the range of 200mV. The mic is powered off of 3.3V. For amplification I am utilizing a LM324 powered off +/-2.5V. For the conversion of the signal, I am using a LM339 comparator with a low pass "averaging" circuit and it is powered off of 3.3V.
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 8kHz 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 however 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 be expecting 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!