1
\$\begingroup\$

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

\$\endgroup\$
2
  • \$\begingroup\$ Which DAC, which audio power amp? \$\endgroup\$ Apr 12, 2020 at 0:52
  • \$\begingroup\$ The DAC is a PCM5102, and I am currently using two PAM8301AAF as the amps, but I don't know that I'm very happy with them. \$\endgroup\$
    – notloc
    Apr 12, 2020 at 3:23

3 Answers 3

1
\$\begingroup\$

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.

\$\endgroup\$
7
  • \$\begingroup\$ 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. \$\endgroup\$
    – notloc
    Apr 12, 2020 at 3:23
  • \$\begingroup\$ I beg your pardon for the blunder. \$\endgroup\$
    – vu2nan
    Apr 12, 2020 at 3:32
  • \$\begingroup\$ Answer duly altered. \$\endgroup\$
    – vu2nan
    Apr 12, 2020 at 6:54
  • 1
    \$\begingroup\$ 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.) \$\endgroup\$
    – Transistor
    Apr 12, 2020 at 8:32
  • \$\begingroup\$ @Transistor, Thank you very much for your pertinent questions. \$\endgroup\$
    – vu2nan
    Apr 12, 2020 at 12:01
1
\$\begingroup\$

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

\$\endgroup\$
0
\$\begingroup\$

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?

\$\endgroup\$

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.