Maker Pro
Maker Pro

Activate tiny RELAY by headphone jack?? (PLEASE HELP)

supak111

★ƃuᴉɯǝɥɔs sʎɐʍlɐ★
Apr 29, 2012
341
Joined
Apr 29, 2012
Messages
341
Hi everyone, newbie here building an electronic project. Any help is greatly appreciated. Thanks everyone.

I am trying to make a 3.5mm headphone jack activate a small relay. AC voltage coming out of the headphone jack is very very small, what would be the best way to activate a small relay with the tiny speaker voltage? The relay itself wont have much going through it, 1 watt at 12volt maybe even less then 1 watt. Relay just needs turn ON and then turn OFF few seconds after.

I can't seem to find any cheap relays that will activate at such low AC speaker voltage. Main thing here is to make it cheap, small, and easy. Best would be if I could buy something pretty cheap off the shelf/internet and not have to built it at all because I might need many of them.

Any thoughts or suggestions are welcome. And sorry if its a stupid question but I don't know how to accomplish this.
 

jackorocko

Apr 4, 2010
1,284
Joined
Apr 4, 2010
Messages
1,284
the question that needs to be answered, does the signal on the jack need to do something other then turn on a relay?
 

duke37

Jan 9, 2011
5,364
Joined
Jan 9, 2011
Messages
5,364
This looks impossible without an amplifier and power supply.
What is very small?

Gas central heating boilers use a thermocouple to drive a relay but this is DC.
If you rectify the signal to get DC you will lose voltage in the diodes.
If you need the relay to hold for a time, you will need a capacitor and sufficient power to charge it up.
 

supak111

★ƃuᴉɯǝɥɔs sʎɐʍlɐ★
Apr 29, 2012
341
Joined
Apr 29, 2012
Messages
341
the question that needs to be answered, does the signal on the jack need to do something other then turn on a relay?

No I can play pretty much any sound I want, the sound does NOT need to do anything other then just turn on the relay. I am thinking about using a TRANSISTOR but again I'm kinda of a newbie so exactly if that is possible or not I do not know.
 

CocaCola

Apr 7, 2012
3,635
Joined
Apr 7, 2012
Messages
3,635
You should be able to get something working with a LM3915, once adjusted/calibrated for your input levels, just use a transistor on the appropriate output pin to drive the relay... Hardly the most eloquent solution but for someone without much experience they are likely to get it working without much effort... You can even purchase DIY UV meter kits built around this chip that would only require the small modification/addition of the transistor and relay...
 

duke37

Jan 9, 2011
5,364
Joined
Jan 9, 2011
Messages
5,364
You can use a transistor or intgrated circuit to amplify the signal to switch a high power. In order to do this, you will need a power supply which I thought you did not want.
 

supak111

★ƃuᴉɯǝɥɔs sʎɐʍlɐ★
Apr 29, 2012
341
Joined
Apr 29, 2012
Messages
341
You can use a transistor or intgrated circuit to amplify the signal to switch a high power. In order to do this, you will need a power supply which I thought you did not want.

You are right I don't want a power supply, it would make it complicated. How about if I just connect the 2 sound wires from the PhoneJack to Base&Emitter of the Transistor, wouldn't that make the Collector&Emitter a tiny switch/relay? I could add a few diodes to make everything direcitonal and rectify the AC sound voltage into DC voltage again by diodes right?

What I forgot to mention is that it doesn't necessarily needs to be a relay, a switch operated by the PhoneJack would work as well.
 
Last edited:

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
You could use the signal to switch a mosfet. Rectify it, charge a capacitor, and provide a suitable discharge resistor. Use this voltage to switch a logic level mosfet.

The problem is that it wouldn't go from fully on to fully off immediately.
 

supak111

★ƃuᴉɯǝɥɔs sʎɐʍlɐ★
Apr 29, 2012
341
Joined
Apr 29, 2012
Messages
341
You could use the signal to switch a mosfet. Rectify it, charge a capacitor, and provide a suitable discharge resistor. Use this voltage to switch a logic level mosfet.

The problem is that it wouldn't go from fully on to fully off immediately.

This could work perfect, its simple and I don't think not going from ON to OFF immediately would be a problem.
 

QuantumCheese

Apr 27, 2012
74
Joined
Apr 27, 2012
Messages
74
I have one idea..... a 3.5mm headphone jack normally has three pins - so that the 'speakers' can be cut off while using headphones.

So there's your switch. now you just need sufficient DC to a) drive the relay. and use an RC to determine the off time as suggested by (*steve*).

trouble is we are assuming there is sufficient 'sound' at the point of insertion to drive all this? what if it's a quiet bit? can you energy harvest the signal before plugging in the jack - with a rectifier and a cap, then the switch-on would happen when you want it to & not 'some time' later?
 

supak111

★ƃuᴉɯǝɥɔs sʎɐʍlɐ★
Apr 29, 2012
341
Joined
Apr 29, 2012
Messages
341
I have one idea..... a 3.5mm headphone jack normally has three pins - so that the 'speakers' can be cut off while using headphones.

