BACKGROUND OF THE INVENTION1. Field of the InventionThe present invention relates to audio interface, and more particularly, to a state detection device for detecting a connector type of audio equipment and a water ingress state of an audio jack socket in an audio interface.
2. Description of the Prior ArtMany electronic devices are connectable to external audio equipment. For example, mobile phones, tablet computers, notebook computers, can be connected to audio equipment, such as earphones/headphones, speakers, and headsets. Such audio equipment and electronic devices are usually connected via connector elements such as audio plugs and audio jack sockets. For example, many headphones have a 3.5 mm audio plug, which can be used to connect to a 3.5 mm audio jack socket provided by an electronic device.
Typically, electronic devices usually rely on some detection mechanisms to detect whether the audio plug has been inserted into the audio jack socket. Accordingly, the electronic device can perform some corresponding operations, such as interrupting or starting audio playback, switching audio playback from built-in speakers to external audio equipment, or avoiding popping sound caused by plugging and unplugging the audio plug. On the other hand, when water enters the audio jack socket, there may be conduction between contacts of the audio jack socket, which will further cause the electronic device to misjudge the insertion of the audio plug. As a result, the electronic devices will fail to properly control audio playback as the audio plug is plugged in or unplugged, or switch between the built-in speaker and the external audio equipment.
On the other hand, 3.5 mm audio plugs are usually two-ring three-pole type (TRS type) or three-ring four-pole type (TRRS type). The two-ring three-pole type 3.5 mm audio plug can be used to transmit stereo analog audio signals, while the three-ring four-pole type 3.5 mm audio plug cannot only transmit stereo analog audio signals, but also transmit a mono microphone signal. In addition, the three-ring four-pole type 3.5 mm audio jack comprises a CTIA type and an OMTP type depending on definition of its poles. Since these different types of 3.5 mm audio plugs are quite common, electronic devices also need to correctly identify the specific connector type, so as to correctly control the external audio equipment and identify signals on each pole of the audio plugs.
SUMMARY OF THE INVENTIONIn view of this, the present invention provides a state detection circuit for use in an audio interface to detect a connector type of audio equipment and a water ingress state of an audio jack socket in an audio interface. In embodiments of the present invention, by detecting a voltage cross two contacts of the audio jack socket that are connected to a first pole of an audio plug, it is determined whether ingress of water occurs in the audio jack socket. If it is determined that the ingress of water fails to occur, it is determined that the conductor entering the audio jack socket is the audio plug. Accordingly, embodiments of the present invention determine a connector type of the audio plug and a type of the audio equipment to which the audio plug belongs by detecting a voltage on a contact of the audio jack socket that is connected to a fourth pole of the audio plug. Since the present invention requires no extra contacts for state detection, it is suitable for existing audio jack sockets, and can also provide the ability of identifying different types of audio plugs and detecting the water ingress state of the audio jack socket.
According to one embodiment, a state detection device for use in an audio interface is provided. The state detection device comprises: a first voltage detection circuit, a second voltage detection circuit and a state determination circuit. The first voltage detection circuit is coupled to a first contact and a second contact of an audio jack socket, and configured to detect a voltage across the first contact and the second contact to generate a first detection value. The second voltage detection circuit is coupled to a third contact of the audio jack socket, and configured to detect a voltage on the third contact to generate a second detection value. The state determination circuit is coupled to the first voltage detection circuit and the second voltage detection circuit, configured to determine a water ingress state of the audio jack socket according to the first detection value, and determine a connector type of an audio plug that is inserted into the audio jack socket according to the second detection value.
According to one embodiment, a state detection method for use in an audio interface is provided. The state detection method comprises: detecting a voltage across a first contact and a second contact of an audio jack socket to generate a first detection value; detecting a voltage on a third contact of the audio jack socket to generate a second detection value; and determining a water ingress state of the audio jack socket according to the first detection value, and determining a connector type of an audio plug that is inserted into the audio jack socket according to the second detection value.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.
BRIEF DESCRIPTION OF THE DRAWINGSFIG.1A is a schematic diagram of a state detection circuit and its application according to one embodiment of the present invention.
FIG.1B illustrates different types of audio plugs and related audio equipment that can be identified by embodiments of the present invention.
FIGS.2A and2B illustrates an approach to detect a water ingress state.
FIG.3 illustrates a scenario that a first detection value and a second detection value change with the water ingress state and different types of audio jacks according to one embodiment of the present invention.
FIG.4 illustrates an approach to detect the water ingress state.
FIG.5 illustrates a flow chart of state detection according to one embodiment of the present invention.
DETAILED DESCRIPTIONIn the following description, numerous specific details are set forth in order to provide a thorough understanding of the present embodiments. It will be apparent, however, to one having ordinary skill in the art that the specific detail need not be employed to practice the present embodiments. In other instances, well-known materials or methods have not been described in detail in order to avoid obscuring the present embodiments.
Reference throughout this specification to “one embodiment” or “an embodiment” means that a particular feature, structure or characteristic described in connection with the embodiment or example is included in at least one embodiment of the present embodiments. Thus, appearances of the phrases “in one embodiment” or “in an embodiment” in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures or characteristics may be combined in any suitable combinations and/or sub-combinations in one or more embodiments.
FIG.1A shows a schematic diagram of astate detection device100 and its application according to one embodiment of the present invention. Thestate detection device100 of the present invention may be used in anaudio interface10 to detect whether an audio plug200 (i.e., a male connector) is inserted into the audio jack socket (i.e., a female connector)300, a type of theaudio plug200, and whether theaudio jack socket300 has ingress of water. Theaudio interface10 may be a sound card or a sound processing system of an electronic device (such as a mobile phone, a personal computer, a tablet computer, a notebook computer, a multimedia player, and so on), where theaudio interface10 may also include (not shown) power amplifiers, digital/analog converters, digital audio processors, and so on. Theaudio plug200 may be a two-ring three-pole type (such as, a TRS type) connector, which includes afirst pole211, asecond pole212, and athird pole213. Alternatively, theaudio plug200 may be a three-ring four-pole type (such as, TRRS type) connector, which includes afirst pole211, asecond pole212, athird pole213 and afourth pole214. As shown inFIG.1B, theaudio plug200 belongs to a part of audio equipment. For example, the two-ring three-pole audio plug200 can be connected to headphones/earphones (as shown in the figure), speakers andother loudspeaker device400 through a wire. The three-ring four-pole audio plug200 can be connected to a sound picking-up andloudspeaker combination device500 that integrates headphones/earphones and microphones. Moreover, theaudio plug200 may be a three-ring four-pole male connector of anaudio extension cable600. Generally speaking, when theaudio plug200 is the two-ring three-pole type, thefirst pole211 is used to receive a left-channel audio signal generated by theaudio interface10 and transmit it to theloudspeaker device400, thesecond pole211 is used to receive a right-channel audio signal generated by theaudio interface10 and transmit it to theloudspeaker device400, and thethird pole213 is a ground terminal. When theaudio plug200 is the three-ring four-pole type, thefirst pole211 is used to receive the left-channel audio signal generated by theaudio interface10 and transmit it to a loudspeaker part of the sound picking-up andloudspeaker combination device500, and thesecond pole212 is used to receive the right-channel audio signal generated by theaudio interface100, and transmit it to the loudspeaker part of the sound picking-up andloudspeaker combination device500. One of thethird pole213 and thefourth pole214 is the ground terminal, and the other is used to transmit a microphone signal generated by a sound picking-up part of the sound picking-up andloudspeaker combination device500 to theaudio interface10.
Please refer toFIG.1A again. Thestate detection device100 of the present invention is coupled to a plurality of conductive contacts in theaudio jack socket300. These conductive contacts include at least acontact311, acontact312, acontact313, acontact314 and contact315. If theaudio plug200 is the two-ring three-pole type connector, thecontact311 in the audio jack socket300 (at an innermost part of an upper end of the audio jack socket300) is connected to thefirst pole211 of theaudio plug200, which is used to transmit the left-channel audio signal. The contact312 (at an outer part of the upper end of the audio jack socket300) is connected to thesecond pole212 of theaudio plug200, which is used to transmit the right-channel audio signal. The contact point313 (at an outer part of a lower end of theaudio jack socket300 but deviated from the position of the contact312) is connected to thethird pole213 of theaudio plug200, and is further coupled to a ground terminal GND. The contact314 (the outermost ring of the audio jack socket300) is also connected to thethird pole213 of theaudio plug200. In addition, when theaudio plug200 is the three-ring four-pole type connector, in addition to the contacts311-313 of theaudio jack socket300 are connected to the first to third poles211-213 of theaudio plug200, thecontact314 of theaudio jack socket300 is connected to thefourth pole214 of theaudio plug200 for transmitting the microphone signal. Furthermore, thecontact315 of the audio jack socket300 (at an innermost part of the lower end of theaudio jack socket300, corresponding to the position of the contact point311) is connected to thefirst pole211 of theaudio plug200.
Thestate detection device100 includes a firstvoltage detection circuit110, a secondvoltage detection circuit120, and astate determination circuit130. In one embodiment, the firstvoltage detection circuit110 and the secondvoltage detection circuit120 may be analog-to-digital converters, respectively. The firstvoltage detection circuit110 is coupled to thecontact311 of theaudio jack socket300 and is coupled to thecontact315 through avoltage divider150. When theaudio plug200 is inserted and connected to theaudio jack socket300, the firstvoltage detection circuit110 can be coupled to thefirst pole211 of theaudio plug200. The secondvoltage detection circuit120 is coupled to thecontact314 of theaudio jack socket300, and an input terminal of the secondvoltage detection circuit120 is selectively connected to a voltage VDD2 through a pull-up resistor Ra3. Moreover, when theaudio plug200 is inserted and connected to theaudio jack socket300, the secondvoltage detection circuit120 can be coupled to thethird pole213 of the audio plug200 (if theaudio plug200 is the two-ring three-pole type) or the fourth pole214 (if theaudio plug200 is the three-ring four-pole type).
Please refer toFIG.1A in conjunction withFIG.2A. When theaudio plug200 is inserted into theaudio jack socket300, an impedance RL between thecontact311 and thecontact315 is approximately equal to an impedance at thefirst pole211 of theaudio plug200, such as, an impedance of theloudspeaker device400 or the sound picking-up andloudspeaker combination device500, or an impedance of afirst pole211 of theaudio extension cable600, which usually falls within a range of 0-1.1K ohms. As shown inFIG.2B, once ingress of water occurs in theaudio jack socket300 and water fills the hollow space of theaudio jack socket300, the impedance RL between thecontact311 and thecontact315 will become water impedance RW. As the impedance of salt water is different from that of fresh water (the impedance of the salt water will vary with time), the impedance RW will fall in a range of 2K-2M ohms. Voltage values on thecontact311 and thecontact315 that are sampled by the firstvoltage detection circuit110 will also vary accordingly. Therefore, thestate determination circuit130 in thestate detection device100 can determine whether ingress of water occurs in theaudio jack socket300 according a first detection value DET1 output by the firstvoltage detection circuit110. As shown inFIG.3, assuming that voltage VDD1=3.3V, voltage VDD2=3.3V, resistor Ra3=1.2K ohms, resistor Rc1=100K ohms of thevoltage divider150 and the resistor Ra1=1M Ohm and the resistor Ra2=850K ohms, various states and different types of audio plugs200 will cause the first detection value DET1 sampled by the firstvoltage detection circuit110 and the second detection value DET2 sampled by the secondvoltage detection circuit120 to change. As can be seen from the table, the first detection value DET1 is significantly increased when ingress of water occurs in the audio jack socket300 (for example, 0.068-3.15V). Therefore, thestate determination circuit130 may be provided with a first predetermined threshold TH1 (for example, but not limited to a value between 0.038V and 0.068V). When the first detection value DET1 sampled by the firstvoltage detection circuit110 is higher than the first predetermined threshold TH1, it is determined that ingress of water currently occurs in theaudio jack socket300. When the first detection value DET1 is lower than the first predetermined threshold TH1, it is determined that no ingress of water occurs in theaudio jack socket300, and the conductor entering theaudio jack socket300 may be theaudio plug200. In one embodiment, only when the first detection value DET1 is lower than the first predetermined threshold TH1, the secondvoltage detection circuit120 will be activated to determine a connector type of theaudio plug200.
Furthermore, as shown byFIG.4, if theaudio plug200 is the two-ring three-pole male connector belonging to the cable of theloudspeaker device400, once it is inserted into theaudio jack socket300, thecontact313 and thecontact314 will be shorted (i.e., both connected to thethird pole213 of the audio plug200), and the impedance RL between these two contacts is extremely low. Considering the existence of contact impedance, the impedance RL is approximately between0 and1.1K ohms. On the other hand, if theaudio plug200 is the three-ring four-pole male connector belonging to a cable of the sound picking-up andloudspeaker combination device500, the impedance RL between thecontact313 and the contact314 (which are respectively connected to thethird pole213 and the fourpole214 of the audio plug200) is approximately equal to the impedance Rm of the sound picking-up part in the sound picking-up andloudspeaker combination device500, which falls between 1.35 to 33K ohms. Moreover, if theaudio plug200 is the three-ring four-pole male connector of anaudio extension cable600, and an audio jack socket at the other end of theaudio extension cable600 is not connected to a conductor, the impedance RL betweencontact313 and the contact314 (which are respectively connected to thethird pole213 and thefourth pole214 of the audio plug200) is infinite.
Furthermore, as can be understood by table inFIG.3, the second detection value DET2 on thecontact314 sampled by the secondvoltage detection circuit120 has three types of value distributions. If theaudio plug200 is the two-ring three-pole type, the second detection value DET2 has the smallest value (e.g., 0-1.578V). If theaudio plug200 is the three-ring four-pole type, the second detection value DET2 has the intermediate value (e.g., 1.747V-3.184V). If theaudio plug200 is the three-ring four-pole male connector of the audio extension cable, the second detection value DET2 has the largest value (e.g., 3.3V). Therefore, thestate determination circuit130 can preset two thresholds TH2 (for example, but not limited to a value between 3.184-3.3V) and TH3 (for example, but not limited to a value between 1.578-1.747V). When the second detection value DET2 sampled by the secondvoltage detection circuit120 is higher than the threshold TH2, it is determined that theaudio plug200 is the three-ring four-pole male connector belonging to theaudio extension cable600. When the second detection value DET2 is lower than the threshold TH3, it is determined that theaudio plug200 is the two-ring three-pole male connector belonging to the cable of theloudspeaker device400, and when the second detection value DET2 is lower than the threshold TH2 but higher than the threshold TH3, it is determined that theaudio plug200 is the three-ring four-pole male connector belonging to the cable of the sound picking-up andloudspeaker combination device500.
In one embodiment, thestate detection device100 further includes aninsertion detection circuit140 and avoltage divider150. In one embodiment, theinsertion detection circuit140 of thestate detection device100 detects whether a conductor enters theaudio jack socket300. Only when the detection result of theinsertion detection circuit140 indicates that the conductor enters theaudio jack socket300, the firstvoltage detection circuit110 and the secondvoltage detection circuit120 can be activated. After detecting that the conductor enters theaudio jack socket300, the firstvoltage detection circuit110 is activated. According to the first detection value DET1 provided by the firstvoltage detection circuit110, thestate determination circuit130 determines the conductor entering theaudio jack socket300 is either theaudio plug200 or water. Furthermore, only when it is determined that the conductor entering theaudio jack socket300 is theaudio plug200, the secondvoltage detection circuit200 will be activated. According to the second detection value DET2 provided by the secondvoltage detection circuit120, the connector type can be determined. It is note that, in some embodiments, theinsertion detection circuit140 may be omitted, and the insertion detection is performed directly based on the first detection value DET1 outputted by the firstvoltage detection circuit110.
Furthermore, thevoltage divider150 includes resistors Rc1, Ra1, and Ra2. The purpose of the resistor Rc1 is to adjust a voltage division provided to the firstvoltage detection circuit110, such that the firstvoltage detection circuit110 can better detect across the voltage between thecontact311 and thecontact315, where the resistor Ra3 coupled to the voltage VDD2 has same purpose. Furthermore, the purpose of the resistors Ra1 and Ra2 are used to prevent audio signals outputted from theaudio interface10 from interfering with theinsertion detection circuit140 and causing it to malfunction.
After thestate detection circuit100 generates the detection result, theaudio interface10 can correctly control the connected audio equipment, such as: sending a correct corresponding signal to the audio equipment via the contacts, starting or interrupting audio playback, switching audio playback device (such as switching from built-in speakers to external audio equipment), or notifying the electronic device of ingress of water.
FIG.5 illustrates a flow chart of state detection performed by thestate detection device100 according to one embodiment of the present invention. First, at step S510, theinsertion detection circuit140 is utilized to determine whether a conductor enters theaudio jack socket300; if the determination result shows yes, the flow goes to step S520; if the determination result shows not, the flow stops at step S510, which keeps determining whether a conductor enters theaudio jack socket300. At step S520, the firstvoltage detection circuit110 is activated. At this time, according to the first detection value DET1 sampled by the first voltage detection circuit110 (i.e., the voltage across thecontact311 and thecontact315 of the audio jack socket300) and the first threshold TH1, it is determined whether ingress of water occurs; if the determination result shows yes, the flow stops at step S520, where the firstvoltage detection circuit100 remains activated, waiting for the insertion of theaudio plug200. If the determination result of step S520 shows no, the flow goes to step S530, where the firstvoltage detection circuit110 is de-activated, and the secondvoltage detection circuit120 is activated. According to the second detection value DET2 sampled by the second voltage detection circuit120 (i.e., the voltage of thecontact311 of theaudio jack socket300 relative to the ground terminal), the second threshold TH2 and the third threshold TH3, it is determined the connector type is: three-ring four-pole male connector belonging to an audio extension cable, two-ring three-pole connector male connector belonging to a cable of theloudspeaker device400, or three-ring four-pole male connector belonging to a cable of the sound picking-up andloudspeaker combination device500. Once it is determined that the connector type is the three-ring four-pole male connector belonging to the audio extension cable, the secondvoltage detection circuit120 can remain activated to detect. The secondvoltage detection circuit120 can end detecting until the connector type is determined as the two-ring three-pole male connector belonging to the cable of theloudspeaker device400, or until the connector type is determined as the three-ring four-pole male connector belonging to the cable of the sound picking-up andloudspeaker combination device500. Once the detection ends, the flow goes to step5540, where theinsertion detection circuit140 monitors the insertion state to detect whether theaudio plug200 is removed from theaudio jack socket300. If it is removed, the flow ends.
In summary, the present invention provides circuits and related methods for detecting a connector type of audio equipment and a water ingress state of the audio jack socket of an audio interface. In the present invention, by detecting a voltage across two contacts (i.e., thecontact311 and the contact315) of theaudio jack socket300 that are connected thefirst pole211 of theaudio plug200, it can be determined that whether ingress of water occurs, or whether theaudio plug200 is inserted into theaudio jack socket300. A feature of the present invention is that water ingress detection can correctly detect whether salt water or fresh water enters theaudio jack socket300, and this is accomplished only via the firstvoltage detection circuit110. In addition, the present invention also detects a voltage on the contact (i.e., contact314) on theaudio jack socket300 that is connected to thefourth pole214 of theaudio plug200, thereby to determine a connector type of the audio plug and a type of audio equipment to which the audio plug belongs. Since the present invention does not use extra contacts for state detection, it is suitable for existing audio jack sockets, and can provide ability of identifying multiple connector types and detecting the water ingress state of the audio jack socket at the same time.
Embodiments in accordance with the present invention can be implemented as an apparatus, method, or computer program product. Accordingly, the present embodiments may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects that can all generally be referred to herein as a “module” or “system.” Furthermore, the present embodiments may take the form of a computer program product embodied in any tangible medium of expression having computer-usable program code embodied in the medium. In terms of hardware, the present invention can be accomplished by applying any of the following technologies or related combinations: an individual operation logic with logic gates capable of performing logic functions according to data signals, and an application specific integrated circuit (ASIC), a programmable gate array (PGA) or a field programmable gate array (FPGA) with a suitable combinational
The flowchart and block diagrams in the flow diagrams illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present embodiments. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by special purpose hardware-based systems that perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. These computer program instructions can be stored in a computer-readable medium that directs a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable medium produce an article of manufacture including instruction means which implement the function/act specified in the flowchart and/or block diagram block or blocks.
Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.