CN108874708B - OTG device, terminal charging method, mobile terminal and computer readable storage medium - Google Patents

OTG device, terminal charging method, mobile terminal and computer readable storage medium Download PDF

Info

Publication number
CN108874708B
CN108874708B CN201810695064.6A CN201810695064A CN108874708B CN 108874708 B CN108874708 B CN 108874708B CN 201810695064 A CN201810695064 A CN 201810695064A CN 108874708 B CN108874708 B CN 108874708B
Authority
CN
China
Prior art keywords
mobile terminal
otg
charging
port
voltage
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
CN201810695064.6A
Other languages
Chinese (zh)
Other versions
CN108874708A (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.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201810695064.6A priority Critical patent/CN108874708B/en
Publication of CN108874708A publication Critical patent/CN108874708A/en
Application granted granted Critical
Publication of CN108874708B publication Critical patent/CN108874708B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/382Information transfer, e.g. on bus using universal interface adapter
    • G06F13/385Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The invention discloses an OTG device, a terminal charging method, a mobile terminal and a computer readable storage medium, wherein the OTG device comprises: the USB charging device comprises an OTG device and a charging device, wherein a USB charging voltage port of the OTG device is electrically connected with a USB charging voltage port of the charging device, a ground port of the OTG device is electrically connected with a ground port of the charging device, and a detection positive port and a detection negative port of the charging device are in short circuit. The power management chip in the mobile terminal is used for accessing the mobile terminal with the OTG equipment and enabling the OTG equipment to be provided with the USB charging voltage to be connected with the mobile terminal, and then enabling the USB charging voltage to be connected with the inside of the mobile terminal, enabling the voltage reduction circuit and closing the voltage boost circuit so as to use the USB charging voltage to charge the battery. The invention realizes that the OTG equipment charges the mobile terminal and the data interaction between the mobile terminal and the OTG equipment is carried out simultaneously, thereby improving the user experience.

Description

OTG device, terminal charging method, mobile terminal and computer readable storage medium
Technical Field
The present invention relates to The field of mobile terminal control, and in particular, to an OTG (On The Go, a USB operating mode) device, a terminal charging method, a mobile terminal, and a computer-readable storage medium.
Background
The intelligent mobile terminal enters the profound era of different fields after undergoing brute force growth, each large mobile terminal manufacturer creates characteristic attributes of the intelligent mobile terminal manufacturer, particularly, the popularity of hand trip in recent years accelerates the state, a mobile terminal developed specially for games, namely a game mobile terminal, is produced, mobile terminal elements which are more concerned by online game users comprise endurance, network, heating and the like, the endurance problem is that each large manufacturer researches vigorously, the electric quantity and the network of the mobile terminal are not good important factors influencing the experience of the game mobile terminal, the network users know that a wired network is more stable than a wireless network, so that the intelligent mobile terminal manufacturer also can use the wired network to connect with the mobile terminal, if the intelligent mobile terminal uses the wired network to connect with the mobile terminal, a transfer line for connecting the wired network with the mobile terminal can be purchased on the market at present, as shown in fig. 1, the patch cord is an OTG device.
For charging the mobile terminal, the user hopes that the shorter the charging time is, the better the charging time is, and the application of the fast charging technical scheme provided by the platform of the high-traffic company is quite mature at present, such as QC2.0, QC3.0 and the like, however, a problem is encountered during the game process: this is how well the user needs both charging and a stable wired network, i.e. if there is a device that can both charge and enable a wired network at the same time, this problem can be solved. However, the existing charging and wired internet two-in-one device on the market can only realize one function at the same time, namely, either charging or wired internet.
Therefore, no device for simultaneously supporting charging and wired internet access of the mobile terminal is available in the market at present.
Disclosure of Invention
The invention mainly aims to provide an OTG device, a terminal charging method, a mobile terminal and a computer readable storage medium, and aims to realize that the OTG device charges the mobile terminal and the data interaction between the mobile terminal and the OTG device is carried out simultaneously, so that a user obtains better experience.
In order to achieve the above object, the present invention provides an OTG device, including: the OTG device comprises an OTG device and a charging device, wherein a USB charging voltage port of the OTG device is electrically connected with a USB charging voltage port of the charging device, a grounding port of the OTG device is electrically connected with a grounding port of the charging device, and a detection positive port and a detection negative port of the charging device are in short circuit.
Optionally, the OTG device has a Type _ C interface connected to the mobile terminal.
Optionally, in a case that the OTG device is accessed to the mobile terminal, the OTG device provides data interaction with a wired internet access function for the mobile terminal.
Optionally, under the condition that the OTG device is accessed to the mobile terminal, the OTG device provides a data interaction function for the mobile terminal, and the charging device is configured to charge the battery of the mobile terminal, and is further configured to supply power to the OTG device.
The present invention further provides a mobile terminal, including: a power management chip and a battery, wherein,
the power management chip is used for accessing the USB charging voltage into the mobile terminal when detecting that the OTG equipment is accessed into the mobile terminal and the OTG equipment is provided with the USB charging voltage, and starting the voltage reduction circuit and closing the voltage boost circuit so as to use the USB charging voltage to charge the battery.
Optionally, the power management chip is specifically configured to:
and under the condition that the mobile terminal is connected with the OTG equipment through a Type _ C interface, detecting whether one of two alternate pull-down potential ports of the Type _ C interface is connected with a corresponding port of the OTG equipment to form a pull-up voltage division circuit, if so, judging that the OTG equipment is accessed into the mobile terminal, otherwise, judging that no OTG equipment is accessed into the mobile terminal.
Optionally, the power management chip is further configured to:
and when detecting that no input signal exists in the positive detection port and the negative detection port of the Type-C interface, charging the battery by using the USB charging voltage under the set charging voltage and current control parameters.
Optionally, the power management chip is further configured to:
and when detecting that the charging current for charging the battery is greater than a preset current threshold value, stopping charging and giving an alarm.
In addition, in order to achieve the above object, the present invention further provides a terminal charging method applied to a mobile terminal, where the method includes:
when detecting that OTG equipment is accessed into the mobile terminal and the OTG equipment is provided with USB charging voltage for connection, the USB charging voltage is accessed into the mobile terminal, a voltage reduction circuit is started and a voltage boosting circuit is closed, so that the battery is charged by the USB charging voltage.
Optionally, the method for detecting whether an OTG device accesses the mobile terminal includes:
and under the condition that the mobile terminal is connected with the OTG equipment through a Type _ C interface, detecting whether one of two alternate pull-down potential ports of the Type _ C interface is connected with a corresponding port of the OTG equipment to form a pull-up voltage division circuit, if so, judging that the OTG equipment is accessed into the mobile terminal, otherwise, judging that no OTG equipment is accessed into the mobile terminal.
Optionally, the charging the battery with the USB charging voltage includes:
and when detecting that no input signal exists in the positive detection port and the negative detection port of the Type-C interface, charging the battery by using the USB charging voltage under the set charging voltage and current control parameters.
Optionally, the method further includes:
and when detecting that the charging current for charging the battery is greater than a preset current threshold value, stopping charging and giving an alarm.
The invention further provides a computer readable storage medium, where an OTG charging program is stored, and when the OTG charging program is executed by a processor, the steps of the terminal charging method are implemented.
The OTG device, the terminal charging method, the mobile terminal and the computer readable storage medium provided by the invention can easily realize the data interaction between the mobile terminal and the OTG device and the requirement of the OTG device on the parallel charging of the battery of the mobile terminal, and are convenient and practical. The mobile terminal is matched with the OTG equipment for use, a power management chip of the mobile terminal can accurately control the on and off of an internal boosting circuit and a voltage reduction circuit, so that the OTG equipment connected to the mobile terminal can smoothly charge a battery of the mobile terminal while performing data interaction with the mobile terminal, and the battery can be stopped from being charged when the charging current exceeds a preset current threshold value, so that the battery can be protected in time.
Drawings
FIG. 1 is a schematic diagram of a prior art network card product with a cable-to-Typc-C conversion function;
fig. 2 is a schematic diagram of a hardware structure of an alternative mobile terminal for implementing various embodiments of the present invention;
FIG. 3 is a diagram of a wireless communication system for the mobile terminal shown in FIG. 2;
fig. 4 is a schematic connection diagram of components of an OTG device according to a first embodiment of the present invention;
fig. 5 is a schematic diagram illustrating connection components of a mobile terminal according to a second embodiment and a third embodiment of the present invention;
fig. 6 is a schematic diagram of a generic type C-C interface of a mobile terminal according to a second embodiment and a third embodiment of the present invention;
fig. 7 is a flowchart of a terminal charging method according to a fourth embodiment of the invention;
fig. 8 is a flowchart of a terminal charging method according to a fifth embodiment of the present invention;
fig. 9 is a schematic diagram illustrating a connection situation between an OTG device and a mobile terminal according to an embodiment of the present invention;
the implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in itself. Thus, "module", "component" or "unit" may be used mixedly.
The terminal may be implemented in various forms. For example, the terminal described in the present invention may include mobile terminals such as a mobile terminal, a tablet computer, a notebook computer, a palmtop computer, a Personal Digital Assistant (PDA), a Portable Media Player (PMP), a navigation device, a wearable device, a smart band, a pedometer, and the like, and fixed terminals such as a Digital TV, a desktop computer, and the like.
The following description will be given by way of example of a mobile terminal, and it will be understood by those skilled in the art that the construction according to the embodiment of the present invention can be applied to a fixed type terminal, in addition to elements particularly used for mobile purposes.
Referring to fig. 2, which is a schematic diagram of a hardware structure of a mobile terminal for implementing various embodiments of the present invention, the mobile terminal 100 may include: RF (Radio Frequency) unit 101, WiFi module 102, audio output unit 103, a/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111. Those skilled in the art will appreciate that the mobile terminal architecture shown in fig. 2 is not intended to be limiting of mobile terminals, and that a mobile terminal may include more or fewer components than shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile terminal in detail with reference to fig. 2:
the radio frequency unit 101 may be configured to receive and transmit signals during information transmission and reception or during a call, and specifically, receive downlink information of a base station and then process the downlink information to the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (General Packet Radio Service), CDMA2000(Code Division Multiple Access 2000), WCDMA (Wideband Code Division Multiple Access), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access), FDD-LTE (Frequency Division duplex Long Term Evolution), and TDD-LTE (Time Division duplex Long Term Evolution).
WiFi belongs to short-distance wireless transmission technology, and the mobile terminal can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 102, and provides wireless broadband internet access for the user. Although fig. 2 shows the WiFi module 102, it is understood that it does not belong to the essential constitution of the mobile terminal, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the WiFi module 102 or stored in the memory 109 into an audio signal and output as sound when the mobile terminal 100 is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 may include a speaker, a buzzer, and the like.
The a/V input unit 104 is used to receive audio or video signals. The a/V input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, the Graphics processor 1041 Processing image data of still pictures or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the WiFi module 102. The microphone 1042 may receive sounds (audio data) via the microphone 1042 in a phone call mode, a recording mode, a voice recognition mode, or the like, and may be capable of processing such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode. The microphone 1042 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The mobile terminal 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or a backlight when the mobile terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when stationary, and can be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration) for recognizing the attitude of the mobile terminal, and related functions (such as pedometer and tapping) for vibration recognition; as for other sensors such as a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile terminal, further description is omitted here.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 107 may include a touch panel 1071 and other input devices 1072. The touch panel 1071, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 1071 (e.g., an operation performed by the user on or near the touch panel 1071 using a finger, a stylus, or any other suitable object or accessory), and drive a corresponding connection device according to a predetermined program. The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and can receive and execute commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. In particular, other input devices 1072 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like, and are not limited to these specific examples.
Further, the touch panel 1071 may cover the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although the touch panel 1071 and the display panel 1061 are shown in fig. 2 as two separate components to implement the input and output functions of the mobile terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the mobile terminal, and is not limited herein.
The interface unit 108 serves as an interface through which at least one external device is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal 100 and external devices.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the mobile terminal, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the mobile terminal, connects various parts of the entire mobile terminal using various interfaces and lines, and performs various functions of the mobile terminal and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the mobile terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The mobile terminal 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 111 may be logically connected to the processor 110 via a power management system, so as to manage charging, discharging, and power consumption management functions via the power management system.
Although not shown in fig. 2, the mobile terminal 100 may further include a bluetooth module or the like, which is not described in detail herein.
In order to facilitate understanding of the embodiments of the present invention, a communication network system on which the mobile terminal of the present invention is based is described below.
Referring to fig. 3, fig. 3 is an architecture diagram of a communication Network system according to an embodiment of the present invention, where the communication Network system is an LTE system of a universal mobile telecommunications technology, and the LTE system includes a UE (User Equipment) 201, an E-UTRAN (Evolved UMTS Terrestrial Radio Access Network) 202, an EPC (Evolved Packet Core) 203, and an IP service 204 of an operator, which are in communication connection in sequence.
Specifically, the UE201 may be the terminal 100 described above, and is not described herein again.
The E-UTRAN202 includes eNodeB2021 and other eNodeBs 2022, among others. Among them, the eNodeB2021 may be connected with other eNodeB2022 through backhaul (e.g., X2 interface), the eNodeB2021 is connected to the EPC203, and the eNodeB2021 may provide the UE201 access to the EPC 203.
The EPC203 may include an MME (Mobility Management Entity) 2031, an HSS (Home Subscriber Server) 2032, other MMEs 2033, an SGW (Serving gateway) 2034, a PGW (PDN gateway) 2035, and a PCRF (Policy and Charging Rules Function) 2036, and the like. The MME2031 is a control node that handles signaling between the UE201 and the EPC203, and provides bearer and connection management. HSS2032 is used to provide registers to manage functions such as home location register (not shown) and holds subscriber specific information about service characteristics, data rates, etc. All user data may be sent through SGW2034, PGW2035 may provide IP address assignment for UE201 and other functions, and PCRF2036 is a policy and charging control policy decision point for traffic data flow and IP bearer resources, which selects and provides available policy and charging control decisions for a policy and charging enforcement function (not shown).
The IP services 204 may include the internet, intranets, IMS (IP Multimedia Subsystem), or other IP services, among others.
Although the LTE system is described as an example, it should be understood by those skilled in the art that the present invention is not limited to the LTE system, but may also be applied to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA, and future new network systems.
Based on the above mobile terminal hardware structure and communication network system, the present invention provides various embodiments of the method.
As shown in fig. 4, a first embodiment of the present invention proposes an OTG device, including: an OTG device 401 and a charging device 402, wherein,
the USB charging voltage port VBUS of the OTG device 401 is electrically connected to the USB charging voltage port VBUS of the charging device 402, the ground port GND of the OTG device 401 is electrically connected to the ground port GND of the charging device 402, and the detection positive port D + and the detection negative port D-of the charging device 402 are shorted.
When the OTG device of the embodiment of the present invention is connected to a mobile terminal, a power management chip PMIC in the mobile terminal recognizes that the OTG device is still an OTG device 401 in the OTG device rather than a charging device 402, and the principle of the conventional charging device is that after a USB charging voltage port VBUS, a ground port GND, a detection positive port D + and a detection negative port D-are connected to the power management chip PMIC, the power management chip PMIC determines whether the charging device is a standard charger or a non-standard charger according to input signals of the detection positive port D + and the detection negative port D-, and performs corresponding control on charging voltage and current and enters a charging mode. Therefore, in the embodiment of the present invention, the purpose of short-circuiting the detection positive port D + and the detection negative port D-of the charging device 402 is to avoid that the power management chip PMIC detects the detection positive port D + and the detection negative port D-signals that are output only by the charging device when the power management chip PMIC recognizes that the OTG device 401 is ready to perform power supply and data interaction with the OTG device 401 without entering the charging mode, and on the other hand, according to the idea of the embodiment of the present invention, it is only necessary to modify the software interpretation logic of the power management chip PMIC side to design the charging function on the mobile terminal side according to the set charging current and voltage when it is detected that the OTG device is connected to the mobile terminal and the OTG device is provided with the USB charging voltage.
Optionally, the OTG device has a Type _ C interface connected to the mobile terminal. The Type _ C interface is a relatively general data interface used by the mobile terminal at present, and the embodiment of the present invention is not limited to use of the Type _ C interface, and all interface forms conforming to the USB operating mode are available.
Optionally, in a case that the OTG device is accessed to the mobile terminal, the OTG device provides data interaction with a wired internet access function for the mobile terminal.
Compared with the existing OTG equipment which can only realize a single wired internet access function or a charging function at the same time, the embodiment of the invention simultaneously meets the requirements of a user on the wired internet access and the charging parallelism of the used mobile terminal, and greatly improves the use experience of the user. In addition, because the types of the current OTG devices are various, the OTG apparatus 401 in the OTG device in the embodiment of the present invention is not limited to provide a data interaction function of wired internet access for the user, such as: the OTG device can also be an OTG device externally connected with a storage space, and as long as the OTG device can be connected with the mobile terminal through a USB working mode and provides a corresponding data interaction function, the charging device provided in the OTG device in the embodiment of the invention can be combined to simultaneously realize the parallel of charging and data interaction of various functions.
Optionally, when the OTG device is connected to the mobile terminal, the charging device 402 is configured to charge the battery of the mobile terminal while the OTG device provides a data interaction function for the mobile terminal, and the charging device is further configured to supply power to the OTG device 401.
In the embodiment of the present invention, when the OTG device is used in cooperation with the mobile terminal in the embodiment of the present invention, not only data interaction of various functions provided to the mobile terminal and charging of the mobile terminal can be performed in parallel, but also the mobile terminal does not need to supply power to the OTG device that is accessed, and the charging device 402 of the OTG device can supply power to the OTG device 401 in the OTG device, so that power consumption of a battery in the mobile terminal is also saved.
As shown in fig. 5, a second embodiment of the present invention provides a mobile terminal, including: a power management chip 501 and a battery 502, wherein,
the power management chip 501 is configured to access the USB charging voltage into the mobile terminal when it is detected that the OTG device is accessed to the mobile terminal and the OTG device is provided with the USB charging voltage, and turn on the voltage step-down circuit and turn off the voltage step-up circuit to charge the battery 502 with the USB charging voltage.
Optionally, the power management chip 501 is specifically configured to:
under the condition that the mobile terminal is connected with the OTG equipment through a Type _ C interface, detecting whether one of two alternative pull-down potential ports CC1 and CC2 of the Type _ C interface is connected with a corresponding port CC of the OTG equipment to form a pull-up voltage division circuit, if so, judging that the OTG equipment is accessed to the mobile terminal, otherwise, judging that no OTG equipment is accessed to the mobile terminal.
Here, a principle that the existing mobile terminal identifies the charging device and the OTG device in the case of using the Type _ C interface is introduced as follows:
as shown in fig. 6, a CC signal pin is designed inside the external data line plug, and the signal pin is connected to VBUS through a 56K Ω pull-up resistor inside the charging head, the female head of the Type-C interface is placed on the mobile terminal, and in order to support the positive and negative insertion, two CC pins, namely CC1 and CC2, are designed inside the female head. When an external male connector is inserted into a female connector, a pin of the male connector CC is in short circuit with one of a pin CC1 and a pin CC2 in the female connector, a pin CC1 and a pin CC2 in the female connector are connected with a power management chip PMIC, switchable pull-up resistors and pull-down resistors are designed inside the PMICs of the CC1 and the CC2, if the external connector is not inserted, an internal pin CC1 and the pin CC2 are in polling detection of external charging equipment and OTG equipment, if the pin CC and the female connector CC1 are in short circuit, a 56K omega pull-up resistor is arranged inside the external male connector, when the inside of the PMIC is switched to be pulled down by a CC1 in turn, a pull-up voltage division circuit is formed by the pull-up resistor and the external male connector, and the formation of the circuit informs the PMIC that the VBUS and the inside of the mobile terminal form a channel, so that a BUCK circuit, namely a voltage reduction circuit inside the PMIC is used for; when an OTG device such as a flash disk, a patch cord, etc. is plugged in, the difference between the male plug of the OTG device and the male plug of the charging data line is that the male plug of the OTG device is designed with a pull-down resistor with a fixed resistance value, rather than a 56K Ω pull-up resistor in the male plug of the charging data line, when the PMIC is pulled up by turns in CC1 or CC2, one of CC1 or CC2 will form a circuit with the pull-down resistor of the OTG device to form a pull-down voltage divider circuit, and once the pull-down voltage divider circuit is detected and it can be considered that the OTG device is plugged in from the outside, the OTG device is powered by the mobile terminal.
When the mobile terminal of the embodiment of the present invention is used in cooperation with the OTG device of the first embodiment, because the OTG device includes the USB charging voltage provided by the charging device 402, the mobile terminal of this embodiment can detect that not only the OTG device is accessed but also the USB charging voltage is accessed, and at this time, the mobile terminal of this embodiment does not start the voltage boost circuit to supply power to the outside, but starts the voltage buck circuit to receive the external power to charge itself.
Optionally, the power management chip 501 is further configured to:
when detecting that no input signal is input to the detection positive port and the detection negative port of the Type _ C interface, the battery 502 is charged with the USB charging voltage under the set charging voltage and current control parameters.
For example, when it is detected that no signal is input to the positive detection port and the negative detection port of the Type _ C interface, the battery 502 is charged based on the charging voltage and current control parameters previously set in the power management chip 501, where the set charging voltage and current control parameters include: upper limits of charging voltage, charging current, and charging current.
As shown in fig. 5, a third embodiment of the present invention provides a mobile terminal, including: a power management chip 501 and a battery 502, wherein,
the power management chip 501 is configured to access the USB charging voltage into the mobile terminal when it is detected that the OTG device is accessed to the mobile terminal and the OTG device is provided with the USB charging voltage, and turn on the voltage step-down circuit and turn off the voltage step-up circuit to charge the battery 502 with the USB charging voltage.
Optionally, the power management chip 501 is specifically configured to:
under the condition that the mobile terminal is connected with the OTG equipment through a Type _ C interface, detecting whether one of two alternative pull-down potential ports CC1 and CC2 of the Type _ C interface is connected with a corresponding port CC of the OTG equipment to form a pull-up voltage division circuit, if so, judging that the OTG equipment is accessed to the mobile terminal, otherwise, judging that no OTG equipment is accessed to the mobile terminal.
When the mobile terminal of the embodiment of the present invention is used in cooperation with the OTG device of the first embodiment, because the OTG device includes the USB charging voltage provided by the charging device 402, the mobile terminal of this embodiment can detect that not only the OTG device is accessed but also the USB charging voltage is accessed, and at this time, the mobile terminal of this embodiment does not start the voltage boost circuit to supply power to the outside, but starts the voltage buck circuit to receive the external power to charge itself.
Optionally, the power management chip 501 is further configured to:
when detecting that no input signal is input to the detection positive port and the detection negative port of the Type _ C interface, the battery 502 is charged with the USB charging voltage under the set charging voltage and current control parameters.
For example, when it is detected that no signal is input to the positive detection port and the negative detection port of the Type _ C interface, the battery 502 is charged based on the charging voltage and current control parameters previously set in the power management chip 501, where the set charging voltage and current control parameters include: upper limits of charging voltage, charging current, and charging current.
Optionally, the power management chip 501 is further configured to:
when the charging current for charging the battery 502 is detected to be larger than a preset current threshold value, the charging is stopped and an alarm is given. The embodiment of the invention sets the upper limit of the charging current in the front, and the function of the embodiment is to form protection on the condition of overlarge flow possibly occurring in the charging process, thereby further improving the charging safety.
As shown in fig. 7, a fourth embodiment of the present invention provides a terminal charging method applied to a mobile terminal, where the method includes:
step S1, whether an OTG device is accessed to the mobile terminal is detected, if yes, step S2 is executed, otherwise, the process is ended;
optionally, the method for detecting whether an OTG device accesses the mobile terminal includes:
and under the condition that the mobile terminal is connected with the OTG equipment through a Type _ C interface, detecting whether one of two alternate pull-down potential ports of the Type _ C interface is connected with a corresponding port of the OTG equipment to form a pull-up voltage division circuit, if so, judging that the OTG equipment is accessed into the mobile terminal, otherwise, judging that no OTG equipment is accessed into the mobile terminal.
And step S2, when detecting that the OTG device is provided with a USB charging voltage connection at the same time, accessing the USB charging voltage into the mobile terminal, and starting a voltage reduction circuit and closing a voltage boost circuit so as to charge the battery by using the USB charging voltage.
Optionally, the charging the battery with the USB charging voltage includes:
and when detecting that no input signal exists in the positive detection port and the negative detection port of the Type-C interface, charging the battery by using the USB charging voltage under the set charging voltage and current control parameters.
The mobile terminal and the OTG equipment are used in a matched mode, and a power management chip of the mobile terminal can accurately control the on and off of an internal boosting circuit and a voltage reduction circuit, so that the OTG equipment connected to the mobile terminal can smoothly charge a battery of the mobile terminal while performing data interaction with the mobile terminal.
As shown in fig. 8, a fifth embodiment of the present invention provides a terminal charging method applied to a mobile terminal, where the method includes:
step S1, whether an OTG device is accessed to the mobile terminal is detected, if yes, step S2 is executed, otherwise, the process is ended;
optionally, the method for detecting whether an OTG device accesses the mobile terminal includes:
and under the condition that the mobile terminal is connected with the OTG equipment through a Type _ C interface, detecting whether one of two alternate pull-down potential ports of the Type _ C interface is connected with a corresponding port of the OTG equipment to form a pull-up voltage division circuit, if so, judging that the OTG equipment is accessed into the mobile terminal, otherwise, judging that no OTG equipment is accessed into the mobile terminal.
And step S2, when detecting that the OTG equipment is provided with a USB charging voltage connection at the same time, accessing the USB charging voltage into the mobile terminal, and starting a voltage reduction circuit and closing a voltage boost circuit so as to charge the battery by using the USB charging voltage.
Optionally, the charging the battery with the USB charging voltage includes:
and when detecting that no input signal exists in the positive detection port and the negative detection port of the Type-C interface, charging the battery by using the USB charging voltage under the set charging voltage and current control parameters.
And step S3, if the charging current is detected to be larger than a preset current threshold value when the battery is charged, stopping charging and giving an alarm.
The embodiment of the invention sets the upper limit of the charging current in the front, and the function of the embodiment is to form protection on the condition of overlarge flow possibly occurring in the charging process, thereby further improving the charging safety.
A sixth embodiment of the present invention provides a computer-readable storage medium, where an OTG charging program is stored on the computer-readable storage medium, and the OTG charging program, when executed by a processor, implements the steps of the terminal charging method according to the third embodiment or the fourth embodiment.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile terminal, a computer, a home appliance, or a network device) to execute the method according to the third or fourth embodiment of the present invention.
The application example of the present invention also meets the initial requirement when two devices, namely, the charging device and the OTG device, in the OTG device described in the foregoing embodiment operate simultaneously, and introduces a Type _ C interface-based wired internet access switching device as an example of performing charging and wired internet access simultaneously, where the device is an OTG device.
Fig. 9 shows a connection situation between the wired internet access switching device based on the Type _ C interface and the mobile terminal, where the charger and the network card in the wired internet access switching device correspond to the charging device in the first embodiment of the present invention, and the network card corresponds to the charging device OTG device in the first embodiment of the present invention. In the following description, a male head of a Type _ C interface is referred to as a male head for short, and a female head of the Type _ C interface is referred to as a female head for short.
The VBUS and the GND pins of the charger are connected with the VBUS and the GND of the network card interface one by one, the D + and the D-of the charger are short-circuited, the network card is connected with a male head of an OTG device to be inserted into the mobile terminal, a high-pass power management chip PMIC in the mobile terminal can identify the OTG device, if no external power supply circuit is provided, the power supply of the OTG device is supplied by a BOOST circuit in the BOB circuit in the PMIC, the power supply of the OTG device can be supplied without the internal BOOST circuit due to the existence of the external VBUS, the internal BOOST circuit is required to be closed at the moment, the VBUS is directly filled into the OTG device circuit, the VBUS is connected with the female head through the male head, if a BUCK circuit in the BOB circuit is opened through software operation at the moment, the voltage VPH _ PWR for charging the battery can be obtained, the identification of the charging type in the high-pass standard protocol is carried out through the identification through the D + and the non-standard charging if the non-standard charging is not carried out, the current can be set within 2A, VBUS is required to charge the battery in the scheme and is used as the power supply voltage of the external OTG equipment, and therefore the purpose of parallel charging and internet surfing can be achieved.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (8)

