CN111586549B - Earphone insertion detection circuit - Google Patents

Earphone insertion detection circuit Download PDF

Info

Publication number
CN111586549B
CN111586549B CN202010409199.9A CN202010409199A CN111586549B CN 111586549 B CN111586549 B CN 111586549B CN 202010409199 A CN202010409199 A CN 202010409199A CN 111586549 B CN111586549 B CN 111586549B
Authority
CN
China
Prior art keywords
earphone
voltage
pin
detection
processor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010409199.9A
Other languages
Chinese (zh)
Other versions
CN111586549A (en
Inventor
褚状状
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kunming Wentai Communication Co.,Ltd.
Original Assignee
Kunming Wentai Communication Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kunming Wentai Communication Co ltd filed Critical Kunming Wentai Communication Co ltd
Priority to CN202010409199.9A priority Critical patent/CN111586549B/en
Publication of CN111586549A publication Critical patent/CN111586549A/en
Application granted granted Critical
Publication of CN111586549B publication Critical patent/CN111586549B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R29/00Monitoring arrangements; Testing arrangements
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01VGEOPHYSICS; GRAVITATIONAL MEASUREMENTS; DETECTING MASSES OR OBJECTS; TAGS
    • G01V3/00Electric or magnetic prospecting or detecting; Measuring magnetic field characteristics of the earth, e.g. declination, deviation
    • G01V3/02Electric or magnetic prospecting or detecting; Measuring magnetic field characteristics of the earth, e.g. declination, deviation operating with propagation of electric current

Landscapes

  • Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Otolaryngology (AREA)
  • Acoustics & Sound (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Environmental & Geological Engineering (AREA)
  • Geology (AREA)
  • Remote Sensing (AREA)
  • General Life Sciences & Earth Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Geophysics (AREA)
  • Headphones And Earphones (AREA)

Abstract

The invention relates to the technical field of interfaces and provides an earphone insertion detection circuit. The circuit includes: an earphone seat and a processor; the earphone seat comprises a grounding pin, a microphone pin, a sound channel pin and a detection pin, wherein the grounding pin is used for connecting a grounding end of an earphone to be inserted, the microphone pin is used for connecting a microphone end of the earphone to be inserted, the sound channel pin is used for connecting a sound channel end corresponding to the earphone to be inserted, and the detection pin is used for disconnecting or conducting connection with the sound channel pin according to the state of the earphone seat; the processor is connected with the earphone seat and used for acquiring a first voltage of the detection pin and a second voltage of the microphone pin and determining whether the earphone to be inserted is inserted into the earphone seat or not according to the first voltage and the second voltage. The adoption of the scheme can realize the recognition of the condition of accumulated water or other conductive foreign matters in the earphone seat, reduce the condition that the earphone seat misjudges the insertion of the earphone in the development or use process, and improve the reliability of the insertion detection of the earphone.

Description

Earphone insertion detection circuit
Technical Field
The invention relates to the technical field of interfaces, in particular to an earphone insertion detection circuit.
Background
With the rapid development of computer devices, most computer devices have a function of audio transmission through earphones, that is, an earphone mode and a play-out mode are simultaneously supported. Generally, when the earphone is not inserted into the earphone seat, the external playing mode is used by default, audio transmission is carried out through the loudspeaker, and when the earphone is inserted into the earphone seat, the loudspeaker is turned off, and the earphone mode is replaced by the earphone mode. Therefore, the process of detecting insertion of the earphone into the earphone holder is indispensable.
In the prior art, a detection mechanism for inserting the earphone is generally mechanical plug detection, that is, voltage of a detection pin in the earphone seat is detected, and then the voltage is compared with a preset voltage threshold, and whether the earphone is inserted into the earphone seat is directly judged according to a comparison result.
However, in the process of a waterproof test in a development stage or actual use of a user, a small amount of water or accidental water may exist in the earphone seat, or some other conductive foreign matters enter, so that the earphone is inserted as a result of detection of the computer device under the condition that the earphone is not inserted, and therefore the problem that the speaker is silent is caused, and inconvenience is brought to the use of the user.
Disclosure of Invention
In view of the above, it is desirable to provide an earphone insertion detection circuit capable of reducing erroneous judgment of earphone insertion during development or use of an earphone holder on a computer device.
The embodiment of the invention provides an earphone insertion detection circuit, which comprises: an earphone seat and a processor;
the earphone seat comprises a grounding pin, a microphone pin, a sound channel pin and a detection pin, wherein the grounding pin is used for connecting a grounding end of an earphone to be inserted, the microphone pin is used for connecting a microphone end of the earphone to be inserted, the sound channel pin is used for connecting a sound channel end corresponding to the earphone to be inserted, and the detection pin is used for disconnecting or conducting connection with the sound channel pin according to the state of the earphone seat;
the processor is connected with the earphone seat and used for acquiring a first voltage of the detection pin and a second voltage of the microphone pin and determining whether the earphone to be inserted is inserted into the earphone seat or not according to the first voltage and the second voltage.
In one embodiment, the processor comprises a ground port, a microphone port, a sound channel port and a detection port, wherein the ground port is connected with the ground pin, the microphone port is connected with the microphone pin, the sound channel port is correspondingly connected with the sound channel pin, and the detection port is connected with the detection pin.
In one embodiment, the earphone seat is a normally open type, and determining whether an earphone to be inserted is inserted into the earphone seat according to the first voltage and the second voltage includes:
and comparing the first voltage with a first voltage threshold, and if the first voltage is smaller than the first voltage threshold, determining whether the earphone to be inserted is inserted into the earphone seat or not according to the second voltage.
In one embodiment, determining whether the earphone to be inserted is inserted into the earphone seat according to the first voltage and the second voltage further comprises:
if the first voltage is smaller than the first voltage threshold, the second voltage is compared with the second voltage threshold, and if the second voltage is smaller than the second voltage threshold, it is determined that the earphone seat is inserted into the earphone to be inserted.
In one embodiment, the circuit further comprises: and the detection pin switch is connected between the processor and the detection pin and used for connecting or disconnecting the processor and the detection pin.
In one embodiment, the processor is further configured to:
if the first voltage is smaller than the first voltage threshold and the second voltage is larger than the second voltage threshold, controlling the detection pin switch to be switched into a disconnected state;
and controlling the detection pin switch to recover the conduction state after a first preset time.
In one embodiment, the processor is further configured to:
after the detection pin switch is controlled to recover the on state, if the first voltage is still smaller than the first voltage threshold and the second voltage is larger than the second voltage threshold, the detection pin switch is controlled to be switched to the off state again.
In one embodiment, the processor is further configured to:
and after the detection pin switch is controlled to be switched to the off state again, the detection pin switch is controlled to be restored to the on state again after a second preset time.
In one embodiment, the circuit further comprises: and the codec is connected between the processor and the earphone seat and is used for converting the digital signal sent to the earphone seat by the processor into an analog signal and converting the analog signal sent to the processor by the earphone seat into a digital signal.
In one embodiment, the codec includes a pull-up resistor for pulling up the acquired first voltage to a high level greater than a first voltage threshold if the pin switch is detected to be open.
According to the earphone insertion detection circuit provided by the embodiment of the invention, the first voltage of the detection pin on the earphone seat and the second voltage of the microphone pin on the earphone seat are obtained through the processor, and whether the earphone to be inserted is inserted into the earphone seat is determined according to the first voltage and the second voltage, so that the condition that accumulated water or other conductive foreign matters exist in the earphone seat is identified, the condition that the earphone seat misjudges the insertion of the earphone in the development or use process is reduced, and the reliability of earphone insertion detection is improved.
Drawings
FIG. 1 is a block diagram of a headset insertion detection circuit in one embodiment;
fig. 2 is a block diagram showing the structure of a headphone insertion detection circuit in another embodiment;
fig. 3 is a block diagram showing the structure of a headphone insertion detection circuit in another embodiment;
fig. 4 is a block diagram showing the structure of a headphone insertion detection circuit in another embodiment;
fig. 5 is a block diagram showing the structure of a headphone insertion detection circuit in another embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
The earphone insertion detection circuit provided by the invention can be applied to the condition of detecting whether an earphone is inserted into an earphone seat on computer equipment, and the computer equipment can be but is not limited to various personal computers, notebook computers, smart phones, tablet computers and portable wearable equipment.
In one embodiment, there is provided a headset insertion detection circuit, as shown in fig. 1, comprising: earphone seat 10 and processor 20.
The earphone seat 10 includes a ground pin GND1, a microphone pin MIC1, a sound channel pin and a detection pin DET1, the ground pin GND1 is used for connecting a ground terminal to be inserted into an earphone, the microphone pin MIC1 is used for connecting a microphone terminal to be inserted into the earphone, the sound channel pin is used for connecting a sound channel terminal corresponding to the earphone to be inserted, and the detection pin DET1 is used for disconnecting or connecting with the sound channel pin according to the state of the earphone seat.
The processor 20 is connected to the earphone socket 10, and configured to obtain a first voltage of the detection pin DET1 and a second voltage of the microphone pin MIC1, and determine whether an earphone to be inserted is inserted into the earphone socket 10 according to the first voltage and the second voltage.
Specifically, the earphone base 10 may be divided into a normally Open type (NO) and a normally closed type (NC), if the earphone base 10 is the normally Open type, the detection pin DET1 in the earphone base 10 is kept disconnected from the sound channel pin when the earphone is not inserted into the earphone base 10, and when the earphone is inserted into the earphone base 10, the detection pin DET1 may be connected to the sound channel pin through the sound channel end of the earphone, or when conductive foreign objects such as water are introduced into the earphone base 10, the detection pin DET1 may be connected to the sound channel pin through water. If the earphone holder 10 is normally closed, the procedure is reversed, the detection pin DET1 remains on with the audio pin when no earphone is inserted into the earphone holder 10, and the detection pin DET1 is disconnected with the audio pin when an earphone is inserted into the earphone holder 10. Therefore, the detection pin DET1 can be disconnected or connected to the audio pin according to the state of the earphone socket 10, and at the same time, the possible state of the earphone socket 10, such as that the earphone is not inserted, the earphone is inserted or water is filled, can be determined according to the connection state of the detection pin DET1 and the audio pin.
The earphone seat 10 is suitable for four-segment type earphone connectors, wherein the four-segment type earphone connector is divided into four segments by an insulating ring, and includes a ground terminal, a microphone terminal, a left channel terminal and a right channel terminal, for example, as shown in fig. 1, the channel pin included in the earphone seat 10 may further include a left channel pin L1 and a right channel pin R1, when an earphone is inserted into the earphone seat 10, the ground terminal GND1, the microphone pin MIC1 and the channel pin in the earphone seat 10 may be respectively connected to the corresponding ground terminal, microphone terminal and channel terminal on the earphone connector, wherein the channel terminal includes the left channel terminal and the right channel terminal. Since the left channel end is located at the top end of the earphone connector, the corresponding left channel pin L1 is located at the innermost end of the earphone seat 10, and therefore, optionally, the detection pin DET1 is specifically configured to disconnect or connect the left channel pin L1 according to the state of the earphone seat 10, so as to determine the state of the earphone seat 10 more accurately.
In one embodiment, the processor 20 optionally includes a ground port GND2, a microphone port MIC2, an audio port, and a detection port DET2, the ground port GND2 is connected to a ground pin GND1, the microphone port MIC2 is connected to a microphone pin MIC1, the audio port is connected to an audio pin, and the detection port DET2 is connected to a detection pin DET 1.
Specifically, the processor 20 is connected to the earphone socket 10, and specifically may be connected to each pin of the earphone socket 10, for example, as shown in fig. 1, the processor 20 is connected to a ground pin GND1 through a ground port GND2, and may be configured to provide a power supply ground for an earphone inserted into the earphone socket 10; the processor 20 is connected with a microphone pin MIC1 through a microphone port MIC2 and is used for receiving sound signals generated by a microphone end of the earphone; the channel ports may include a left channel port L2 and a right channel port R2, and the processor 20 is correspondingly connected to the left channel pin L1 and the right channel pin R1 of the channel pins through the left channel port L2 and the right channel port R2, respectively, and may be configured to output sound signals to the channel end of the headphone; the processor 20 is connected to the detection pin DET1 through the detection port DET2, and can be used to obtain the voltage of the detection pin DET 1.
Optionally, the earphone jack 10 is passive, and the processor 20 may provide power to the earphone jack 10. When the detect pin DET1 is shorted to the vocal tract pin, the first voltage obtained by the processor 20 is pulled low due to the short. Meanwhile, when an earphone is plugged into the earphone seat 10, since the microphone of the earphone is equivalent to a pull-down resistor, the second voltage obtained by the processor 20 is pulled down due to the voltage division. Therefore, after the processor 20 obtains the first voltage and the second voltage, it can determine whether the earphone is inserted into the earphone holder 10 according to the first voltage and the second voltage.
In one embodiment, optionally, the earphone seat 10 is a normally open type, and determining whether an earphone to be inserted is inserted into the earphone seat 10 according to the first voltage and the second voltage includes: and comparing the first voltage with a first voltage threshold, and if the first voltage is smaller than the first voltage threshold, determining whether the earphone to be inserted is inserted into the earphone seat 10 according to the second voltage.
Specifically, when the earphone seat 10 is a normally open type, if an earphone is inserted into the earphone seat 10, the first voltage is pulled down due to a short circuit, so that the first voltage is compared with a preset first voltage threshold, if the first voltage is smaller than the first voltage threshold, it is indicated that there is a possibility that the earphone is inserted into the earphone seat 10, and at this time, whether the earphone to be inserted is inserted into the earphone seat 10 is further determined according to the second voltage, and the determination result is more accurate. If the first voltage is greater than the first voltage threshold, it is determined that the earphone to be inserted is not inserted into the earphone seat 10, and it is no longer necessary to perform a determination according to the second voltage. Wherein the first voltage threshold may be 1.62V (volts).
In one embodiment, optionally, determining whether the earphone to be inserted is inserted into the earphone seat according to the first voltage and the second voltage, further includes: if the first voltage is smaller than the first voltage threshold, the second voltage is compared with the second voltage threshold, and if the second voltage is smaller than the second voltage threshold, it is determined that the earphone to be inserted is inserted into the earphone seat 10.
Specifically, when the first voltage is smaller than the first voltage threshold, the second voltage of the microphone pin MIC1 may be compared with the second voltage threshold to further determine whether the first voltage is pulled down due to the earphone being inserted into the earphone holder 10, so as to eliminate the situation that the first voltage is pulled down due to water entering the earphone holder. After the first voltage is determined to be pulled down, the second voltage of the microphone pin MIC1 may be detected, if an earphone is inserted into the earphone seat 10, the second voltage may be pulled down due to voltage division, and if the first voltage is pulled down due to water inflow, since the water in the earphone seat 10 is generally not filled, and meanwhile, the microphone pin MIC1 is generally located at a position close to the outer side of the earphone seat 10, the second voltage is generally not changed.
The minimum dc operating voltage required to be applied across the microphones of different models of earphones is also different, and for example, the typical operating voltage may be 1.5V, 3V, or 4.5V, so the second voltage threshold may be preset according to the model of the device and/or the model of the earphone to be inserted, and the like, to which the device is adapted. Meanwhile, the preset second voltage threshold value can be set according to the second voltage of the microphone pin MIC1 after the earphone is inserted under normal conditions, so that the result of judging that the second voltage is pulled down is more accurate.
In one embodiment, as shown in fig. 2, optionally, the processor 20 includes a codec module 201, which may convert a digital signal to be transmitted to the earphone socket 10 by the processor 20 into an analog signal for outputting to an earphone, and convert an analog signal transmitted to the processor 20 by the earphone socket 10 into a digital signal for processing by the processor 20.
Specifically, the codec module 201 may convert the first voltage and the second voltage acquired by the processor 20 into digital signals convenient for the processor 20 to process, so that the processor 20 further determines whether the earphone to be inserted is inserted into the earphone socket 10 according to the first voltage and the second voltage. Optionally, the encoding and decoding module 201 may provide a power supply for the earphone seat 10, and the encoding and decoding module 201 completes a process of determining whether the earphone to be inserted is inserted into the earphone seat 10 according to the first voltage and the second voltage, so as to save a process of converting the first voltage and the second voltage into digital signals, and further improve efficiency of the processor 20 in responding to the earphone insertion detection result.
In the above-mentioned earphone insertion detection circuit, the processor 20 obtains the first voltage of the detection pin DET1 and the second voltage of the microphone pin MIC1 on the earphone base 10, and determines whether the earphone to be inserted is inserted into the earphone base 10 according to the first voltage and the second voltage, thereby realizing the identification of the condition that water or other conductive foreign matters exist in the earphone base 10, reducing the condition that the earphone base 10 misjudges the insertion of the earphone in the development or use process, and improving the reliability of the earphone insertion detection.
In an embodiment, another earphone insertion detection circuit is provided, as shown in fig. 3, on the basis of the above embodiment, optionally, the circuit further includes: a detection pin switch 30, the detection pin switch 30 being connected between the processor 20 and the detection pin DET1 for making or breaking the connection between the processor 20 and the detection pin DET 1.
Optionally, the detection pin switch 30 may be a Metal-Oxide-Semiconductor Field-Effect Transistor (MOSFET), a gate of the detection pin switch 30 is connected to a control port of the processor 20, so as to control the detection pin switch 30 to be turned on or off through the processor 20, and a source and a drain of the detection pin switch 30 are respectively connected to the detection pin DET1 and the detection port DET2 of the processor 20, so as to turn on or off the connection between the processor 20 and the detection pin DET1 according to the turn-on or turn-off of the detection pin switch 30. If the detection pin switch 30 disconnects the connection between the processor 20 and the detection pin DET1, it is equivalent to that the processor 20 does not acquire the state of the earphone socket 10 any more, so that the detection of earphone insertion can be stopped when the earphone socket 10 enters water, thereby avoiding the occurrence of false detection. Alternatively, the detection pin switch 30 may be a manual switch or the like, and the connection between the processor 20 and the detection pin DET1 may be disconnected according to the operation of the detection pin switch 30 by the user.
Specifically, if the detection pin switch 30 is a MOSFET, after the device is turned on and operated, the processor 20 may control the detection pin switch 30 to keep a conducting state through a General-purpose input/output (GPIO) so as to detect the earphone seat 10. Meanwhile, if the earphone holder 10 is kept in a state where water is not introduced and an earphone is not inserted, the detection pin switch 30 is controlled to continuously keep the on state.
In one embodiment, optionally, the processor 20 is further configured to: if the first voltage is less than the first voltage threshold and the second voltage is greater than the second voltage threshold, controlling the detection pin switch 30 to switch to the off state; after a first preset duration, the detection pin switch 30 is controlled to resume the on state.
Specifically, if the first voltage is smaller than the first voltage threshold and the second voltage is greater than the second voltage threshold, it indicates that the earphone seat 10 may be in the water inlet state, and at this time, the processor 20 may determine the water inlet state of the earphone seat 10 and control the detection pin switch 30 to be turned off, that is, ignore the voltage change of the detection pin DET1, and stop detecting the insertion of the earphone.
After the processor 20 controls the detection pin switch 30 to switch to the off state, optionally, as shown in fig. 4, the processor 20 may start timing by the timing module 202, where the first preset time period may be an average value calculated after time required for the earphone socket 10 to be treated or naturally evaporate and disappear in the multi-test water inlet state, and for example, the first preset time period may be ten minutes. When the first preset time period is reached, the processor 20 controls the detection pin switch 30 to recover the on state, so as to restart to acquire the voltage change of the detection pin DET1, and continue to detect the insertion process of the earphone.
In one embodiment, optionally, the processor 20 is further configured to: after controlling the detection pin switch 30 to recover the on state, if the first voltage is still smaller than the first voltage threshold and the second voltage is greater than the second voltage threshold, the detection pin switch 30 is controlled to switch to the off state again.
Specifically, after the processor 20 controls the detection pin switch 30 to recover the on state, if the first voltage is still smaller than the first voltage threshold and the second voltage is greater than the second voltage threshold, it indicates that the earphone seat 10 is still in the water inlet state, and at this time, the processor 20 controls the detection pin switch 30 to switch to the off state again, and stops the detection of the insertion of the earphone.
In one embodiment, optionally, the processor 20 is further configured to: after controlling the detection pin switch 30 to be switched to the off state again, the detection pin switch 30 is controlled to be restored to the on state again after a second preset time period.
Specifically, after the processor 20 controls the detection pin switch 30 to switch to the off state again, timing may be restarted in the processor 20 through the timing module 202, where the second preset time period may be the same as the first preset time period, and since the first preset time period may be a time required for the earphone seat 10 to recover to the normal state, the second preset time period may also be set according to a proper reduction of the first preset time period, for example, the second preset time period may be 5 minutes, so as to reduce the number of times of re-detection as much as possible, and the second preset time period may also be a shorter time period, for example, 1 minute, so as to reduce the time required for re-detection, thereby determining that the earphone seat 10 has recovered to the normal state more quickly.
In the above-mentioned earphone insertion detection circuit, the connection or disconnection between the processor 20 and the detection pin DET1 is realized by adding the detection pin switch 30, and at the same time, the connection between the processor 20 and the detection pin DET1 can be disconnected when it is detected that the earphone seat 10 is possibly in a water inlet state, and the connection is recovered after the timing reaches a certain time by the timing module 202, so that the earphone insertion detection process is stopped when the earphone seat 10 is in the water inlet state, repeated detection of water inlet to the earphone seat 10 is reduced, and the earphone insertion is continuously detected after the earphone seat 10 is recovered to be normal, thereby further reducing the situation that the earphone insertion is misjudged in the development or use process of the earphone seat 10, and further improving the reliability of earphone insertion detection.
In one embodiment, another earphone insertion detection circuit is provided, as shown in fig. 5, with the detection pin switch 30 being a MOSFET tube for example. On the basis of the foregoing embodiment, optionally, the circuit further includes: and a codec 40, wherein the codec 40 is connected between the processor 20 and the earphone base 10, and is used for converting the digital signal transmitted to the earphone base 10 by the processor 20 into an analog signal, and converting the analog signal transmitted to the processor 20 by the earphone base 10 into a digital signal. The gate G of the MOSFET is connected to the control port CTR of the processor 20, and the source S and the drain D of the MOSFET are connected to the detection pin DET1 and the detection port DET3 of the codec 40, respectively.
Specifically, as shown in fig. 5, the codec 40 is connected to the ground pin GND1 through a ground port GND3, and can be used to provide a power ground for the earphone inserted into the earphone holder 10; the codec 40 is connected with a microphone pin MIC1 through a microphone port MIC3, and is used for receiving sound signals generated by a microphone end of the earphone; the codec 40 is connected to the left channel pin L1 and the right channel pin R1 of the channel pins through the left channel port L3 and the right channel port R3, respectively, and is configured to output sound signals to the channel end of the headphone. Meanwhile, the codec 40 may acquire the first voltage of the detection pin DET1 and the second voltage of the microphone pin MIC1 through the detection port DET3 and the microphone port MIC3, respectively, and convert the first voltage and the second voltage into digital signals that are convenient for the processor 20 to process, so that the processor 20 may further determine whether the earphone to be inserted is inserted into the earphone holder 10 according to the first voltage and the second voltage. Optionally, the codec 40 includes a power module, which may be configured to provide power to the headset base 10, and the codec 40 may further complete a process of determining whether the headset to be inserted into the headset base 10 is inserted according to the first voltage and the second voltage, and may feed back a determined result from a data port DAT2 of the codec 40 to a data port DAT1 of the processor 20 through a Serial Peripheral Interface (SPI), so as to control the detection of the on/off of the pin switch 30 through the processor 20, and may implement further actions according to the determined result. Meanwhile, the control of the on/off of the detection pin switch 30 by the processor 20 may be realized by controlling the voltage of the gate G of the detection pin switch 30 through the control port CTR of the processor 20, and meanwhile, for example, the further action includes that the control device selects an earphone mode or an external playing mode to play sound, or prompts the user that the earphone seat 10 is in a water inlet state, and the like, so that a process of converting the first voltage and the second voltage into digital signals is saved, and the efficiency of the processor 20 in responding to the earphone insertion detection result is improved.
In one embodiment, the codec 40 optionally includes a pull-up resistor for pulling up the acquired first voltage to a high level greater than the first voltage threshold if the pin switch 30 is turned off.
Specifically, after the processor 20 controls the detection pin switch 30 to switch to the off state, the first voltage obtained by the codec 40 may be pulled up to a high level greater than a first voltage threshold by a pull-up resistor connected to the detection port DET3 of the codec 40 in the codec 40, that is, the value of the first voltage under the condition that no earphone is inserted into the earphone seat 10, so that the first voltage clamp, which is originally uncertain in value after the detection pin switch 30 is switched off, is at the high level, and is restored to the state that no earphone is inserted into the earphone seat 10, and meanwhile, the current limiting function may also be performed.
In the above-mentioned earphone insertion detection circuit, the digital-analog data conversion between processor 20 and earphone seat 10 is realized by adding codec 40, the process of determining that the earphone is inserted into earphone seat 10 can also be completed by codec 40, independent codec 40 can have richer analysis and calculation functions, the decision process of earphone insertion detection can be better realized, and the pressure of processor 20 is relieved, thereby improving the efficiency of processor 20 responding to the earphone insertion detection result.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (6)

1. A headset insertion detection circuit, comprising: an earphone seat and a processor;
the earphone seat comprises a grounding pin, a microphone pin, a sound channel pin and a detection pin, wherein the grounding pin is used for connecting a grounding end of an earphone to be inserted, the microphone pin is used for connecting a microphone end of the earphone to be inserted, the sound channel pin is used for connecting a sound channel end corresponding to the earphone to be inserted, and the detection pin is used for disconnecting or conducting connection with the sound channel pin according to the state of the earphone seat;
the processor is connected with the earphone seat and used for acquiring a first voltage of the detection pin and a second voltage of the microphone pin and determining whether the earphone to be inserted is inserted into the earphone seat or not according to the first voltage and the second voltage;
further comprising: the detection pin switch is connected between the processor and the detection pin and used for switching on or off the connection between the processor and the detection pin;
the processor is further configured to:
if the first voltage is smaller than the first voltage threshold and the second voltage is larger than the second voltage threshold, controlling the detection pin switch to be switched to an off state; controlling the detection pin switch to recover the conduction state after a first preset time length; after the detection pin switch is controlled to recover the conducting state, if the first voltage is still smaller than the first voltage threshold and the second voltage is larger than the second voltage threshold, the detection pin switch is controlled to be switched to the disconnecting state again; after the detection pin switch is controlled to be switched to the off state again, the detection pin switch is controlled to be restored to the on state again after a second preset time period; the second preset duration is less than the first preset duration.
2. The headset insertion detection circuit of claim 1 wherein the processor comprises a ground port, a microphone port, a sound channel port, and a detection port, the ground port is connected to the ground pin, the microphone port is connected to the microphone pin, the sound channel port is correspondingly connected to the sound channel pin, and the detection port is connected to the detection pin.
3. The headset insertion detection circuit of claim 1, wherein the headset base is a normally open type, and the determining whether the headset to be inserted is inserted into the headset base according to the first voltage and the second voltage comprises:
and comparing the first voltage with a first voltage threshold, and if the first voltage is smaller than the first voltage threshold, determining whether the earphone to be inserted is inserted into the earphone seat according to the second voltage.
4. The headset insertion detection circuit of claim 3, wherein the determining whether the headset to be inserted is inserted into the headset base according to the first voltage and the second voltage further comprises:
if the first voltage is smaller than the first voltage threshold, comparing the second voltage with a second voltage threshold, and if the second voltage is smaller than the second voltage threshold, determining that the earphone to be inserted is inserted into the earphone seat.
5. The headset insertion detection circuit of claim 1 or 4, further comprising: and the codec is connected between the processor and the earphone seat and is used for converting the digital signal sent to the earphone seat by the processor into an analog signal and converting the analog signal sent to the processor by the earphone seat into a digital signal.
6. The headset insertion detection circuit of claim 5, wherein the codec comprises a pull-up resistor configured to pull up the acquired first voltage to a high level greater than the first voltage threshold if the detection pin switch is open.
CN202010409199.9A 2020-05-14 2020-05-14 Earphone insertion detection circuit Active CN111586549B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010409199.9A CN111586549B (en) 2020-05-14 2020-05-14 Earphone insertion detection circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010409199.9A CN111586549B (en) 2020-05-14 2020-05-14 Earphone insertion detection circuit

Publications (2)

Publication Number Publication Date
CN111586549A CN111586549A (en) 2020-08-25
CN111586549B true CN111586549B (en) 2022-03-15

Family

ID=72126578

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010409199.9A Active CN111586549B (en) 2020-05-14 2020-05-14 Earphone insertion detection circuit

Country Status (1)

Country Link
CN (1) CN111586549B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113316064B (en) * 2021-04-28 2023-01-24 杭州小派智能科技有限公司 Method, system, head-mounted display device and storage medium for earphone and loudspeaker recognition
CN115442730A (en) * 2021-06-03 2022-12-06 瑞昱半导体股份有限公司 State detection device for audio interface
CN113473315B (en) * 2021-07-31 2022-06-28 展讯通信(上海)有限公司 Electronic device capable of improving output performance of earphone
CN117827558A (en) * 2022-08-18 2024-04-05 荣耀终端有限公司 Electronic equipment

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103716734A (en) * 2012-10-08 2014-04-09 三星电子株式会社 Apparatus and method for detecting insertion of headset into mobile station
EP2797346A2 (en) * 2013-04-01 2014-10-29 ACER Incorporated Detection circuit
CN105101001A (en) * 2015-09-18 2015-11-25 青岛海信移动通信技术股份有限公司 Earphone identification device and terminal equipment
CN105101009A (en) * 2014-05-09 2015-11-25 快捷半导体(苏州)有限公司 Audio jack detection detection, system, and method
CN105407442A (en) * 2015-12-24 2016-03-16 广州艾想电子科技有限公司 Plugging detection method and device for earphone apparatus
CN108023235A (en) * 2016-10-28 2018-05-11 中兴通讯股份有限公司 A kind of usb circuit, terminal, head circuit and earphone
EP3531712A1 (en) * 2016-10-24 2019-08-28 Sony Corporation Sound output device, method for executing function of sound output device, and program
CN110213686A (en) * 2019-05-28 2019-09-06 维沃移动通信有限公司 A kind of detection method and terminal of earphone socket
CN210327962U (en) * 2019-09-12 2020-04-14 广州视源电子科技股份有限公司 Microphone plugging detection circuit and microphone system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202094975U (en) * 2011-07-07 2011-12-28 深圳市金立通信设备有限公司 Male joint low level detection circuit for earphone of cell phone
KR101267047B1 (en) * 2012-03-30 2013-05-24 삼성전자주식회사 Apparatus and method for detecting earphone
CN107172515A (en) * 2017-05-19 2017-09-15 青岛海信移动通信技术股份有限公司 Test earphone plug is inserted in mobile terminal detection circuit and mobile terminal
CN206851033U (en) * 2017-06-30 2018-01-05 厦门美图移动科技有限公司 A kind of four-section type headset and earphone interface
TWI659657B (en) * 2017-09-26 2019-05-11 瑞昱半導體股份有限公司 Detecting circuit and associated detecting method
CN108064013A (en) * 2018-02-23 2018-05-22 西安闻泰电子科技有限公司 Earphone detection circuit, earphone detecting method and electronic equipment
CN108810701B (en) * 2018-06-27 2019-12-03 维沃移动通信有限公司 A kind of Type-C interface method for detecting abnormality and mobile terminal

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103716734A (en) * 2012-10-08 2014-04-09 三星电子株式会社 Apparatus and method for detecting insertion of headset into mobile station
EP2797346A2 (en) * 2013-04-01 2014-10-29 ACER Incorporated Detection circuit
CN105101009A (en) * 2014-05-09 2015-11-25 快捷半导体(苏州)有限公司 Audio jack detection detection, system, and method
CN105101001A (en) * 2015-09-18 2015-11-25 青岛海信移动通信技术股份有限公司 Earphone identification device and terminal equipment
CN105407442A (en) * 2015-12-24 2016-03-16 广州艾想电子科技有限公司 Plugging detection method and device for earphone apparatus
EP3531712A1 (en) * 2016-10-24 2019-08-28 Sony Corporation Sound output device, method for executing function of sound output device, and program
CN108023235A (en) * 2016-10-28 2018-05-11 中兴通讯股份有限公司 A kind of usb circuit, terminal, head circuit and earphone
CN110213686A (en) * 2019-05-28 2019-09-06 维沃移动通信有限公司 A kind of detection method and terminal of earphone socket
CN210327962U (en) * 2019-09-12 2020-04-14 广州视源电子科技股份有限公司 Microphone plugging detection circuit and microphone system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《音频插孔检测开关提升智能手机音质》;Seth Prentice;《中国电子商情-基础电子》;20111031;全文 *

Also Published As

Publication number Publication date
CN111586549A (en) 2020-08-25

Similar Documents

Publication Publication Date Title
CN111586549B (en) Earphone insertion detection circuit
US9301045B2 (en) Audio I O headset plug and plug detection circuitry
JP4191192B2 (en) Identification method of audio device in portable terminal and portable terminal
US7961895B2 (en) Audio interface device and method
JP5161153B2 (en) Audio device recognition apparatus and portable computer
US9215526B2 (en) Circuit for microphone pin assignment detection and method thereof
CN105933823B (en) Backward compatible system and method for providing power and signals to headphones with active noise cancellation using a 4P audio plug
US20100109749A1 (en) Signal transmission path selection circuit and method, and electronic device employing the circuit
CN101739374A (en) Signal transmission path selecting circuit and electronic device applying same
CN102073470A (en) Electronic equipment and control method thereof
US9414176B2 (en) Accessory plug detection
CN111314817B (en) Switching control circuit, terminal equipment and switching control method
CN109769174B (en) Judging circuit and method for positive and negative terminals of MIC (microphone) of earphone and electronic equipment
JP2013251728A (en) Connector device and electronic device
CN106559724B (en) Circuit and method for eliminating earphone plugging noise
KR20150107518A (en) Electronic device having function for removing noise
TWI774396B (en) State detection apparatus for use in an audio interface
CN212628419U (en) Comparison circuit suitable for headset
CN108897521B (en) Electronic equipment and control method
CN112118518B (en) Acoustic-electric transducer
CN111383632A (en) Electronic device
CN103458351A (en) Compound joint detection circuit
CN115442730A (en) State detection device for audio interface
KR100303306B1 (en) Headset control apparatus
CN107484079B (en) Bluetooth sound box and method for improving music playing jam during charging

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20220215

Address after: 650106 No. 6666, Gaoxin Avenue, high tech Zone, Kunming, Yunnan

Applicant after: Kunming Wentai Communication Co.,Ltd.

Address before: 10 / F, Zhongqing building, No.42, Gaoxin 6th Road, hi tech Zone, Xi'an City, Shaanxi Province

Applicant before: XI'AN WINGTECH ELECTRONIC TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant