CN107425570B - Charging method, system and device of terminal equipment - Google Patents

Charging method, system and device of terminal equipment Download PDF

Info

Publication number
CN107425570B
CN107425570B CN201710654054.3A CN201710654054A CN107425570B CN 107425570 B CN107425570 B CN 107425570B CN 201710654054 A CN201710654054 A CN 201710654054A CN 107425570 B CN107425570 B CN 107425570B
Authority
CN
China
Prior art keywords
charger
charging
serial port
target
terminal device
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
CN201710654054.3A
Other languages
Chinese (zh)
Other versions
CN107425570A (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.)
Wingtech Communication Co Ltd
Original Assignee
Wingtech Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wingtech Communication Co Ltd filed Critical Wingtech Communication Co Ltd
Priority to CN201710654054.3A priority Critical patent/CN107425570B/en
Publication of CN107425570A publication Critical patent/CN107425570A/en
Application granted granted Critical
Publication of CN107425570B publication Critical patent/CN107425570B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/00032Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries characterised by data exchange
    • H02J7/00036Charger exchanging data with battery
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/00032Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries characterised by data exchange
    • H02J7/00034Charger exchanging data with an electronic device, i.e. telephone, whose internal battery is under charge
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/00032Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries characterised by data exchange
    • H02J7/00045Authentication, i.e. circuits for checking compatibility between one component, e.g. a battery or a battery charger, and another component, e.g. a power source

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The invention provides a charging method, a system and a device of terminal equipment, wherein the method comprises the following steps: establishing a charging connection relation with a charger; sending a target serial port command to the charger based on the charging connection relation so that the charger checks the target serial port command, sends a response signal and outputs a charging voltage; and after receiving the response signal sent by the charger, detecting the charging voltage output by the charger, and when the charging voltage is a target voltage value, receiving the charging voltage by the terminal equipment to charge the battery of the terminal equipment. According to the method, the terminal device sends the target serial port command to the charger, and the charger charges after checking and responding to the target serial port command, so that the charging reliability and stability are greatly improved, the target voltage value can be quickly obtained, a USB slave device is not needed, the cost is reduced, and the problems that a quick charging scheme in the prior art cannot simultaneously meet the requirements of high charging reliability, high boosting speed and low cost are solved.

Description