1. An OTG device, comprising: the device comprises an OTG device and a charging device, wherein a USB charging voltage port of the OTG device is electrically connected with a USB charging voltage port of the charging device, a grounding port of the OTG device is electrically connected with a grounding port of the charging device, and a detection positive port and a detection negative port of the charging device are in short circuit;
under the condition that the OTG equipment is accessed to the mobile terminal, the OTG equipment provides a data interaction function for the mobile terminal, and meanwhile, the charging device is used for charging a battery of the mobile terminal and is also used for supplying power to the OTG device;
the OTG equipment is provided with a Type _ C interface connected with the mobile terminal.
2. The OTG device of claim 1, wherein, when the OTG device is connected to a mobile terminal, the OTG device provides data interaction of a wired internet function for the mobile terminal.
3. A terminal charging method is applied to a mobile terminal, and comprises the following steps:
when detecting that there is OTG equipment to insert mobile terminal just the OTG equipment is provided with USB charging voltage and connects when, will USB charging voltage inserts inside the mobile terminal, opens buck circuit and closes boost circuit, in order to use USB charging voltage is right battery in the mobile terminal charges, the OTG equipment includes OTG device and charging device, through charging device does the OTG device power supply, charging device's the positive port of detection and detection negative port short circuit under the circumstances that the OTG equipment inserts mobile terminal, the OTG equipment provides the data interaction of wired internet access function for mobile terminal.
4. The terminal charging method according to claim 3, wherein the detecting whether there is a way for the OTG device to access the mobile terminal comprises:
and under the condition that the mobile terminal is connected with the OTG equipment through a Type _ C interface, detecting whether one of two alternate pull-down potential ports of the Type _ C interface is connected with a corresponding port of the OTG equipment to form a pull-up voltage division circuit, if so, judging that the OTG equipment is accessed into the mobile terminal, otherwise, judging that no OTG equipment is accessed into the mobile terminal.
5. The terminal charging method according to claim 3, wherein the charging the battery using the USB charging voltage includes:
and when no input signal is detected at the positive detection port and the negative detection port of the Type-C interface, the battery is charged by using the USB charging voltage under the set charging voltage and current control parameters.
6. The terminal charging method according to claim 3, further comprising:
and when detecting that the charging current for charging the battery is greater than a preset current threshold value, stopping charging and giving an alarm.
7. A mobile terminal, comprising: a power management chip and a battery, wherein the power management chip is configured to execute an OTG charging program to charge the battery, and the OTG charging program implements the steps of the terminal charging method according to any one of claims 3 to 6 when executed by the power management chip.
8. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon an OTG charging program, which when executed by a processor implements the steps of the terminal charging method according to any one of claims 3 to 6.
CN201810695064.6A 2018-06-28 2018-06-28 OTG device, terminal charging method, mobile terminal and computer readable storage medium Active CN108874708B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810695064.6A CN108874708B (en) 2018-06-28 2018-06-28 OTG device, terminal charging method, mobile terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810695064.6A CN108874708B (en) 2018-06-28 2018-06-28 OTG device, terminal charging method, mobile terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN108874708A CN108874708A (en) 2018-11-23
CN108874708B true CN108874708B (en) 2021-08-10

