Charging circuit, charging device, charging method, charging controller and storage medium

By using the controller and signal generator in the charger to establish a single-line communication channel, the problem of the charger occupying the data transmission channel when charging is solved, and the charging protocol adapted to the access device is realized, which improves charging efficiency and reliability.

CN119070415APending Publication Date: 2024-12-03BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310640449.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-31
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

When the existing charger is connected to the charging protocol, it uses two terminals to identify and communicate, which will occupy the data transmission channel, resulting in the problem of not being able to transmit data during charging.

Method used

The controller is used as a communication control center, connected to the preset terminal, and the signal generator outputs and receives level signals, establishes a single-line communication channel, realizes authentication communication of the charging protocol, and adapts to the charging protocol of the access device for adaptive power supply and charging .

Benefits of technology

It realizes authentication communication of charging protocol on a single terminal, avoids the occupation of data transmission channels, and improves charging efficiency and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119070415A_ABST
    Figure CN119070415A_ABST
Patent Text Reader

Abstract

The invention relates to a charging circuit, a charging device, a charging method, a charging control device and a storage medium. The charging circuit comprises a port, a signal generator, a controller and a charging module, wherein the port is provided with a plurality of terminals; the signal generator is connected to the terminal of the port; a controller is in signal connection with the signal generator, the controller is connected with the preset terminal, the controller outputs at least one group of handshake signals to the preset terminal through the signal generator, each handshake signal represents a charging protocol, the controller obtains an input identification signal through the preset terminal, and the identification signal is transmitted to the controller through the preset terminal. The identification signal is the feedback of the access device to the handshake signal; and the controller is also used for executing charging through the port according to the identification signal. The invention provides a charging communication solution capable of realizing identification of a plurality of charging protocols through a single wire.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of electronic products, and in particular to a charging circuit, a charging device, a charging method, a charging control device and a storage medium. Background Art

[0002] With the continuous development of mobile terminals, the functions of mobile terminals are becoming more and more powerful. Users generally use mobile terminals for office and entertainment, which has become an inseparable part of life. Therefore, the battery life of mobile terminals is becoming more and more the focus of users.

[0003] Since the improvement cycle of terminal power storage capacity is long, increasing charging power is an important consideration for solving the endurance of mobile terminals. With the popularization of high-power chargers, wired charging communications are becoming more and more widespread. Therefore, how to use charging protocols and equipment with lower costs, more reliable and efficient communications is the current technology to be broken through. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present disclosure provides a charging circuit, a charging device, a charging method, a charging control device and a storage medium which can realize the recognition of multiple charging protocols through a single line.

[0005] According to a first aspect of an embodiment of the present disclosure, a charging circuit is provided, comprising a port, a signal generator, a controller and a charging module: the port has a plurality of terminals; the signal generator is connected to the terminals of the port; the controller signal is connected to the signal generator, the controller is connected to the preset terminal, the controller outputs at least one set of handshake signals to the preset terminal through the signal generator, each handshake signal represents a charging protocol, and the controller obtains an input identification signal through the preset terminal, the identification signal is feedback of the connected device to the handshake signal; the controller is further used to perform charging through the port according to the identification signal.

[0006] Furthermore, the preset terminal includes two terminals, and the controller closes the connection between the other terminal and the signal generator according to a signal indicating successful connection of one of the terminals.

[0007] Furthermore, the controller includes a memory, a processor, a communication interface and a logic circuit; the memory stores at least one charging protocol data, the processor is connected to the memory, the communication interface and the logic circuit, the communication interface is used to receive signals and output signals, and the logic circuit is connected to the charging module to regulate and control the charging module.

[0008] Furthermore, the port includes a first terminal and a second terminal, the first terminal is connected to a first pull-up resistor, and the second terminal is connected to a second pull-up resistor.

[0009] Further, the first terminal is a CC1 terminal, and the second terminal is a CC2 terminal.

[0010] Furthermore, the controller closes the connection between the other terminal and the corresponding pull-up resistor and the signal generator according to the level signal of one of the terminals.

[0011] Furthermore, the signal generator is connected to the first terminal via a first switch tube, the signal generator is connected to the second terminal via a third switch tube, and control ends of the first switch tube and the third switch tube are connected to a controller.

[0012] Furthermore, the first pull-up resistor is connected to the first terminal via a second switch tube, the second pull-up resistor is connected to the second terminal via a fourth switch tube, and control ends of the second switch tube and the fourth switch tube are connected to a controller.

[0013] Furthermore, it also includes a charging module, which includes a power output module, a regulator and an output end, the power output module is connected to the output end through the regulator, and the output end can be connected to a powered device through the port; the regulator is connected to the controller, and the regulator switches the power output by the output end according to the instructions of the controller.

[0014] Furthermore, the signal generator is a serial communication asynchronous signal generator.

[0015] Another aspect of the present disclosure may also be considered to provide a charging device, which includes the charging circuit described above.

[0016] Another aspect of the present disclosure may also be considered to provide a charging method, comprising the steps of:

[0017] After the access device is connected, one or more handshake signals corresponding to the charging protocols are output to the preset terminal;

[0018] Acquire an identification signal inputted by the preset terminal, wherein the identification signal is a feedback of the access device in response to a specified handshake signal;

[0019] Determine a charging protocol adapted by the access device according to the identification signal;

[0020] The corresponding charging operation is performed according to the charging protocol.

[0021] Furthermore, the step of obtaining the identification signal inputted by the preset terminal comprises the steps of:

[0022] After outputting at least one set of handshake signals to the preset terminal, wait for the preset time;

[0023] After acquiring the identification signal through the preset terminal, performing a corresponding charging operation;

[0024] After waiting for a preset time, if no level signal of the preset terminal is detected, the process returns to the step of outputting at least one set of handshake signals to the preset terminal.

[0025] Further, the step of determining the charging protocol adapted by the access device according to the identification signal comprises the steps of:

[0026] Obtaining a level signal of the preset terminal;

[0027] Comparing the acquired level signal with multiple groups of preset thresholds;

[0028] The identification signal of the corresponding charging protocol is determined according to the preset threshold value that meets the requirement, and the charging mode corresponding to the charging protocol is adjusted and outputted.

[0029] Further, the detection of access equipment includes the following steps:

[0030] Detecting level signals of two preset terminals;

[0031] A preset level signal of a preset terminal is detected;

[0032] Determine the preset level signal as a successful connection signal of the access device;

[0033] According to the access device connection success signal, enter the step of outputting at least one set of handshake signals to the preset terminal.

[0034] Furthermore, the preset terminal includes two terminals, and according to a preset level signal of one of the terminals, the connection with the other terminal is closed.

[0035] Another aspect of the present disclosure may also be considered to provide a charging controller, comprising:

[0036] processor;

[0037] a memory for storing processor-executable instructions;

[0038] Wherein, the processor is configured to:

[0039] Perform the charging method as described above.

[0040] Another aspect of the present disclosure may also be considered to provide a non-transitory computer-readable storage medium, which, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform the charging method as described above.

[0041] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: In order to solve the problem that the existing charger uses two terminals for identification communication of the charging protocol during charging access, which will occupy the data transmission channel and cause data transmission to be unable to be performed during charging. The controller is used as the communication control center, and the controller and the signal generator are both connected to the preset terminals, which can be used as the receiving end and the sending end of the level signal of the authentication communication respectively. With this configuration, a half-duplex single-line communication channel can be established with a single terminal, so that the authentication communication of the charging protocol can be realized with one terminal. In this way, the charging protocol applicable to the access device can be adapted to perform adaptive power supply charging.

[0042] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0044] Figure 1 The figure is a schematic diagram showing the structure of a charging circuit according to an exemplary embodiment.

[0045] Figure 2 It is a schematic structural diagram of a controller of a charging circuit according to an exemplary embodiment.

[0046] Figure 3 The figure is a schematic diagram showing the structure of a charging circuit according to an exemplary embodiment.