Charging method, system and device of terminal equipment
Technical Field
The present invention relates to the field of charging technologies, and in particular, to a method, a system, and an apparatus for charging a terminal device.
Background
Currently, when a terminal device (e.g., a mobile phone) is charged, a fast charging scheme is often used, and the current fast charging scheme mainly includes the following steps. One is to implement boosting by sending a current model. The specific process is as follows: setting the current to be larger than the threshold value and maintaining for a period of time X, and then setting the current to be smaller than the threshold value and maintaining for a period of time Y. Then, a bit is composed of the time X and the time Y, and whether the bit is 0 or 1 is defined according to the magnitude of the time X and the time Y. And finally, forming a command by a plurality of bits, sending the command to the charger, and executing the boosting operation by the charger according to the command. In the fast charging method, if there is interference between commands 0 and 1, the charger is not aware, so the fast charging scheme is not reliable, and although the algorithm is optimized, the verification and response mechanism is far from good. Another fast charging scheme is to send some waveforms through the DP pin or DM pin of the USB to achieve boosting. This boosting process is slow and cannot be done in one step. Finally, if a USB command is sent to achieve boosting, reliability may be good, but the charger is required to have the functionality of a USB slave device, and the cost of the charger may be high.
In summary, when the terminal device is rapidly charged by using the rapid charging scheme in the prior art, the requirements of high charging reliability, high boosting precision, rapidness and low cost cannot be simultaneously met.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a method, a system and a device for charging a terminal device, so as to solve the technical problems that a fast charging scheme in the prior art cannot simultaneously satisfy high charging reliability, accurate and fast boosting and low cost.
In a first aspect, an embodiment of the present invention provides a method for charging a terminal device, where the method is applied to the terminal device, and the method includes:
establishing a charging connection relation with a charger;
sending a target serial port command to the charger based on the charging connection relation so that the charger checks the target serial port command, sends a response signal and outputs charging voltage, wherein the target serial port command comprises information of a target voltage value and information of a check code;
after receiving the response signal sent by the charger, detecting the charging voltage output by the charger, and when the charging voltage is the target voltage value, the terminal equipment receives the charging voltage so as to charge a battery of the terminal equipment.
With reference to the first aspect, an embodiment of the present invention provides a first possible implementation manner of the first aspect, where in a case that the terminal device does not receive the response signal, the method further includes:
and sending a serial port reset command to the charger to reset the charger.
With reference to the first aspect, an embodiment of the present invention provides a second possible implementation manner of the first aspect, where in a case that the terminal device detects that the charging voltage is not the target voltage value, the method further includes:
and retransmitting the charging command to the charger.
With reference to the first aspect, an embodiment of the present invention provides a third possible implementation manner of the first aspect, where sending a target serial port command to the charger based on the charging connection relationship includes:
determining whether the charger is a standard charger based on the charging connection relationship;
under the condition that the charger is determined to be the standard charger, sending a high level signal with preset time to the charger through a first transmission link to control the disconnection of a link between a first group of pins of the charger and setting the first group of pins as serial port function pins, wherein the first group of pins are a DM pin and a DP pin of the charger;
setting a second group of pins as serial port function pins, wherein the second group of pins are a DM pin and a DP pin of a power management chip in the terminal equipment;
determining a target voltage value, wherein the target voltage value is calculated by the central processing unit of the terminal equipment according to a voltage regulation algorithm;
and generating the target serial port command according to the target voltage value so that the charger checks the target serial port command, sends the response signal and outputs the charging voltage.
With reference to the first aspect, an embodiment of the present invention provides a fourth possible implementation manner of the first aspect, where generating the target serial port command according to the target voltage value includes:
generating a serial port command according to the target voltage value, wherein the serial port command comprises information of the target voltage value;
and adding the check code to the serial port command to obtain the target serial port command.
With reference to the first aspect, an embodiment of the present invention provides a fifth possible implementation manner of the first aspect, where in a case that the charger is a non-standard charger, the method further includes:
and receiving the 5V charging voltage sent by the charger so as to charge the battery by adopting the 5V charging voltage.
In a second aspect, an embodiment of the present invention further provides a charging system for a terminal device, including: a terminal device and a charger;
the terminal device is used for establishing a charging connection relation with the charger and sending a target serial port command to the charger based on the charging connection relation, wherein the target serial port command comprises information of a target voltage value and information of a check code;
the charger is used for receiving the target serial port command, verifying the target serial port command, sending a response signal and outputting a charging voltage;
the terminal device detects the charging voltage output by the charger after receiving the response signal sent by the charger, and receives the charging voltage to charge a battery of the terminal device when the charging voltage is the target voltage value.
With reference to the second aspect, an embodiment of the present invention provides a first possible implementation manner of the second aspect, where in a case that the terminal device does not receive the response signal, the terminal device sends a serial port reset command to the charger, so that the charger is reset.
With reference to the second aspect, the present invention provides a second possible implementation manner of the second aspect, wherein, in a case that the terminal device detects that the charging voltage is not the target voltage value, the terminal device retransmits a charging command to the charger.
In a third aspect, an embodiment of the present invention further provides a charging apparatus for a terminal device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the charging method of the terminal device described in the first aspect when executing the computer program.
The embodiment of the invention has the following beneficial effects: the embodiment of the invention provides a method, a system and a device for charging terminal equipment, wherein the method for charging the terminal equipment comprises the following steps: establishing a charging connection relation with a charger, and sending a target serial port command to the charger based on the charging connection relation so that the charger checks the target serial port command, sends a response signal and outputs charging voltage, wherein the target serial port command comprises information of a target voltage value and information of a check code; and after receiving the response signal sent by the charger, detecting the charging voltage output by the charger, and when the charging voltage is a target voltage value, receiving the charging voltage by the terminal equipment so as to charge the battery of the terminal equipment.
The conventional fast charging method is to implement boosting by sending a current model or some waveform through the DP pin or DM pin of the USB. Compared with the traditional quick charging method, in the charging method of the terminal equipment, after the terminal equipment establishes the charging connection relation with the charger, the terminal equipment sends the target serial port command to the charger based on the charging connection relation, so that the charger checks the target serial port command, sends the response signal and outputs the charging voltage, after receiving the response signal sent by the charger, the terminal equipment detects the charging voltage output by the charger, and when the charging voltage is the target voltage value, the terminal equipment receives the charging voltage to charge the battery of the terminal equipment. According to the charging method, the terminal device sends the target serial port command to the charger, and the charger charges after checking and responding to the target serial port command, so that the charging reliability and stability are greatly improved, the target voltage value can be quickly obtained, the voltage value conversion time is shortened, a USB slave device is not needed, the cost is reduced, and the technical problems that a quick charging scheme in the prior art cannot simultaneously meet the requirements of high charging reliability, accurate and quick boosting and low cost are solved.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a flowchart of a charging method for a terminal device according to an embodiment of the present invention;
fig. 2 is a circuit diagram of a charging connection relationship in a charging process of a terminal device according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating sending a target serial port command to a charger based on a charging connection relationship according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a charging system of a terminal device according to an embodiment of the present invention.
Icon:
11-a terminal device; 12-a charger.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
For the convenience of understanding the present embodiment, a detailed description will be first given of a charging method for a terminal device disclosed in the present embodiment.
The first embodiment is as follows:
a charging method of a terminal device, referring to fig. 1, applied to the terminal device, the method includes:
s101, establishing a charging connection relation with a charger;
in the embodiment of the present invention, the terminal device is illustrated by taking a mobile phone as an example, and may also be other terminal devices, such as a tablet computer, and the embodiment of the present invention does not specifically limit the terminal device. After the charger is inserted into the charging interface of the mobile phone through the USB line, the charging connection relation between the terminal equipment and the charger is established. Specifically, a circuit diagram of the charging connection relationship may refer to fig. 2 (the device in fig. 2 is described in detail below).
S102, sending a target serial port command to the charger based on the charging connection relation so that the charger can check the target serial port command, send out a response signal and output charging voltage, wherein the target serial port command comprises information of a target voltage value and information of a check code;
after the charging connection relation is established, the terminal device can send a target serial port command containing a target voltage value and a check code to the charger based on the charging connection relation, the charger checks the target serial port command after receiving the target serial port command, the specific process of checking is realized through a checking algorithm, the checking algorithm is used in the prior art, and details are not repeated here. And sending a response signal after the verification is finished.
And S103, after receiving the response signal sent by the charger, detecting the charging voltage output by the charger, and when the charging voltage is a target voltage value, receiving the charging voltage by the terminal equipment so as to charge the battery of the terminal equipment.
And when the charging voltage is the target voltage value, the terminal equipment receives the charging voltage to realize charging of the battery of the terminal equipment.
The conventional fast charging method is to implement boosting by sending a current model or some waveform through the DP pin or DM pin of the USB. Compared with the traditional quick charging method, in the charging method of the terminal equipment, after the terminal equipment establishes the charging connection relation with the charger, the terminal equipment sends the target serial port command to the charger based on the charging connection relation, so that the charger checks the target serial port command, sends the response signal and outputs the charging voltage, after receiving the response signal sent by the charger, the terminal equipment detects the charging voltage output by the charger, and when the charging voltage is the target voltage value, the terminal equipment receives the charging voltage to charge the battery of the terminal equipment. According to the charging method, the terminal device sends the target serial port command to the charger, and the charger charges after checking and responding to the target serial port command, so that the charging reliability and stability are greatly improved, the target voltage value can be quickly obtained, the voltage value conversion time is shortened, a USB slave device is not needed, the cost is reduced, and the technical problems that a quick charging scheme in the prior art cannot simultaneously meet the requirements of high charging reliability, accurate and quick boosting and low cost are solved.
Further, in the case that the terminal device does not receive the response signal, the method further includes:
and sending a serial port reset command to the charger to reset the charger.
Further, in a case where the terminal device detects that the charging voltage is not the target voltage value, the method further includes:
the charging command is retransmitted to the charger.
Specifically, under the condition that the terminal device detects that the charging voltage is not the target voltage value, the terminal device firstly sends a serial port reset command to the charger, and after the charger is reset, the charging command is retransmitted to the charger.
Further, referring to fig. 3, the sending the target serial port command to the charger based on the charging connection relationship includes:
s301, determining whether the charger is a standard charger or not based on the charging connection relation;
in the embodiment of the invention, when the DM pin and the DP pin of the charger (particularly a chip carried in the charger) are short-circuited, the charger is a standard charger.
S302, under the condition that the charger is determined to be a standard charger, sending a high level signal of preset time to the charger through a first transmission link to control the disconnection of a link between a first group of pins of the charger, and setting the first group of pins as serial port function pins, wherein the first group of pins are a DM pin and a DP pin of the charger;
in the embodiment of the present invention, the first transmission link is a link between a DM pin of the terminal device (specifically, a power management chip) and a DM pin of the charger (specifically, a chip provided inside the charger). The preset time is a certain time, and the preset time is adjustable. The charger has the high level on judging the DM pin to when duration meets the requirement, the charger just breaks the short circuit link between its inside DM pin and DP pin, and sets up its inside DM pin and DP pin as serial ports function pin, with the communication that realizes the serial ports protocol.
S303, setting a second group of pins as serial port function pins, wherein the second group of pins are a DM pin and a DP pin of a power management chip in the terminal equipment;
specifically, after the power management chip of the terminal device recognizes that the DM pin and the DP pin in the charger are disconnected, the DM pin and the DP pin of the power management chip are set as serial functional pins, so that serial communication can be realized between the terminal device and the charger.
S304, determining a target voltage value, wherein the target voltage value is calculated by a central processing unit of the terminal equipment according to a voltage regulation algorithm;
specifically, the central processing unit calculates a target voltage value according to a voltage regulation algorithm (such as a boosting algorithm), and sends the target voltage value to the power management chip.
And S305, generating a target serial port command according to the target voltage value so that the charger can verify the target serial port command, send out a response signal and output the charging voltage.
And after receiving the target voltage value, the power management chip generates a target serial port command according to the target voltage value and sends the target serial port command to the charger, so that the charger checks the target serial port command, sends a response signal and outputs charging voltage.
Further, generating the target serial port command according to the target voltage value includes:
generating a serial port command according to the target voltage value, wherein the serial port command comprises information of the target voltage value;
and adding a check code to the serial port command to obtain a target serial port command.
Further, in the case that the charger is a non-standard charger, the method further comprises:
and receiving the 5V charging voltage sent by the charger to charge the battery with the 5V charging voltage.
Referring to fig. 2, a charging method (taking boost fast charging as an example) of a terminal device (taking a mobile phone as an example) provided by the embodiment of the present invention is briefly described:
when the charger is inserted into the mobile phone, the circuit connection relationship between the charger and the mobile phone is shown in fig. 2. In fig. 2, a central processing unit, a power management chip and two 300 ohm resistors are devices in the mobile phone, and the charger includes a chip carried by itself. Specifically, the chip of the charger includes a first DM pin, a first DP pin, a power output pin (VBUS in fig. 2), the power management chip includes a second DM pin, a second DP pin, and a power input pin (USBIN in fig. 2), the central processing unit includes a third DM pin, and a third DP pin, and in addition, the chip of the charger and the power management chip also include a ground pin (GND), when the charger is connected to the mobile phone, the first DM pin is connected to the second DM pin and the third DM pin, the first DP pin is connected to the second DP pin and the third DP pin, the power output pin is connected to the power input pin, and the power management chip is connected to the battery.
The working process is as follows: the method comprises the steps that firstly, the mobile phone determines whether a charger is a standard charger or not based on a charging connection relation, namely, whether a first DM pin and a first DP pin of a chip in the charger are in short circuit or not is judged, and if the first DM pin and the first DP pin are in short circuit, the mobile phone is the standard charger; if the short circuit does not occur, the short circuit is a non-standard charger, in this case, the 5V charging voltage sent by the charger is received, and the battery of the mobile phone is charged by using the 5V charging voltage, that is, in this case, the charger is used as a normal charger.
When the charger is a standard charger, the power management chip transmits a high level (namely, the first transmission link) to the first DM pin through the second DM pin, namely, the power management chip transmits the high level of preset time to the chip in the charger, when the chip in the charger judges that the first DM pin has the high level and the continuous time meets the requirement, the chip in the charger controls the first DM pin and the first DP pin of the short circuit to be disconnected, and the first DM pin and the first DP pin are set as serial port function pins.
Furthermore, after the power management chip identifies that the first DM pin and the first DP pin of the chip in the charger are disconnected, the power management chip sets the second DM pin and the second DP pin as serial port function pins, so that serial port communication can be realized between the mobile phone and the charger.
When the requirement of boosting quick charging exists, the central processing unit of the mobile phone calculates through a boosting algorithm in the central processing unit to obtain a target voltage value, sends the calculated target voltage value to the power management chip, the power management chip matches a corresponding serial port command according to the target voltage value, adds a check code for the serial port command to obtain a target serial port command, and finally sends the target serial port command to a chip in the charger.
After receiving the target serial port command, a chip in the charger checks the target serial port command, sends out a response signal after the checking is finished, and outputs charging voltage through a power output pin.
After receiving a response signal sent by a chip in the charger, the power supply management chip detects the charging voltage on the power supply output pin, and if the charging voltage on the power supply output pin is a target voltage value, the power supply input pin of the power supply management chip receives the charging voltage and charges a battery; if the charging voltage on the power supply output pin is not the target voltage value, sending a reset command to a chip in the charger, and after the reset is finished, retransmitting the charging command; and if the power management chip does not receive a response signal sent by the chip in the charger, sending a reset command to the chip in the charger.
The mobile phone sends a command to the charger through the serial port, and the charger performs voltage boosting after checking the command and responding, so that the reliability and the stability are greatly improved. And the voltage can be boosted to a specified voltage value in one step, and the boosting time is shortened. And serial port communication belongs to the traditional stable communication mode, and if the command receives interference in the command transmission process, the command is judged through a checking algorithm. Meanwhile, through a response mechanism, the mobile phone end can also know whether the command is accurately sent, so that measures are taken to deal with the situation that the command is wrong.
Example two:
an embodiment of the present invention further provides a charging system for a terminal device, and referring to fig. 4, the system includes a terminal device 11 and a charger 12;
the terminal equipment is used for establishing a charging connection relation with the charger and sending a target serial port command to the charger based on the charging connection relation, wherein the target serial port command comprises information of a target voltage value and information of a check code;
the charger is used for receiving the target serial port command, checking the target serial port command, sending a response signal and outputting a charging voltage;
the terminal device detects the charging voltage output by the charger after receiving the response signal sent by the charger, and receives the charging voltage to charge the battery of the terminal device when the charging voltage is a target voltage value.
Further, under the condition that the terminal device does not receive the response signal, the terminal device sends a serial port reset command to the charger so that the charger is reset.
Further, in a case where the terminal device detects that the charging voltage is not the target voltage value, the terminal device retransmits the charging command to the charger.
The implementation principle and the generated technical effects of the charging system of the terminal device provided in the embodiment of the present invention are the same as those of the foregoing method embodiment (i.e., embodiment one), and for brief description, corresponding contents in the foregoing method embodiment may be referred to where no part of the system embodiment (i.e., embodiment two) is mentioned, and are not repeated herein.
Example three:
the embodiment of the invention also provides a charging device of the terminal equipment, which comprises: the charging method of the terminal device in the first embodiment is implemented by the processor executing the computer program.
The computer program product of the method, the system, and the apparatus for charging a terminal device according to the embodiments of the present invention includes a computer-readable storage medium storing a program code, where instructions included in the program code may be used to execute the method described in the foregoing method embodiments, and specific implementation may refer to the method embodiments, and will not be described herein again.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In addition, in the description of the embodiments of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. 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 and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (9)