So there's your switch. now you just need sufficient DC to a) drive the relay. and use an RC to determine the off time as suggested by (*steve*).

trouble is we are assuming there is sufficient 'sound' at the point of insertion to drive all this? what if it's a quiet bit? can you energy harvest the signal before plugging in the jack - with a rectifier and a cap, then the switch-on would happen when you want it to & not 'some time' later?

Technically I'm not using the HeadphoneJack, I'm using the 2 wires coming out of a car CD player. Any two wires that normally go to speaker and have sound need to turn on this switch/relay
 

timothy48342

Nov 28, 2011
218
Joined
Nov 28, 2011
Messages
218
That changes a few things. What Steve said stil make the most sense if you don't want a power supply.
I think it would look like this, although the polarity of the diode might depend on the type of MOSFET and the image shows a polarized cap and a regular cap should be fine.
audioactivator.jpg


Just curious, since your messin around with the wires connecting to the back of the CD player and there is 12V +/- back there, why not use it. It opens up a lot more ways to do this.
--tim
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
The problem with the circuit above is that if the output is ground referenced you effectively short out the diode, and that the load needs to be able to share the same ground as the output signal.

My idea is an idea, but I'm not convinced it would be overly practical.
 

supak111

★ƃuᴉɯǝɥɔs sʎɐʍlɐ★
Apr 29, 2012
341
Joined
Apr 29, 2012
Messages
341
That changes a few things. What Steve said stil make the most sense if you don't want a power supply.
I think it would look like this, although the polarity of the diode might depend on the type of MOSFET and the image shows a polarized cap and a regular cap should be fine.
audioactivator.jpg


Just curious, since your messin around with the wires connecting to the back of the CD player and there is 12V +/- back there, why not use it. It opens up a lot more ways to do this.
--tim

I need to build it so the sound turns ON the switch. Using power from the back of the CD player would be easy but not what I need the finished device to do.

TESTING:
I just tried using a IRF640N mosfet, I connected the -12v power to light bulb, then other side of the bulb to Source on the mosfet, connected the Drain to +12v. Then connected the sound wires to Gate and base of the mosfet, PROBLEM in this setup is the mosfet always stay ON with or without sound in the wires. Even tried adding a diode in the sound wires but still same problem.
 

QuantumCheese

Apr 27, 2012
74
Joined
Apr 27, 2012
Messages
74
Technically I'm not using the HeadphoneJack, I'm using the 2 wires coming out of a car CD player. Any two wires that normally go to speaker and have sound need to turn on this switch/relay

!!! So not "I am trying to make a 3.5mm headphone jack activate a small relay" then.

Okay. For clarification here, are these two wires at line-level or the amplifier output? I know you said speakers but you did also say headphone jack before.
do you require this event to be a one off or pulse continuously with the sound levels?

/edit
I think IRF640N is a bit of overkill to drive a relay coil!
/
 
Last edited:

supak111

★ƃuᴉɯǝɥɔs sʎɐʍlɐ★
Apr 29, 2012
341
Joined
Apr 29, 2012
Messages
341
OK to clarify: I would be using the finished device on only 2 wires, sound WILL NOT be amplified.

So two sound wires coming out of a small mp3 player need to turn the switch ON, do not need it to pulse with sound. ON when there is sound, OFF with no sound. I will pick a sound file that fits best and is right length later.

And I just had some irf640n mosfets sitting around, again I'm a newbie didn't think it mattered which one it was.
 

duke37

Jan 9, 2011
5,364
Joined
Jan 9, 2011
Messages
5,364
I have not looked up the data for the IRF640 but it probably has a threshold voltage of 3 or 4V so will not do any thing with a signal below this. There are mosfets suitable for digital circuits with lower threshold voltages.

You could consider an audio transformer to raise the voltage to a level that will work.

The diagrams shown previously shows the FET to be off and turned harder off with signal input.

You should try to get a measure of the output voltage that you are dealing with so that an appropriate solution can be found.
 

QuantumCheese

Apr 27, 2012
74
Joined
Apr 27, 2012
Messages
74
OK to clarify: I would be using the finished device on only 2 wires, sound WILL NOT be amplified.

So two sound wires coming out of a small mp3 player need to turn the switch ON, do not need it to pulse with sound. ON when there is sound, OFF with no sound. I will pick a sound file that fits best and is right length later.

And I just had some irf640n mosfets sitting around, again I'm a newbie didn't think it mattered which one it was.

Thanks. No need to shout though.
So we are back to a headphone output stage, with not many volts and a few ohms output impedance (apparently an ipod is 5 ohms - not verified ) driving a switch...........hmmm
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
An audio transformer has the added benefit of isolating the mosfet's source from the signal.
 

QuantumCheese

Apr 27, 2012
74
Joined
Apr 27, 2012
Messages
74
An audio transformer has the added benefit of isolating the mosfet's source from the signal.

True, but i just don't think there is going to be enough juice available to hard switch anything!
I'm expecting anywhere between bouncing relay to nothing at all happening
 
Top