Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

Some sound card audio jacks can now inform recent Windows OS's that an audio device is plugged in. Anyone know how it does this? I'm thinking it uses some kind of voltage comparator or resistance measurement.

This question was asked at Superuser. My gut feeling is that the circuit is not as trivial as one of the participants is suggesting, but I'm a bit rusty on circuits.

share|improve this question
add comment

4 Answers

up vote 11 down vote accepted

While audio jacks often have switches that can be used for plug detection, most codecs now implement jack sensing that measures the impedance and other characteristics of the plugged in device and make that information available to the processor they are connected to.

This is also very helpful in preventing an audio amplifier from trying to drive speakers outside its impedance range and damaging the amp or the speakers.

share|improve this answer
    
Do you have any online references for this? Is this done in the audio codec or the driver? –  J. Polfer Feb 22 '10 at 21:40
1  
Hi sheepsimulator, IDT's AC'97 codec (STAC9752A) implements this impedance-based jack sensing. Unfortunately, it is some proprietary current sensing techniques that IDT's calling Universal Jack(tm). ADI also has a AC'97 codec (AD1888) with yet another proprietary jack sensing mechanism. Nonetheless, it is definitely done in the audio codec chip. Hope this helps... –  Terry Chen Feb 23 '10 at 0:01
add comment

Most all jacks (DC power or audio) have an extra terminal that is switched on plug insertion. This is a mechanical switch. Some designs use this extra terminal to switch between battery and external power (in the case of DC jacks) or to switch between headphones and speakers (in the case of audio jacks).

In the photo of this DC jack on Digikey you can almost get a good view of the internals. The two lugs on the back of the jack are for the two DC power connections. The third lug on the bottom is the switch input. Audio jacks have a similar arrangement.

share|improve this answer
add comment

Does it not measure the impedance of whatever is plugged in and then determines what it is based on known values ?

when I insert my speaker jack into the plug, i can hear all the speakers "clicking" one by one, as if the computer is testing to see if they are there...

I found this on http://www.freepatentsonline.com/7579832.html

An audio system includes a CODEC audio jack having left and right audio ports and a jack sense circuit. The jack sense circuit includes left and right amplifiers and a cross-drive impedance sensing circuit. This cross-drive impedance sensing circuit, which is electrically coupled to the left and right audio ports and the left and right amplifiers, detects the resistances of left and right output loads in order to determine characteristics of a device connected to the CODEC audio jack. The cross-drive impedance circuit is configured to measure a resistance of a left output load electrically coupled to the left audio port, in response to a “right” test signal generated by the right amplifier, and is further configured to measure a resistance of a right output load electrically coupled to the right audio port in response to a “left” test signal generated by the left amplifier.

share|improve this answer
add comment

Take one apart and find out. :)

There are several things it could be doing, depending on whether it's just measuring the presence of a plug (just a jack switch will do), or if it knows the difference between a mic and a headphone, etc (resistance measurement?).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.