Announcement

Collapse
No announcement yet.

How ca I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How ca 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, 07:03 AM. Reason: Mistake in title

    #2
    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.

    Comment


      #3
      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.

      Comment


        #4
        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.

        Comment


          #5
          Re: How ca I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

          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.

          Comment


            #6
            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, 12:57 AM.

            Comment


              #7
              Re: How ca I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

              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)

              Comment


                #8
                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.

                Comment


                  #9
                  Re: How ca I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

                  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..."

                  Comment


                    #10
                    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.

                    Comment


                      #11
                      Re: How ca I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

                      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:

                      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!

                      Comment


                        #12
                        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
                        Attached Files
                        Last edited by antoniu200; 11-13-2019, 01:05 PM.

                        Comment


                          #13
                          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, 01:11 PM.

                          Comment


                            #14
                            Re: How ca I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

                            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.


                            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.

                            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, 01:50 PM.

                            Comment


                              #15
                              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 Files
                              Last edited by R_J; 11-13-2019, 01:58 PM.

                              Comment


                                #16
                                Re: How ca I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

                                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?

                                Comment


                                  #17
                                  Re: How ca I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

                                  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...

                                  Comment


                                    #18
                                    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?

                                    Comment


                                      #19
                                      Re: How ca I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

                                      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...

                                      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)?

                                      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.

                                      Comment


                                        #20
                                        Re: How ca I use an SPDT 5V relay to reverse NC switch in 3.5mm jack?

                                        Originally posted by antoniu200 View Post
                                        You came to agree with a solution, leaving my doubtfulness unanswered, while mocking my solution that for sure works.
                                        If it "for sure works", then there's no need to answer the question posed, right?

                                        (Or, do you have some nonstandard way of defining "works" that includes "not working"?)

                                        Comment

                                        Working...
                                        X