[0047] Figure 4 The figure is a flow chart of a charging method according to an exemplary embodiment.

[0048] Figure 5 The figure is a schematic diagram showing an execution process of a charging method according to an exemplary embodiment.

[0049] 1. Port; 11. Terminal;

[0050] 2. Signal generator;

[0051] 3. Controller; 32. Memory; 31. Processor; 33. Communication interface; 34. Logic circuit;

[0052] 4. Charging module; 41. Regulator;

[0053] RP1, first pull-up resistor; PR2, second pull-up resistor; Q1, first switch tube; Q2, second switch tube; Q3, third switch tube; Q4, fourth switch tube; DETAILED DESCRIPTION

[0054] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0055] As the performance of smart terminals continues to improve, the power consumption of smart terminals continues to increase, the battery capacity continues to increase, and the demand for fast charging of smart terminals continues to increase. In recent years, various terminal manufacturers have developed their own fast charging protocols. At present, the fast charging protocols developed by various terminal manufacturers are generally based on D+ / D- (Data+ / Data-) channel communication.

[0056] Since the USB (Universal Serial Bus, USB) data transmission process is also implemented based on the D+ / D- (Data+ / Data-) channel communication protocol, it is difficult to achieve fast charging and USB2.0 data transmission at the same time when D+ / D- (Data+ / Data-) is used for charging communication. Therefore, this will occupy the data transmission channel, resulting in the inability to perform data transmission during charging.

[0057] The present disclosure proposes a new charging communication architecture, which can use a signal generator and a controller to achieve single-line communication, so that charging protocol authentication communication can be achieved using one terminal.

[0058] Figure 1It is a structural schematic diagram of a charging circuit according to an exemplary embodiment. According to the first aspect of the embodiment of the present disclosure, a charging device is provided, which mainly includes a port 1, a signal generator 2, a controller 3 and a charging module 4. Port 1 can be a common electronic device connection port, and it should be understood that port 1 generally has multiple terminals 11. Signal generator 2 can be connected to the preset terminal 11 of port 1 as a communication signal generator, and it can be understood that the preset terminal 11 here can be any terminal that is generally not involved in data communication. The controller 3 signal is connected to the signal generator 2 to control the signal generator 2 to send a preset signal, and the controller 3 is also connected to the preset terminal 11 to receive the response signal of the access device through the preset terminal 11. The controller 3 can output a level signal to the preset terminal 11 through the signal generator 2, and the controller 3 obtains the level signal of the access device response input through the terminal, so as to perform the identification communication of the charging protocol of the access device, and finally the charging module 4 performs the corresponding charging operation according to the control signal of the controller.

[0059] In this way, the controller 3 can be used as the communication control center, and the controller 3 and the signal generator 2 are both connected to the preset terminal 11, which can be used as the receiving end and the sending end of the level signal of the authentication communication respectively. In this way, a half-duplex single-line communication channel can be established with a single terminal, so that the authentication communication of the charging protocol can be realized with one terminal. In this way, the charging protocol applicable to the access device can be adapted to perform adaptive power supply charging.

[0060] Half-duplex communication: allows data to be transmitted in both directions, but only allows data to be transmitted in one direction at a time. It is actually a simplex communication with switching direction.

[0061] In the embodiment of the present disclosure, the signal generator 2 is selected as UARTphy, that is, the port physical layer of the universal asynchronous receiver / transmitter, which is a port physical layer of an asynchronous receiver / transmitter. In a specific embodiment, the signal generator 2 can be selected to output a specified level signal to the terminal. Of course, in one embodiment, the asynchronous receiver / transmitter can be used to store multiple groups of handshake signals in the built-in storage, and multiple groups of handshake signals can be output to the preset terminal in sequence according to the instructions of the controller 3, wherein the TX (send data pin) of the UART chip can be selected to be connected to the preset terminal 11, and the RX of the UART chip can be connected to the controller 3 (receive data pin) to facilitate receiving control instructions. The handshake signal in this embodiment can be a communication signal compiled according to the serial communication protocol, such as a multi-segment signal compiled according to the RS-232 standard.