1. A charging method of a terminal device is applied to the terminal device, and the method comprises the following steps:
establishing a charging connection relation with a charger;
sending a target serial port command to the charger based on the charging connection relation so that the charger checks the target serial port command, sends a response signal and outputs charging voltage, wherein the target serial port command comprises information of a target voltage value and information of a check code;
after receiving the response signal sent by the charger, detecting the charging voltage output by the charger, and when the charging voltage is the target voltage value, receiving the charging voltage by the terminal equipment so as to charge a battery of the terminal equipment;
sending a target serial port command to the charger based on the charging connection relationship comprises:
determining whether the charger is a standard charger based on the charging connection relationship;
under the condition that the charger is determined to be the standard charger, sending a high level signal with preset time to the charger through a first transmission link to control the disconnection of a link between a first group of pins of the charger and setting the first group of pins as serial port function pins, wherein the first group of pins are a DM pin and a DP pin of the charger;
setting a second group of pins as serial port function pins, wherein the second group of pins are a DM pin and a DP pin of a power management chip in the terminal equipment;
determining a target voltage value, wherein the target voltage value is calculated by the central processing unit of the terminal equipment according to a voltage regulation algorithm;
and generating the target serial port command according to the target voltage value so that the charger checks the target serial port command, sends the response signal and outputs the charging voltage.
2. The method according to claim 1, wherein in case that the terminal device does not receive the response signal, the method further comprises:
and sending a serial port reset command to the charger to reset the charger.
3. The method of claim 1, wherein in the case that the terminal device detects that the charging voltage is not the target voltage value, the method further comprises:
and retransmitting the charging command to the charger.
4. The method of claim 1, wherein generating the target serial port command according to the target voltage value comprises:
generating a serial port command according to the target voltage value, wherein the serial port command comprises information of the target voltage value;
and adding the check code to the serial port command to obtain the target serial port command.
5. The method of claim 1, wherein in the case where the charger is a non-standard charger, the method further comprises:
and receiving the 5V charging voltage sent by the charger so as to charge the battery by adopting the 5V charging voltage.
6. A charging system for a terminal device, comprising: a terminal device and a charger;
the terminal device is used for establishing a charging connection relation with the charger and sending a target serial port command to the charger based on the charging connection relation, wherein the target serial port command comprises information of a target voltage value and information of a check code;
the charger is used for receiving the target serial port command, verifying the target serial port command, sending a response signal and outputting a charging voltage;
after receiving the response signal sent by the charger, the terminal device detects the charging voltage output by the charger, and when the charging voltage is the target voltage value, the terminal device receives the charging voltage to charge a battery of the terminal device;
the charger determining whether the charger is a standard charger based on the charging connection relationship; under the condition that the charger is determined to be the standard charger, sending a high level signal with preset time to the charger through a first transmission link to control the disconnection of a link between a first group of pins of the charger and setting the first group of pins as serial port function pins, wherein the first group of pins are a DM pin and a DP pin of the charger; setting a second group of pins as serial port function pins, wherein the second group of pins are a DM pin and a DP pin of a power management chip in the terminal equipment; determining a target voltage value, wherein the target voltage value is calculated by the central processing unit of the terminal equipment according to a voltage regulation algorithm; and generating the target serial port command according to the target voltage value so that the charger checks the target serial port command, sends the response signal and outputs the charging voltage.
7. The system of claim 6,
and under the condition that the terminal equipment does not receive the response signal, the terminal equipment sends a serial port reset command to the charger so as to reset the charger.
8. The system of claim 6,
in the case where the terminal device detects that the charging voltage is not the target voltage value, the terminal device retransmits a charging command to the charger.
9. A charging apparatus for a terminal device, comprising: memory, processor and computer program stored on the memory and executable on the processor, characterized in that the processor implements the charging method of the terminal device according to any of the preceding claims 1 to 5 when executing the computer program.
CN201710654054.3A 2017-08-02 2017-08-02 Charging method, system and device of terminal equipment Active CN107425570B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710654054.3A CN107425570B (en) 2017-08-02 2017-08-02 Charging method, system and device of terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710654054.3A CN107425570B (en) 2017-08-02 2017-08-02 Charging method, system and device of terminal equipment

