[Note: the initial text of this thread was edited]

I'm trying to do the simpliest circuit possible for muting tpa class-D amp boards (tpa3118, 3116, and so) in the absence of input sound/music - yeah, a workaround to avoid that hiss background sound. I readed a lot of stackEx questions, and isn't hard to achieve that with proper signal (+0.7v). But found almost nothing that works for very low voltage signals. I don't want to detect a specific frequency or pwm, my goal is detect any music frequency (20hz~20khz) audio above +-2mV (or 5mV, at least).

For making the circuit, I have both 5v (isolated) and 21v (5s) lipo-power WITHOUT GROUND available (plastic chassis - only if I make the "virtual ground").

My input is a bluetooth headset, what delivers no more than 300mV. My intention is detect 5mV and below signals - to catch even signals streamed in low volume by cellphone to the bt headset.

The "whole thing" looks like this: Whole thing Note that the mute positive (always 6.9v) and audio negative are with "?" because maybe they don't need to be used.

I mapped 2 main approachs: opamp and arduino.

On arduino, I would be able to clip negative voltages (to not damage analogInput) OR dcBias the audio, and detect a resolution of almost 5mv (5v/1024). A script could be runned to detect variations above and below reference (2.5v), and do the desired mute action (sending a H signal from arduino to mute pin of tpa board, i.e.).

But would be interesting doing this only electronically. Seems so obvious that I'm deeply distressed about it. With an opamp what amplifies the soundwave amplitude like 500 times, a 2mV signal (now 1v) could make a bjt transistor to work. The complementary circuit would be a capacitor-resistor-zener one, to limit the output voltage (for the reading) and make a "buffer" of the sound peaks (slower switching).

Based on Bruce Abbott and Tony Stewart answers, I (we all) got nice suggestions of opAmp circuits to it.

My "dream" simpliest circuit for achieving this objective: "Dream circuit". Dream solution The led emulates mute negative pin draw. With ground, works as intended. Using virtual ground, all the circuit oscillates, and the cap "got drained", not holding his charge. It's another simulation error (read more about Falstad circuit simulator below)? Or it's "right"? Of course, why this occurs is trivial for who knows, but unfortunately, not to me :/

Now I'm in doubt if the Falstad nice'n-easy javascript circuit simulator (www.falstad.com/circuit/circuitjs.html) is faulty on "real opAmps" or not. Maybe it's just a ground or "virtual ground" thing, as we'll see below. The fact it's I'm unable to achieve, in the simulations, the results of an ideal opAmp with a real one, on lipo power. All what I got is the output voltage of the soundwave equal in mV to input one, not amplified like I want - the "wave voltage fluctuation" of the output is equal of the input.

After Bruce and Tony valuable feedbacks, two important questions appeared:

1) I'll need to use audio's negative? (Isn't a problem, but note by my above draw that are two "different" powersources); and

2) I'll need to add "virtual ground" to the circuit? Or I'll need to achieve the "ground function"? How? From my simulation above, seems I'm unable to use "virtual ground" in the idea.

In mine main idea, and also in Bruce's answer, only "positive" of the audio is used.

[Please correct me if I'm wrong, but in the bluetooth headset outputs, only the "positive" will conducts the soundwaves and the (positive and negative) voltage, right? In multimeter readings, comparing with a ground, the audio negative didn't showed any voltage.]

Also, in Bruce's circuit, the negative pole of the battery is "grounded", what, from my point of view (probably wrong one), makes it equal to ground. That's why I simulated the circuits "without ground", Tony.

I simulated Tony's answer circuit without grounds and powered by a 5v batt. Worked ok, thank you very much. BUT, simply by removing the noise source (dragging aside, and even if untoggled), the circuit FAILS in simulation. I tried some arrangements with resistors values, tried to add some diodes and caps, to rebalance the circuit, without sucess. In this scenario, would be impossible to add my unipole audiosource. And using the negative from audio, if needed, deserves some attention, to not burn (another) bluetooth headset with the returning current.

Bruce's circuit what Tony adapted from my simulation also looks terrible without ground. And with ground, doesn't seems to work 100% as intended. I just didn't abandoned Falstad's simulator yet because it's sooo intuitive...

Also I got LTspice, Multisim (web - National Instruments), and TINA (Texas Instruments). But they use and simulation aren't intuitive, and some basic components needs to be specified/imported, what makes it more difficult yet.

Besides nice Bruce and Tony answers, looks that I still need advices, both on grounding issue (plastic chassis) and on "real opAmp" issue (on Falstad simulator with 5v batt, it basically "forwards" 80% of Vcc received, completely out of the expected).

Ideas? Suggestions? Tip of any working web "real opAmp" simulator?

  • 1
    \$\begingroup\$ You could work on your presentation. If your question needs a "spoiler" there's probably a lot to cut out. The extra EDIT tacked on at the end makes it even more difficult to follow. It would be better if you incorporate the edits into the question since this is not supposed to be a discussion - only a free-standing question and one or more free-standing answers. \$\endgroup\$
    – pipe
    Commented Mar 1, 2020 at 11:24
  • \$\begingroup\$ I dont understand why you cant get rid of the noise. Perhaps it is also why you cannot define your problem here with clear inputs and outputs and forget about how to do it and include common mode noise as an input with impedance to closest ground. \$\endgroup\$ Commented Mar 4, 2020 at 23:20

