Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Very simple audio activated relay (PTT)

Status
Not open for further replies.

neazoi

Advanced Member level 6
Joined
Jan 5, 2008
Messages
4,119
Helped
13
Reputation
26
Reaction score
15
Trophy points
1,318
Location
Greece
Activity points
36,918
Hi, I want to make a simple ptt driven by the sound card of the PC. I have connected a 2n7000 source to the ground and the drain to a relay coil (with internal diode) then the other contact of the relay coil to the vcc. The 2n7000 pulsates the relay on and off when I touch the gate with my finger, possibly because my hand acts as a receiver antenna for the hum in the lab. The point is, if the mosfet is that sensitive, why can't I make it turned on by the audio of the sound card after rectifying it with a germanium diode?
 

why can't I make it turned on by the audio of the sound card after rectifying it with a germanium diode?
You surely can.

Sounds like you are thinking about audio voltage level and MOSFET Vgs threshold. What did you find out?
 
  • Like
Reactions: neazoi

    neazoi

    Points: 2
    Helpful Answer Positive Rating
You surely can.

Sounds like you are thinking about audio voltage level and MOSFET Vgs threshold. What did you find out?

Well, i connected the gate of the 2n7000 to a germanium diode, then it's other end to the audio output of the sound card. I also connected a shunt capacitor to the gnd, from the gate and then from the soundard output, to see what happens. I set the volume to maximum and I produced in software 1KHz tone. But nothing happens. On the gate I measure on the scope something like 60mV or 200mV (I am not sure now which of the two values I measured as I am away from the lab).

It is only when I disconnect the ground from the PC ground that the relay again pulsates, probably receiving RF noise from the PC itself.
 

The 2N7000 can need up to 3V on it's gate (relative to source) before it starts to conduct. Allowing for the diode drop, you probably need 3.5V audio peaks to drive it into conduction. That equates to about 1.5W of audio if you are driving it from a loudspeaker output. Line level output will be too low to use.
Also check that the PC still produces audio when the output is unloaded, some have sense circuits that drop the audio level considerably when it sees a high impedance, you might have to wire a resistor (~22 Ohms) across the output to simulate a loudspeaker being connected.

Warning: even though the 2N7000 is an enhancement mode FET, you can easily damage it by excessive gate voltage, disconnecting the ground or injecting body static into it is likely to kill it.

You might find a small BJT works better in this application as base current is readily available and the turn-on voltage is much lower.

Brian.
 

The 2N7000 can need up to 3V on it's gate (relative to source) before it starts to conduct. Allowing for the diode drop, you probably need 3.5V audio peaks to drive it into conduction. That equates to about 1.5W of audio if you are driving it from a loudspeaker output. Line level output will be too low to use.
Also check that the PC still produces audio when the output is unloaded, some have sense circuits that drop the audio level considerably when it sees a high impedance, you might have to wire a resistor (~22 Ohms) across the output to simulate a loudspeaker being connected.

Warning: even though the 2N7000 is an enhancement mode FET, you can easily damage it by excessive gate voltage, disconnecting the ground or injecting body static into it is likely to kill it.

You might find a small BJT works better in this application as base current is readily available and the turn-on voltage is much lower.

Brian.

How about this one?
http://www.learningaboutelectronics.com/Articles/P-channel-JFET-switch-circuit.php
A simple potential difider could set it up at the threshold of conduction. Then the rectified audio (or unrectified?) can do the rest, even at low level.
I have ordered J175 to try it, but I am not sure if my idea will work.

- - - Updated - - -

This is what I am talking about
 

Attachments

  • Capture.PNG
    Capture.PNG
    3.8 KB · Views: 141

That's a very odd tutorial. Using a JFET with the load in it's source and disconnecting a 'turn off' supply to it's gate is not at all reliable and could even damage the FET. It should at least include a resistor to pull the gate voltage back up when the switch is opened.