[0062] Serial communication refers to the use of a transmission line to transmit data one bit at a time. Of course, two signal lines can also be used to form full-duplex communication, such as RS232. Asynchronous communication uses one character as the transmission unit. The time interval between two characters in communication is not fixed, but the time interval between two adjacent bits in the same character is fixed. Each character of serial communication is generally 10 bits (1 start bit, 7 data bits, 1 check bit, and 1 end bit). It only needs to be connected to a handshake signal that can be recorded as a specified charging protocol.

[0063] In another embodiment of the present disclosure, the signal generator 2 is selected as UARTphy, that is, the port physical layer of the Universal Asynchronous Receiver / Transmitter. In a specific embodiment, the signal generator 2 can be selected to output a specified level signal to the terminal. Similarly, the TX (transmit data pin) of the UART chip is connected to the preset terminal 11, and the RX of the UART chip can be connected to the controller 3 (receive data pin). A switch tube can be configured between the signal generator 2 and the preset terminal 11 (which will be described in detail in the following embodiments). By turning on and off the switch tube at preset time intervals, a handshake signal can also be formed. It only needs to be recorded as a handshake signal of the specified charging protocol by the access device. With this embodiment, the serial communication protocol layer can be constructed without all controllers involved in identifying the communication. It is a faster and simpler solution to deploy, and it takes up less total storage space.

[0064] It is obvious to those skilled in the art that the signal generator 2 can also be integrated into the controller 3, that is, the controller 3 can select a chip that has integrated a level signal generation (UART) module. One embodiment only requires the integration of a controller chip of a universal asynchronous receiver-transmitter (UART), and the signal generator 2 integrated in the controller 3 also has a corresponding external port to facilitate connection to the preset terminal 11, so that a serial communication signal can be output through the preset terminal 11, or a set of level signals can be output through the preset terminal 11. Another embodiment is a controller chip that integrates a universal asynchronous receiver-transmitter physical layer (equivalent to the output of a fixed level signal), where the universal asynchronous receiver-transmitter physical layer is only used as a generator of a specified level signal, and a switch tube is configured between the external interface of the signal generator 2 and the preset terminal 11. The switch tube is turned on and off at a preset time interval, and a handshake signal can also be formed. It only needs the access device to record the handshake signal of the specified charging protocol.

[0065] Of course, it is understandable that the above signal generator 2 can also be implemented simultaneously to facilitate wider compatibility. By implementing the above two embodiments simultaneously, two forms of handshake signals can be selectively output to the access device, and a greater number of protocols can be represented.

[0066] It is obvious to those skilled in the art that the examples of charging protocols mentioned above include: USB PD, QC fast charging protocol, PD privatization protocol, etc. The USB PD fast charging protocol (USB Power Delivery Specification) is a fast charging standard launched by the USB-Implementers Forum (USB-IF for short) standardization organization and is widely used. The QC fast charging protocol (QC Quick Charge) is a fast charging protocol launched by Qualcomm. On the other hand, each terminal manufacturer also has its own PD privatization protocol, such as OPPO's VOOC flash charging, Huawei's SCP / FCP flash charging, VIVO's FlashCharge flash charging, and Xiaomi's ChargeTurbo flash charging.

[0067] Figure 2 It is a structural diagram of a controller of a charging device according to an exemplary embodiment. Further, in the embodiment of the present disclosure, the controller 3 can be a microcontroller unit MCU. The microcontroller unit (MCU), also known as a single chip microcomputer (Single Chip Microcomputer) or a single chip microcomputer, is to appropriately reduce the frequency and specifications of the central processing unit (CPU), and integrate the memory (memory), counter (Timer), USB, A / D conversion, UART, PLC, DMA and other peripheral interfaces, and even LCD drive circuits on a single chip to form a chip-level computer, and perform different combination controls for different application scenarios. In the specific embodiment of the present disclosure, the controller 3 can be considered to mainly include a memory 32, a processor 31, a communication interface 33 and a logic circuit 34. The memory stores at least one charging protocol data, the communication interface is used to receive signals and output signals, and the logic circuit is connected to the charging module 4 to control the charging module.

[0068] The communication interface mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The communication interface is used for communication between the above electronic device and other devices.

[0069] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0070] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0071] On the other hand, it can also be considered that the controller 3 has three program layers, namely, the communication physical layer, the communication protocol layer and the authentication module. The controller 3 can send and receive communication signals through the communication physical layer, and the communication protocol layer can identify the received signals, and the authentication module can determine the charging protocol adapted to the access device according to the identified signals. In this way, the controller 3 can become a communication control center. The controller 3 and the signal generator 2 are both connected to the preset terminal 11. The controller 3 and the signal generator 2 can serve as the receiving end and the sending end of the authentication communication respectively. The controller 3 controls the signal generator 2 to send the handshake signal. At the same time, the controller 3 can also monitor the correctness of the handshake signal sent by the signal generator 2 in a closed loop, and time it accordingly. After the controller 3 obtains the identification signal fed back by the access device in the preset time period, the communication protocol layer can identify the received signal, and the authentication module can determine the charging protocol adapted to the access device according to the identified signal. With this configuration, a half-duplex single-line communication channel can be established with a single terminal, so that the authentication communication of the charging protocol can be realized with one terminal. In this way, the charging protocol applicable to the access device can be adapted to perform adaptive power supply charging.

[0072] Figure 3 The figure is a schematic diagram showing the structure of a charging circuit according to an exemplary embodiment. Figure 3 A specific circuit configuration diagram of the present disclosure is illustrated, wherein the charging circuit of this embodiment mainly includes a port 1, a signal generator 2, a controller 3 and a charging module 4. Port 1 can be a common electronic device connection port. For example, in this embodiment, port 1 is a USB Type-C port, and port 1 generally has multiple terminals 11. Signal generator 2, as a communication signal generator, can be connected to the preset terminal 11 of port 1, and controller 3 is connected to signal generator 2 to control signal generator 2 to send a preset signal. At the same time, controller 3 is also connected to preset terminal 11 to receive a response signal of the connected device through preset terminal 11. Controller 3 can output a level signal to preset terminal 11 through signal generator 2, and controller 3 obtains the level signal of the connected device response input through the terminal, so as to perform identification communication of the charging protocol of the connected device, and finally charging module 4 performs the corresponding charging operation according to the control signal of the controller.

[0073] The preset terminal 11 of port 1 includes a first terminal and a second terminal, wherein the first terminal is connected to a first pull-up resistor RP1, and the second terminal is connected to a second pull-up resistor PR2, and only one of the first terminal and the second terminal is connected to the signal generator 2 at the same time. It can be seen that port 1 can be a commonly used USB port, and the Universal Serial Bus (USB) is a serial bus standard and also a technical specification of an input and output interface. Currently, there are three physical specifications of USB interfaces: USB Type-A, USB Type-B and USB Type-C. The following embodiments of the present disclosure mainly take USB Type-C as an example, wherein the USB Type-C interface has 24 pins.

[0074] Furthermore, the first terminal is a CC1 terminal, and the second terminal is a CC2 terminal. In addition, CC (Configuration Channel) is a newly added channel in USB Type-C, which has the functions of detecting forward and reverse insertion, detecting the voltage and current that can be provided by USB connection identification, establishing and managing the connection between data and VBUS between USB devices, etc. The following embodiments of the present disclosure mainly take CC (Configuration Channel) channel as an example.

[0075] Further, the signal generator 2 is connected to the first terminal CC1 through the first switch tube Q1, the signal generator 2 is connected to the second terminal CC2 through the third switch tube Q3, and the control ends of the first switch tube Q1 and the third switch tube Q3 are connected to the controller 3. The first pull-up resistor RP1 is connected to the first terminal CC1 through the second switch tube Q2, the second pull-up resistor RP2 is connected to the second terminal CC2 through the fourth switch tube Q4, and the control ends b of the second switch tube Q2 and the fourth switch tube Q4 are also connected to the controller. In this embodiment, the first switch tube Q1 to the fourth switch tube Q4 can all be selected as MOS tubes, or other switch tubes that can be directly controlled by the controller.

