2
\$\begingroup\$

IS it possible for the source device to detect what's connected to the audio output jack? Perhaps by exploiting the presence of the headphone's speaker coils and its response to oscillations?

\$\endgroup\$
2
  • \$\begingroup\$ Long shot, because you'd probably thought of it yourself if there was ... Sometimes there is a small integrated switch on the chassis part. \$\endgroup\$
    – jippie
    Aug 6 '12 at 8:06
  • \$\begingroup\$ Why do you wish to detect this? \$\endgroup\$ Aug 28 '15 at 15:23
5
\$\begingroup\$

What you want to detect is the impedance of the "load". In one case the load is the headphones. In another case the load is the aux input of the device.

With the headphones, the impedance will typically be less than 1K Ohm (and as low as 4 ohms). If it is feeding an aux input then the impedance will be greater than 1K, and possibly as high as 1 mega-ohm.

Measuring the impedance is difficult, since the impedance changes depending on frequency. And frequency depends on the music or audio program that is being "played". The normal way is to measure both the voltage and current to the load and then do some crazy complex math to calculate the impedance. Most of the time this is done by feeding the voltage and current into an ADC, and then to a DSP.

There might be a way to do a cheap and dirty version that doesn't require an ADC or DSP, if all you want to know is if it's greater or less than 1K Ohm. I haven't given this much thought, however, since everything I've done has focused on the accurate version and not a quick and dirty version.

\$\endgroup\$
4
  • \$\begingroup\$ Is it really necessary to measure the impedance? Would it not be possible to measure only the DC resistance or alternatively the resistance (i.e. not complex impedance) at one single frequency? \$\endgroup\$
    – ARF
    Aug 6 '12 at 11:19
  • \$\begingroup\$ @ArikRaffaelFunke The DC resistance would be problematic, since for headphones it could be very low and for an Aux input it could also be very low for a while (depending on how long it takes the DC blocking caps to charge, and how big the caps are). Measuring it at a single frequency is much better. If your frequency (called a pilot tone) is above 20 KHz then nobody would hear it, too. \$\endgroup\$
    – user3624
    Aug 6 '12 at 13:31
  • \$\begingroup\$ Can't you just measure the average current consumption of the driver amp? \$\endgroup\$ Aug 6 '12 at 20:06
  • \$\begingroup\$ @Rocketmagnet Maybe if you're trying to do something quick and dirty. The usual method would be with a current sense resistor on the output. If you place the resistor immediately at the output of the opamp, before it branches off for feedback, then the opamp itself will compensate for the voltage drop and increased output impedance of the current sense resistor. Then you just create a difference amp, fed with both sides from the current sense resistor, to get a current measurement. \$\endgroup\$
    – user3624
    Aug 6 '12 at 22:29
5
\$\begingroup\$

If you are free to choose the receptacle in the device yourself, you could use a plug with a split ground connection or mechanical detector pin.

  1. With a split ground connection: You can then measure whether a small DC current can flow between the two parts of the ground connection. If there is no plug in the receptacle, the two parts of the ground connection will be isolated and no current can flow and vice versa. Note: this will give the attached speaker a slight DC offset.
  2. With a mechanical detector pin: with these receptacles, insertion of a plug will break a link. With a pullup/pulldown resistor you can feed this to a logic circuit.

For electronic solutions have a look at this article.

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