Publications (2)

Publication Number Publication Date
CN107425570A CN107425570A (en) 2017-12-01
CN107425570B true CN107425570B (en) 2020-06-19

Family

ID=60436717

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710654054.3A Active CN107425570B (en) 2017-08-02 2017-08-02 Charging method, system and device of terminal equipment

Country Status (1)

Country Link
CN (1) CN107425570B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112636402A (en) * 2019-09-24 2021-04-09 北京小米移动软件有限公司 Charging method and device and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105071473A (en) * 2015-08-11 2015-11-18 小米科技有限责任公司 USB charging method and device
CN105449764A (en) * 2015-12-17 2016-03-30 小米科技有限责任公司 Charging method, charging apparatus and charging system
CN105932729A (en) * 2016-04-27 2016-09-07 乐视控股(北京)有限公司 Charger authentication method and device for electronic equipment and electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2010068062A2 (en) * 2008-12-12 2010-06-17 주식회사 한림포스텍 Contactless power transmission device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105071473A (en) * 2015-08-11 2015-11-18 小米科技有限责任公司 USB charging method and device
CN105449764A (en) * 2015-12-17 2016-03-30 小米科技有限责任公司 Charging method, charging apparatus and charging system
CN105932729A (en) * 2016-04-27 2016-09-07 乐视控股(北京)有限公司 Charger authentication method and device for electronic equipment and electronic equipment