[0076] Furthermore, the charging module 4 includes a power output module, a regulator 41 and an output end, the power output module is connected to the output end through the regulator 41, and the output end is connected to the powered device through the port 1; the regulator 41 is connected to the controller 3, and the regulator switches the power outputted by the output end according to the instruction of the controller 3. It is obvious to those skilled in the art that the regulator 41 can be implemented by selecting a variety of power regulating circuits or devices, and since the focus of the present disclosure is not on the new implementation principle of the regulator 41, it will not be described in detail.

[0077] In the control circuit of the present embodiment, the first terminal CC1 and the second terminal CC2 are pulled up to the power supply VCC by the first pull-up resistor RP1 and the second pull-up resistor RP2 in the default state, and whether an external device is connected is confirmed by detecting the level signal of the CC channel. The first switch tube Q1 to the fourth switch tube Q4 are independently controlled by the controller 3. Only one channel of the first terminal CC1 and the second terminal CC2 works at the same time. When one channel works, the other channel is suspended. For example, after the first terminal CC1 detects an external connection, the third switch tube Q3 and the fourth switch tube Q4 on the second terminal CC2 channel are both turned off. At this time, only the first switch tube Q1 and the second switch tube Q2 on the CC1 channel work.

[0078] On the other hand, in order to obtain the input signal, the controller 3 also has a signal channel connected to the first terminal CC1 and the second terminal CC2, so as to directly obtain the level signal input by the first terminal CC1 or the second terminal CC2. According to the above introduction, the input level signal mainly includes: a continuous level signal on the first terminal CC1 or the second terminal CC2 when the access device is connected, which signal can be regarded as an access signal; and an identification signal fed back by the access device, so as to complete the protocol authentication based on this.

[0079] The present disclosure also provides an embodiment of a charging method, which mainly includes:

[0080] Step S101, obtaining a level signal of a preset terminal;

[0081] In the present embodiment, this step can be regarded as a normal initial step. In this step, when no external device is connected, both terminals, the first terminal CC1 and the second terminal CC2, can be defined as Open to indicate an open signal. When the first terminal CC1 or the second terminal CC2 has a level signal, it generally represents that an access device is connected through port 1. At this time, according to the Type-C standard, only one of the first terminal CC1 and the second terminal CC2 obtains the Ra or Rd signal of the CC channel, so as to determine the physical access direction of the access socket, thereby performing data and electrical connections with the adapted terminals.

[0082] Step S102, after detecting a preset level signal, outputting one or more handshake signals corresponding to the preset terminal;

[0083] It can be understood that this step is mainly performed when it is clear which of the first terminal CC1 and the second terminal CC2 has established single-line connection. Based on this, the controller 3 can control the opening of the switch tube corresponding to the specified terminal to establish the connection between this terminal and the signal generator 2. According to the introduction of the previous embodiment, one embodiment is to form a preset handshake signal by turning on and off the switch tube between the signal generator 2 and the terminal, another embodiment is to use the serial data generated by the signal generator 2 to form a preset handshake signal, or another embodiment is that the above two handshake signals coexist and are optional. All of the above can be controlled and executed by the controller 3 according to the preset programming.

[0084] Step S103, obtaining an identification signal inputted by the preset terminal, wherein the identification signal is a preset feedback signal of the access device in response to a specified handshake signal;

[0085] After the controller 3 obtains the identification signal fed back by the access device within a preset time period, the communication protocol layer can compare it with the stored signal directory to identify the received signal.

[0086] Step S104, determining a charging protocol adapted by the access device according to the identification signal;

[0087] The authentication module of the controller 3 can determine the charging protocol adapted by the access device according to the signal recognized by the communication protocol layer.

[0088] Step S105, performing corresponding charging operations according to the charging protocol.

