CN105301386B - OTG detection circuit and mobile terminal with it - Google Patents

OTG detection circuit and mobile terminal with it Download PDF

Info

Publication number
CN105301386B
CN105301386B CN201510613084.0A CN201510613084A CN105301386B CN 105301386 B CN105301386 B CN 105301386B CN 201510613084 A CN201510613084 A CN 201510613084A CN 105301386 B CN105301386 B CN 105301386B
Authority
CN
China
Prior art keywords
detection
otg
comparator
comparator circuit
resistance
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.)
Expired - Fee Related
Application number
CN201510613084.0A
Other languages
Chinese (zh)
Other versions
CN105301386A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201510613084.0A priority Critical patent/CN105301386B/en
Publication of CN105301386A publication Critical patent/CN105301386A/en
Application granted granted Critical
Publication of CN105301386B publication Critical patent/CN105301386B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Tests Of Electronic Circuits (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses a kind of OTG detection circuits comprising: test side, the test side is for connecting OTG equipment;Detection unit, the detection unit are connected with the test side, and the detection unit is used to generate detection voltage when the test side is connected with the OTG equipment;Comparator circuit, the input terminal of the comparator circuit are connected with the detection unit, and the comparator circuit is according to the detection voltage output comparison signal;The identification pin of detection chip, the detection chip is connected with the output end of the comparator circuit, and the detection chip identifies whether the test side is connected with the OTG equipment according to the comparison signal.OTG detection circuit of the invention identifies the insertion for having OTG equipment by increasing comparator circuit, substantially increases accuracy of identification.The invention also discloses a kind of mobile terminals with above-mentioned OTG detection circuit.

Description

OTG detection circuit and mobile terminal with it
Technical field
The present invention relates to mobile device technology, in particular to a kind of OTG (On-The-Go) detection circuit and one kind Mobile terminal with the OTG detection circuit.
Background technique
In the related technology, mobile phone OTG detection circuit typically simply uses GPIO (the General Purpose of chip Input Output, universal input/output) pin detected, relies solely on the level change that GPIO pin recognizes and come Detect the insertion and extraction of OTG equipment.
Then, since the pull-up resistor of GPIO pin is larger, if GPIO pin has a micro- short resistance over the ground, hold very much Misrecognition is easily led at the insertion of OTG equipment, and after the insertion for recognizing OTG equipment, just there is the voltage of 1.8V or so It always exists, to provide electric field environment to electrochemical corrosion occurs in wet environment.
Summary of the invention
The present invention is directed to solve at least some of the technical problems in related technologies.For this purpose, of the invention One purpose is to propose a kind of OTG detection circuit, identifies the insertion for having OTG equipment by increasing comparator circuit, significantly Improve accuracy of identification.
It is another object of the present invention to propose a kind of mobile terminal.
In order to achieve the above objectives, a kind of OTG detection circuit that the embodiment of the present invention proposes, comprising: test side, the detection End is for connecting OTG equipment;Detection unit, the detection unit are connected with the test side, and the detection unit is used in institute It states when test side is connected with the OTG equipment and generates detection voltage;Comparator circuit, the input terminal of the comparator circuit and institute It states detection unit to be connected, the comparator circuit is according to the detection voltage output comparison signal;Detection chip, the detection core The identification pin of piece is connected with the output end of the comparator circuit, and the detection chip is according to comparison signal identification Whether test side is connected with the OTG equipment.
OTG detection circuit according to an embodiment of the present invention, by increasing comparator between detection unit and detection chip Circuit comes whether recognition detection end is connected with OTG equipment, can not only reduce the voltage of identification pin, to slow down electrochemistry corruption The speed of erosion can also substantially increase accuracy of identification as much as possible by OTG identification impedance adjustment to relatively low range.
According to one embodiment of present invention, the comparator circuit specifically includes: concatenated first resistor and the second electricity Resistance, the concatenated first resistor and second resistance are connected between the first default power supply and ground, the concatenated first resistor There is first node, input terminal of the first node as the comparator circuit between second resistance;Concatenated third Resistance and the 4th resistance, the concatenated 3rd resistor and the 4th resistance are connected between the described first default power supply and ground, institute Stating has second node between concatenated 3rd resistor and the 4th resistance;Comparator, the non-inverting input terminal of the comparator and institute State first node be connected, the inverting input terminal of the comparator is connected with the second node, the power end of the comparator and Second default power supply is connected, and the ground terminal ground connection of the comparator, the output end of the comparator is as the comparator circuit Output end.
Also, the comparator circuit further includes the first electric capacity of voltage regulation, one end of first electric capacity of voltage regulation and described the Two default power supplys are connected, the other end ground connection of first electric capacity of voltage regulation.
According to one embodiment of present invention, the output end of the comparator circuit also passes through pull-up resistor and first and presets Power supply is connected.
According to one embodiment of present invention, the detection unit includes detection resistance, and the detection resistance is connected to institute It states between test side and the input terminal of the comparator circuit.
Also, the OTG detection circuit further includes the second electric capacity of voltage regulation, one end of second electric capacity of voltage regulation with it is described The input terminal of comparator circuit is connected, the other end ground connection of second electric capacity of voltage regulation.
In addition, the embodiment of the present invention also proposed a kind of mobile terminal comprising above-mentioned OTG detection circuit.
Mobile terminal according to an embodiment of the present invention identifies whether that being inserted into OTG sets by above-mentioned OTG detection circuit Standby, the voltage that can not only reduce identification pin can also as much as possible identify OTG to slow down the speed of electrochemical corrosion Impedance adjustment substantially increases accuracy of identification, sufficiently meets the needs of user to relatively low range.
Detailed description of the invention
Fig. 1 is the schematic diagram according to the OTG detection circuit of one embodiment of the invention;And
Fig. 2 is the block diagram according to the mobile terminal of the embodiment of the present invention.
Specific embodiment
The embodiment of the present invention is described below in detail, examples of the embodiments are shown in the accompanying drawings, wherein from beginning to end Same or similar label indicates same or similar element or element with the same or similar functions.Below with reference to attached The embodiment of figure description is exemplary, it is intended to is used to explain the present invention, and is not considered as limiting the invention.
It is electric to describe the OTG detection circuit proposed according to embodiments of the present invention and there is the OTG to detect with reference to the accompanying drawings The mobile terminal on road.
Fig. 1 is the schematic diagram according to the OTG detection circuit of one embodiment of the invention.As shown in Figure 1, OTG detection electricity Road includes test side 10, detection unit 20, comparator circuit 30 and detection chip 40.
Wherein, such as USB_ID of test side 10 detects pin for connecting OTG equipment, detection unit 20 and 10 phase of test side Even, detection unit 20 is used to generate detection voltage when test side is connected with OTG equipment.
According to one embodiment of present invention, as shown in Figure 1, detection unit 20 includes detection resistance R0, detection resistance connects It connects between test side 10 and the input terminal of comparator circuit 30.Also, such as USB_ID detects pin connection in test side 10 When having OTG equipment, such as USB_ID of test side 10 detection pin is equivalent to over the ground, and detection unit 20 is on detection resistance R0 at this time Form detection voltage.
The input terminal of comparator circuit 30 is connected with detection unit 20, and comparator circuit 30 is according to the detection voltage output Identification pin, that is, GPIO pin of comparison signal, detection chip 40 is connected with the output end of comparator circuit 30, detection chip 40 OTG equipment whether is connected with according to comparison signal recognition detection end 10.In other words, detection chip 40 is identified according to comparison signal It to when low and high level jump, can recognize to whether test side 10 is connected with OTG equipment, for example, detection chip 40 recognizes high electricity When flat jump is low level, judgement has the insertion of OTG equipment, and detection chip 40 recognizes low level jump when being high level, sentences Disconnected OTG equipment is extracted.
According to one embodiment of present invention, as shown in Figure 1, comparator circuit 30 specifically includes: concatenated first resistor R1 and second resistance R2, concatenated 3rd resistor R3 and the 4th resistance R3, comparator Comp1.Wherein, concatenated first resistor R1 And second resistance R2 is connected between the power supply and ground of the first default power supply V1P8 such as 1.8V, concatenated first resistor R1 and There is first node, input terminal of the first node as comparator circuit 30 between two resistance R2;Concatenated 3rd resistor R3 and 4th resistance R4 is connected between the first default power supply V1P8 and ground, is had between concatenated 3rd resistor R3 and the 4th resistance R4 Second node;The non-inverting input terminal (+) of comparator Comp1 is connected with first node, the inverting input terminal (-) of comparator Comp1 It is connected with second node, the power end of comparator Comp1 is connected with the power supply of the second default power supply V2P8 such as 2.8V, comparator The ground terminal of Comp1 is grounded, output end of the output end of comparator Comp1 as comparator circuit 30, and exports comparison signal extremely Identify pin GPIO.
Also, as shown in Figure 1, comparator circuit Comp1 further includes the first electric capacity of voltage regulation C1, the one of the first electric capacity of voltage regulation C1 End is connected with the second default power supply V2P8, the other end ground connection of the first electric capacity of voltage regulation C1, with so that the second default power supply V2P8 Output voltage stabilization.
Wherein, the ratio value of first resistor R1 and second resistance R2 are less than the ratio of 3rd resistor R3 and the 4th resistance R4 Value, and first resistor R1 to the 4th resistance R4 can be patch precision resistance.
In an embodiment of the present invention, compared with increasing between such as USB_ID pin of test side 10 and identification pin GPIO Device circuit 30, and suitably divided by first resistor R1 and second resistance R2, so that can reach reduces test side voltage, It is connected to the non-inverting input terminal of comparator simultaneously.And suitably divided by 3rd resistor R3 and the 4th resistance R4 Pressure, and the inverting input terminal for being connected to comparator can play the purpose for reducing identification voltage as reference input.Therefore It says, the OTG detection circuit of the embodiment of the present invention is without changing original software logic, by adjusting the inverting input terminal of comparator Reference voltage, so that it may by OTG identification impedance adjustment arrive very low range, guarantee identify accuracy.Also, in the present invention A specific example in, identification impedance can be reduced to 300 ohms.
Specifically, as shown in Figure 1, the output end of comparator circuit 30 also passes through the default power supply of pull-up resistor RL and first V1P8 is connected.By increasing comparator circuit 30 between such as USB_ID pin of test side 10 and identification pin GPIO, use Comparator is compared judgement, so as to reduce identification pin voltage, so that recognizing the critical voltage of OTG equipment reduces, Improve accuracy of identification.
According to one embodiment of present invention, as shown in Figure 1, above-mentioned OTG detection circuit further includes the second electric capacity of voltage regulation One end of C2, the second electric capacity of voltage regulation C2 are connected with the input terminal of comparator circuit 30, the other end ground connection of the second electric capacity of voltage regulation C2, To stable detection voltage, filtering interference signals improve detection accuracy.
In conclusion OTG detection circuit according to an embodiment of the present invention, by increasing between detection unit and detection chip Add comparator circuit to come whether recognition detection end is connected with OTG equipment, the voltage of identification pin can be not only reduced, to slow down OTG can also be identified that impedance adjustment to relatively low range, substantially increases identification essence as much as possible by the speed of electrochemical corrosion Degree.
In addition, as shown in Fig. 2, the embodiment of the present invention also proposed a kind of mobile terminal 100 comprising above-mentioned OTG inspection Slowdown monitoring circuit 200.
Wherein, mobile terminal can be the mobile devices such as mobile phone, plate.
Mobile terminal according to an embodiment of the present invention identifies whether that being inserted into OTG sets by above-mentioned OTG detection circuit Standby, the voltage that can not only reduce identification pin can also as much as possible identify OTG to slow down the speed of electrochemical corrosion Impedance adjustment substantially increases accuracy of identification, sufficiently meets the needs of user to relatively low range.
In the description of the present invention, it is to be understood that, term " center ", " longitudinal direction ", " transverse direction ", " length ", " width ", " thickness ", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom" "inner", "outside", " up time The orientation or positional relationship of the instructions such as needle ", " counterclockwise ", " axial direction ", " radial direction ", " circumferential direction " be orientation based on the figure or Positional relationship is merely for convenience of description of the present invention and simplification of the description, rather than the device or element of indication or suggestion meaning must There must be specific orientation, be constructed and operated in a specific orientation, therefore be not considered as limiting the invention.
In addition, term " first ", " second " are used for descriptive purposes only and cannot be understood as indicating or suggesting relative importance Or implicitly indicate the quantity of indicated technical characteristic.Define " first " as a result, the feature of " second " can be expressed or Implicitly include at least one this feature.In the description of the present invention, the meaning of " plurality " is at least two, such as two, three It is a etc., unless otherwise specifically defined.
In the present invention unless specifically defined or limited otherwise, term " installation ", " connected ", " connection ", " fixation " etc. Term shall be understood in a broad sense, for example, it may be being fixedly connected, may be a detachable connection, or integral;It can be mechanical connect It connects, is also possible to be electrically connected;It can be directly connected, can also can be in two elements indirectly connected through an intermediary The interaction relationship of the connection in portion or two elements, unless otherwise restricted clearly.For those of ordinary skill in the art For, the specific meanings of the above terms in the present invention can be understood according to specific conditions.
In the present invention unless specifically defined or limited otherwise, fisrt feature in the second feature " on " or " down " can be with It is that the first and second features directly contact or the first and second features pass through intermediary mediate contact.Moreover, fisrt feature exists Second feature " on ", " top " and " above " but fisrt feature be directly above or diagonally above the second feature, or be merely representative of First feature horizontal height is higher than second feature.Fisrt feature can be under the second feature " below ", " below " and " below " One feature is directly under or diagonally below the second feature, or is merely representative of first feature horizontal height less than second feature.
In the description of this specification, reference term " one embodiment ", " some embodiments ", " example ", " specifically show The description of example " or " some examples " etc. means specific features, structure, material or spy described in conjunction with this embodiment or example Point is included at least one embodiment or example of the invention.In the present specification, schematic expression of the above terms are not It must be directed to identical embodiment or example.Moreover, particular features, structures, materials, or characteristics described can be in office It can be combined in any suitable manner in one or more embodiment or examples.In addition, without conflicting with each other, the skill of this field Art personnel can tie the feature of different embodiments or examples described in this specification and different embodiments or examples It closes and combines.
Although the embodiments of the present invention has been shown and described above, it is to be understood that above-described embodiment is example Property, it is not considered as limiting the invention, those skilled in the art within the scope of the invention can be to above-mentioned Embodiment is changed, modifies, replacement and variant.

Claims (6)

1. a kind of OTG detection circuit characterized by comprising
Test side, the test side is for connecting OTG equipment;
Detection unit, the detection unit are connected with the test side, and the detection unit in the test side for being connected with Detection voltage is generated when the OTG equipment;
Comparator circuit, the input terminal of the comparator circuit are connected with the detection unit, and the comparator circuit is according to institute State detection voltage output comparison signal, wherein the detection unit includes detection resistance, and the detection resistance is connected to the inspection It surveys between end and the input terminal of the comparator circuit;
The identification pin of detection chip, the detection chip is connected with the output end of the comparator circuit, the detection chip Identify whether the test side is connected with the OTG equipment according to the comparison signal, wherein the detection chip recognizes height Level jump be low level when, judgement have OTG equipment insertion, the detection chip recognize low level jump be high level when, Judge that OTG equipment is extracted.
2. OTG detection circuit according to claim 1, which is characterized in that the comparator circuit specifically includes:
Concatenated first resistor and second resistance, the concatenated first resistor and second resistance be connected to the first default power supply with Between ground, there is first node, the first node is as the comparison between the concatenated first resistor and second resistance The input terminal of device circuit;
Concatenated 3rd resistor and the 4th resistance, the concatenated 3rd resistor and the 4th resistance are connected to the described first default electricity Between source and ground, there is second node between the concatenated 3rd resistor and the 4th resistance;
Comparator, the non-inverting input terminal of the comparator are connected with the first node, the inverting input terminal of the comparator with The second node is connected, and the power end of the comparator is connected with the second default power supply, the ground terminal ground connection of the comparator, institute State output end of the output end of comparator as the comparator circuit.
3. OTG detection circuit according to claim 2, which is characterized in that the comparator circuit further includes the first pressure stabilizing Capacitor, one end of first electric capacity of voltage regulation are connected with the described second default power supply, another termination of first electric capacity of voltage regulation Ground.
4. OTG detection circuit according to any one of claim 1-3, which is characterized in that the comparator circuit it is defeated Outlet also passes through pull-up resistor and is connected with the first default power supply.
5. OTG detection circuit according to claim 3, which is characterized in that further include the second electric capacity of voltage regulation, described second is steady One end of voltage capacitance is connected with the input terminal of the comparator circuit, the other end ground connection of second electric capacity of voltage regulation.
6. a kind of mobile terminal, which is characterized in that including OTG detection circuit according to any one of claims 1-5.
CN201510613084.0A 2015-09-23 2015-09-23 OTG detection circuit and mobile terminal with it Expired - Fee Related CN105301386B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510613084.0A CN105301386B (en) 2015-09-23 2015-09-23 OTG detection circuit and mobile terminal with it

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510613084.0A CN105301386B (en) 2015-09-23 2015-09-23 OTG detection circuit and mobile terminal with it

Publications (2)

Publication Number Publication Date
CN105301386A CN105301386A (en) 2016-02-03
CN105301386B true CN105301386B (en) 2018-12-04

Family

ID=55198883

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510613084.0A Expired - Fee Related CN105301386B (en) 2015-09-23 2015-09-23 OTG detection circuit and mobile terminal with it

Country Status (1)

Country Link
CN (1) CN105301386B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018094894A1 (en) * 2016-11-23 2018-05-31 华为技术有限公司 Detection circuit and detection method for on-the-go device, and terminal
CN106844265B (en) * 2017-02-06 2018-10-19 维沃移动通信有限公司 A kind of control method and mobile terminal of general-purpose serial bus USB interface
CN107391157B (en) * 2017-07-31 2020-07-31 北京小米移动软件有限公司 Mobile terminal and method for identifying mobile storage device
CN112397948A (en) * 2019-08-13 2021-02-23 北京小米移动软件有限公司 Female seat of Type-C, Type-C plug system and electronic system
CN110659237B (en) * 2019-09-27 2022-12-09 闻泰通讯股份有限公司 Function adaptation method, device, equipment and storage medium

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002082139A (en) * 2000-09-05 2002-03-22 Advantest Corp Power source voltage monitoring circuit
CN1774141A (en) * 2004-11-08 2006-05-17 佛山市顺德区顺达电脑厂有限公司 Detecting device for ear phone with speeking function and operating method thereof
CN100591080C (en) * 2005-05-27 2010-02-17 佛山市顺德区顺达电脑厂有限公司 Detecting method for earphone receiving/hang-up key
CN100589524C (en) * 2006-07-06 2010-02-10 深圳Tcl新技术有限公司 A device for detecting whether signal input device of TV is connected
CN201307924Y (en) * 2008-11-14 2009-09-09 宇龙计算机通信科技(深圳)有限公司 Earphone detecting circuit and terminal device using earphone detecting device
CN102915607A (en) * 2011-08-05 2013-02-06 上海晨兴希姆通电子科技有限公司 Headset anti-theft mobile terminal
CN103067601B (en) * 2013-01-15 2015-02-11 Tcl通讯(宁波)有限公司 Mobile terminal and detecting method of earphone inserting state thereof
CN104714916B (en) * 2015-03-30 2017-11-17 迈普通信技术股份有限公司 USB interface external equipment inserts/transfer to detecting system

Also Published As

Publication number Publication date
CN105301386A (en) 2016-02-03

Similar Documents

Publication Publication Date Title
CN105301386B (en) OTG detection circuit and mobile terminal with it
CN105182154B (en) A kind of USB detection circuit and method
CN106291210B (en) USB interface detector, USB interface detection method, USB connector and electronic equipment
US9128691B2 (en) Method and terminal for selecting internal circuit according to USB interface status
US20150261714A1 (en) Method, apparatus, and computer program product for entering accessory docking mode in usb type c
US20130241469A1 (en) Charging device
US20130179603A1 (en) Apparatus and method of identifying a usb or an mhl device
US9268728B2 (en) Portable electronic device and accessory device thereof, and operating method for the portable electronic device
US10910818B2 (en) Anti-short-circuit detection apparatus and user terminal
US11566964B2 (en) Water ingress detection method and circuit, and electric device
CN109387737B (en) Needle seat and plastic shell connection state detection system
CN104600963A (en) Output voltage dual-mode detection circuit of switching power supply
US20160225559A1 (en) Power supply system
CN106797414B (en) A kind of leakage current detection circuit and terminal of terminal
US9859811B2 (en) Adjusting power consumption of a load
CN109394169B (en) Medical Devices with hysteresis module
US20130285878A1 (en) Antenna switching circuit and electronic device and antenna switching method thereof
US9557789B2 (en) Power control device
CN108321858B (en) Charging protection device and method thereof
US8872521B2 (en) Electrical parameter detection device for peripheral component interconnect devices
CN208849505U (en) Medical Devices with hysteresis module
CN216696605U (en) Battery temperature detection circuit
CN108196113A (en) A kind of quick warning circuit of ONU power down for PON system
US20150185817A1 (en) Charging circuit for usb interface
CN213122226U (en) Detection circuit of wireless earphone charging box, charging box and wireless earphone

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Patentee after: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

Address before: Changan town in Guangdong province Dongguan 523859 usha Beach Road No. 18

Patentee before: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS Corp.,Ltd.

CP03 Change of name, title or address
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20181204

CF01 Termination of patent right due to non-payment of annual fee