I have a audio jack with a build in switch that when an nothing is plunged in the switch lead is grounded but when you plug something in its no longer grounded. I want to use this audio jack as a power switch so when you plug in something an arduino gets power and turns on.

I am not running power through the jacks, I am using them for audio in my project. I am making a small box with no visible switches that when you plug in some ear phones it turns on and plays music. I just need some kind of switch or relay that will turn on the device when the switch leg if of the audio jack is no longer connected to ground.

enter image description here

I am not sure how to make this circuit, maybe there is some kind of transistor or relay that works this way but i just don't know about it.

Please help.

  • \$\begingroup\$ Don't you think a photo would be a good idea? \$\endgroup\$ – Transistor Aug 25 '16 at 22:08
  • \$\begingroup\$ A photo wont really help, the audio jack as three legs, a positive, negative and switch. The switch leg is connected to ground when nothing is plugged in but when something is plugged in it breaks the ground connection. \$\endgroup\$ – jardane Aug 25 '16 at 22:11
  • 1
    \$\begingroup\$ A photo will help. There are many types of audio jack, mono, stereo, with multiple contact arrangements. Audio does not use "positive and negative" - it uses signal and ground. \$\endgroup\$ – Transistor Aug 25 '16 at 22:14
  • 1
    \$\begingroup\$ related, if not duplicate: Remove pin to close switch and What to do with third contact in DC barrel plug with only two input contacts? \$\endgroup\$ – Nick Alexeev Aug 25 '16 at 22:16
  • 1
    \$\begingroup\$ There are lots of audio jacks with different switching arrangements, so in order for us not have to waste a lot of time helping you out, you could help us out by posting a part number, a photo, or a schematic. \$\endgroup\$ – EM Fields Aug 25 '16 at 22:17

IF one side of the audio is grounded (as your comments suggest)
then adding an eg 10k resistor from the pin which gets isolated to V+ will produce a DC signal on plug insertion. If desired an LED across the ground-isolated contact would light when the plug was inserted. (With 10k and 5V and eg red LED level is low but usable.

If the resultant standby current is too high (eg 1/2 mA at 5V) the you can use eg 1M (5 uA) or 10M (0.5 uA) at 5V with suitable following logic. An eg xx74x14 Schmitt trigger inverter will wok with 10M and leave you 5 of the 6 gates spare for other use. (Flash an LED when on or whatever).The higher value resistors make the simple LED + resistor indicator impractical but adding a package of Schmitt inverters can add an LED driver + much bonus capability.

Two examples of possible methods.

The diagram at left can be used if one audio lead is grounded.
If headphone or internal circuit is DC coupled the capacitors C2 & C3 at right may be needed.
As shown the LED is on with plug OUT but by moving the LED to across the switch the opposite occurs. Quiescent current drain may be higher than desired if LED is to be driven. R2 may be increased - see text above.

The right hand version allows the audio path to have neither leg grounded.
Resistors set load on audio, audio balaance, DC point of audio leg. C2, C3 may be needed if input or output not AC coupled.


simulate this circuit – Schematic created using CircuitLab



I added the image and your relevant comments and edited YOUR questionvery slightly.


  1. Add the ebay link

  2. Stop arguing :-)

  3. Answer good technical questions politely rather than resisting them - if you knew what was wanted and/or relevant you would not need to ask the question. If you maximise information and answer technical questions and describe what you are trying to do and known constraints then you WILL get a good solution here if the question is on topic (and maybe also if its not).

But, hiding photos, hiding source and data references, hiding real use and more (all of which you are effectively doing ) leads to a long slow misunderstood teeth pulling approach.

  • \$\begingroup\$ An upvote and, as always, a pleasure to read you. :) \$\endgroup\$ – EM Fields Aug 26 '16 at 1:13
  • \$\begingroup\$ @EMFields Flattery will get you somewhere :-) \$\endgroup\$ – Russell McMahon Aug 26 '16 at 1:15
  • \$\begingroup\$ I"m not about that, but I do like kindness, when warranted. \$\endgroup\$ – EM Fields Aug 26 '16 at 1:34
  • \$\begingroup\$ @EMFields Yes. The flattery comment was a joke, of sorts. Sincere flattery always welcome :-). Kindness seems warranted often enough. Over the years (since long before Stack Exchange days) I've tried to take note of what Olin has to say about dealing with people, what his aims are and how effective and how reasonable the approach is. He and I have many major aims in common when it comes to trying to get the best from people BUT our approaches are "somewhat different" and he seems neither to see any merit in my approach or to acknowledge that I care about improving people's abilities. ... \$\endgroup\$ – Russell McMahon Aug 27 '16 at 15:40
  • \$\begingroup\$ ... [Whether the above "seems" reflects reality is not something I know or that he's going to tell me :-).] | So eg in this case, I've ended with some fairly robust (and, hopefully, useful) input aimed at the O BUT preceded it by as much practical advice as seems reasonable at this stage. Best case he picks up the ball and runs with it. Worst case - you can't win them all. Lately a number of OP's have done brilliantly after very shaky starts. All good fun ... . :-) \$\endgroup\$ – Russell McMahon Aug 27 '16 at 15:44

It's never a good idea to use an audio jack for power - especially if power is coming from an audio plug - because it's almost impossible to keep from shorting the supply as the plug is being inserted into the jack.

Use, instead, one of the many barrel jacks available.

  • \$\begingroup\$ I am not running power through the jacks, i am using them for audio in my project. I am making a small box with no viable switches that when you plug in some ear phones it turns on and plays music. I just need some kind of switch or relay that will turn on the device when the switch leg if of the audio jack is no longer connected to ground. \$\endgroup\$ – jardane Aug 25 '16 at 22:52
  • \$\begingroup\$ That's a completely different scenario from the one you asked for help with, and if all you want to do is to plug into audio from the Arduino, all you need to do is connect the audio signal from the Arduino to the tip contact of the jack, the Arduino's ground to the sleeve contact, and let the switch contact float. \$\endgroup\$ – EM Fields Aug 25 '16 at 23:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.