I have built a peak detector circuit using op-amps/comparators to amplify the signal from an electret microphone, hold the peak signal and create a sharp logic edge when a peak is detected to be sent to a microcontroller.

I have built the circuit as follows setting up OA1 as a non inverting amplifier with a gain of 1000, but the voltage out from the OA1 remains fixed at about 4.5V no matter how much noise I make into the microphone. The comparator part of the circuit is outputting approximately 2V low and 5V high depending on how I set the potentiometer. All the components appear to be working.


simulate this circuit – Schematic created using CircuitLab

  • \$\begingroup\$ @vofa's answer is correct. Another problem with this circuit is that your bandwidth is too low for audio. The LM1458 has a gain-bandwidth product of 1 MHz = 1000 kHz, so with a gain of 1000 (actually 1001) your bandwidth is only 1000 kHz / 1000 = 1 kHz. You need a bandwidth of at least 20 kHz or so for audio. You either need to choose an op amp with a higher gain-bandwidth product or split the gain between two or more stages. \$\endgroup\$
    – Null
    Dec 11, 2016 at 3:03

1 Answer 1


The LM1458 is an op amp, and is not designed to be used as a comparator. The Texas Instruments datasheet specifies a minimum voltage of 6V. The datasheet also says that, when powered from +/-15V, the output can only typically reach +/-14V. The device does not have a rail-to-rail output. In your application, it is doing all it can, but there is not enough supply voltage for it to function properly. Same for the amplifier stage.

Also note that only the top half of the AC waveform generated by your microphone is getting through the op amp. Since there is no negative supply, the op-amp output saturates at its minimum output voltage for any negative input signal. That does not matter much for this type of circuit, but it is something to be aware of.

Some things to try are:

  • use an op amp that is rated to run from a +5V single supply

  • increase your supply voltage

  • use a comparator instead of an op-amp for the output

  • \$\begingroup\$ So - I have switched my op amp to the LM324. I have tried setting the input voltage to 15V and just measuring the output of OA1 which is reading a constant 13V. Also the voltage into the non inverting input of OA1 is wavering around 5.8V, which I assume is not correct either? \$\endgroup\$ Dec 13, 2016 at 10:51
  • \$\begingroup\$ The LM324 is like the LM1458 in that its output can't reach the supply voltage. 13V is its maximum output voltage for a 15V supply. The output is saturated high. The OA is pushing as hard as it can, trying to make the input pin voltages equal, but it can't for some reason. Try reducing the gain to 1, then see if things make sense. Then try 10, then 100. A gain of 1000 might just be too high. Sources of error (like the OA's input offset voltage) are being amplified by 1000. Double check that your circuit is built correctly. Last night I wasted hours on a circuit. My OA's were upside down. \$\endgroup\$
    – vofa
    Dec 13, 2016 at 14:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.