Family

ID=64296973

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810695064.6A Active CN108874708B (en) 2018-06-28 2018-06-28 OTG device, terminal charging method, mobile terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN108874708B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109375758B (en) * 2018-12-14 2024-03-22 佛山市伙伴联扬电子有限公司 Charging device for computer host configuration
CN109726156A (en) * 2018-12-24 2019-05-07 努比亚技术有限公司 OTG equipment, charge control method, terminal and storage medium
CN110262648A (en) * 2019-05-15 2019-09-20 深圳市优博讯科技股份有限公司 Master device functionality and the parallel method of charge function and hand-held data gathering terminal
CN113078696B (en) * 2020-01-03 2024-05-07 北京小米移动软件有限公司 Electronic device, charging method and device thereof, and readable storage medium
CN113473056A (en) * 2021-05-14 2021-10-01 鹤壁天海电子信息系统有限公司 Female head and public head of video interface, electronic equipment, patch cord and external device

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101901201B (en) * 2010-08-06 2014-07-16 中兴通讯股份有限公司 Method and device for realizing USB OTG function on electronic equipment
JP5177460B2 (en) * 2010-12-10 2013-04-03 ブラザー工業株式会社 Information processing system
CN102820682B (en) * 2011-06-09 2016-01-20 中兴通讯股份有限公司 A kind of communicated by USB interface and be external equipment charging device and method
US9588560B2 (en) * 2014-05-28 2017-03-07 Nokia Technologies Oy Baseband PD communication over USB standard a connector
CN104978300B (en) * 2015-07-16 2019-04-12 Oppo广东移动通信有限公司 Mobile terminal and its detection method being connect with external equipment and device
US11277015B2 (en) * 2016-01-05 2022-03-15 Semiconductor Components Industries, Llc USB Type-C connector with shorted differential data contacts
US10339093B2 (en) * 2016-03-29 2019-07-02 Intel Corporation USB interface using repeaters with guest protocol support
CN107885688B (en) * 2016-09-30 2021-06-04 中兴通讯股份有限公司 Signal switching method and device
CN107180004A (en) * 2017-05-11 2017-09-19 深圳市金立通信设备有限公司 It is a kind of at the same realize OTG communication and charging method and terminal
CN206878506U (en) * 2017-05-27 2018-01-12 维沃移动通信有限公司 A kind of data wire and adapter

Also Published As

Publication number Publication date
CN108874708A (en) 2018-11-23

Similar Documents

Publication Publication Date Title
CN108874708B (en) OTG device, terminal charging method, mobile terminal and computer readable storage medium
CN107546808B (en) Charging identification circuit, identification method and terminal equipment
US20210384749A1 (en) Charging control circuit, terminal device, and control method
CN107332316B (en) Stepped charging method, mobile terminal and computer-readable storage medium
CN108966085B (en) Self-adaptive audio circuit and mobile terminal
CN107645189B (en) Charging protection method and mobile terminal
CN107785961B (en) Series battery charging method, mobile terminal and computer readable medium
CN108121681B (en) Hot plug implementation method, terminal and storage medium
US20210391753A1 (en) Terminal and wireless charging control method
CN112261535A (en) Major-minor switching method and device for wireless earphone and readable storage medium
CN110098651B (en) Charging method, charging device, electronic equipment and readable storage medium
CN108009116B (en) MicroUSB interface circuit and mobile terminal thereof
CN108448177B (en) Charging method and terminal
CN109726156A (en) OTG equipment, charge control method, terminal and storage medium
CN113922465A (en) Interface identification circuit, interface identification method and intelligent terminal
CN112165136A (en) Interface arrangement and mobile terminal charge
CN108650404B (en) Port starting circuit, device and mobile terminal
CN109753483B (en) File management application page display method and device, mobile terminal and storage medium
CN115102267A (en) Charging chip, charging method, charging system, intelligent terminal and storage medium
CN114498202A (en) Interface circuit device and equipment
CN107863795B (en) Parallel battery module charging method, mobile terminal and computer readable storage medium
CN108430005B (en) Audio circuit, audio judgment method and mobile terminal
CN112463659B (en) Docking station identification detection circuit and terminal equipment
CN114465328A (en) Charging method, charging circuit, intelligent terminal and storage medium
CN107645151A (en) A kind of current foldback circuit, control method and device, terminal

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
GR01 Patent grant
GR01 Patent grant