3 Answers 3


With an opamp what amplifies the soundwave amplitude like 500 times, a 2mV signal (now 1v) could make a bjt transistor to work. The complementary circuit would be a capacitor-resistor-zener one, to limit the output voltage (for the reading) and make a "buffer" of the sound peaks (slower switching).

I'm asking too much? This 2mV (or at least 5mV) audio signal could be amplified to a higher voltage?

No, you are not asking too much. An LM324 could do it with a circuit like this:-


simulate this circuit – Schematic created using CircuitLab

OA1 is configured as an audio amplifier with a voltage gain of about 500. C2 reduces the gain to 1 at DC, so the DC output voltage is equal to the input bias voltage of 2 V.

The next stage (OA2) is a comparator with hysteresis (created by R8) that squares up and inverts negative peaks of the amplified audio signal once they reach a threshold level of ~0.7 V (2 V - 1.3 V), corresponding to ~2 mV at the input. This output is fed through D1 to charge C3.

When the audio level drops below 2 mV OA2's output stays low so C3 discharges through R9. OA3 is another comparator with hysteresis which squares up and inverts the voltage on C3 to produce a 'digital' output that goes high for muting the audio (using whatever method you decide, eg. turn on a transistor to 'short out' the audio signal, operate an analog transmission gate etc.). If you need low output for mute then just configure the 4th op amp in LM324 as an inverter.

  • \$\begingroup\$ Hi Bruce Abbott, thanks for your feedback! I was unable to simulate it in CircuitLab, because I'm no member - so I'm unable to add some ac low-voltage signal to test it. But I built and simulated your draw (please see on tinyurl.com/uvjndyp), and get the same results what I get everytime: output "fluctuation" is the same as input, not multiplied. Maybe Falstad's simulator has issues on opAmps? I really dunno, also several ppl made use of his site, pretty intuitive. Also note that yours 2nd and 3nd opAmp are without Vcc, it's like that? I got same results with Vcc hooked. Thanks. \$\endgroup\$
    – user243993
    Commented Mar 1, 2020 at 4:23
  • \$\begingroup\$ Addendum: In "no file" label, it's the audioInput, I usually load the demo.mp3 on winamp folder. Also note that I edited the opening thread, dunno if while you was reading it :) \$\endgroup\$
    – user243993
    Commented Mar 1, 2020 at 4:30
  • 1
    \$\begingroup\$ I simulated it in LTspice. I only use circuit lab to put schematics into replies here because that's what this site prefers. It makes nice drawings, but sucks as a simulator (Falstad sucks too). LM324 has 4 op amps in one IC so only needs Vcc and ground on one (dunno if circuit lab handles that, I never simulated anything with it!). If you want to really test the circuit then build it with real components! \$\endgroup\$ Commented Mar 1, 2020 at 6:48
  • \$\begingroup\$ The best tool is the one you know how to use. Warezmann for got to add supply lines to two Op Amps and they are too complex to run in real-time, . Also there was no Gnd symbol , and no audio file, So I fixed all that. tinyurl.com/vykenlx . before seeing your design I did it my way. tinyurl.com/ry26r69 using ideal OA's but I define Voh,Vol. However the root cause is HISS which may be solved in better ways. \$\endgroup\$ Commented Mar 1, 2020 at 10:14
  • \$\begingroup\$ Your design again in real-time with graphs tinyurl.com/txq7hfg In mine, I reduced to 2 OA's. \$\endgroup\$ Commented Mar 1, 2020 at 10:25

After tl;dr "Reading" your specs: signal = 5mV and Supply = 5V and offering my fixes to your Falstad design, I decided to give an answer. enter image description here

I chose 2s for turn off delay, but you can easily change this. You can add C coupling to input if not available on the source. I chose Voh=3V based on LM324 using Vcc=5V.

Theory of Op.

  1. Half-wave +ve rectifier with gain = 1k with 1M 1uF decay time and diode Rs 1uF attack time
  2. Comparator using 455 mV threshold so fast attack and slow decay turn off with the rectified signal going from 0 to 2.5V
  3. RED LED indicates MUTE is ON.
  • \$\begingroup\$ Hi @Tony , thanks for the feedback. I summed my last topic edit, to make it cleaner. I guess I still have some issue on grounding - or lack of, I'm mounting the project in a PVC pipe. \$\endgroup\$
    – user243993
    Commented Mar 3, 2020 at 7:03

Your question is not very clear. If you want a logic signal that indicates the presence of an audio signal that is greater than x mV peak and y hertz, that can be done with a comparator in what is called a missing-pulse detector, a version of a retriggerable monostable multivibrator. A more detailed question gets a more detailed answer.

  • \$\begingroup\$ Hi AnalogKid, thanks for your feedback. I edited the opening thread to clarify a lil' more. \$\endgroup\$
    – user243993
    Commented Mar 1, 2020 at 3:21

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.