Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 13 of 13

Thread: Why does the audio shield's headphone jack use a virtual ground?

  1. #1

    Why does the audio shield's headphone jack use a virtual ground?

    This isn't about a problem I'm having, but I'm curious why the line-out on the audio shield uses capacitors and a true ground, but the headphone jack uses no capacitors and a virtual ground? It seems like it would be safer to isolate the headphone jack in case someone plugs it into the wrong aux-in?

    I found an interesting article about designing headphone circuits, but I don't fully understand it and I'm not sure how it applies: https://www.electronicproducts.com/A...eadphones.aspx

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    23,733
    The reason is the large capacitance that's required to pass the lower part of the audio spectrum when the load is the relatively low 32 ohm impedance of headphones.

    These days, many chips which drive headphones use this or similar approaches so you can avoid those bulky components.

  3. #3
    Senior Member oddson's Avatar
    Join Date
    Feb 2013
    Location
    Isle in the Salish Sea
    Posts
    1,389
    Quote Originally Posted by skybrian View Post
    ...would be safer to isolate the headphone jack in case someone plugs it into the wrong aux-in?...
    Has anyone done this?

    How much damage?

  4. #4
    Interesting. The thing is, I expect most people who aren't audio enthusiasts haven't heard of this, and would just plug a headphone jack into a random aux-in without thinking about it? I'm wondering how consumer gear being sold to the masses handles it. Maybe most aux inputs have capacitors on that end?

  5. #5
    Senior Member
    Join Date
    Mar 2019
    Location
    Hoboken, New Jersey, USA
    Posts
    126
    What's a "wrong aux-in"? Are you saying that the audio board can get smoked if its phone jack is plugged into some "wrong" amplifier?
    The phone jack on my audio board just it just stays plugged into my active speakers. I never used the "Line out".

  6. #6
    On the Teensy audio shield, it says "Caution: do not short VGND to GND". The headphone jack uses VGND. There is a risk that if you connect the headphone jack to an aux input, that equipment might have the ground wire in the aux-in jack connected to ground, shorting it out. But that's going to depend on the circuit in the other equipment.

    I'm new to this, but I think it won't matter if you're on battery power? Also, even if were a true ground, you might still have trouble with audio quality due to creating a ground loop?

  7. #7
    Junior Member
    Join Date
    Nov 2020
    Posts
    11
    I'm working on making something similar to this, mounting the teensy and audio adapter side by side: https://www.pjrc.com/breakout-board-for-teensy-4-0/

    But I also want to break out the pins for the head phone jack so I can mount a different head phone jack in another location in my project on the PCB.
    I can get the L/R pins easily from the tiny ones next to the jack, but I'm curious if I need to get the VGND pin as well or if it's possible to run the HP from the normal GND?
    Obviously, it'd be a lot easier since the VGND is only a pad instead of a TH pin!

    Also based on the discussion above, should I be concerned thinking of this headphone out as sort of a headphone / line out? able to drive HP but also able to plug into the Aux in port of, say, a bluetooth speaker?

  8. #8
    Junior Member
    Join Date
    Dec 2020
    Posts
    1
    Quote Originally Posted by bmo View Post
    I'm working on making something similar to this, mounting the teensy and audio adapter side by side:
    https://www.pjrc.com/cloud based employee monitoring/breakout-board-for-teensy-4-0/
    But I also want to break out the pins for the head phone jack so I can mount a different head phone jack in another location in my project on the PCB.
    I can get the L/R pins easily from the tiny ones next to the jack, but I'm curious if I need to get the VGND pin as well or if it's possible to run the HP from the normal GND?
    Obviously, it'd be a lot easier since the VGND is only a pad instead of a TH pin!

    Also based on the discussion above, should I be concerned thinking of this headphone out as sort of a headphone/line out? able to drive HP but also able to plug into the Aux in port of, say, a bluetooth speaker?
    Sure, if your cable has a BT sender/reciever

  9. #9
    Senior Member
    Join Date
    May 2015
    Location
    USA
    Posts
    840
    Note that if your teensy and the other equipment don't share a ground, then the ground of the other equipment can be at the teensy VGND level. Ie, it can work, even without balanced inputs on the other equipment.

    Or use optical outputs, eliminating all worries about grounds and ground loop noise.

  10. #10
    Junior Member
    Join Date
    Nov 2020
    Posts
    11
    Quote Originally Posted by lanettekosa View Post
    Sure, if your cable has a BT sender/reciever
    *thanks for this helpful reply*, It's not like i wrote the aux port of the speaker or anything...

  11. #11
    Junior Member
    Join Date
    Nov 2020
    Posts
    11
    Quote Originally Posted by jonr View Post
    Note that if your teensy and the other equipment don't share a ground, then the ground of the other equipment can be at the teensy VGND level. Ie, it can work, even without balanced inputs on the other equipment.

    Or use optical outputs, eliminating all worries about grounds and ground loop noise.

    wait, so if they don't share a ground. Say, in the instance of an aux in to an external speaker it's OK to use the headphone port of the SGTL5000 for that connection...? this will be ok? I'm confused now.

    This would sort of contradict what skybrian said above:

    There is a risk that if you connect the headphone jack to an aux input, that equipment might have the ground wire in the aux-in jack connected to ground, shorting it out. But that's going to depend on the circuit in the other equipment.
    unless you're saying explicitly that the aux input is known to not be connected to ground?

  12. #12
    Senior Member
    Join Date
    May 2015
    Location
    USA
    Posts
    840
    When you talk about "ground", you need to specify which ground. For example, the teensy could have one ground and your other equipment could have a different ground. Don't connect these grounds together and the teensy VGND could be connected to the equipment ground.

  13. #13
    Deleted User
    Guest
    Quote Originally Posted by bmo View Post
    I can get the L/R pins easily from the tiny ones next to the jack, but I'm curious if I need to get the VGND pin as well or if it's possible to run the HP from the normal GND?
    Look in the datasheet of the SGTL5000, figure 20 on page 60.
    You may use high quality audio capacitors ( C2 and C3 ) in the audio lines, so the headphone is referenced to GND or wherever you like. HP_R and HP_L are higher than GND, so polarized capacitor can be positive towards the chip's output, or better use antiserial electrolyte (not tantalum!), a classical technique. 6.3V or 4V types should last, as they are smaller than higher voltage.
    Or use multiayer ceramic capacitor (MLCC), where a 6.3V type 200F is just 3.2mm x 1.6mm x 1.6mm in size.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •