I am making a solution where I want to control headphone detection by PC externally as I have no control over the PC to do it through software. Below are my attempted solutions.

  1. My first try was to make solenoid push and pull the headphone jack in and out of the PC but don't know whether it will have enough force correctly push/pull. Also mechanical solution will increase cost and make system unstable.

  2. I wanted to insert headphone plug only(like in below figure)and control the circuit open/close to make head phone detection. I inserted the plug like in image and my showed that the headphone connected even though its just a plug because headphone sockets have switches which get activated and show headphone connected so this also is not possible.

enter image description here

The second solution seems the correct way. so Please let me know whether there is another way like directly controlling headphone socket electrically.

  • \$\begingroup\$ this smells like an X-Y problem. why do you want to do that? \$\endgroup\$ – Jasen Feb 26 '18 at 6:57
  • \$\begingroup\$ I am running tests on PC to test audio jack \$\endgroup\$ – rohan Feb 26 '18 at 6:59
  • \$\begingroup\$ The PC software will detect the plug as being present if it has been inserted into the jack. You don't want that. You have no control over the PC, so you cannot modify the software running on it to stop it from applying that logic. So that also must remain. Your only choice is to mechanically insert the plug, then (unless you are allowed to modify the PC jack hardware.) Are you testing the PC software for its ability to detect the plug? \$\endgroup\$ – jonk Feb 26 '18 at 7:23
  • \$\begingroup\$ Yes. if I con bring the audio connections out of audio jack then i will be able to control by using Raspberry PI signals. \$\endgroup\$ – rohan Feb 26 '18 at 7:45
  • 1
    \$\begingroup\$ Possible duplicate of Headphone jack plug/unplug solution you have already asked this question, do not repost! \$\endgroup\$ – Chris Stratton Mar 7 '18 at 5:48

A solenoid or motor is pretty-much the only way unless you want to modify the PC hardware

enter image description here

for a PC with HD Audio connector you just need to interrupt pin 10 and fit a relay switching it to pin 7. That will mimic the switch that's internal to the headphone socket. When the relay contact is closed the PC will sense headphones present.

You can either cut the wires inside your PC solder in the relay or used a cable able with a 5X2 plug one end and a 5x2 socket on the other and the relay in the middle. Or even use individual "duPont"* jumper wires.

(*)Makers call them that, but I don't think it's the correct name.


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.