CMP EMBEDDED.COM

Login | Register     Welcome Guest  
HOME DESIGN PRODUCTS COLUMNS E-LEARNING CONFERENCES CODE FORUMS/BLOGS NEWSLETTERS CONTACT FEATURES RSS RSS

Using comparators to detect accessories in portable audio applications
Here's how you can configure a comparator in various ways to provide simple and cost-effective detection of external accessories like jacks, headsets, and hook switches in portable applications.



Audio DesignLine
Hook-switch detection
Most hands-free headsets include a switch, usually known as a hook switch, that accepts and ends calls, provides the MUTE/HOLD function, and holds an ongoing call or call/receives a second call. The microcontroller controlling the headset needs to detect the status of the hook switch as well as the presence of the headset. The jack (hence the headset) can be detected automatically, as illustrated in Figure 1. A signal for the hook-switch status can be generated as explained below.

Status detection circuitry for the hook switch comprises a 4-connecter stereo headset with microphone, and a parallel hook switch (Figure 6). (A mono headset is similar, but has a three-pin connector.) In both cases the tip is connected to the microphone in parallel with the hook switch.

Figure 6. Hook-switch detect circuitry using MAX9063.

As shown, the hook switch presents a low resistance when pressed and a high microphone resistance when open. As for headset detection (explained above), an interface between the headphone-detection voltage and the CMOS inputs of the microcontroller can complicate the circuit design for MIC/hook-switch detection.

The voltage VDETECT (Figure 6) is pulled close to ground when the hook switch is pressed, and interpreted as logic 0 by the microcontroller. When the hook switch is open, however, VDETECT may violate the VIH spec for the CMOS inputs. It can vary between 1.24V and 2.78V, depending on the value of RMIC_BIAS (2.2kΩ in this case) and the type of microphone in the headset.

Thus, a direct interface between the hook switch and the controller is not possible for all microphone types. A comparator can be used as in Figure 6, where you set the reference level to detect a given type of microphone while indicating the status of the hook switch. The comparator output is pulled high when the hook switch is pressed and pulled low when the switch is open.

The scope shot of Figure 7 is triggered by pressing the hook switch of a mono headset. The setup is identical to that of Figure 6, but a 2.5mm universal headset for cell phones is used for test purposes. The headset "tip" has an electret microphone with hook switch and 32Ω speaker connected to its "ring". That microphone draws a constant bias current of 212µA when powered with a 3V supply through the 2.2kΩ bias resistor.

Figure 7. These waveforms are taken from an electret microphone with hook switch, controlled by a mono headset and its internal control circuitry. When you press the hook switch of a mono headphone, the comparator detects the shorted microphone, allowing its output to be pulled to logic high.

The DC voltage observed at VDETECT is 2.52V (refer to the Figure 7 scope shot), which causes the MAX9063 output to assert low. Pressing the hook switch grounds VDETECT, allowing the MAX9063 output to be pulled high by an external 10kΩ pull-up resistor. Thus, the tiny MAX9063 comparator is well suited for detecting hook switches and accessories. MAX9028 and MAX9030 comparators are also suitable for these applications.

The need for detecting jacks, headsets, and hook switches is common in portable applications. For that purpose, dedicated comparators such as the MAX9063/MAX9028/MAX9030 occupy very little real estate and consume negligible power. They offer an economical solution for detection circuitry in portable applications.

About the author:
Arpit Mehta is a strategic applications engineer for the Multimedia business unit at Maxim Integrated Products, currently responsible for solving technical problems in the op amp, comparator, and current-sense-amplifier product lines. Mehta graduated from San Jose State University with a Masters degree in Electrical Engineering.

Related links:
Headphone Amplifiers: Choose the right topology for your application
Good design practices that reduce noise corruption in portable audio apps
Headphone amplifier selection criteria for portable audio applications
Driving mobile headphones require attention to new details

1 | 2 | 3

Rate this article: Low High
Current rating
  • .
Embedded.com Career Center
Looking for a new job?
SEARCH JOBS

Browse all jobs

SPONSOR
RECENT JOB POSTINGS





 :