Also Published As

Publication number Publication date
CN107425570A (en) 2017-12-01

Similar Documents

Publication Publication Date Title
US10910853B2 (en) Quick charging method, power adapter and mobile terminal
US10673261B2 (en) Power adapter and mobile terminal
US11791651B2 (en) Quick charging method, mobile terminal, and power adapter
US9859740B2 (en) Adapter, portable electronic device and charge control method thereof
US10014703B2 (en) USB charging with separate controller bidirectional communication of charging capabilities
US9647475B2 (en) Charger, terminal, charging system, and charging control method
EP2348604A1 (en) Wireless power transmission method
EP3148039A1 (en) Fast charging method, power source adapter and mobile terminal
CN103618356A (en) Charging system for mobile terminal and charging method thereof
TW201715412A (en) Charging method, mobile terminal, and charging device
TW201725822A (en) Method of fast charging, mobile terminal, and adaptor
CN106707194B (en) Rechargeable battery detection method and electronic equipment
CN105071484A (en) Charging method and apparatus of terminal having data exchange function
EP3101770B1 (en) Power adapter and terminal
CN105896639B (en) Charging control method and electronic equipment
CN107425570B (en) Charging method, system and device of terminal equipment
US11462930B2 (en) Method and device for controlling charging on basis of state of battery
CN107422825A (en) A kind of CDP mouths charge control method, device, storage medium and electronic equipment
WO2017080411A1 (en) Method and apparatus for checking charging parameter and charger
CN103036276B (en) Charger, terminal, controller, system and charger recognition method
CN114765465A (en) Portable device communicating with charger and method of operating the same
CN113771652B (en) Charging device and charging control method
CN219696860U (en) Charging wire
CN210430949U (en) Charging device capable of transmitting data
CN113725972A (en) Connecting line, charging control method, charging control device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant