Audio Detector Switch

wayneh

Joined Sep 9, 2010
17,496
Yes, it is. The diode D1 makes sure that C4 can only discharge slowly through the 10M resistor R11. So once turned on, it will stay on until the voltage on C4 falls thru the threshold area to off.
 

Thread Starter

tracecom

Joined Apr 16, 2010
3,944
Yes, it is. The diode D1 makes sure that C4 can only discharge slowly through the 10M resistor R11. So once turned on, it will stay on until the voltage on C4 falls thru the threshold area to off.
Thanks.

I breadboarded the LM1458 circuit this afternoon (all except the MOSFET and relay) using a regulated 12.03 V power supply. I changed C4 to 10μF and connected my DMM to the cathode of D1. I found that with no input from my MP3 player, the voltage was stable at 1.77 V, and with output the voltage fluctuated from about 9 to 11 V. Pressing the play button on the MP3 player, I could see the output at D1 immediately jump from 1.77 V to the 9 - 11 V area. Pressing the pause button (actually the same button) caused the output to decrease from 9 -11 V to 1.77 V over a period of about 5 seconds, although I didn't actually time it.

The surprise was that with the MP3 player paused, when I pressed the off button, the voltage would immediately rise to 9 - 11 V, and then decay back to 1.77 V. Do you think there a way to prevent that?
 

Attachments

Last edited:

wayneh

Joined Sep 9, 2010
17,496
Do you think there a way to prevent that?
Don't press the button! :p

Returning C4 to a larger value might help, as might increasing the value of R9 a bit, for instance to 1K. Both of these would act to prevent a brief spike from actually raising the gate voltage, the voltage across C4.
 

Thread Starter

tracecom

Joined Apr 16, 2010
3,944
Don't press the button! :p

Returning C4 to a larger value might help, as might increasing the value of R9 a bit, for instance to 1K. Both of these would act to prevent a brief spike from actually raising the gate voltage, the voltage across C4.
Thanks again. I changed C4 back to 100 μF, and R9 to 1k. These changes reduced the duration and the magnitude of the voltage spike, but did not eliminate it.

My objective is to turn a battery powered amplifier on/off by simply starting and stopping the MP3 player.

I really like the circuit in post #1 better for several reasons: it uses fewer components; it runs on 5 V; and the quiescent current of the op-amp is much lower. However, I haven't found a source for the LMC7215 in a through hole package.
 
Last edited:

wayneh

Joined Sep 9, 2010
17,496
It would probably be better to "integrate" the input signal than try to integrate the op-amp output, although I suppose either approach gives the same end result. Maybe you just need 1000µF.
 

Thread Starter

tracecom

Joined Apr 16, 2010
3,944
It would probably be better to "integrate" the input signal than try to integrate the op-amp output, although I suppose either approach gives the same end result. Maybe you just need 1000µF.
Thanks for your help. A 1000 μF cap makes the release time way too long. I ordered some breakout boards for the SOIC8 LMC7215, and will build that circuit to try.
 

Thread Starter

tracecom

Joined Apr 16, 2010
3,944
I finally got the circuit attached to post 1 built and sort of working. I haven't put a MOSFET in yet; I am looking at the output to see if it is going high in response to an audio signal input.

The input is about 500 mVpp and the output is responding, but it is essentially following the audio input peaks. What I want to do is use the output to turn on an amplifier whenever there is audio and turn it off when there is no audio. So, the output needs to stay high for several seconds after the input stops in order not to cycle on and off rapidly.

On a similar circuit using an LM1458, I found that increasing the size of the output cap held the output high. That doesn't seem to work on this circuit; going from .1 μF to 1 μF seems to make an improvement, but further increasing the capacitance seems to have no effect.

What can I try in order to hold the output high for 30 seconds or so after the audio input stops? I don't want to add any more components than absolutely necessary.

Thanks.

I should add that I am using a 5 V power supply instead of the 3 V shown in the schematic.
 

KrisBlueNZ

Joined Oct 17, 2012
111
Hi tracecom,

I like the LMC7215 circuit. I would use that, rather than the 1458-based design. You don't need to use that device though, especially if you're running it at 5V instead of 3V (which is fine). Pretty much any op-amp or comparator will do (except a comparator with an open-collector output).

Actually it would be better to operate the device at a higher voltage, say 9V, then you can guarantee that you'll have enough gate voltage to properly saturate the MOSFET. What voltage do you want to switch?

With that design, the input voltage requirement is proportional to the power supply voltage; to accommodate changes in supply voltage, decrease the 150k resistor in proportion to the increase in power supply voltage. So if you're running it at 9V instead of 3V, reduce the 150K resistor to 50K (or 47K).

Increasing the gate-source capacitor definitely should increase the hold-on time. Remember that your multimeter has an input resistance of 10 megohms (presumably), and connecting it across that capacitor will make it discharge noticeably more quickly than it would without the multimeter - the parallel resistance of the 4M7 resistor and 10M is 3M2 instead of 4M7. This is a fairly small change though, and the hold-on time is still directly proportional to the capacitor value.

If you'd rather switch the positive rail, this circuit can be redesigned to use a P-channel MOSFET; if you use a comparator with an open-collector output like the LM393 (dual), you can avoid the diode as well!
 

Thread Starter

