Badcaps.net Forum
Go Back   Badcaps Forums > General Topics > General Computer & Tech Discussion
Register FAQ Calendar Search Today's Posts Mark Forums Read

 
Thread Tools Display Modes
Old 10-07-2019, 06:52 AM   #1
antoniu200
Member
 
Join Date: Dec 2018
City & State: Bucharest
My Country: Romania
Posts: 47
Default How can I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

Hi! So, I'd like to get some advices on how I could achieve such circuit that reverses the behavior of an NC 3.5mm front panel jack.

Most of you probably wonder why would I want this? Well, this is because, contrary to popular belief, most soundcards today use NO 3.5mm jacks, instead of the HD Audio standard of NC. And so did my case and SoundBlaster soundcard.
Now, the problem isn't obvious until one of those 3.5mm jacks breaks. And, lucky me, one of mine broke. So, I ordered from a local electronics shop some 3.5mm jacks. Obviously, those were NC, not NO. So, they worked the other way around: when I connected my headphones, Windows detected my headphones as disconnected, and when I disconnected them, Windows detected them as connected.

Now, I had a case in my attic that also had some NO jacks, so I took those and replaced my broke jack. All good and dandy, until you realize those NO jacks don't have a way to ground your 3.5mm stereo connection, which is unbalanced. So, noise happens to slip in. And, lucky me, my older, not very sensitive to sine waves, headphones broke too, so I bought a pair of JBL Tune 500, which were far more sensitive. So, that nice noise is now in my ears, as the ground doesn't exist on these NO jacks (as their exterior is made out of plastic, and not out of aluminum or some other conductive metal).

Leaving the story behind, I want to make a circuit to reverse that NC behaviour, or better said, make a circuit on the HD AUDIO cable, such as my SoundBlaster understands NC as the normal jack and NO as the reverse, unstandard jack. I was advised to look into 5V SPDT relays, but I can't figure out a way to power that electromagnet in them.

Now, the final question, how can I power a 5V SPDT relay using connections found in the PC? I'd prefer using connections found on the front panel cables (soundcard 5V, USB 5V, USB GROUND) and not PSU connections.

Last edited by antoniu200; 10-07-2019 at 08:03 AM.. Reason: Mistake in title
antoniu200 is offline   Reply With Quote
Old 10-07-2019, 08:35 AM   #2
eccerr0r
Solder Sloth
 
eccerr0r's Avatar
 
Join Date: Nov 2012
City & State: CO
My Country: USA
Line Voltage: 120VAC 60Hz
I'm a: Hobbyist Tech
Posts: 4,414
Default Re: How ca I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

Usually those switch jacks are normally closed so something is connected to the tip or ring when the plug is removed. Is this what you mean?

Because of this I have a hard time understanding what the situation is. They should be 'closed' when nothing is plugged in. Very unusual for a jack to open something when a plug is inserted. Is it a separate circuit? That would be a possibility.

The problem you're seeing is that usually the switch is part of the signal (tip/ring, not shield). Because of this, yes, it would be very hard to 'reverse' the polarity of this. However if you have jack that has yet another presence switch separate from the signal jamming switch, to separate the two would require some circuitry.

Please give some pictures/links to the exact jack you're using and the jack you're trying to replace.
eccerr0r is offline   Reply With Quote
Old 10-07-2019, 11:47 AM   #3
stj
Great Sage 齊天大聖
 
stj's Avatar
 
Join Date: Dec 2009
City & State: Europe
My Country: some shithole run by Israeli agents
I'm a: Professional Tech
Posts: 21,554
Default Re: How ca I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

just get the same jacks from ali-express.
stj is online now   Reply With Quote
Old 10-13-2019, 07:52 AM   #4
Flexderec
New Member
 
Join Date: Oct 2019
City & State: NY
My Country: USA
I'm a: Knowledge Seeker
Posts: 4
Default Re: How ca I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

How is it?
Flexderec is offline   Reply With Quote
Old 11-11-2019, 07:26 AM   #5
antoniu200
Member
 
Join Date: Dec 2018
City & State: Bucharest
My Country: Romania
Posts: 47
Default Re: How ca I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

I'm sorry for not replying. But I didn't get an email notification, although I set them on.

Anyway, after more digging I found out why I need these N-O jacks. Well, the Intel HD Audio connector needs them N-O, as it detects the jack connected and disconnected states. And I just bought 6 N-C jacks, which are used for the older AC'97 connector, that doesn't detect the connected/disconnected states. So, I have to use 2 relays to switch the jacks on or off, otherwise my Soundblaster will always see no device plugged in.

How?

The +5V pin on the relay goes to the MIC/SPEAKER_DETECT pin on the connector, GROUND pin on the relay goes to USB_GND (unused port on MoBo), NC pin on the relay goes to the MIC/SPEAKER_DETECT on the soundcard, COM pin on the relay goes to USB_5V.
antoniu200 is offline   Reply With Quote
Old 11-11-2019, 06:53 PM   #6
Curious.George
Badcaps Veteran
 
Join Date: Nov 2011
Posts: 1,590
Default Re: How ca I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

Quote:
Originally Posted by antoniu200 View Post
Well, the Intel HD Audio connector needs them N-O, as it detects the jack connected and disconnected states. And I just bought 6 N-C jacks, which are used for the older AC'97 connector, that doesn't detect the connected/disconnected states. So, I have to use 2 relays to switch the jacks on or off, otherwise my Soundblaster will always see no device plugged in.
I don't understand. Some jacks have mechanical switches usually to open the "default" circuit connection when an inserted plug is physically detected. E.g., the "audio output" often is routed through such a switch so that, in the ABSENCE of an inserted plug, it continues to its normal/default routing to drive an internal loudspeaker. Inserting a plug (e.g., for a headphone) opens that connection and lets the signal flow OUT to the headphone, instead.

If you don't wire anything to the "other side" of the switch, then there's no (practical/mechanical) way that the circuit can discriminate between the switch being ABSENT vs. "nothing plugged in". No relays needed.

Draw yourself a diagram of what's there and you'll see how leaving that extra contact "open" essentially gives you what you need.
Curious.George is offline   Reply With Quote
Old 11-11-2019, 11:58 PM   #7
antoniu200
Member
 
Join Date: Dec 2018
City & State: Bucharest
My Country: Romania
Posts: 47
Default Re: How ca I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

Well, first of all, Intel HD Audio jacks are closed when a jack is inserted, and not open, as per your description and what I actually bought 2 months ago.

But N-C jacks were used in the AC'97 type circuits. Intel HD Audio uses N-O jacks, not N-C.

And for that reverse connection to work as intended (that includes the connected/disconnected signals), I'm going to need an SPDT relay wired as I explained above.

Last edited by antoniu200; 11-12-2019 at 12:57 AM..
antoniu200 is offline   Reply With Quote
Old 11-12-2019, 01:49 AM   #8
Curious.George
Badcaps Veteran
 
Join Date: Nov 2011
Posts: 1,590
Default Re: How ca I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

Quote:
Originally Posted by antoniu200 View Post
Well, first of all, Intel HD Audio jacks are closed when a jack is inserted, and not open, as per your description and what I actually bought 2 months ago.
How many connections to each jack? If there aren't at least 4 (for a stereo connector) -- and if all of them aren't actually connected to signals, then there isn't a "mechanical switch" incorporated in the jack AND being used in it.

Why don't you just SHOW US what the circuit (or, at least the COMPONENTS!) looks like? Your language is anything BUT "precise"!

WHAT is "closed"? WHAT is "open"?

I'll give you a bona fide, proven solution -- with the same level of detail that you're offering us:
Solder the replacement into the circuit