[0089] Next, the working logic of each module is described. See the workflow diagram for details. Figure 5When the first terminal CC1 or the second terminal CC2 detects a connection, the CC level is determined by the power supply VCC and the external resistor. At this time, the level of the first terminal CC1 or the second terminal CC2 is V1. Within the specified time, the signal generator 2 (UARTphy) will be connected, then disconnected, connected again, disconnected...repeated multiple times, that is, the first switch tube Q1 or the third switch tube Q3 is repeatedly turned on and off. When the signal generator 2 (UARTphy) is connected, the power supply VCC and the signal generator 2 module are connected in parallel to jointly determine the CC level. At this time, a square wave of high level V2-low level V1-high level V2-low level V1-... appears on the first terminal CC1 or the second terminal CC2. The purpose of this action is to carry out Handshake detection; second, to prevent false triggering, after the switch action of signal generator 2 (UARTphy) is completed, wait for the preset time period (Twait). During the waiting time period, the CC channel can access other protocol data for handshake. After the preset time period (Twait), if the external device responds within the specified time, it will cause the CC level to be different. The controller 3 can judge the specific protocol type supported by the external device according to the size of the external CC level, realize the half-duplex high-power charging protocol recognition, and finally control the power circuit to adjust the power. If there is no external device response after the preset time period (Twait), it will return to the handshake signal sending step of signal generator 2, and the connection process will be retried;

[0090] In another embodiment provided by the present invention, it can also be considered that a charging controller is provided, and the controller can be a microcontroller unit MCU. The microcontroller unit (MCU), also known as a single chip microcomputer (Single Chip Microcomputer) or a single chip microcomputer, is to appropriately reduce the frequency and specifications of the central processing unit (CPU), and integrate the memory (memory), counter (Timer), USB, A / D conversion, UART, PLC, DMA and other peripheral interfaces, and even LCD drive circuits on a single chip to form a chip-level computer, and perform different combination controls for different application scenarios. Among them, the central processing unit is configured to execute the charging method of any embodiment as described above.

[0091] In another embodiment provided by the present invention, a non-temporary computer-readable storage medium is also provided, in which a computer program is stored, and when the computer program is executed by a processor, the steps of any of the above-mentioned device control methods are implemented.

[0092] In another embodiment of the present invention, a computer program product including instructions is provided, which, when executed on a computer, enables the computer to execute any device control method in the above embodiments.

[0093] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0094] It is to be understood that in the present disclosure, "plurality" refers to two or more than two, and other quantifiers are similar. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. The singular forms "a", "the" and "the" are also intended to include plural forms, unless the context clearly indicates other meanings.

[0095] It is further understood that the terms "first", "second", etc. are used to describe various information, but such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other, and do not indicate a specific order or degree of importance. In fact, the expressions "first", "second", etc. can be used interchangeably. For example, without departing from the scope of the present disclosure, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information.

[0096] It will be further understood that the terms “center”, “longitudinal”, “lateral”, “front”, “back”, “up”, “down”, “left”, “right”, “vertical”, “horizontal”, “top”, “bottom”, “inside”, “outside”, etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the present embodiment and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation.

[0097] It can be further understood that, unless otherwise specified, “connection” includes a direct connection without other components between the two, and also includes an indirect connection with other components between the two.

[0098] It is further understood that, although the operations are described in a specific order in the drawings in the embodiments of the present disclosure, it should not be understood as requiring the operations to be performed in the specific order shown or in a serial order, or requiring the execution of all the operations shown to obtain the desired results. In certain environments, multitasking and parallel processing may be advantageous.

[0099] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the scheme disclosed herein. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are only considered to be exemplary, and the true scope and spirit of the present disclosure are indicated by the following scope of rights.

[0100] It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the scope of the appended claims.

Claims

1. A charging circuit, characterized in that: include: A port having a plurality of terminals; A signal generator connected to a preset terminal of the port; A controller, signal-connected to the signal generator, the controller connected to the preset terminal, the controller outputs at least one set of handshake signals to the preset terminal through the signal generator, each handshake signal represents a charging protocol, and the controller obtains an input identification signal through the preset terminal, the identification signal is the feedback of the access device to the handshake signal; The controller is further configured to perform charging through the port according to the identification signal.

2. The charging circuit according to claim 1, characterized in that: The preset terminal includes two terminals, and the controller closes the connection between the other terminal and the signal generator according to a signal indicating successful connection of one of the terminals.

3. The charging circuit according to claim 1, characterized in that: The signal generator is a serial communication asynchronous receiver and transmitter.

4. The charging circuit according to claim 1, characterized in that: The port includes a first terminal and a second terminal, the first terminal is connected to a first pull-up resistor, and the second terminal is connected to a second pull-up resistor.

5. The charging circuit according to claim 4, characterized in that: The first terminal is a CC1 terminal, and the second terminal is a CC2 terminal.

6. The charging circuit according to claim 5, characterized in that: The controller closes the connection between the other terminal and the corresponding pull-up resistor and the signal generator according to the level signal of one of the terminals.

7. The charging circuit according to claim 5, characterized in that: The signal generator is connected to the first terminal via a first switch tube, the signal generator is connected to the second terminal via a third switch tube, and control ends of the first switch tube and the third switch tube are connected to a controller.

8. The charging circuit according to claim 7, characterized in that: The first pull-up resistor is connected to the first terminal via a second switch tube, the second pull-up resistor is connected to the second terminal via a fourth switch tube, and control ends of the second switch tube and the fourth switch tube are connected to a controller.

9. The charging circuit according to any one of claims 1 to 7, characterized in that: It also includes a charging module, which includes a power output module, a regulator and an output end. The power output module is connected to the output end through the regulator, and the output end can be connected to a powered device through the port; the regulator is connected to the controller, and the regulator switches the power output by the output end according to the instructions of the controller.

10. The charging circuit according to any one of claims 1 to 7, characterized in that: The controller includes a memory, a processor, a communication interface and a logic circuit; the memory stores at least one charging protocol data, the processor is connected to the memory, the communication interface and the logic circuit, the communication interface is used to receive signals and output signals, and the logic circuit is connected to the charging module to regulate and control the charging module.

11. A charging device, characterized in that: The charging circuit comprises a charging circuit as claimed in any one of claims 1 to 10.

12. A charging method, characterized in that: Includes steps: After the access device is connected, one or more handshake signals corresponding to the charging protocols are output to the preset terminal; Acquire an identification signal inputted by the preset terminal, wherein the identification signal is feedback of the access device in response to a specified handshake signal; Determine a charging protocol adapted by the access device according to the identification signal; The corresponding charging operation is performed according to the charging protocol.

13. The charging method according to claim 12, characterized in that: The step of obtaining the identification signal inputted by the preset terminal comprises the following steps: After outputting at least one set of handshake signals to the preset terminal, wait for the preset time; After acquiring the identification signal through the preset terminal, performing a corresponding charging operation; After waiting for a preset time, if no level signal of the preset terminal is detected, the process returns to the step of outputting at least one set of handshake signals to the preset terminal.

14. The charging method according to claim 13, characterized in that: The method of determining the charging protocol adapted by the access device according to the identification signal comprises the steps of: Obtaining a level signal of the preset terminal; Comparing the acquired level signal with multiple groups of preset thresholds; The identification signal of the corresponding charging protocol is determined according to the preset threshold value that meets the requirement, and the charging mode corresponding to the charging protocol is adjusted and outputted.

15. The charging method according to claim 14, characterized in that: Regarding detecting access devices, the steps include: Detecting level signals of two preset terminals; A preset level signal of a preset terminal is detected; Determine the preset level signal as a successful connection signal of the access device; According to the access device connection success signal, enter the step of outputting at least one set of handshake signals to the preset terminal.

16. The charging method according to claim 15, characterized in that: The preset terminal includes two terminals, and according to a preset level signal of one of the terminals, the connection with the other terminal is closed.

17. A charging controller, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: Execute the charging method according to any one of claims 12 to 16.

18. A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the charging method according to any one of claims 12 to 16.