tracecom

Joined Apr 16, 2010
3,944
Hi tracecom,

I like the LMC7215 circuit. I would use that, rather than the 1458-based design. You don't need to use that device though, especially if you're running it at 5V instead of 3V (which is fine).
I need an opamp with a low current drain because it will be on all the time monitoring the output from the MP3 player.

Thanks for your comments. I will reread them later today when I have time to focus. :)
 

hupa

Joined May 19, 2011
8
I have done this using an limiting OP amp, detector and timing 'hang' for gaps in the audio. I shall sketch out a circuit and post if you like.
It is doing A1 service as a 'silence' detector in a community radio station.
 

Thread Starter

tracecom

Joined Apr 16, 2010
3,944
I have done this using an limiting OP amp, detector and timing 'hang' for gaps in the audio. I shall sketch out a circuit and post if you like.
It is doing A1 service as a 'silence' detector in a community radio station.
I would like to see your circuit. Thanks.
 

hupa

Joined May 19, 2011
8
What you're after is called a 'VOX' circuit and there are lots about.
This design is well proven - It was built up as part of an FM transmitter to remotely turn it on in the presence of Audio. Hang time in this instance was set to 4 minutes or thereabouts - so quiet classical music passages didnt turn off. I 'inverted it' for another application to detect audio silence. It is essentially the same. ie an audio preamp; a limiter; detector; and switch. Hold times for 'silence' being set much shorter in this scene.
I sketched out 2 cuircuits for you - The first being what I have used, and used split supply rails ( +12, and -12V). I dreamt up a simplified version using a single supply rail and no preamp. I recon it would work down to +5V supply with low voltage OP amps. LED's back to back make good clippers so I threw some in for variation.
I hope I can attach the sketch circuit
 

Attachments

KrisBlueNZ

Joined Oct 17, 2012
111
hupa, I think your circuit is unnecessarily complicated and doesn't offer any actual advantages over the single op-amp or comparator circuit presented earlier. The simpler circuit also has very low current consumption and simple power supply requirements, and adjustable sensitivity can be easily added. It does however only respond to one half of the AC waveform, i.e. the peak value (either positive or negative, but not both), whereas the charge pump method responds to the peak-to-peak voltage.

I see there's a series resistor in the charge pump, to stop the circuit from responding to very short bursts of noise. This is a good idea, and can easily be added to the simpler circuit.

Can you state any quantifiable advantges of your circuit over the very simple one?
 

hupa

Joined May 19, 2011
8
K
Tracecom asked me to post it.

And it was designed initially 30+ years ago as VOX for an FM transmitter t'other end of a long landline. Fets to drive relays were then hardly common, I was in a +-15V environment, and I had spare Op Amps to play with in a quad package.
I chose the 2 diode detector simply to get a bit more DC to switch with from the 4V or so P'P zener limited audio.
I resurrected the design recently as a 'Silence' detector for another Community Radio station, using it 'backwards' with fast attack and 15 or so sec hang, to switch in a backup Player doodad when the station automation fails, or a presenter doesnt show up.
Actually the sensitivity control & limiting is/was very useful for reliable 'hold' on quiet classical music for instance, and not do the wrong thing on noise.
Yes it is more than the basics, but it sure works ....
 

KrisBlueNZ

Joined Oct 17, 2012
111
hupa, sorry if I offended you. I don't mean to insult your circuit; I'm sure it works well, and was a good solution to the problem at the time. I know tracecom did ask you to post it. I'm sure it does work well, and it is interesting to see. And it does have an advantage over the simpler circuit, in the series resistor that prevents it from responding to very short signals such as transients. Thanks for your contribution.
 

Thread Starter

tracecom

Joined Apr 16, 2010
3,944
I sent an e-mail to the designer of the circuit in post 1 in the hope that he could make some suggestions, but the response was disappointing.

My e-mail:

I have breadboarded your Audio Activated Switch up to, but not
including, the MOSFET. Instead of the MOSFET, I have attached a 220 ohm
resistor and a red LED to the 1N4148 on the output of the LMC7215. My
goal is to use it to turn on a battery powered amplifier when it detects
an audio signal from an MP3 player.

If I turn the volume control on the MP3 player to maximum, the LED will
flash in sync with the peaks on the audio signal. There are two issues.
First, the output needs to stay high for several (about 30) seconds in
order to keep the external amplifier from cycling on/off with the audio
peaks. Second, the output from the MP3 player is on the order of 500
mVpp at max, and it seems that the LMC7215 should be more sensitive than
it appears. What do you suppose I have done wrong?

Thanks


His response:

The diode, resistor and capacitor feeding the gate of the FET forms a long 0.5 second time constant. That network is needed if you want to hold the switch closed. Why can't you use the FET to drive your LED? The circuit should work with just 0.05v peak signal.


 

KrisBlueNZ

Joined Oct 17, 2012
111
You're trying to drive an LED directly from the signal that's supposed to go to the MOSFET gate? You can't do that; the LED draws a lot of current, and will defeat the time constant implemented by the 4M7 and the capacitor. The MOSFET draws almost NO current, and doesn't affect the behaviour of the time constant circuit.

The reply from the author is exactly right. You can't drive the LED from the cathode of the diode. You need to use a MOSFET as a buffer.
 
Top