I seriously doubt your pictured circuit will work as you intend. Make sure you connect the FET with source towards the relay and not the conventional way! You can probably find a trigger point where the relay 'nearly' operates then give it a final push with the audio but at best you will apply audio to the relay coil and make it chatter or squeal.

Be careful with the ratings of the J175, it isn't intended to be used as a power switch like that. Even when fully conducting, it has a drain-source resistance of up to 125 Ohms so be careful it doesn't get too hot while passing the relay coil current. You may need a supply several volts higher than the coil rating to have enough to operate it.

Are you intending to drive it from the loudspeaker output or a line level output?

Brian.
 

That's a very odd tutorial. Using a JFET with the load in it's source and disconnecting a 'turn off' supply to it's gate is not at all reliable and could even damage the FET. It should at least include a resistor to pull the gate voltage back up when the switch is opened.

I seriously doubt your pictured circuit will work as you intend. Make sure you connect the FET with source towards the relay and not the conventional way! You can probably find a trigger point where the relay 'nearly' operates then give it a final push with the audio but at best you will apply audio to the relay coil and make it chatter or squeal.

Be careful with the ratings of the J175, it isn't intended to be used as a power switch like that. Even when fully conducting, it has a drain-source resistance of up to 125 Ohms so be careful it doesn't get too hot while passing the relay coil current. You may need a supply several volts higher than the coil rating to have enough to operate it.

Are you intending to drive it from the loudspeaker output or a line level output?

Brian.



No I intend to drive it directly from the laptop's sound card phones output, the green plug. He connects the drain to the ground.
I was trying to find a way to do it reliably in a single devise. I thought that the "already on" feature of the JFETs would allow me to set the bias in a critical point that the FET does not conduct. Then the extra audio would make it conduct. This would give max sensitivity.
Maybe I should better use the J174 which can pass more current? My relay draws 30mA at 9v.
And maybe I should first rectify audio and feed the DC as an extra bias to the gate somehow, to turn it on?
Any suggestions are really valuable!

- - - Updated - - -

No I intend to drive it directly from the laptop's sound card phones output, the green plug. He connects the drain to the ground.
I was trying to find a way to do it reliably in a single devise. I thought that the "already on" feature of the JFETs would allow me to set the bias in a critical point that the FET does not conduct. Then the extra audio would make it conduct. This would give max sensitivity.
Maybe I should better use the J174 which can pass more current? My relay draws 30mA at 9v.
And maybe I should first rectify audio and feed the DC as an extra bias to the gate somehow, to turn it on?
Any suggestions are really valuable!


Why did I think of the P-JFET?
Why not use a 2N7000 enhancement MOSFET set near its threshold voltage?
 
Last edited:

Even at 30mA the J174 would drop 3.75V when fully conducting and it would dissipate at least 112mW so it wouldn't be a good solution. They are really intended to be used as signal switches in situations of low voltage and very low current.

You could use a 2N7000, it would be far more efficient in terms of power loss but I'm still not sure it will do what you want.

If my assumption is correct, what you need is a circuit that reacts relatively slowly (tens of mS) to an audio input and holds on for say 500mS in the absence of audio before switching off. That gives good immunity to impulse noise and continuity between words in speech.

The best way to do that is to rectify the audio and filter it to extract the envelope but not component frequencies then send it to one input of a comparator. The other input goes to an adjustable voltage to set the switching threshold. The comparator output drives the relay.

The LM339 comparator comes to mind as it's threshold goes down to zero but it would not drive your relay directly, you would still need a transistor to drive it. The LM311 can drive the relay but isn't so good when the threshold is very close to ground. If you use one of those, I strongly advise that you stabilize the threshold voltage, especially if you are using a battery supply. If the threshold voltage varies as the relay draws current you can get some very strange feedback effects!

Brian.
 

If my assumption is correct, what you need is a circuit that reacts relatively slowly (tens of mS) to an audio input and holds on for say 500mS in the absence of audio before switching off. That gives good immunity to impulse noise and continuity between words in speech.

