Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Turn on a switch from audio jack.

Status
Not open for further replies.

baxterdmutt

Member
I have a ham radio that I need to take the signal via the headphones jack and have it turn the on an external circuit when it in-squelches (when there is audio come through the speaker). I thought I might be able to run it into a rectifier and then use the DC signal I get from that to make a transitor go high and be the switch. It looks like I can get about 2v off the rectifier (well more than the .7v I would need for the transistors base.
Is there a better way to turn on a switch using an internal audio signal?
 
I have a ham radio that I need to take the signal via the headphones jack and have it turn the on an external circuit when it in-squelches (when there is audio come through the speaker). I thought I might be able to run it into a rectifier and then use the DC signal I get from that to make a transitor go high and be the switch. It looks like I can get about 2v off the rectifier (well more than the .7v I would need for the transistors base.
Is there a better way to turn on a switch using an internal audio signal?
... like a smart hi-side automotive power switch for the audio amp? with logic level threshold frmo Digikey?
 
Hy Baxter,

There are many ways to do what you want from a single transistor (BC546 for example) to a comparator (LM339) but we really need to know what you would like to switch. Can you provide exact details- that will help us answer your question better.

spec
 
Build a VOX circuit.
One of hundreds shown on the net ----> **broken link removed**
 
Most of my Ham rigs have a LED that lights when the squelch is opened by a signal. How about attaching an optical pickup (phototransistor) to the LED?
How about digging into the radio and bringing out the COS (Carrier Operated Squelch) signal that already exists in the radio (it is used to pass audio to the audio power amp, every FM receiver and most AM/SSB has it internal)?

If you intend to build an external VOX, use a 500Ω to 4/8Ω audio transformer backwards across the speaker output from the radio in place of the normal speaker. You will have ~20V of audio from the 500Ω side to rectify, maybe to drive a sensitive 5Vdc to 12Vdc relay with no other amplification...
 
Your circuit covers the basics. Source, diode, base current limiting resistor, base, emitter to GND, collector to the load. If the load is a relay and you don't want it to chatter as syllables come and go in the audio, add a capacitor from the diode cathode to GND. As above, there are tons of more complex circuits with various performance improvements, but depending on the circuit you are controlling, the 1-transistor approach might be good enough.

ak
 
I have an external speaker (Motorola) that has a built in amp. It was designed for a Motorola portable radio that had a built in switch on the squelch. The speaker was built so the amp stays off until the squelch opens. I can make it come on and stay on but then I'm always listening to a hum. The switching on the amp is 12volts. I haven't tested it but my understanding is that 12v is low amperage. I'm pretty sure a BJT could do it. My radio is a small handheld. Opening it up is not an option.

I've not done much with audio so I wasn't sure if I could/should do this the way I suggested. Audio is a bit more of a complex beast than just an AC sine wave so I wasn't sure how well a rectifier and some capacitors would do to convert that to DC.
Thanks
 
Hy Baxter,

Audio only goes from 20Hz to 20Khz so a diode like a 1N4148 or a transistor, like a BC546 would easily do the job. A normal rectifier diode like a 1N400x would be a poor choice though because of low frequency response and relatively high leakage current.

One question: why not just fix the hum in the speaker. That is liable to be quite simple if it is due to power supply ripple.

spec
 
Hy Baxter,

One question: why not just fix the hum in the speaker. That is liable to be quite simple if it is due to power supply ripple.
spec
I could do that but then the amp is always on and drawing power even if the radio is off. Also, I'm not sure if it's getting hum from the alternator, radio, transmitter or all of the above. If I can do a simple rectifier with a diode or two and a filter capacitor plus the transistor switching circuit, that seems pretty simple also. I just wasn't sure how well it would work. It sounds like the consensus here is that it should, so I'll throw a couple components together and see what shakes!

Thanks
 
Please let us know how you get on.:)

spec
I managed to make a simple rectifier and can get a couple volts out of it and turn on a transistor but I have no audio, so I'm going to have to isolate it with a transformer I guess. I hadn't thought of that before. I don't have a transformer that I can use, so unless someone has another way to isolate it, it'll be a little while before I find out how well this works.
 
I managed to make a simple rectifier and can get a couple volts out of it and turn on a transistor but I have no audio, so I'm going to have to isolate it with a transformer I guess. I hadn't thought of that before. I don't have a transformer that I can use, so unless someone has another way to isolate it, it'll be a little while before I find out how well this works.
Hy Baxter,

I'm not sure what is happening with your circuit. Could you post a schematic so we can see what you are doing.

Rather than requiring an isolating transformer, I suspect that you are loading the audio output.

spec
 
Hy Baxter,

I'm not sure what is happening with your circuit. Could you post a schematic so we can see what you are doing.

Rather than requiring an isolating transformer, I suspect that you are loading the audio output.

spec
Yup, you are correct. I went back to the breadboard and had a quick look and I shorted a jumper. I'm on the right track again! I haven't drawn out a schematic but once I know I'm really close, or I have another problem, I'll post one here. Thank again.
 
Yup, you are correct. I went back to the breadboard and had a quick look and I shorted a jumper. I'm on the right track again! I haven't drawn out a schematic but once I know I'm really close, or I have another problem, I'll post one here. Thank again.
Oh, that is good. I thought you may be stuck so I just did a circuit for you to experiment with:

2016_09_27: OBSOLETE. SEE POST 16

2016_09_26_Iss1_ETO_AUDIO_DETECTOR_Ver1.png
NOTES
(1) With no audio input the output will be 12V
(2) With 1.2V or more peak audio input the output will be around 100mV
(3) R23 can be adjusted to alter the sensitivity. If R23 is 100K the turn on point will be 0.6V peak
(4) R24 and C8 control the recovery delay which will be around a second. C8 can be changed to adjust the recovery delay.
(5) C17 is only a decoupler and should be a disk ceramic type of X7R dialectic (if possible)
(6) A PMOSFET (and another transistor) can be added to the circuit to turn the amp/speaker on/off once the circuit has been tested/proved
(7) The input impedance will be at least 10K so hopefully it will not load the audio output unduly
(8) Later, I can probably do a circuit using an LM339 quad comparator which should perform better and be simpler.
 
Last edited:
Oh, that is good. I thought you may be stuck so I just did a circuit for you to experiment with:

NOTES
(1) With no audio input the output will be 12V
(2) With 1.2V or more peak audio input the output will be around 100mV
(3) R23 can be adjusted to alter the sensitivity. If R23 is 100K the turn on point will be 0.6V peak
(4) R24 and C8 control the recovery delay which will be around a second. C8 can be changed to adjust the recovery delay.
(5) C17 is only a decoupler and should be a disk ceramic type of X7R dialectic (if possible)
(6) A PMOSFET (and another transistor) can be added to the circuit to turn the amp/speaker on/off once the circuit has been tested/proved
(7) The input impedance will be at least 10K so hopefully it will not load the audio output unduly
(8) Later, I can probably do a circuit using an LM339 quad comparator which should perform better and be simpler.
Thanks I did get myself confused. I think the talk on here about VOX got you thinking backwards to my needs as well. I need the output to go to 12v when there is audio and not the way you are showing.
 
Hy Baxter,

:) Here is the complete circuit:

