DETAILED DESCRIPTION OF EMBODIMENT (S) OF INVENTION
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that in various embodiments of the invention, numerous technical details are set forth in order to provide a better understanding of the present application. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments.
The first embodiment of the present invention relates to a mobile terminal 100 for connecting to a charging interface 6 of a charging device to receive a charging voltage, the mobile terminal 100 of the present embodiment comprising: a control assembly 1, at least one diverter switch 2 and a rechargeable battery 3, as shown in fig. 1.
The control assembly 1 is connected to the charging interface 6 through the selector switch 2, the control assembly 1 is also connected with the rechargeable battery 3, and the control assembly 1 receives charging voltage from the charging interface 6 and outputs charging current to the rechargeable battery 3; when the charging voltage is not greater than the first preset value, the control assembly 1 switches a conduction path between the control assembly 1 and the charging interface 6 through the change-over switch 2 so as to adjust the charging voltage.
In the present embodiment, the change-over switch 2 may be a single-pole double-throw switch, or may be another electronic switch. The first preset value in this embodiment may be set in the program of the mobile terminal, for example, 4.5V, the control component 1 receives the charging voltage from the charging interface 6, and determines whether the charging voltage is greater than the first preset value (for example, 4.5V), when the charging voltage is greater than 4.5V, the first conduction path between the mobile terminal 100 and the charging interface 6 is conducted through the switch 2, in this case, the charging device may be used to charge the mobile terminal 100 through the first conduction path, when the charging voltage is not greater than 4.5V, the conduction path between the mobile terminal 100 and the charging interface 6 is switched from the first conduction path to the second conduction path through the switch 2, in this case, the control component 1 sends a control signal for adjusting the charging voltage to the charging device through the second conduction path, after the charging device receives the control signal, and adjusting the output charging voltage.
Compared with the prior art, the embodiment has the advantages that the at least one change-over switch is additionally arranged in the mobile terminal, so that the control assembly and the charging interface can be switched between two different conduction paths, the charging voltage can be conveniently adjusted in time when the charging voltage is not greater than the preset value, and the protection of the mobile terminal during charging is facilitated.
A second embodiment of the present invention relates to a mobile terminal 100. The second embodiment is refined on the basis of the first embodiment, and the refinement is that: in the present embodiment, a specific implementation of the control assembly 1 is provided, as shown in fig. 2.
Specifically, the control assembly 1 in this embodiment includes a processor 11 and a charging chip 12; the charging pin 121 of the charging chip 12 is connected to the voltage output end 63 of the charging interface 6 to receive the charging voltage; the current output pin 122 of the charging chip 12 is connected to the rechargeable battery 3 to output a charging current to the rechargeable battery 3; the first pin 21 of the switch 2 is connected to the first signal pin 111 of the processor 11, the second pin 22 of the switch 2 is connected to the first input/output pin 112 of the processor 11, and the third pin 23 of the switch 2 is connected to the first signal terminal 61 of the charging interface 6; the processor 11 is connected to the charging chip 12, and reads the charging voltage through the charging chip 12.
In this embodiment, the charging interface 6 may be a USB interface, the voltage output end 63 may be a VBUS end, the first signal end 61 may be one of a D + end or a D-end, when the first signal end 61 is a D + end, the first signal pin 111 of the processor 11 is a D + signal pin, and the D-end of the charging interface 6 is directly connected to the D-signal pin of the processor; when the first signal terminal 61 is a D-terminal, the first signal pin 111 of the processor 11 is a D-signal pin, and the D + terminal of the charging interface 6 is directly connected to the D + signal pin of the processor; the first input/output pin 112 of the processor 11 is a general purpose GPIO pin.
The first preset value in this embodiment can be set in the program of the mobile terminal, for example, 4.5V, the processor 11 reads the charging voltage through the charging chip 12, and determines whether the charging voltage is greater than the first preset value (for example, 4.5V), when the charging voltage is greater than 4.5V, the first signal terminal 61 is conducted with the first signal pin 111 through the switch 2 (i.e., the first conducting path of the switch 2 is conducted), in this case, the charging device can be used to charge the mobile terminal 100 through the first conducting path of the switch 2, when the charging voltage is not greater than 4.5V, the first signal terminal 61 is conducted with the first input/output pin 112 through the switch 2 (i.e., the second conducting path of the switch 2 is conducted), in this case, the control component 1 sends the control signal for adjusting the charging voltage to the charging device through the second conducting path of the switch 2, and after receiving the control signal, the charging device adjusts the output charging voltage.
The embodiment provides a concrete implementation mode of the control assembly and is easy to implement.
A third embodiment of the present invention relates to a mobile terminal 100. The third embodiment is improved on the basis of the second embodiment, and the improvement is that: in the present embodiment, there may be two change-over switches 2, as shown in fig. 3.
Specifically, the number of the switches in this embodiment is two, that is, the first switch 21 and the second switch 22.
The first pin connection 211 of the first switch 21 is connected to the first signal pin 111 of the processor 11, the second pin 212 of the first switch 21 is connected to the first input/output pin 112 of the processor 11, and the third pin 213 of the first switch 21 is connected to the first signal terminal 61 of the charging interface 6.
The first pin 221 of the second switch 22 is connected to the second signal pin 113 of the processor 11, the second pin 222 of the second switch 22 is connected to the second input/output pin 114 of the processor 11, and the third pin 223 of the second switch 22 is connected to the second signal terminal 62 of the charging interface 6.
In this embodiment, the charging interface 6 may be a USB interface, the first signal terminal 61 may be one of a D + terminal or a D-terminal, the second signal terminal 62 is the other of the D + terminal or the D-terminal, the first signal pin 111 is a pin corresponding to the first signal terminal 61, the second signal pin 113 is a pin corresponding to the second signal terminal 62, the first input/output pin 112 and the second input/output pin 114 are both general GPIO pins, the first signal terminal 61 is a D + terminal for description, the second signal terminal 62 is a D-terminal, the first signal pin 111 is a D + signal pin, and the second signal pin 113 is a D-signal pin.
The first preset value in this embodiment may also be set in the program of the mobile terminal, for example, 4.5V, the processor 11 reads the charging voltage through the charging chip 12, and determines whether the charging voltage is greater than the first preset value (for example, 4.5V), when the charging voltage is greater than 4.5V, the first signal terminal 61 is conducted with the first signal pin 111 through the first switch 21 (i.e., the first conduction path of the first switch 21 is conducted), and the second signal terminal 62 is conducted with the second signal pin 113 through the second switch 22 (i.e., the first conduction path of the second switch 22 is conducted), in this case, the charging device may be used to charge the mobile terminal 100 through the USB connection line; when the charging voltage is not greater than 4.5V, the first signal terminal 61 is conducted with the first input/output pin 112 through the first switch 21 (i.e., the second conducting path of the first switch 21 is conducted), or the second signal terminal 62 is conducted with the second input/output pin 114 through the second switch 22 (i.e., the second conducting path of the second switch 22 is conducted), in this case, a control signal for adjusting the charging voltage may be sent to the charging device through the second conducting path of the first switch 21 or the second conducting path of the second switch 22, and the charging device adjusts the output charging voltage after receiving the control signal.
In the embodiment of the invention, two change-over switches are arranged, and when a control signal needs to be sent to the charging device to adjust the output charging voltage, one of the two change-over switches can be selected at will for switching, so that the embodiment of the invention is simpler and more convenient.
A fourth embodiment of the present invention relates to a charging device for charging the mobile terminal 100 in the first, second, or third embodiment, the charging device of the present embodiment including: a logic control unit 7, a control chip 8 and a charging interface 6, as shown in fig. 4.
Specifically, the first pin 71 and the second pin 72 of the logic control unit 7 are respectively connected to the first signal terminal 61 and the second signal terminal 62 of the charging interface 6; the control chip 8 is connected to the third pin 73 of the logic control unit 7 and the voltage output terminal 63 of the charging interface 6, respectively.
In this embodiment, the charging interface 6 may be a USB interface, the voltage output end 63 is a VBUS end, the first signal end 61 may be one of a D + end or a D-end, the second signal end 62 is the other of the D + end or the D-end, the first pin 71 is a pin corresponding to the first signal end 61, the second pin 72 is a pin corresponding to the second signal end 62, and the first signal end 61 is the D + end for explanation, the second signal end 62 is the D-end, the first pin 71 is the D + pin, and the second pin 72 is the D-pin, after receiving the control signal sent by the control component 1, the logic control unit 7 sends a signal for adjusting voltage to the control chip 8, and then the control chip 8 adjusts the output charging voltage according to the received signal for adjusting voltage.
Compared with the prior art, the charging device is provided with the logic control unit, so that the charging voltage output by the charging device can be conveniently adjusted, and the protection of the mobile terminal in charging is facilitated.
A fifth embodiment of the present invention relates to a charging method, which is applied to a mobile terminal including at least one switch and a rechargeable battery, where the mobile terminal is configured to be connected to a charging interface of a charging device to receive a charging voltage and output the rechargeable battery to the rechargeable battery, and in this embodiment, the mobile terminal includes the switch as an example, and a flow of the charging method is as shown in fig. 5, and specifically includes the following steps:
in step 501, it is determined whether the charging voltage is greater than a first preset value. Specifically, the first preset value in this embodiment may be set in a program of the mobile terminal, for example, 4.5V, if the determination result in this step is yes, it indicates that the charging voltage is greater than the first preset value, step 502 is entered, otherwise, it indicates that the charging voltage is not greater than the first preset value, step 504 is entered.
In step 502, whether the charging device is a PC terminal is detected according to the USB protocol. Specifically, if the determination result in this step is yes, it indicates that the charging device is detected to be the PC side, the step 507 is performed for normal charging, otherwise, it indicates that the charging device is detected not to be the PC side, and the step 503 is performed.
In step 503, the charging device is determined to be a non-standard charger, and the charging current is controlled to be smaller than a second preset value. Specifically, the second preset value of this embodiment may also be set in the program of the mobile terminal, for example, 500mA, when the charging device is a non-standard charger, the charging current is controlled to be smaller than the second preset value, so as to limit the charging current, and avoid electrical overstress of the mobile terminal caused by too large charging current when the non-standard charger is used for charging, thereby avoiding the performance of the mobile terminal from being damaged.
In step 504, a conduction path between the mobile terminal and the charging interface is switched from a first conduction path to a second conduction path through a switch. When the second conduction path is conducted, the mobile terminal and the charging device can transmit the control signal.
In step 505, a charging voltage switching signal is sent to the charging device through the second conduction path to control the charging device to adjust the charging voltage to a third preset value. Specifically, the third preset value of this embodiment may also be set in the program of the mobile terminal, and the third preset value should be greater than the first preset value, for example, 5V.
In step 506, it is detected whether the charging voltage is greater than a first preset value. Specifically, if the determination result in this step is that the charging voltage is greater than the first preset value, it indicates that the charging device is a standard charger, and then step 507 is entered, otherwise, it indicates that the charging voltage is not greater than the first preset value, it indicates that the charging device is a non-standard charger, and then step 503 is entered.
In step 507, normal charging is performed.
Compared with the prior art, when charging for mobile terminal using charging device, through detecting charging voltage, judge whether charging device is the non-standard charging device of joining in marriage according to charging voltage, when charging device is the standard charging device or is the PC end, normal charging, when charging device is not the standard charging device of joining in marriage, restriction charging current, thereby avoid in the charging process because use the non-standard charger of joining in marriage and lead to charging voltage or charging current too big arouse mobile terminal's electric overstress, and then avoid mobile terminal to be damaged, improve mobile terminal's performance.
It should be understood that this embodiment is a method embodiment corresponding to the first embodiment, and the embodiment can be implemented in cooperation with the first embodiment. The related technical details mentioned in the first embodiment are still valid in this embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related-art details mentioned in the present embodiment can also be applied to the first embodiment.
A sixth embodiment of the present invention relates to a charging method, which is detailed on the basis of the fifth embodiment, and the detailed point is that the present embodiment provides a specific implementation manner that the conduction path between the control component and the charging interface is switched from the first conduction path to the second conduction path through the switch.
In this embodiment, the switch includes a first pin, a second pin and a third pin; when the third pin is connected with the first pin, a first conduction path corresponding to the switch is formed, and when the third pin is connected with the second pin, a second conduction path corresponding to the switch is formed; the flow of the charging method of this embodiment is shown in fig. 6, and specifically includes the following steps:
in step 601, it is determined whether the charging voltage is greater than a first preset value. Specifically, the first preset value in this embodiment may be set in a program of the mobile terminal, for example, 4.5V, if the determination result in this step is yes, it indicates that the charging voltage is greater than the first preset value, step 602 is entered, otherwise, it indicates that the charging voltage is not greater than the first preset value, step 604 is entered.
In step 602, it is detected whether the charging device is a PC terminal according to the USB protocol. Specifically, if the determination result in this step is yes, it indicates that the charging device is detected to be the PC side, the step 607 is performed for normal charging, otherwise, it indicates that the charging device is detected not to be the PC side, and the step 603 is performed.
In step 603, the charging device is determined to be a non-standard charger, and the charging current is controlled to be smaller than a second preset value. Specifically, the second preset value of this embodiment may also be set in the program of the mobile terminal, for example, 500mA, when the charging device is a non-standard charger, the charging current is controlled to be smaller than the second preset value, so as to limit the charging current, and avoid electrical overstress of the mobile terminal caused by too large charging current when the non-standard charger is used for charging, thereby avoiding the performance of the mobile terminal from being damaged.
In step 604, the third pin of the switch is controlled to switch from the connection state with the first pin of the switch to the connection state with the second pin of the switch. Specifically, the third pin of the change-over switch is switched to the second pin of the change-over switch from the connection state with the first pin of the change-over switch, so that the conduction path between the mobile terminal and the charging interface can be switched from the first conduction path to the second conduction path.
In step 605, a charging voltage switching signal is sent to the charging device through the second conduction path to control the charging device to adjust the charging voltage to a third preset value. Specifically, the third preset value of this embodiment may also be set in the program of the mobile terminal, and the third preset value should be greater than the first preset value, for example, 5V. In this embodiment, the charging device may adjust the charging voltage to the third preset value according to the control signal by sending the control signal for adjusting the charging voltage to the third preset value to the charging device, and then the mobile terminal receives the charging voltage of the third preset value output by the charging device.
In step 606, it is detected whether the charging voltage is greater than a first preset value. Specifically, if the determination result in this step is yes, it indicates that the charging device is a standard charger if the charging voltage is greater than the first preset value, the step 607 is entered, otherwise, it indicates that the charging device is a non-standard charger if the charging voltage is not greater than the first preset value, and the step 603 is entered.
In step 607, charging is normal.
Since the second embodiment corresponds to the present embodiment, the present embodiment can be implemented in cooperation with the second embodiment. The related technical details mentioned in the second embodiment are still valid in this embodiment, and the technical effects that can be achieved in the second embodiment can also be achieved in this embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related-art details mentioned in the present embodiment can also be applied to the second embodiment.
A seventh embodiment of the present invention relates to a charging method, which is an improvement over the fifth embodiment in that the present embodiment provides another implementation manner of switching the conduction path between the control component and the charging interface from the first conduction path to the second conduction path through the switch.
In this embodiment, the switches are a first switch and a second switch, respectively, and the flow of the charging method of this embodiment is shown in fig. 7, which is as follows:
in step 701, it is determined whether the charging voltage is greater than a first preset value. Specifically, the first preset value in this embodiment may be set in a program of the mobile terminal, for example, 4.5V, in this step, if the determination result is yes, it indicates that the charging voltage is greater than the first preset value, step 702 is entered, otherwise, it indicates that the charging voltage is not greater than the first preset value, step 704 is entered.
In step 702, it is detected whether the charging device is a PC terminal according to the USB protocol. Specifically, if the determination result in this step is yes, it indicates that the charging device is detected to be the PC side, the step 707 is performed to perform normal charging, otherwise, it indicates that the charging device is detected not to be the PC side, and the step 703 is performed.
In step 703, the charging device is determined to be a non-standard charger, and the charging current is controlled to be smaller than a second preset value. Specifically, the second preset value of this embodiment may also be set in the program of the mobile terminal, for example, 500mA, when the charging device is a non-standard charger, the charging current is controlled to be smaller than the second preset value, so as to limit the charging current, and avoid electrical overstress of the mobile terminal caused by too large charging current when the non-standard charger is used for charging, thereby avoiding the performance of the mobile terminal from being damaged.
In step 704, controlling the third pin of the first switch to switch from the connection state with the first pin of the first switch to the connection state with the second pin of the first switch; or the third pin of the second change-over switch is controlled to be switched from the connection state with the first pin of the second change-over switch to the connection state with the second pin of the second change-over switch. Specifically, in this embodiment, the third pin of the first switch is controlled to switch from the connection state with the first pin of the first switch to the connection state with the second pin of the first switch, so that the first conduction path corresponding to the first switch can be switched to the second conduction path corresponding to the first switch, and the third pin of the second switch is controlled to switch from the connection state with the first pin of the second switch to the connection state with the second pin of the second switch, so that the first conduction path corresponding to the second switch can be switched to the second conduction path corresponding to the second switch.
In step 705, a charging voltage switching signal is sent to the charging device through the second conduction path to control the charging device to adjust the charging voltage to a third preset value. Specifically, the third preset value of this embodiment may also be set in the program of the mobile terminal, and the third preset value should be greater than the first preset value, for example, 5V.
In step 706, it is detected whether the charging voltage is greater than a first preset value. Specifically, if the determination result in this step is yes, it indicates that the charging device is a standard charger, step 707 is entered, otherwise, it indicates that the charging device is a non-standard charger, and step 703 is entered.
In step 707, normal charging is performed.
This embodiment is a method embodiment corresponding to the third embodiment, and can be implemented in cooperation with the third embodiment. The related technical details mentioned in the third embodiment are still valid in this embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related-art details mentioned in the present embodiment can also be applied to the third embodiment.
An eighth embodiment of the present invention relates to a charging method, and the present embodiment is detailed on the basis of the seventh embodiment, and mainly provides a specific implementation manner for detecting whether a charging device is a PC terminal according to a USB protocol.
In this embodiment, the switches are a first switch and a second switch, respectively, and a first conduction path corresponding to the first switch and a first conduction path corresponding to the second switch are formed between the mobile terminal and the charging interface through the first switch and the second switch, respectively; the flow of the charging method of this embodiment is shown in fig. 8, and specifically includes the following steps:
in step 801, it is determined whether the charging voltage is greater than a first preset value. Specifically, the first preset value in this embodiment may be set in a program of the mobile terminal, for example, 4.5V, if the determination result in this step is yes, it indicates that the charging voltage is greater than the first preset value, step 802 is entered, otherwise, it indicates that the charging voltage is not greater than the first preset value, step 804 is entered.
In step 802, it is detected whether the charging device is a PC terminal according to the USB protocol. Specifically, this step includes sub-step 8021 and sub-step 8022.
In sub-step 8021, the detection signal is sent to the charging device through the first conduction path corresponding to the first switch.
In sub-step 8022, it is determined whether an acknowledgement signal corresponding to the detection signal can be received from the charging apparatus through the first conduction path corresponding to the second switch. Specifically, if the determination result in this step is that it indicates that the charging device can receive the corresponding confirmation signal through the first conduction path corresponding to the second switch, the step 807 is performed if it is determined that the charging device is the PC terminal, otherwise, it is determined that the charging device cannot receive the corresponding confirmation signal through the first conduction path corresponding to the second switch, the step 803 is performed if it is determined that the charging device is not the PC terminal.
In this embodiment, the first conduction path is turned on in the initial state of the first switch and the initial state of the second switch, that is, when charging is started, the first conduction path corresponding to the first switch is turned on and the first conduction path corresponding to the second switch is turned on. However, in other embodiments, if the initial state of the first switch and/or the second switch is not the first conduction path, the first conduction paths of the first switch and the second switch are controlled to be in the conduction state before detecting whether the charging device is the PC terminal according to the USB protocol.
In step 803, the charging device is determined to be a non-standard charger, and the charging current is controlled to be smaller than a second preset value. Specifically, the second preset value of this embodiment may also be set in the program of the mobile terminal, for example, 500mA, when the charging device is a non-standard charger, the charging current is controlled to be smaller than the second preset value, so as to limit the charging current, and avoid electrical overstress of the mobile terminal caused by too large charging current when the non-standard charger is used for charging, thereby avoiding the performance of the mobile terminal from being damaged.
In step 804, controlling the third pin of the first switch to switch from the connection state with the first pin of the first switch to the connection state with the second pin of the first switch; or the third pin of the second change-over switch is controlled to be switched from the connection state with the first pin of the second change-over switch to the connection state with the second pin of the second change-over switch. Specifically, in this embodiment, the third pin of the first switch is controlled to switch from the connection state with the first pin of the first switch to the connection state with the second pin of the first switch, so that the first conduction path corresponding to the first switch can be switched to the second conduction path corresponding to the first switch, and the third pin of the second switch is controlled to switch from the connection state with the first pin of the second switch to the connection state with the second pin of the second switch, so that the first conduction path corresponding to the second switch can be switched to the second conduction path corresponding to the second switch.
In step 805, a charging voltage switching signal is sent to the charging device through the second conduction path to control the charging device to adjust the charging voltage to a third preset value. Specifically, the third preset value of this embodiment may also be set in the program of the mobile terminal, and the third preset value should be greater than the first preset value, for example, 5V. In this embodiment, the charging voltage switching signal may be sent to the charging device through the second conduction path corresponding to the first switch, or the charging voltage switching signal may be sent to the charging device through the second conduction path corresponding to the second switch.
In step 806, it is detected whether the charging voltage is greater than a first preset value. Specifically, if the determination result in this step is yes, it indicates that the charging device is a standard charger if the charging voltage is greater than the first preset value, the step 807 is entered, otherwise, it indicates that the charging device is a non-standard charger if the charging voltage is not greater than the first preset value, and the step 803 is entered.
In step 807, normal charging is performed.
It should be noted that, the number of the switch in this embodiment may also be one, and the first pin of the switch may be connected to the D + signal pin of the processor or the D-signal pin of the processor. When a first pin of the switch is connected with a D + signal pin of the processor, a second pin of the switch is connected with a GPIO pin of the processor, a third pin of the switch is connected with a D + end of a charging interface, the D-signal pin of the processor is directly connected with the D-end of the charging interface, when whether the charging device is a PC end or not is detected according to a USB protocol, a detection signal can be sent to the charging device through a first conduction path of the switch (namely the D + signal pin of the processor is conducted with the D + end of the charging interface), and then whether a confirmation signal corresponding to the detection signal can be received from the charging device through a path between the D-signal pin and the D-end or not is judged; when the first pin of the change-over switch is connected with the D-signal pin of the processor, the second pin of the change-over switch is connected with the GPIO pin of the processor, the third pin of the change-over switch is connected with the D-signal end of the charging interface, the D + signal pin of the processor is directly connected with the D + end of the charging interface, when whether the charging device is a PC end or not is detected according to the USB protocol, a detection signal can be sent to the charging device through a path between the D + signal pin and the D + end, and then whether a confirmation signal corresponding to the detection signal can be received from the charging device through the first conduction path of the change-over switch (namely the D-signal pin of the processor is conducted with the D-end of the charging interface) is judged.
The embodiment provides a specific implementation manner for detecting whether the charging device is a PC terminal according to the USB protocol.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the steps contain the same logical relationship, which is within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
Those skilled in the art can understand that all or part of the steps in the method of the foregoing embodiments may be implemented by a program to instruct related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. 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.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific embodiments for practicing the invention, and that various changes in form and details may be made therein without departing from the spirit and scope of the invention in practice.