Brian.

Not exactly. I actually do not care about the switch on/off timing. When audio (a single tone) is present at the output of the sound card the relay must be switched on quickly. Then it must be kept on for as long as the tone presents there. When the tone stops, then the relay must be switched off quickly. This will allow higher "data rates". I do not care about any "key clicks" for this simple circuit.

I was hoping on a simplistic circuit with low components count, not an IC based circuit. Maybe a small transformer (although more rare) would help in stepping up the audio of the sound card so that no other component other than a diode and the 2n7000 is needed?
This would also isolate the grounds. The attached image is similar to this but it uses a bridge and I would prefer a doubler instead or maybe just a single diode and a capacitor to ground would be enough to switch on the bjt

Another idea: I have tried a 1.5v IR LED if this can be switched on with just the audio tone. But it did not. If this could, I would point this to a phototransistor and hopefully I could drive the relay with just two components. But it did not light up as I said...
 

Attachments

  • feldhell keyer.PNG
    feldhell keyer.PNG
    43 KB · Views: 111
Last edited:

Your problem there is you start with a signal that is probably only a few hundred mV then feed it through a bridge rectifier and expect > 0.6V to come out.

I would first look at exactly what the source signal looks like with an oscilloscope so you can get some idea of it's amplitude. Try with and without a load resistor to simulate a loudspeaker as many PC sound systems adapt their outputs according to the load they see connected. They pass a small DC current through the load and detect the voltage dropped across it to see if it looks like a loudspeaker, headphones or line (1K) load and set the output level accordingly. You probably want loudspeaker simulation so it provides most output without amplification.

When you know what the source looks like, you can decide whether it needs amplifying or requires an offset. If you are using half duplex "HELLSCHREIBER" mode you do need fast switching but it would be best done electronically rather than by relay as it may have to switch RX/TX/RX on every character sent.

The method I use is based on a "SignaLink USB" box. Mine died after a while so I opened it up and traced the schematic. It uses an op-amp to boost the level then uses the comparator inside a PIC to trigger a timer. The timer period is set by a front panel control and read by the PIC ADC. The PIC had died so I wrote my own code to replicate the original function. With the delay at minimum it does exactly what you are trying to do but in a spectacularly complicated way!

Brian.
 
  • Like
Reactions: neazoi

    neazoi

    Points: 2
    Helpful Answer Positive Rating
Your problem there is you start with a signal that is probably only a few hundred mV then feed it through a bridge rectifier and expect > 0.6V to come out.

I would first look at exactly what the source signal looks like with an oscilloscope so you can get some idea of it's amplitude. Try with and without a load resistor to simulate a loudspeaker as many PC sound systems adapt their outputs according to the load they see connected. They pass a small DC current through the load and detect the voltage dropped across it to see if it looks like a loudspeaker, headphones or line (1K) load and set the output level accordingly. You probably want loudspeaker simulation so it provides most output without amplification.

When you know what the source looks like, you can decide whether it needs amplifying or requires an offset. If you are using half duplex "HELLSCHREIBER" mode you do need fast switching but it would be best done electronically rather than by relay as it may have to switch RX/TX/RX on every character sent.

The method I use is based on a "SignaLink USB" box. Mine died after a while so I opened it up and traced the schematic. It uses an op-amp to boost the level then uses the comparator inside a PIC to trigger a timer. The timer period is set by a front panel control and read by the PIC ADC. The PIC had died so I wrote my own code to replicate the original function. With the delay at minimum it does exactly what you are trying to do but in a spectacularly complicated way!

Brian.

The idea seems to work. I placed a 2n7000, the source to the gnd, the drain to the relay and then to the vcc (the relay has internal diode) and the gate to the wiper of a potentiometer. One end of the potentiometer to gnd and the other to vcc. I set the potentiometer so that the relay is just switched off. Then I apply audio to the gate through a capacitor. The relay pulsates to the rate of the audio. I haven't tried yet, but I think a diode rectifier before the gate will do the trick. I wonder if i somehow can avoid the extra diode, use the fet's internal diode or whatever?
 

Your problem there is you start with a signal that is probably only a few hundred mV then feed it through a bridge rectifier and expect > 0.6V to come out.

I would first look at exactly what the source signal looks like with an oscilloscope so you can get some idea of it's amplitude. Try with and without a load resistor to simulate a loudspeaker as many PC sound systems adapt their outputs according to the load they see connected. They pass a small DC current through the load and detect the voltage dropped across it to see if it looks like a loudspeaker, headphones or line (1K) load and set the output level accordingly. You probably want loudspeaker simulation so it provides most output without amplification.

When you know what the source looks like, you can decide whether it needs amplifying or requires an offset. If you are using half duplex "HELLSCHREIBER" mode you do need fast switching but it would be best done electronically rather than by relay as it may have to switch RX/TX/RX on every character sent.

The method I use is based on a "SignaLink USB" box. Mine died after a while so I opened it up and traced the schematic. It uses an op-amp to boost the level then uses the comparator inside a PIC to trigger a timer. The timer period is set by a front panel control and read by the PIC ADC. The PIC had died so I wrote my own code to replicate the original function. With the delay at minimum it does exactly what you are trying to do but in a spectacularly complicated way!

Brian.

I think I did it. 6 components including the relay and if the relay has an internal diode, 5 components.
The advantage is that it does not use harder to find schottky diodes or germanium ones.
Also, there is no voltage drop since there are no diodes and the audio does not need to be switched all the way up. In my case it was about 70%.
Also the sensitivity can be varied a bit using the bias pot.

Here is how I see it working, which is different from the diode rectification.
The transistor acts as an AF amplifier. The pot, sets the bias so that the relay is just switched on. However the relay pulsates to the audio rate (tone) because there is no rectification. The capacitor on the relay contacts, delays the switching off of the relay and the relay no more pulsates.
I have tested it with 10uF at the relay and it works reliably from 200Hz tone and up and as said, on 70% volume only. CW speeds of 5wpm to 25wpm were tested reliably.

What do you think of my idea?

- - - Updated - - -

I think I did it. 6 components including the relay and if the relay has an internal diode, 5 components.
The advantage is that it does not use harder to find schottky diodes or germanium ones.
Also, there is no voltage drop since there are no diodes and the audio does not need to be switched all the way up. In my case it was about 70%.
Also the sensitivity can be varied a bit using the bias pot.

Here is how I see it working, which is different from the diode rectification.
The transistor acts as an AF amplifier. The pot, sets the bias so that the relay is just switched on. However the relay pulsates to the audio rate (tone) because there is no rectification. The capacitor on the relay contacts, delays the switching off of the relay and the relay no more pulsates.
I have tested it with 10uF at the relay and it works reliably from 200Hz tone and up and as said, on 70% volume only. CW speeds of 5wpm to 25wpm were tested reliably.

What do you think of my idea?

A JFET is shown but I have used the 2n7000
 

Attachments

  • rly.GIF
    rly.GIF
    2.4 KB · Views: 101

I think I did it. 6 components including the relay and if the relay has an internal diode, 5 components.
The advantage is that it does not use harder to find schottky diodes or germanium ones.
Also, there is no voltage drop since there are no diodes and the audio does not need to be switched all the way up. In my case it was about 70%.
Also the sensitivity can be varied a bit using the bias pot.

Here is how I see it working, which is different from the diode rectification.
The transistor acts as an AF amplifier. The pot, sets the bias so that the relay is just switched on. However the relay pulsates to the audio rate (tone) because there is no rectification. The capacitor on the relay contacts, delays the switching off of the relay and the relay no more pulsates.
I have tested it with 10uF at the relay and it works reliably from 200Hz tone and up and as said, on 70% volume only. CW speeds of 5wpm to 25wpm were tested reliably.

What do you think of my idea?

- - - Updated - - -



A JFET is shown but I have used the 2n7000

A 2n2222 bjt works better there, more reliably. I have tested it
 

Mains hum on a high Z node can be many volts, and
MOSFET Cgs is nothing at 60Hz.

Line out on the audio card is probably 1V P-P max.

You probably want a gain block, envelope detect,
compare type lineup and I'd suggest rejecting both
very high (EMI) and very low (hum) frequencies.
Might consider a cheap PLL chip set up to detect
(say) 1kHz - bearing in mind >= 10 cycles to lock
and unlock so very slow actuation at audio freqs.
LM567 maybe? Saturated switch to GND, maybe
a switching PNP following that to get a default=
off, arbitrary high side drive swing (if you are
against a cheapo inverting MOSFET driver or in
the case of a logic level FET, maybe just all 6
channels of a 74HC14 paralleled).
 

Mains hum on a high Z node can be many volts, and
MOSFET Cgs is nothing at 60Hz.

Line out on the audio card is probably 1V P-P max.

You probably want a gain block, envelope detect,
compare type lineup and I'd suggest rejecting both
very high (EMI) and very low (hum) frequencies.
Might consider a cheap PLL chip set up to detect
(say) 1kHz - bearing in mind >= 10 cycles to lock
and unlock so very slow actuation at audio freqs.
LM567 maybe? Saturated switch to GND, maybe
a switching PNP following that to get a default=
off, arbitrary high side drive swing (if you are
against a cheapo inverting MOSFET driver or in
the case of a logic level FET, maybe just all 6
channels of a 74HC14 paralleled).

Well, it sounds too complicated. I 've done it in a few components. See the very end of this page https://192.168.2.50/allbandtrx/index.htm

- - - Updated - - -

Well, it sounds too complicated. I 've done it in a few components. See the very end of this page
https://qrp.gr/allbandtrx/index.htm
 


Hi neazoi,

Hope you are well. Are the links working? I couldn't get either to open just now.
 

I have no doubt it works for you but it may not work for others. It is probably frequency sensitive and certainly level sensitive. Holding the relay coil at low current so it only takes a small extra kick to operate it is not efficient and you probably find it draws current even when the relay isn't energized. I appreciate it's simplicity but someone driving with a different sound card or at a different level may find it doesn't work or the relay contacts are suspended somewhere between open and closed which could cause erratic operation. Personally, I would still use a circuit that has a more positive on and off operation.

Brian.
 
  • Like
Reactions: neazoi

    neazoi

    Points: 2
    Helpful Answer Positive Rating
I have no doubt it works for you but it may not work for others. It is probably frequency sensitive and certainly level sensitive. Holding the relay coil at low current so it only takes a small extra kick to operate it is not efficient and you probably find it draws current even when the relay isn't energized. I appreciate it's simplicity but someone driving with a different sound card or at a different level may find it doesn't work or the relay contacts are suspended somewhere between open and closed which could cause erratic operation. Personally, I would still use a circuit that has a more positive on and off operation.

Brian.
No it is not frequency sensitive (at least with this relay) it works fine from 100Hz to 3KHz.

I used a miniature SMD relay. The level of the sound it could be triggered was 30%. So this leaves a lot of headroom for weaker sound cards. I have tried it on a laptop, so I do not think the audio out level would be great anyway. I have also used only one of the channels.

I have noticed the relay-in-between or else not dully switched behaviour you mentioned. This was at a bit less than 30%. Just to be sure, I increased the level of the audio signal to 50% or greater, just to make sure the relay will be fully switched on. I think there is enough headroom for weaker sound cards.

But I have not tried it with other relays, even bigger ones so you might have a point there.

An advantage is that I could possibly use the same keyer as an extra audio amplifier on RX. See the very last schematic on my page. I have just finished the cirquir and I am going to test this now.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top