spec

ISSUE 6 of 2016_09_27

2016_09_27_Iss5_ETO_AUDIO_DETECTOR_Ver2.png

NOTES
(1) With no audio input the output will be 0V
(2) With 1.6V peak, or more, audio input the output will be 12V with a current capability of 1A (more if PMOSFET, Q10, is on a heatsink)
(3) R26 value can be reduced to lower the sensitivity.
(4) R27 and C3 control the turn off delay which will be around a second. C3 can be reduced to shorten the turn off delay or increased to lengthen the turn off delay.
(5) C18 and C22 are only decouplers and should be disk ceramic type of X7R dialectic, at least 25V working. The values can be increased
(6) The input impedance will be at least 4.7K so, hopefully, it will not load the audio output unduly
(7) R28 is a gate stopper to prevent the PMOSFET from oscillating at high frequencies. R28 should be mounted directly on the MOSFET gate terminal.
(8) The amplifier will turn on fairly quickly and turn off fairly slowly so that no audio should be lost and there should not be any clicks and thumps from the speaker. Also the power will not be continuously turned on and off for small gaps in the audio.
(9) D3 protects Q9 emitter/base junction from negative input voltages
 
Last edited:
Hy Baxter,

:) Here is the complete circuit:

spec

**broken link removed**
NOTES
(1) With no audio input the output will be 0V
(2) With 1.2V or more peak audio input the output will be 12V with a current capability of 1A (more if PMOSFET, Q10, is on a heatsink)
(3) R23 can be adjusted to alter the sensitivity. If R23 is 100K the turn on point will be 0.6V peak
(4) R27 and C3 control the turn off delay which will be around a second. C3 can be changed to adjust the turn off delay.
(5) C18 and C22 are only decouplers and should be a disk ceramic type of X7R dialectic
(6) The input impedance will be at least 10K so hopefully it will not load the audio output unduly
(7) Many PMOSFET types will be suitable
(8) R28 is a gate stopper to prevent the PMOSFET from oscillating at a high frequency. R28 should be mounted directly on the MOSFET gate terminal.
(9) The amplifier will turn on fairly quickly and turn off fairly slowly so that no audio should be lost and there should not be any clicks and thumps from the speaker. Also the power will not be continuously turned off and on for small gaps in the audio.
WOW!!
Thanks Spec.
I'm very greatful for this. I would have put something together but it wouldn't have been nearly as elegant. I'm looking forward to giving it a try. Hopefully I'll have time tomorrow. I'll update you on my progress.
Thanks again.
 
No probs Baxter,

I hope the circuit works OK.:)

spec

(PS: best check post #16 from time to time for updates to the schematic)
 
Last edited:
Hy again Baxter,

Here is a better defined circuit which switches the 12V on and off sharply after a short delay to turn on and about a second to turn off.

spec

2016_10_03 OBSOLETE: see schematic in post #46

2016_09_28_Iss2_ETO_AUDIO_DETECTOR_Ver3.png
 
Last edited:
Hy again Baxter,

Here is a better defined circuit which switches the 12V on and off sharply after a short delay to turn on and about a second to turn off.

spec

Thanks again spec,
What is the benefits of the opamp in this application and how fast would it turn on as compared to the lesser circuit? A very fast turn on would be important to me.
Thanks.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top