A headphone jack circuit and electronic device
By designing a headphone jack circuit that automatically identifies and grounds the headphone jack in the event of a power outage, the noise problem of the headphone jack after power failure is solved, achieving adaptive compatibility and grounding protection for different standard headphones, thus improving the reliability and safety of audio equipment.
Patent Information
- Application Number
- CN202611395071.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-09
- Publication Date
- 2026-11-17
AI Technical Summary
The existing headphone jack circuit has a problem where the audio interface ground pin cannot be grounded after the motherboard is powered off, causing noise to be generated by audio devices that are not powered off.
Design a headphone interface circuit, including first and second switch groups and a driver module, to automatically identify different standard headphones by detecting the voltage difference of the audio interface pins, and to ground the pins in the power-off state to ensure that the audio interface is grounded.
It achieves adaptive compatibility between different standard headphones, avoids noise problems after power failure, and features a simple circuit structure, low cost, and high reliability, thus improving the user experience and safety of audio devices.
Smart Images

Figure CN123123785A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of headphone jack circuit technology, and particularly to a headphone jack circuit and electronic device. Background Technology
[0002] Currently, four-segment headphone jacks are widely used in mobile terminals, computers, and various audio devices. Depending on the arrangement of the microphone (MIC) and ground (GND) pins, four-segment headphones come in two standards: the Chinese national standard (GB1) and the American standard (AUS). In both standards, the MIC pin and GND pin are in opposite positions. To ensure compatibility with these two different headphone standards, some motherboards or audio devices incorporate an automatic identification and switching chip to achieve adaptive matching for different headphone standards.
[0003] However, the aforementioned automatic identification switching chip has significant drawbacks in practical applications. When the motherboard or audio device's system power is off, but the connected speakers, amplifiers, or external audio devices are still powered on, the GND_MIC pin of the audio interface cannot be effectively grounded because the switching chip is in a high-impedance state. In this situation, the speakers or amplifiers that are not powered off are prone to generating severe noise because the audio ground cannot form an effective circuit through this pin, seriously affecting the user experience.
[0004] Therefore, how to automatically identify headphones of different standards while ensuring that the audio interface can be automatically grounded in the power-off state so that the audio device does not generate noise is a technical problem that urgently needs to be solved in this field. Summary of the Invention
[0005] The embodiments of the present invention provide a headphone interface circuit and an electronic device, which aim to solve the technical problem that existing headphone interface circuits cannot ground due to the audio interface grounding pin being in a high impedance state after the motherboard is powered off, resulting in noise generated by audio devices that are not powered off.
[0006] In a first aspect, the present invention provides an automatic headphone jack identification circuit, characterized in that it comprises: an audio interface having a first pin and a second pin for connecting microphone signals and ground signals of different standard headphones; a first switch group connected to the first pin, the second pin, and a sound card for selectively connecting the first pin and the second pin to the sound card; a second switch group connected to the first pin, the second pin, and motherboard ground for selectively connecting the first pin and the second pin to the motherboard ground; and a driver module connected to the first pin, the second pin, the first switch group, and the second switch group for generating control signals for controlling the selection of the first switch group and the second switch group based on the voltage of the pins; wherein the control signals are configured as follows: when the audio interface is connected to a first standard headphone, the first switch group is controlled to select the first pin to connect to the sound card, and the second switch group is controlled to select the second pin to connect to the motherboard ground; when the audio interface is connected to a second standard headphone, the first switch group is controlled to connect the second pin to the sound card, and the second switch group is controlled to connect the first pin to the motherboard ground; and in the power-off state, both the first switch group and the second switch group are controlled to ground the first pin and the second pin.
[0007] In the headphone interface circuit provided in this embodiment of the invention, the driving module includes a first driving group and a second driving group. The first driving group is connected to the first pin, the second pin, and the first switch group, and is used to drive the first switch group to selectively connect the first pin and the second pin to the sound card according to the voltage of the pin. The second driving group is connected to the first driving group and the second switch group, and is used to drive the second switch group to selectively connect the first pin and the second pin to the motherboard ground according to the output signal of the first driving group.
[0008] In the headphone interface circuit provided in this embodiment of the invention, the first switch group includes a first depletion-type analog switch and a second depletion-type analog switch; the two selected terminals of the first depletion-type analog switch are respectively connected to the first pin and the sound card; the two selected terminals of the second depletion-type analog switch are respectively connected to the second pin and the sound card; the control terminals of the first depletion-type analog switch and the second depletion-type analog switch are connected to the first drive group.
[0009] In the headphone interface circuit provided in this embodiment of the invention, the second switch group includes a third depletion-type analog switch and a fourth depletion-type analog switch; the two selected terminals of the third depletion-type analog switch are respectively connected to the first pin and the motherboard ground; the two selected terminals of the fourth depletion-type analog switch are respectively connected to the second pin and the motherboard ground; the control terminals of the third depletion-type analog switch and the fourth depletion-type analog switch are connected to the second drive group.
[0010] In the headphone interface circuit provided in this embodiment of the invention, the first driving group includes a first voltage divider circuit, a second voltage divider circuit, and a first switching transistor group; the second driving group includes a second switching transistor group. The input terminal of the first voltage divider circuit is connected to the first pin, and the output terminal is connected to the first control terminal of the first switching transistor group. The first control terminal is used to control the first switching transistor group to drive the first depletion-type analog switch. The input terminal of the second voltage divider circuit is connected to the second pin, and the output terminal is connected to the second control terminal of the first switching transistor group. The second control terminal is used to control the first switching transistor group to drive the second depletion-type analog switch. The first switching transistor group is respectively connected to the control terminals of the first depletion-type analog switch, the second depletion-type analog switch, and the second switching transistor group. The output terminal of the second switching transistor group is respectively connected to the control terminals of the third depletion-type analog switch and the fourth depletion-type analog switch.
[0011] In the headphone interface circuit provided in the embodiment of the present invention, the first switch group includes a first switch and a second switch; the control terminal of the first switch is connected to the output terminal of the first voltage divider circuit, the first terminal of the first switch is grounded, and the second terminal is connected to the control terminal of the first depletion-type analog switch and the first power supply of the motherboard; the control terminal of the second switch is connected to the output terminal of the second voltage divider circuit, the first terminal of the second switch is grounded, and the second terminal is connected to the control terminal of the second depletion-type analog switch.
[0012] In the headphone interface circuit provided in the embodiment of the present invention, the first voltage divider circuit includes a first resistor and a second resistor; the first end of the first resistor is connected to the first pin and the second power supply of the motherboard, the second end of the first resistor is connected to the first end of the second resistor and the control terminal of the first switching transistor, and the second end of the second resistor is grounded.
[0013] In the headphone interface circuit provided in this embodiment of the invention, the second switch group includes a third switch and a fourth switch; the control terminal of the third switch is connected to the second terminal of the first switch, the first terminal of the third switch is grounded, and the second terminal is connected to the control terminal of the third depletion-type analog switch; the control terminal of the fourth switch is connected to the second terminal of the second switch, the first terminal of the fourth switch is grounded, and the second terminal is connected to the control terminal of the fourth depletion-type analog switch and the first power supply of the motherboard.
[0014] In the headphone interface circuit provided in the embodiment of the present invention, the second voltage divider circuit includes a third resistor and a fourth resistor; the first end of the third resistor is connected to the second pin and the second power supply of the motherboard, the second end of the third resistor is connected to the first end of the fourth resistor and the control terminal of the second switching transistor, and the second end of the fourth resistor is grounded.
[0015] Secondly, the present invention provides an electronic device comprising a motherboard, a sound card, and the headphone jack automatic identification circuit described in the first aspect. The motherboard has a ground terminal, the sound card has a microphone input terminal, the headphone jack automatic identification circuit is integrated on the motherboard, and a first switch group of the headphone jack automatic identification circuit is connected to the microphone input terminal and a second switch group is connected to the ground terminal.
[0016] This invention detects the voltage difference between the first and second pins of the audio interface using a drive module, automatically identifying different standard headphones and controlling the first and second switch groups to work together. This achieves precise selection between the microphone signal terminal and the ground terminal, enabling adaptive compatibility with both Chinese and American standard headphones without relying on software algorithms or additional adapters. Simultaneously, it automatically conducts when the device is powered off, directly grounding the first and second pins, effectively eliminating the noise problem in audio devices that are not powered off due to the high impedance state of the pins after power failure in traditional automatic identification chips. The overall circuit structure of this invention is simple, low-cost, and highly reliable, and can be widely applied to the audio interface design of various electronic devices. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the structures shown in these drawings without creative effort.
[0018] Figure 1 A schematic structural block of the headphone interface circuit provided in an embodiment of the present invention. Figure 1 ; Figure 2 These are structural diagrams of two different standard headphone connectors; Figure 3 A schematic structural block diagram illustrating the connection between the audio interface of the headphone interface circuit provided in an embodiment of the present invention and a first standard headphone. Figure 4 A schematic structural block diagram illustrating the connection between the audio interface of the headphone interface circuit provided in an embodiment of the present invention and a second standard headphone. Figure 5 A schematic structural block of the headphone interface circuit provided in an embodiment of the present invention. Figure 2 ; Figure 6 A circuit diagram of a headphone interface circuit provided in an embodiment of the present invention; Figure 7 A schematic structural block diagram of an electronic device provided in an embodiment of the present invention; Explanation of reference numerals in the attached figures: 10. Audio interface; 20. First switch group; 30. Second switch group; 40. Driver module; 41. First driver group; 411. First voltage divider circuit; 412. Second voltage divider circuit; 413. First switching transistor group; 42. Second driver group; 421. Second switching transistor group; 210. Motherboard; 220. Sound card; 230. Headphone jack circuit. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0020] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indication will also change accordingly.
[0021] Please see Figures 1 to 6 This invention provides a headphone interface circuit, comprising: an audio interface 10 having a first pin M and a second pin N for connecting microphone signals and ground signals of different standard headphones; a first switch group 20 connected to the first pin M, the second pin N, and a sound card, for selectively connecting the first pin M and the second pin N to the sound card; a second switch group 30 connected to the first pin M, the second pin N, and motherboard ground, for selectively connecting the first pin M and the second pin N to the motherboard ground; and a driver module 40 connected to the first pin M, the second pin N, the first switch group 20, and the second switch group 30, for generating signals based on the voltage of the pins. A control signal is configured to control the selection of the first switch group 20 and the second switch group 30; wherein, the control signal is configured as follows: when the audio interface 10 is connected to a first standard headphone, the first switch group 20 is controlled to select the first pin M to connect to the sound card, and the second switch group 30 is controlled to select the second pin N to connect to the motherboard ground; when the audio interface 10 is connected to a second standard headphone, the first switch group 20 is controlled to connect the second pin N to the sound card, and the second switch group 30 is controlled to connect the first pin M to the motherboard ground; and in the power-off state, both the first switch group 20 and the second switch group 30 are controlled to ground the first pin M and the second pin N.
[0022] In specific implementation, the audio interface 10 is configured as a socket for inserting four-segment headphones of different standards (e.g., a universal 3.5mm audio interface 10), and it has multiple pins internally, including at least a first pin M and a second pin N. This circuit can be widely used in various electronic devices such as mobile phones, tablets, laptops, desktops, audio amplifiers, and game consoles. Its core functional modules (audio interface 10, switch group, and driver module 40) are usually integrated on the device's motherboard. The motherboard is the power supply and signal carrying platform for the entire electronic device, providing operating power (e.g., 3.3V, 5V) and a common ground reference point (i.e., motherboard ground GND1). The sound card is a circuit module or independent chip on the motherboard specifically responsible for processing audio signals, and it is connected to the audio interface 10 through a specific signal line. The first switch group 20 ultimately connects the microphone signal of the headphones to the dedicated microphone input terminal in the sound card circuit (i.e., the dedicated interface of the sound card for receiving external analog audio signals), ensuring that subsequent audio acquisition and processing can proceed normally.
[0023] This embodiment uses the first standard earphone as a Chinese standard earphone and the second standard earphone as an American standard earphone as examples. The earphone connector structure is as follows: Figure 2 As shown, in common Chinese standard headphones, the first to fourth segments of the plug correspond to the left channel (L), right channel (R), ground (GND), and microphone (MIC), respectively. However, in common American standard headphones, the order of these segments is interchangeable. Therefore, the first pin M and the second pin N on the same socket are used to connect the microphone signal terminal (MIC) and the ground terminal (GND) of the headphones, respectively. The first pin M and the second pin N form two signal transmission lines, MIC1 and MIC2, respectively. One line transmits the microphone signal MIC, and the other transmits the ground signal GND. The specific signals transmitted by MIC1 and MIC2 depend on the standard type of headphones inserted.
[0024] The first switch group 20 is configured between the audio interface 10 and the microphone input terminal of the sound card circuit. Its main function is to selectively connect one of its pins to the microphone input terminal of the sound card according to a control signal, so as to provide a microphone signal (MIC) to the sound card. The second switch group 30 is configured between the audio interface 10 and the motherboard ground, and is used to selectively connect the other pin to the motherboard ground (GND1) according to a control signal, thereby realizing the correct conduction of the grounding path in the audio circuit. In this embodiment, the driver module 40 detects the voltage on the first pin M and the second pin N in real time, and generates corresponding control signals based on the differences in these voltages to drive the first switch group 20 and the second switch group 30 to operate in coordination.
[0025] In specific work, see Figure 3 and Figure 4 Because the physical positions of the microphone input and ground terminals are interchanged when different standard headphones are plugged in, this will cause a significant difference in the impedance or voltage to ground on the first pin M and the second pin N. For example... Figure 2 As shown, when a first standard headset (e.g., a GB standard headset) is connected, the driver module 40 detects that the voltage of the first pin M is at a first level and the voltage of the second pin N is at a second level. The driver module 40 then generates corresponding control signals, causing the first switch group 20 to connect the first pin M to the microphone input of the sound card circuit, while the second switch group 30 connects the second pin N to the motherboard ground. Figure 4 As shown, when a second standard headset (e.g., a US standard headset) is connected, the driver module 40 detects a reversal in the voltage of the first pin M and the second pin N. At this time, the control signal controls the first switch group 20 to connect the second pin N to the microphone input terminal of the sound card circuit, and simultaneously controls the second switch group 30 to connect the first pin M to the motherboard ground. Through this method of controlling the switch groups to coordinate selection based on pin voltage changes, this application realizes automatic identification and adaptive switching between Chinese standard and US standard headsets, without manual intervention or reliance on complex software algorithms. The circuit response is fast and the reliability is high.
[0026] Furthermore, the circuit in this embodiment is equipped with a power-down protection mechanism. When the motherboard loses power or the system power is cut off, the drive module 40 cannot continue to output control signals due to the loss of power supply. At this time, the first switch group 20 and the second switch group 30 can automatically and simultaneously connect the first pin M and the second pin N of the audio interface 10 directly to the motherboard ground without a control signal. This power-down grounding function effectively avoids the problem of noise generated by speakers or amplifiers that are not powered off due to high pin impedance after power failure, which is a problem of traditional automatic identification ICs. This fundamentally improves the user experience and safety of audio equipment under abnormal operating conditions.
[0027] Through the above circuit structure and logic, the circuit in this embodiment achieves automatic identification of headphone standards and automatic grounding protection when power is lost without the need for additional adapters or complex control chips. It has significant advantages such as simple circuit structure, low cost and high reliability.
[0028] In one embodiment, see Figure 5The driving module 40 includes a first driving group 41 and a second driving group 42. The first driving group 41 is connected to the first pin M, the second pin N and the first switch group 20, and is used to drive the first switch group 20 to selectively connect the first pin M and the second pin N to the sound card according to the voltage of the pin. The second driving group 42 is connected to the first driving group 41 and the second switch group 30, and is used to drive the second switch group 30 to selectively connect the first pin M and the second pin N to the motherboard ground according to the output signal of the first driving group 41.
[0029] In practical implementation, the driver module 40 is logically divided into two functional units: a first driver group 41 and a second driver group 42, to achieve independent detection and coordinated control of the two switch groups. The first driver group 41 is connected to the first pin M and the second pin N of the audio interface 10, and also to the first switch group 20. The first driver group 41 generates corresponding drive signals by detecting voltage changes on the first pin M and the second pin N, controlling the first switch group 20 to perform a selection action, determining which pin M or the second pin N is connected to the microphone input of the sound card circuit. The second driver group 42 is connected to the first driver group 41 and the second switch group 30. Its function is to generate corresponding drive signals based on the drive signals output by the first driver group 41, controlling the second switch group 30 to perform a selection action, determining which pin M or the second pin N is connected to the motherboard ground. In other words, the drive action of the second driver group 42 is determined by the output of the first driver group 41; the drive signals output by the first driver group 41 serve as control signals for both the first switch group 20 and the second driver group 42.
[0030] Since the first switch group 20 is responsible for connecting to the sound card and the second switch group 30 is responsible for connecting to the motherboard ground, and their selection logic needs to be strictly complementary, that is, when the first switch group 20 connects the first pin M to the sound card, the second switch group 30 must connect the second pin N to the motherboard ground; and vice versa. The first driver group 41 detects the pin voltage and generates a corresponding drive signal based on the specific level of the voltage (e.g., voltage differences caused by different headphone standards) to control the first switch group 20. The second driver group 42 controls the second switch group 30 based on the output signal of the first switch group 20, thereby realizing the synchronous reverse switching of the first switch group 20 and the second switch group 30. This architecture, which divides the driver module 40 into two independent driver groups, makes the overall detection logic of the circuit clearer, facilitates subsequent circuit debugging and maintenance, and also provides a higher degree of modular layered protection for hardware design.
[0031] Further, see Figure 5 and Figure 6The first switch group 20 includes a first depletion-type analog switch U1 and a second depletion-type analog switch U3; the two selected terminals of the first depletion-type analog switch U1 are respectively connected to the first pin M and the sound card; the two selected terminals of the second depletion-type analog switch U3 are respectively connected to the second pin N and the sound card; the control terminals of the first depletion-type analog switch U1 and the second depletion-type analog switch U3 are connected to the first drive group 41.
[0032] In specific implementation, the first switch group 20 is physically configured as two independent depletion-type analog switches to select the headphone microphone signal to the sound card circuit. Specifically, the two selected terminals of the first depletion-type analog switch U1 are connected to the first pin M of the audio interface 10 and the microphone input terminal of the sound card circuit, respectively; the two selected terminals of the second depletion-type analog switch U3 are connected to the second pin N of the audio interface 10 and the microphone input terminal of the sound card circuit, respectively. Under normal operating conditions, the first depletion-type analog switch U1 and the second depletion-type analog switch U3 switch their on / off states according to the drive signal output by the first drive group 41, ultimately ensuring that the microphone input terminal of the sound card circuit remains connected only to the correct one of the first pin M and the second pin N.
[0033] In practical applications, the first driver group 41 detects the voltage difference between the first pin M and the second pin N, generates a corresponding drive signal, and simultaneously applies it to the control terminals of the first depletion-type analog switch U1 and the second depletion-type analog switch U3. When a standard headset is connected, the drive signal output by the first driver group 41 turns on the first depletion-type analog switch U1 and turns off the second depletion-type analog switch U3, thereby connecting the first pin M to the microphone input terminal of the sound card. When another standard headset is connected, the drive signal level is reversed, the first depletion-type analog switch U1 turns off and the second depletion-type analog switch U3 turns on, thereby connecting the second pin N to the microphone input terminal of the sound card. Since both the first depletion-type analog switch U1 and the second depletion-type analog switch U3 are depletion-type devices, their control terminals can accurately switch between "one on, the other off" after receiving the corresponding drive signal, without the signal conflict caused by both being on simultaneously or the signal loss caused by both being off simultaneously. By setting this dual analog switch structure at the signal gating front end, the first drive group 41 can accurately identify the headphone standard and guide the correct microphone signal to the sound card circuit, providing a reliable hardware foundation for realizing the automatic identification function.
[0034] Furthermore, see Figure 5 and Figure 6The second switch group 30 includes a third depletion-type analog switch U2 and a fourth depletion-type analog switch U4; the two selected terminals of the third depletion-type analog switch U2 are respectively connected to the first pin M and the motherboard ground; the two selected terminals of the fourth depletion-type analog switch U4 are respectively connected to the second pin N and the motherboard ground; the control terminals of the third depletion-type analog switch U2 and the fourth depletion-type analog switch U4 are connected to the second drive group 42.
[0035] In specific implementation, the second switch group 30 is physically configured as two independent depletion-type analog switches to select the headphone ground terminal to the motherboard ground. Specifically, the two selected terminals of the third depletion-type analog switch U2 are connected to the first pin M of the audio interface 10 and the motherboard ground, respectively; the two selected terminals of the fourth depletion-type analog switch U4 are connected to the second pin N of the audio interface 10 and the motherboard ground, respectively. During actual operation, the third depletion-type analog switch U2 and the fourth depletion-type analog switch U4 switch their on / off states according to the drive signal output by the second drive group 42, ultimately ensuring that the motherboard ground is only connected to the correct one of the first pin M and the second pin N.
[0036] In practical operation, the second drive group 42 detects the drive signal output by the first drive group 20, generates a corresponding drive signal, and simultaneously applies it to the control terminals of the third depletion-type analog switch U2 and the fourth depletion-type analog switch U4. When a standard headset is connected, the drive signal output by the second drive group 42 will turn off the third depletion-type analog switch U2 and turn on the fourth depletion-type analog switch U4, thereby connecting the second pin N to the motherboard ground. When another standard headset is connected, the drive signal level is reversed, the third depletion-type analog switch U2 turns on and the fourth depletion-type analog switch U4 turns off, thereby connecting the first pin M to the motherboard ground. Since both the third depletion-type analog switch U2 and the fourth depletion-type analog switch U4 use depletion-type devices, their control terminals can accurately switch between "one on, the other off" after receiving the corresponding drive signal, ensuring that the grounding path can be correctly connected under any standard, without causing motherboard ground confusion due to both paths being on simultaneously or grounding failure due to both paths being off simultaneously. Through this dual analog switch structure, the second drive group 42 can accurately connect the ground terminal of the headphones to the motherboard ground under different standards, providing a stable reference ground for the audio circuit, thereby ensuring that the sound card circuit can receive microphone signals and complete audio processing normally.
[0037] Furthermore, see Figure 6The first drive group 41 includes a first voltage divider circuit 411, a second voltage divider circuit 412, and a first switch group 413. The second drive group 42 includes a second switch group 421. The input terminal of the first voltage divider circuit 411 is connected to the first pin M, and the output terminal is connected to the first control terminal of the first switch group 413. The first control terminal is used to control the first switch group 413 to drive the first depletion-type analog switch U1. The input terminal of the second voltage divider circuit 412 is connected to the second pin N, and the output terminal is connected to the second control terminal of the first switch group 413. The second control terminal is used to control the first switch group 413 to drive the second depletion-type analog switch U3. The first switch group 413 is connected to the control terminals of the first depletion-type analog switch U1, the second depletion-type analog switch U3, and the second switch group 421, respectively. The output terminal of the second switch group 421 is connected to the control terminals of the third depletion-type analog switch U2 and the fourth depletion-type analog switch U4, respectively.
[0038] In specific implementation, the first drive group 41 consists of a first voltage divider circuit 411, a second voltage divider circuit 412, and a first switching transistor group 413, and is responsible for converting the voltage signal on the audio interface 10 pin into a drive signal to control the first switching group 20. Specifically, the first voltage divider circuit 411 is connected to the first pin M, used to detect the voltage on the first pin M, and proportionally reduce it before outputting it to the first control terminal of the first switching transistor group 413; the second voltage divider circuit 412 is connected to the second pin N, used to detect the voltage on the second pin N, and proportionally reduce it before outputting it to the second control terminal of the first switching transistor group 413. After receiving signals from the first control terminal and the second control terminal, the first switch group 413 changes the on or off state of its internal switch according to the different voltages generated on the first pin M and the second pin N of different standard headphones, thereby generating a corresponding drive level at its output terminal and outputting it to the control terminals of the first depletion-type analog switch U1 and the second depletion-type analog switch U3 respectively to control the selection state of the first switch group 20. The drive level of the first switch group 413 is also simultaneously output to the control terminal of the second switch group 421 as the control signal of the second switch group 421.
[0039] The second drive group 42 mainly consists of a second switch group 421, used to control the selection of the second switch group 30. Since the second switch group 421 uses the output signal of the first switch group 413 as the control signal, the second switch group 421 can output control of the drive level of the third depletion-type analog switch U2 and the fourth depletion-type analog switch U4 according to the drive signal state output by the first switch group 413 in the first drive group 41, thereby realizing the selection of the grounding path within the second switch group 30. By simultaneously detecting the voltage of the first pin M and the second pin N through the first voltage divider circuit 411 and the second voltage divider circuit 412, and combined with the series linkage control of the first switch group 413 and the second switch group 421, this circuit can automatically realize the synchronous reverse switching of the first switch group 20 and the second switch group 30 according to the difference in pin voltage, ensuring that the microphone signal and the ground terminal can always be correctly connected to the corresponding target port under different standard headphones.
[0040] Furthermore, see Figure 6 The first switch group 413 includes a first switch PQ11 and a second switch PQ12; the control terminal of the first switch PQ11 is connected to the output terminal of the first voltage divider circuit 411, the first terminal of the first switch PQ11 is grounded, and the second terminal is connected to the control terminal of the first depletion-type analog switch U1 and the first power supply of the motherboard; the control terminal of the second switch PQ12 is connected to the output terminal of the second voltage divider circuit 412, the first terminal of the second switch PQ12 is grounded, and the second terminal is connected to the control terminal of the second depletion-type analog switch U3.
[0041] In specific implementation, the first switching transistor group 413, as the core control element of the first drive group 41, consists of two independent switching transistors, namely the first switching transistor PQ11 and the second switching transistor PQ12. The control terminal of the first switching transistor PQ11 is connected to the output terminal of the first voltage divider circuit 411, and is used to receive the drive signal generated by the first voltage divider circuit 411 after detecting the voltage of the first pin M; the control terminal of the second switching transistor PQ12 is connected to the output terminal of the second voltage divider circuit 412, and is used to receive the drive signal generated by the second voltage divider circuit 412 after detecting the voltage of the second pin N. The first terminal of the first switching transistor PQ11 is grounded, and the second terminal is connected to both the control terminal of the first depletion-type analog switch U1 and the first power supply of the motherboard; the first terminal of the second switching transistor PQ12 is grounded, and the second terminal is connected to the control terminal of the second depletion-type analog switch U3.
[0042] In practical operation, when a first standard headphone (e.g., a national standard headphone) is connected, the voltage on the first pin M is pulled down to a first voltage. After being divided by the first voltage divider circuit 411, the voltage at the control terminal of the first switching transistor PQ11 drops below the turn-off threshold, and the first switching transistor PQ11 is turned off. At this time, the second terminal of the first switching transistor PQ11 remains at a high level because it is connected to the first power supply of the motherboard. This high-level signal is applied to the control terminal of the first depletion-type analog switch U1, causing the first depletion-type analog switch U1 to be in the off state. Simultaneously, the voltage on the second pin N is pulled down to a second voltage. After being divided by the second voltage divider circuit 412, the voltage at the control terminal of the second switching transistor PQ12 is kept above the turn-on threshold, and the second switching transistor PQ12 is turned on. Its second terminal is grounded, and a low-level signal is applied to the control terminal of the second depletion-type analog switch U3, causing the second depletion-type analog switch U3 to be turned on, thereby connecting the second pin N to the microphone input terminal of the sound card.
[0043] When a second standard headset (e.g., a US standard headset) is connected, the voltage states on the first pin M and the second pin N are reversed, and the conduction states of the first switch PQ11 and the second switch PQ12 are switched accordingly. At this time, the first switch PQ11 is turned on, and its second terminal is grounded, causing the first depletion-type analog switch U1 to conduct, thereby connecting the first pin M to the sound card; the second switch PQ12 is turned off, and its second terminal remains at a high level, causing the second depletion-type analog switch U3 to turn off. By having the first switch PQ11 and the second switch PQ12 independently controlled and complementary by the first voltage divider circuit 411 and the second voltage divider circuit 412 respectively, a pair of opposite level signals are generated at the output of the first switch group 413, thereby accurately driving the first depletion-type analog switch U1 and the second depletion-type analog switch U3 to perform the selection operation, completing the correct access of the microphone signal path.
[0044] Furthermore, see Figure 6 The first voltage divider circuit 411 includes a first resistor MR6 and a second resistor MR7; the first end of the first resistor MR6 is connected to the first pin M and the second power supply of the motherboard, the second end of the first resistor MR6 is connected to the first end of the second resistor MR7 and the control terminal of the first switching transistor PQ11, and the second end of the second resistor MR7 is grounded.
[0045] In specific implementation, the first voltage divider circuit 411 consists of a first resistor MR6 and a second resistor MR7 connected in series. It is used to detect and divide the voltage on the first pin M, and then transmit the divided voltage signal to the control terminal of the first switching transistor PQ11. The first end of the first resistor MR6 is connected to both the first pin M of the audio interface 10 and the motherboard's second power supply. The motherboard's second power supply provides a pull-up bias voltage (e.g., 3.3V) to the first pin M, keeping it at a higher potential when no headphones are plugged in or when it is in a specific state. The first end of the second resistor MR7 is connected to the second end of the first resistor MR6, and this connection point is also connected to the control terminal of the first switching transistor PQ11. The second end of the second resistor MR7 is grounded, thus forming a voltage divider point at the connection point of the first resistor MR6 and the second resistor MR7. The voltage at this point is determined by the actual voltage of the first pin M and the voltage division ratio of the first resistor MR6 and the second resistor MR7.
[0046] In practical operation, when different standard headphones are plugged in, the first pin M has different impedances to ground and voltages depending on whether it is connected to the microphone or ground terminal of the headphone. The voltage divider circuit, composed of the first resistor MR6 and the second resistor MR7, continuously detects the voltage on the first pin M and transmits the proportionally stepped-down detection signal to the control terminal of the first switching transistor PQ11 through its voltage divider node. This control terminal is used to trigger the first switching transistor PQ11 to turn on or off based on the received voltage level. Through this voltage divider circuit configuration, the first voltage divider circuit 411 can convert the voltage change on the first pin M into a switching control signal recognizable by the first switching transistor PQ11 using a simple resistor voltage divider principle without relying on an external control chip, thus providing stable and reliable front-end voltage detection and signal driving functions for the entire circuit.
[0047] In one embodiment, see Figure 6 The second switch group 421 includes a third switch PQ13 and a fourth switch PQ14; the control terminal of the third switch PQ13 is connected to the second terminal of the first switch PQ11, the first terminal of the third switch PQ13 is grounded, and the second terminal is connected to the control terminal of the third depletion-type analog switch U2; the control terminal of the fourth switch PQ14 is connected to the second terminal of the second switch PQ12, the first terminal of the fourth switch PQ14 is grounded, and the second terminal is connected to the control terminal of the fourth depletion-type analog switch U4 and the first power supply of the motherboard.
[0048] In specific implementation, the second switch group 421, as the core component driving the selection of the second switch group 30, is composed of the third switch PQ13 and the fourth switch PQ14. The control terminal of the third switch PQ13 is directly connected to the second terminal of the first switch PQ11 (belonging to the first switch group 413), that is, connected to the node between the drain of the first switch PQ11 and the control terminal of the first depletion-type analog switch U1. The control terminal of the fourth switch PQ14 is directly connected to the second terminal of the second switch PQ12 (belonging to the first switch group 413), that is, connected to the node between the drain of the second switch PQ12 and the control terminal of the second depletion-type analog switch U3. The first terminal of the third switch PQ13 is grounded, and its second terminal is connected to the control terminal of the third depletion-type analog switch U2; the first terminal of the fourth switch PQ14 is grounded, and its second terminal is connected to the control terminal of the fourth depletion-type analog switch U4, and is also connected to the first power supply of the motherboard.
[0049] In actual operation, the on / off states of the third switch PQ13 and the fourth switch PQ14 are determined by the output states of the first switch PQ11 and the second switch PQ12. When the first switch PQ11 is on, its second terminal is pulled low to ground potential. This low-level signal is directly transmitted to the control terminal of the third switch PQ13, causing the third switch PQ13 to turn off. At this time, the second terminal of the third switch PQ13 is maintained at a high level because it is connected to the main board's first power supply (e.g., 5V). This high-level signal acts on the control terminal of the third depletion-type analog switch U2, putting it in the off state. When the first switch PQ11 is off, its second terminal remains at a high level, turning on the third switch PQ13. The second terminal of the third switch PQ13 is grounded, and a low-level signal acts on the control terminal of the third depletion-type analog switch U2, turning it on.
[0050] Similarly, the fourth switch PQ14 is synchronously controlled by the output state of the second switch PQ12: when the second switch PQ12 is on, the fourth switch PQ14 is off, and the fourth depletion-type analog switch U4 is off because the control terminal is high; when the second switch PQ12 is off, the fourth switch PQ14 is on, and the fourth depletion-type analog switch U4 is on because the control terminal is low. Through this cascaded linkage mechanism where "the first switch group 413 determines the state of the first switch group 20, and the second switch group 421 follows the state of the first switch group 413 to perform complementary actions," the second switch group 421 can achieve synchronous reverse switching with the first switch group 413 without additional voltage divider detection circuit. This ensures that while correctly connecting the microphone signal to the sound card, the corresponding pin is connected to the motherboard ground, forming a complete audio signal and ground loop.
[0051] Further, see Figure 6The second voltage divider circuit 412 includes a third resistor MR8 and a fourth resistor MR9; the first end of the third resistor MR8 is connected to the second pin N and the second power supply of the motherboard, the second end of the third resistor MR8 is connected to the first end of the fourth resistor MR9 and the control terminal of the second switching transistor PQ12, and the second end of the fourth resistor MR9 is grounded.
[0052] In specific implementation, the second voltage divider circuit 412 consists of a third resistor MR8 and a fourth resistor MR9 connected in series, used to detect the voltage state on the second pin N. The first terminal of the third resistor MR8 is connected to both the second pin N of the audio interface 10 and the motherboard's second power supply (e.g., 3.3V), providing a pull-up bias voltage to the second pin N, keeping it at a higher potential when no headphones are plugged in or in a specific state. The first terminal of the fourth resistor MR9 is connected to the second terminal of the third resistor MR8, and this node is also connected to the control terminal of the second switching transistor PQ12; the second terminal of the fourth resistor MR9 is grounded, forming a voltage divider detection point for the voltage at the second pin N together with the third resistor MR8.
[0053] In practical operation, when headphones are connected, the voltage on the second pin N changes depending on the headphone standard. The third resistor MR8 and the fourth resistor MR9 divide this voltage proportionally and send the divided signal to the control terminal of the second switching transistor PQ12. By detecting the voltage on the second pin N, this voltage divider circuit can accurately provide a switching control signal to the second switching transistor PQ12 in the first switching transistor group 413. Combined with the coordinated detection of the first voltage divider circuit 411, this drives the first switching transistor group 413 and subsequently the second switching transistor group 421, achieving the overall circuit's automatic identification and selection function.
[0054] In one embodiment, Figure 6 This is a circuit diagram of the headphone jack circuit. To further understand the headphone jack circuit, the following is a reference to... Figure 6 The principle and working process of the headphone interface circuit are explained in detail.
[0055] See Figure 6The headphone interface circuit uses audio interface 10 (AUDIO_2IN1) as the front-end input, and its pins are connected to the microphone signal terminal (MIC) and ground terminal (GND) of different standard headphones. The circuit is configured with two voltage division circuits, two groups of NMOS switches, and two switch groups consisting of four depletion-mode analog switches (U1~U4), namely the first switch group 20 and the second switch group 30. Among them, the first pin is connected to the 3.3V second power supply VCCA3V3_MIC through resistor R4040 and capacitor C4097, and is grounded in series through the first resistor MR6 and the second resistor MR7 to form the first voltage divider circuit 411, and its voltage division node is connected to the gate of the first switch PQ11; the second pin is connected to the 3.3V second power supply VCCA3V3_MIC through resistor R4041 and capacitor C4098, and is grounded in series through the third resistor MR8 and the fourth resistor MR9 to form the second voltage divider circuit 412, and its voltage division node is connected to the gate of the second switch PQ12. The first switching transistor PQ11 and the second switching transistor PQ12 together constitute the first switching transistor group 413, which is controlled by the first voltage divider circuit 411 and the second voltage divider circuit 412 respectively.
[0056] The drain of the first switch PQ11 is connected to the 5V first power supply VCC_5V through resistor MR5, and is also connected to the control terminal of the first depletion-type analog switch U1, serving as the gate control signal for the third switch PQ13. The drain of the second switch PQ12 is connected to the 5V first power supply VCC_5V through resistor MR3, and is also connected to the control terminal of the second depletion-type analog switch U3, serving as the gate control signal for the fourth switch PQ14. The third switch PQ13 and the fourth switch PQ14 together form the second switch group 421, with their drains connected to the 5V first power supply VCC_5V through resistors MR4 and MR1, respectively, and connected to the control terminals of the third depletion-type analog switch U2 and the fourth depletion-type analog switch U4, respectively. The control terminal logic of the four depletion-type analog switches is as follows: a high level (greater than 2.5V) means the switch is off, and a low level (less than 0.5V) means the switch is on.
[0057] When a standard headphone (such as a national standard headphone) is connected, the first pin is connected to the headphone ground terminal, and the potential is pulled low. After being divided by the first voltage divider circuit 411, the gate voltage of the first switching transistor PQ11 drops to about 0.5V, and it is in the off state, while its drain remains at a high level of 5V. This high level, on the one hand, makes the control terminal of the first depletion-type analog switch U1 high and turns it off, blocking the connection between the first pin and the sound card; on the other hand, it makes the gate of the third switching transistor PQ13 high and turns it on, and its drain is pulled low, which in turn makes the control terminal of the third depletion-type analog switch U2 low and turns it on, connecting the first pin to the motherboard ground. Meanwhile, the second pin is connected to the headphone microphone. The potential is pulled down slightly. After being divided by the second voltage divider circuit 412, the gate voltage of the second switch PQ12 is about 1.8V, which is in the on state. Its drain is pulled down to a low level, which makes the control terminal of the second depletion-type analog switch U3 low and on, connecting the second pin to the microphone input terminal of the sound card. At the same time, this low level turns off the fourth switch PQ14, and its drain remains at a high level of 5V, which turns off the fourth depletion-type analog switch U4, blocking the connection between the second pin and the motherboard ground.
[0058] When a second standard headset (such as a US standard headset) is connected, the microphone and ground terminals of the headset are swapped, causing a complete reversal of the voltage states on the first and second pins. At this time, the first voltage divider circuit 411 drives the first switching transistor PQ11 to conduct, and its low-level drain turns on the first depletion-type analog switch U1, connecting the first pin to the microphone input of the sound card. Simultaneously, it turns off the third switching transistor PQ13, and its high-level drain turns off the third depletion-type analog switch U2, blocking the connection between the first pin and the motherboard ground. The second voltage divider circuit 412 drives the second switching transistor PQ12 to turn off, and its high-level drain turns off the second depletion-type analog switch U3, blocking the connection between the second pin and the sound card. Simultaneously, it turns on the fourth switching transistor PQ14, and its low-level drain turns on the fourth depletion-type analog switch U4, connecting the second pin to the motherboard ground. Through the coordinated operation of these circuits, automatic identification and precise switching between different standard headsets are achieved.
[0059] In addition, when the device loses power, both the 5V first power supply and the 3.3V second power supply drop to 0V. All four depletion-type analog switches automatically turn on (return to the normally closed state) due to the loss of control terminal drive voltage, and the first and second pins of the audio interface 10 are simultaneously connected to the motherboard ground, thereby effectively eliminating the audio noise problem caused by the high impedance state of the pins after power failure.
[0060] In summary, the headphone interface circuit of this invention detects the voltage differences generated when different standard headphones are connected by using the first and second pins of the audio interface in conjunction with the driver module. It then controls the first and second switch groups to operate collaboratively, automatically selecting the correct pin to connect to the sound card and the other pin to the motherboard ground. This allows for adaptive identification of Chinese and American standard headphones without software intervention or additional adapter cables. Furthermore, it automatically turns on when the device is powered off, directly grounding the first and second pins. This effectively avoids noise generated by audio devices that are still powered on due to high impedance at the pins after power failure, improving the reliability of the audio device and the user experience.
[0061] Please see Figure 7 The present invention also provides an electronic device, which includes a motherboard 210, a sound card 220, and a headphone interface circuit 230 as described in the above embodiments. The motherboard 210 has a ground terminal GND1, the sound card 220 has a microphone input terminal MIC, and the headphone interface circuit 230 is integrated on the motherboard 210. The first switch group 20 of the headphone interface circuit 230 is connected to the microphone input terminal MIC, and the second switch group 30 is connected to the ground terminal GND1.
[0062] In specific implementations, the electronic device can be a mobile phone, tablet computer, laptop computer, desktop computer, audio amplifier, or game console, or other electronic terminal with audio input and output functions. The motherboard 210 is the core circuit board of the electronic device, responsible for power supply, signal processing, and various peripheral interfaces, and has a ground terminal GND1, used as the zero-potential reference point for the entire circuit. The sound card 220 is a dedicated circuit module on the motherboard 210 responsible for audio signal processing; its microphone input terminal MIC is used to receive externally input analog audio signals, such as voice signals collected by a headphone microphone.
[0063] The headphone interface circuit 230 is integrated on the motherboard 210, specifically positioned on the signal path between the audio interface 10 and the sound card 220. Its internal first switch group 20 is connected to the microphone input terminal (MIC) of the sound card 220 on the motherboard 210, and the second switch group 30 is connected to the ground terminal (GND1) of the motherboard 210. In actual operation, when a user inserts headphones of different standards (Chinese standard headphones or American standard headphones) into the audio interface 10 of the electronic device, the headphone interface circuit 230 detects the voltage difference between the first and second pins of the audio interface 10 through its driver module 40. It automatically controls the first switch group 20 to connect the correct pin to the microphone input terminal (MIC) of the sound card 220, while simultaneously controlling the second switch group 30 to connect the other pin to the ground terminal (GND1) of the motherboard 210, thereby achieving normal acquisition and transmission of the headphone microphone signal. When the motherboard 210 of the electronic device loses power or the system power is cut off, the first switch group 20 and the second switch group 30 are automatically turned on, directly grounding the two pins of the audio interface 10, effectively preventing the speakers or amplifiers that are not powered off from generating noise due to the inability to ground the audio signal.
[0064] By integrating the aforementioned headphone jack circuit onto the motherboard of the electronic device and establishing a standardized connection between it and the microphone input of the sound card and the grounding terminal of the motherboard, the electronic device can automatically achieve compatibility with different standard headphones without relying on software algorithms or additional adapter cables. It also features automatic grounding protection when power is lost, significantly improving the audio compatibility and reliability of the device in various application scenarios, while reducing maintenance costs and enhancing the user experience.
[0065] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A headphone jack circuit, characterized in that, include: The audio interface has a first pin and a second pin for connecting the microphone signal and ground signal of different standard headphones; The first switch group connects the first pin, the second pin, and the sound card, and is used to selectively connect the first pin and the second pin to the sound card; The second switch group is connected to the first pin, the second pin and the motherboard ground, and is used to selectively connect the first pin and the second pin to the motherboard ground; A drive module, connected to the first pin, the second pin, the first switch group, and the second switch group, is used to generate a control signal for controlling the selection of the first switch group and the second switch group based on the voltage of the pin. The control signal is configured as follows: when the audio interface is connected to a first standard headphone, the first switch group is controlled to select the first pin to connect to the sound card, and the second switch group is controlled to select the second pin to connect to the motherboard ground; when the audio interface is connected to a second standard headphone, the first switch group is controlled to connect the second pin to the sound card, and the second switch group is controlled to connect the first pin to the motherboard ground; and in the power-off state, both the first switch group and the second switch group are controlled to ground the first pin and the second pin.
2. The headphone interface circuit according to claim 1, characterized in that, The driving module includes a first driving group and a second driving group. The first driving group is connected to the first pin, the second pin, and the first switch group, and is used to drive the first switch group to selectively connect the first pin and the second pin to the sound card according to the voltage of the pin. The second driving group is connected to the first driving group and the second switch group, and is used to drive the second switch group to selectively connect the first pin and the second pin to the motherboard ground according to the output signal of the first driving group.
3. The headphone interface circuit according to claim 2, characterized in that, The first switch group includes a first depletion-mode analog switch and a second depletion-mode analog switch; The two selected terminals of the first depletion-type analog switch are respectively connected to the first pin and the sound card; the two selected terminals of the second depletion-type analog switch are respectively connected to the second pin and the sound card; the control terminals of the first depletion-type analog switch and the second depletion-type analog switch are connected to the first drive group.
4. The headphone interface circuit according to claim 3, characterized in that, The second switch group includes a third depletion-mode analog switch and a fourth depletion-mode analog switch; The two selected terminals of the third depletion-type analog switch are respectively connected to the first pin and the motherboard ground; the two selected terminals of the fourth depletion-type analog switch are respectively connected to the second pin and the motherboard ground; the control terminals of the third depletion-type analog switch and the fourth depletion-type analog switch are connected to the second drive group.
5. The headphone interface circuit according to claim 4, characterized in that, The first drive group includes a first voltage divider circuit, a second voltage divider circuit, and a first switch group; the second drive group includes a second switch group. The input terminal of the first voltage divider circuit is connected to the first pin, and the output terminal is connected to the first control terminal of the first switching transistor group. The first control terminal is used to control the first switching transistor group to drive the first depletion-type analog switch. The input terminal of the second voltage divider circuit is connected to the second pin, and the output terminal is connected to the second control terminal of the first switching transistor group. The second control terminal is used to control the first switching transistor group to drive the second depletion-type analog switch. The first switch group is connected to the control terminal of the first depletion-type analog switch, the control terminal of the second depletion-type analog switch, and the control terminal of the second switch group, respectively; the output terminal of the second switch group is connected to the control terminals of the third depletion-type analog switch and the fourth depletion-type analog switch, respectively.
6. The headphone interface circuit according to claim 5, characterized in that, The first switch group includes a first switch and a second switch; The control terminal of the first switching transistor is connected to the output terminal of the first voltage divider circuit. The first terminal of the first switching transistor is grounded, and the second terminal is connected to the control terminal of the first depletion-type analog switch and the first power supply of the motherboard. The control terminal of the second switching transistor is connected to the output terminal of the second voltage divider circuit. The first terminal of the second switching transistor is grounded, and the second terminal is connected to the control terminal of the second depletion-type analog switch.
7. The headphone interface circuit according to claim 6, characterized in that, The first voltage divider circuit includes a first resistor and a second resistor; The first end of the first resistor is connected to the first pin and the second power supply of the motherboard, the second end of the first resistor is connected to the first end of the second resistor and the control terminal of the first switching transistor, and the second end of the second resistor is grounded.
8. The headphone interface circuit according to claim 5, characterized in that, The second switch group includes a third switch and a fourth switch; The control terminal of the third switch is connected to the second terminal of the first switch, the first terminal of the third switch is grounded, and the second terminal is connected to the control terminal of the third depletion-type analog switch; the control terminal of the fourth switch is connected to the second terminal of the second switch, the first terminal of the fourth switch is grounded, and the second terminal is connected to the control terminal of the fourth depletion-type analog switch and the first power supply of the motherboard.
9. The headphone interface circuit according to claim 8, characterized in that, The second voltage divider circuit includes a third resistor and a fourth resistor; The first end of the third resistor is connected to the second pin and the second power supply of the motherboard, the second end of the third resistor is connected to the first end of the fourth resistor and the control terminal of the second switching transistor, and the second end of the fourth resistor is grounded.
10. An electronic device, characterized in that, The device includes a motherboard, a sound card, and a headphone jack circuit as described in any one of claims 1-9. The motherboard has a ground terminal, the sound card has a microphone input terminal, the headphone jack circuit is integrated on the motherboard, and the first switch group of the headphone jack circuit is connected to the microphone input terminal and the second switch group is connected to the ground terminal.
