1

I am designing a handheld device that has an I2S DAC, small speakers, amplifiers (~2 watts), and an earphone jack. I'd love advice on the best way to hook these together. My goal is high quality audio for a broad number of configurations, including different types of earphones, without going nuts on complexity and cost.

Options I have explored:

  1. Have the DAC output to an earphone jack with internal switches, when the earphones are present audio plays through them directly, otherwise the signal passes through the earphone jack switches to the amplifiers and then speakers. This is what I've been using so far. It works, but is it really okay to drive earphones from the DAC output directly? The speaker amps are always active which is wasteful and pick up some noise. Also potentially noisy during insertion.

  2. The DAC feeds the amps directly, which connect to the earphones, or the speakers if earphones are not plugged in. Am I going to blow the earphones (or the user's eardrums) this way, or are earphones high enough impedance that the power delivered to them will be low? Will the brief shorting that occurs during insertion kill the amps? (I guess that depends on the amp)

  3. Implement insertion detection (I've seen a few ways to do this with some pros and cons) and route audio to either the speaker amplifier, or the earphones (with or without their own amplifier). Would I need to switch the signal, or would it be okay to route the signal to both in parallel and simply disable the speaker amps when earphone insertion is detected?

  4. Is there an integrated solution that can do this for me?

Thanks!

Relevant:

Mutually exclusive headphone and speaker

How does the phone detect if 3.5 mm jack circuit is closed?

How (not) to leave class-D amplifier's input hanging

notloc
  • 326
  • 1
  • 7

3 Answers3

1

The headphones may be connected to the amplifiers, through attenuators, with a DPDT switch to select speakers or headphones.

Since the PAM8301AAF output is for an 8Ω speaker, the sum of R1 and R2 should be 8Ω. The choice of R1 & R2 values would depend on the level of attenuation required. 1W resistors would suffice.

The schematic shown is for one channel.

enter image description here

With the PAM8301AAF outputs to be kept isolated between themselves and ground, a standard headphone plug/jack cannot be used.

Separate mono headphone plugs/jacks, with separate cables for each headphone element, would be required for the isolation.

vu2nan
  • 15,929
  • 1
  • 14
  • 42
  • Thanks, but I feel like maybe you didn't read my question all the way. I am using a headphone jack with switches, my question is more about how to link the rest of the chain. – notloc Apr 12 '20 at 03:23
  • I beg your pardon for the blunder. – vu2nan Apr 12 '20 at 03:32
  • Answer duly altered. – vu2nan Apr 12 '20 at 06:54
  • 1
    Your schematic has no labels so it's not clear what your connections are. Why do you recommend a tee? What does R1 on the output do for the circuit (assuming that input is on the left and output on the right)? Why do you need to load of 8 Ω? (Normally the "pad" would set R2 to 8 Ω to match the headphone impedance.) – Transistor Apr 12 '20 at 08:32
  • @Transistor, Thank you very much for your pertinent questions. – vu2nan Apr 12 '20 at 12:01
  • @Transistor, The T pad was an error. An L pad would be more appropriate. The sum of R1 & R2 being 8 Ω would ensure an 8 Ω load at the amplifier output even without the headphones being connected. The individual values would determine the attenuation (like a fixed potentiometer). A standard potentiometer could also be used. – vu2nan Apr 12 '20 at 12:17
  • I understand what you are saying but there is no need to dissipate full power in the pad. From memory it was OK if R2 was equal to the speaker resistance (to keep the damping fairly good) and R1 could be as high as you like to provide the required attenuation while dissipating little heat. – Transistor Apr 12 '20 at 12:26
1

is it really okay to drive earphones from the DAC output directly?

Not really. The PCM5102 has a minimum rated load impedance of 1k Ω. Most earphones are around 32 Ω, which is too much load for the DAC.

You should use a headphone amplifier to buffer the DAC signal.

are earphones high enough impedance that the power delivered to them will be low?

It will be lower due to the higher impedance, but possibly not low enough. Headphone level can be reduced with an 'L' pad.

Another possible problem is that the PAM8301's output is 'BTL' (Bridge Tied Load) so both sides of the speaker are driven and there is no common ground. You could connect each earphone to one side only, through a capacitor to block DC voltage. This would reduce the level by 6 dB, which might be enough make the earphone level acceptable. However the PAM8301 is not specified for operation in this mode so I don't know how how well it will work.

If you want high quality audio output via the headphone jack then it might be better to use a separate (analog) headphone amp which has lower distortion and noise, and no EMI concerns.

Whichever way you do it, stereo headphone jacks are available with auxiliary switches that can be used to switch between speakers and headphones and/or disable the speaker amp. The PAM8301 has an active low 'Shutdown' input that just needs to be grounded to turn it off. So the circuit could look like this:-

schematic

simulate this circuit – Schematic created using CircuitLab

Bruce Abbott
  • 55,540
  • 1
  • 47
  • 89
0

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. (a) The PWM class-D amplifier outputs do not share either of their output pins with ground. (b) Typical 3-pole jack headphone wiring.

To answer your questions:

  1. Have the DAC output to an earphone jack with internal switches, when the earphones are present audio plays through them directly, otherwise the signal passes through the earphone jack switches to the amplifiers and then speakers. This is what I've been using so far. It works, but is it really okay to drive earphones from the DAC output directly? The speaker amps are always active which is wasteful and pick up some noise. Also potentially noisy during insertion.

This is the best solution if you are not overloading the DAC outputs. The disconnected amplifier inputs should be shorted to ground while on headphones. If the jack socket does not have suitable switches then try adding a 1 kΩ resistor from each amplifier input to ground.

  1. The DAC feeds the amps directly, which connect to the earphones, or the speakers if earphones are not plugged in. Am I going to blow the earphones (or the user's eardrums) this way, or are earphones high enough impedance that the power delivered to them will be low? Will the brief shorting that occurs during insertion kill the amps? (I guess that depends on the amp)

Yes, that would be a risk and attenuation would be required for protection of the user, protection of the headphones and to maintain an acceptable signal to noise ratio.

  1. Implement insertion detection (I've seen a few ways to do this with some pros and cons) and route audio to either the speaker amplifier, or the earphones (with or without their own amplifier). Would I need to switch the signal, or would it be okay to route the signal to both in parallel and simply disable the speaker amps when earphone insertion is detected?

Route to both should be fine. Is there an integrated solution that can do this for me?

Transistor
  • 168,990
  • 12
  • 186
  • 385