(I'll let YOU guess as to WHAT the "replacement" happens to be and WHERE it should be installed)
Curious.George is offline   Reply With Quote
Old 11-12-2019, 02:02 AM   #9
antoniu200
Member
 
Join Date: Dec 2018
City & State: Bucharest
My Country: Romania
Posts: 47
Default Re: How ca I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

There are 4 connections to each 3.5mm jack. There is a mechanical switch inside the jack that when there is no headphone inserted, makes circuit with the soundcard (closed), but when inserted breaks the circuit (open).

I already soldered the replacement jacks. The connected/disconnected functionality was reversed.
antoniu200 is offline   Reply With Quote
Old 11-12-2019, 11:41 AM   #10
Curious.George
Badcaps Veteran
 
Join Date: Nov 2011
Posts: 1,590
Default Re: How ca I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

Quote:
Originally Posted by antoniu200 View Post
There are 4 connections to each 3.5mm jack. There is a mechanical switch inside the jack that when there is no headphone inserted, makes circuit with the soundcard (closed), but when inserted breaks the circuit (open).
The motherboard ALSO "makes circuit with the soundcard"; you haven't provided any information of value.

"Help! There's no sound coming from the radio in my car..."
Curious.George is offline   Reply With Quote
Old 11-12-2019, 11:48 AM   #11
antoniu200
Member
 
Join Date: Dec 2018
City & State: Bucharest
My Country: Romania
Posts: 47
Default Re: How ca I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

https://en.wikipedia.org/wiki/Intel_...anel_connector

I'm not sure I can be more specific than this Wikipedia page.
antoniu200 is offline   Reply With Quote
Old 11-13-2019, 10:27 AM   #12
Curious.George
Badcaps Veteran
 
Join Date: Nov 2011
Posts: 1,590
Default Re: How ca I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

Quote:
Originally Posted by antoniu200 View Post
https://en.wikipedia.org/wiki/Intel_...anel_connector

I'm not sure I can be more specific than this Wikipedia page.
You've still not indicated what SIGNALS are connected to those pins.

Quoting YOUR reference:

Quote:
In the HDA design... When the plug is inserted, the isolated switch inside the jack informs the motherboard, and the codec sends audio to the headphones. A similar isolated switch is used to detect when a microphone has been plugged in.
Note that this suggests more than 4 connections to each jack as the switch can not share any of the THREE signal connections that carry audio to the headphones: gnd, left, right plus two conductors for the ISOLATED switch.

Get a description of what (signals!) is actually connected to the pins of the jack -- instead of trying to second guess what's being done from a two sentence Wikipedia description (why propose a solution only to later discover that it's loaded down an output signal or injected hum in an input path because the actual electrical connections weren't defined when the solution was crafted?)

You've been at this for at least 2 months:

https://www.cnet.com/forums/discussi...s-incorrectly/

In all that time, you could have picked up a part-time job flipping burgers, put in two or three hours and BOUGHT a replacement sound card ("I have a Soundblaster Audigy FX, ..."):

https://www.ebay.com/itm/Creative-So...sAAOSwAfVdv0qP

Or, rescued a comparable (not even functional!) motherboard or sound card and pilfered the jacks from it.

And, you haven't even addressed how/where you're going to mount the relay and any associated components.

One of the hardest things to learn to do in Engineering is to abandon an unproductive approach when you're not making progress -- and rethink it! Beating your head on a brick wall doesn't bother the wall -- but leaves your head bloody!
Curious.George is offline   Reply With Quote
Old 11-13-2019, 12:55 PM   #13
antoniu200
Member
 
Join Date: Dec 2018
City & State: Bucharest
My Country: Romania
Posts: 47
Default Re: How ca I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

Oh well, the jacks are indeed 5 physical pins, 4 needed (the ones at the base).

I've been on and on about this (and still am, mind you), since I really don't have enough time on a single moment to stay and think this thoroughly. Hence the long period of time of me on-and-on-ing.

It's what it is. If you don't like the fact that I cannot allocate more than 10-15 minutes daily to think about electronics, ask my school system for a curricullum and for the schedule of a 10th grade student.

I don't want to comment on politics on an electronics forum, so I'll answer your question the best I can:
  • Every single one of the 3.5mm female jacks I see in computer cases nowadays are completely plastic, with nothing grounding the male jack. Once I take a look inside them, I find that they are N-O, meaning the pins in the center (10 and 11 in the picture linked below) are disconnected from each other, meaning there is nothing returning to the soundcard when a male jack isn't plugged in. When plugged in, they make contact and return 5V
  • Every single one of the 3.5mm jacks I've bought have the pins on the side (2 and 3 below) connected to the pins in the center (10 and 11 below), meaning when a male jack isn't connected, they return the sound they receive back to the soundcard. When a jack is plugged in, they don't make any contact.

Both of these designs have a pin for GROUND and 4 other pins below that GROUND pin for audio and jack detect systems, just as in the picture linked below.

Both look like seen in the image attached, only difference being that the N-O jack has that circular tip made from plastic, not from metal.

As for where I'm going to put that relay, literally connected to the HD_AUDIO cable. How? Soldering. Cutting cables and taking out the wires. Mess, but if it works I'm fine with a mess.

And I don't have anymore cases from which I can get N-O jacks, I just used the 2 last ones from an older case and I suspect these will go bad in about 2-3 years. How am I supposed to get jacks from a SoundCard or MotherBoard? They don't use this 5 pin design!

https://www.digikey.com/-/media/Imag...-Jack-fig5.jpg

Last edited by antoniu200; 11-13-2019 at 01:05 PM..
antoniu200 is offline   Reply With Quote
Old 11-13-2019, 01:09 PM   #14
eccerr0r
Solder Sloth
 
eccerr0r's Avatar
 
Join Date: Nov 2012
City & State: CO
My Country: USA
Line Voltage: 120VAC 60Hz
I'm a: Hobbyist Tech
Posts: 4,414
Default Re: How ca I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

Ahh I see now with that picture, these are the standard NC jacks one would buy. The key issue I'm worried about is that the NC jacks are not isolated, what you want is a NO jack that's isolated - the standard "HDA" jack, apparently.

I still don't understand how you got around the problem that these NC jacks are part of the signal path. Adding a voltage source will short out the normal function of the signal pins. Unless you chose to keep left or right channel unconnected? Is that how you did it?

If I ended up with this dilemma I'd probably end up with some complicated circuit to detect plugin (if the drop >0V most likely), or there would be a toggle switch somewhere on the chassis and forget about autodetect...heh.

Last edited by eccerr0r; 11-13-2019 at 01:11 PM..
eccerr0r is offline   Reply With Quote
Old 11-13-2019, 01:32 PM   #15
antoniu200
Member
 
Join Date: Dec 2018
City & State: Bucharest
My Country: Romania
Posts: 47
Default Re: How ca I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

Quote:
Originally Posted by eccerr0r View Post
I still don't understand how you got around the problem that these NC jacks are part of the signal path. Adding a voltage source will short out the normal function of the signal pins. Unless you chose to keep left or right channel unconnected? Is that how you did it?
I'm not sure what you mean. All I did with the NC jacks was connect them to the front panel board with all their pins and connect my headphones. What I noticed is that they appeared as connected when disconnected and disconnected when connected.


Quote:
Originally Posted by eccerr0r View Post
The key issue I'm worried about is that the NC jacks are not isolated, what you want is a NO jack that's isolated - the standard "HDA" jack, apparently.
What changes if the jack is isolated or not? I don't understand.

Quote:
Originally Posted by eccerr0r View Post
If I ended up with this dilemma I'd probably end up with some complicated circuit to detect plugin (if the drop >0V most likely), or there would be a toggle switch somewhere on the chassis and forget about autodetect...heh.
I suppose it's time for some Arduino coding then. I'd have to make a program that detects the audio signal coming from the jack. If present, return 0 to the SoundCard. Else, return 1.
The connection shouldn't be very difficult: I find myself an input pin, I connect the pin 10 or 11 from the jack to the input pin. Now I have to find myself anothed pin for output. That output pin I have to connect to the SoundCard JACK_DETECT signals. Really simple program in practice. Probably a bit harder in C++, but I can figure that out. At least that much.
Power for the Arduino comes from an unused USB port on the Motherboard

I forgot to clarify that my SoundBlaster doesn't work with the front panel unless it fully supports the JACK_DETECT system, this is why I'm so desperate to get it working.

Last edited by antoniu200; 11-13-2019 at 01:50 PM..
antoniu200 is offline   Reply With Quote
Old 11-13-2019, 01:51 PM   #16
R_J
Badcaps Veteran
 
Join Date: Jun 2012
City & State: ☻
My Country: Canada
I'm a: Professional Tech
Posts: 4,873
Default Re: How ca I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

This may not apply here. I am only suggesting this:
In the past I have used a PJ-307 jack, this jack uses a seperate switch that is not connected to the audio signal, it is available with either a spdt or a dpdt switch that is located at the rear of the jack
It can be connected as either N-O or N-C if the plug is inserted or not
Attached Images
File Type: jpg PJ-307.jpg (17.4 KB, 4 views)
File Type: jpg PJ-307B-X.jpg (89.1 KB, 4 views)

Last edited by R_J; 11-13-2019 at 01:58 PM..
R_J is offline   Reply With Quote
Old 11-13-2019, 01:54 PM   #17
antoniu200
Member
 
Join Date: Dec 2018
City & State: Bucharest
My Country: Romania
Posts: 47
Default Re: How ca I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

Quote:
Originally Posted by R_J View Post
I am only suggesting this:
In the past I have used a PJ-307 jack, this jack uses a seperate switch that is not connected to the audio signal, it is available with either a spdt or a dpdt switch that is located at the rear of the jack
It can be connected as either N-O or N-C if the plug is inserted or not
It is a possible solution, but what made me suddenly go to an Arduino solution is the fact that the N-C jacks return audio, while they should return 5V. Couldn't this cause issues? Intermittent "connected/disconnected" problems?
antoniu200 is offline   Reply With Quote
Old 11-14-2019, 11:49 AM   #18
eccerr0r
Solder Sloth
 
eccerr0r's Avatar
 
Join Date: Nov 2012
City & State: CO
My Country: USA
Line Voltage: 120VAC 60Hz
I'm a: Hobbyist Tech
Posts: 4,414
Default Re: How ca I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

Quote:
Originally Posted by R_J View Post
This may not apply here. I am only suggesting this:
In the past I have used a PJ-307 jack, this jack uses a seperate switch that is not connected to the audio signal, it is available with either a spdt or a dpdt switch that is located at the rear of the jack
It can be connected as either N-O or N-C if the plug is inserted or not
Yep, I agree, OP probably should just buy one of these and be done with the problem instead of coming up with a "microcontroller can fix anything" solution...

Stepping back to the sidelines to see what solutions come up if any...
eccerr0r is offline   Reply With Quote
Old 11-14-2019, 12:13 PM   #19
antoniu200
Member
 
Join Date: Dec 2018
City & State: Bucharest
My Country: Romania
Posts: 47
Default Re: How ca I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

You came to agree with a solution, leaving my doubtfulness unanswered, while mocking my solution that for sure works.

Once again,
It is a possible solution, but what made me suddenly go to an Arduino solution is the fact that the N-C jacks return audio, while they should return 5V. Couldn't this cause issues? Intermittent "connected/disconnected" problems?
antoniu200 is offline   Reply With Quote
Old 11-14-2019, 01:06 PM   #20
Curious.George
Badcaps Veteran
 
Join Date: Nov 2011
Posts: 1,590
Default Re: How ca I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

Quote:
Originally Posted by antoniu200 View Post
It's what it is. If you don't like the fact that I cannot allocate more than 10-15 minutes daily to think about electronics, ask my school system for a curricullum and for the schedule of a 10th grade student.
A student that apparently doesn't want to LEARN...

Quote:
As for where I'm going to put that relay, literally connected to the HD_AUDIO cable. How? Soldering. Cutting cables and taking out the wires. Mess, but if it works I'm fine with a mess.
You only have access to THREE signals in any cable that mates with said jack: left, right and return. How are you going to power the relay? How are you going to detect that the plug is mated to the jack? How are you going to signal to the computer that the plug is/is not mated (given that the jack's interface INTERNAL to the computer is not accessible to you via that cable)?

Quote:
How am I supposed to get jacks from a SoundCard or MotherBoard? They don't use this 5 pin design!
You have a Soundblaster Audigy FX (from the other September thread that I referenced). Get another Soundblaster Audigy FX (working or not) and pilfer the jack(s) from it.

[Or, get another "whatever" and pilfer the jacks from THAT!]

Or, live without the "feature" until you next "update" your PC...

I'm out.
Curious.George is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Badcaps.net Technical Forums 2003 - 2019
Powered by vBulletin ®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
All times are GMT -6. The time now is 06:20 PM.
Did you find this forum helpful?