A charging circuit and a charger thereof

By designing a charging circuit in the charger, using VBUS pre-charging and current limit detection to identify USB devices, and combining the overvoltage protection function, the problem of poor charger compatibility is solved, and intelligent detection and efficient power supply for different types of USB devices are achieved.

CN119765550APending Publication Date: 2025-04-04上海慧能泰半导体科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411880649.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

Existing chargers have poor compatibility during device insertion, making it difficult to effectively identify and adapt to different types of USB devices.

Method used

A charging circuit is designed, including a voltage source module, a current limit detection module, a switch module, a logic control module, an overvoltage detection module and a charge pump module. The load device is identified through VBUS pre-charging and current limit detection, and combined with the overvoltage protection function, the identification accuracy and compatibility of the charging device are improved.

Benefits of technology

It improves the recognition accuracy and compatibility of charging devices, realizes intelligent detection and power supply control of different types of USB devices, and ensures the safety and reliability of the charging process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119765550A_ABST
    Figure CN119765550A_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses a charging circuit and a charger thereof, the circuit comprising: a voltage source module, a current limiting detection module, a switch module, a logic control module, an overvoltage detection module and a charge pump module; the voltage source module is connected to the VBUS port through the switch module, and the charge pump module is connected to the external switch tube; the logic control module is configured to output a driving signal when powered on, turn on the switch module, so that the voltage source module supplies power to the USB device; the current limiting detection module is configured to detect the load current of the VBUS port, and output a current limiting signal when the load current is greater than a first preset current; the logic control module is also configured to respond to the current limiting signal, control the charge pump module to turn on the external switch tube, so that the external power supply supplies power to the USB device. The embodiment of the present invention identifies the load device through VBUS pre-charging and current limiting detection, and cooperates with the overvoltage protection function, thereby improving the recognition accuracy and compatibility of the charging device, and has high integration and simple structure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of electronic technology, and in particular to a charging circuit and a charger thereof. Background Art

[0002] With the rapid development of mobile devices, now in homes or markets, in addition to mobile phones and tablets, many new electronic devices such as wireless chargers, drones, smart watches, networking devices, smart speakers, electric gadgets, etc. are very common devices. These devices undoubtedly have a common development trend, and their charging ports are all shifting to USB ports. At present, for the sake of environmental protection, many devices do not provide chargers and charging cables, or only provide consumers with a charging cable.

[0003] USB charging has developed to the point where TYPE_A and TYPE_C are the mainstream charging interfaces on the market, and other interfaces have been phased out. In actual applications, when a device is plugged in, the charger must first identify that the device is plugged in effectively, and then turn on the switch between the charger and the device to allow the device to start charging. In the process of identifying effective insertion, the demand for detection is also increasing. With the popularity of some wireless charging bases and wireless charging, as well as the conversion of some small electronic devices to TYPEA and TYPE_C, the charging cable has integrated smart chips to meet high power and full functions. Existing chargers have the problem of poor compatibility of different types of devices when plugged into the charger. Summary of the invention

[0004] The main technical problem solved by the embodiments of the present invention is to provide a charging circuit and a charger thereof, which can solve the problem of poor compatibility of existing chargers.

[0005] In order to solve the above technical problems, a technical solution adopted in an embodiment of the present invention is: providing a charging circuit, including: a voltage source module, a current limiting detection module, a switch module, a logic control module, an overvoltage detection module and a charge pump module; the voltage source module is connected to the VBUS port through the switch module, and the charge pump module is connected to the external switch tube; the logic control module is configured to output a driving signal when powered on, turn on the switch module, so that the voltage source module supplies power to the USB device; the current limiting detection module is configured to detect the load current of the VBUS port, and output a current limiting signal when the load current is greater than a first preset current; the logic control module is also configured to control the charge pump module to turn on the external switch tube in response to the current limiting signal, so that the external power supply supplies power to the USB device.

[0006] In some embodiments, the charging circuit also includes an overvoltage detection module, which is configured to detect the output voltage of the VBUS port and output an overvoltage signal when the output voltage is greater than a preset reference voltage; the logic control module is also configured to stop outputting the drive signal in response to the overvoltage signal to turn off the switch module.

[0007] In some embodiments, the current limiting detection module includes: a current sampling unit and a current comparison unit; the current sampling unit samples the load current; the current comparison unit is used to compare the load current with the preset reference current, and output the current limiting signal when the load current is greater than the first preset current.

[0008] In some embodiments, the logic control module includes a control unit, an AND logic gate I3, a switch tube HVNM1 and a current source Ibais2, the input end of the control unit is connected to the signal output end of the current limiting detection module, the first output end of the control unit is connected to the first input end of the AND logic gate I3, the second output end of the control unit is connected to the input end of the charge pump module, the second input end of the AND logic gate I3 is connected to the output end of the overvoltage detection module, the output end of the AND logic gate I3 is connected to the gate of the switch tube HVNM1, the drain of the switch tube HVNM1 is connected to the controlled end of the switch module, the source of the switch tube HVNM1 is connected to the positive end of the current source Ibais2, and the negative end of the current source Ibais2 is grounded.

[0009] In some embodiments, the switch module includes a switch tube HVPM1, a gate of the switch tube HVPM1 is connected to the first output end of the logic control module, a drain of the switch tube HVPM1 is connected to the power output end of the current limiting detection module, and a source of the switch tube HVPM1 is connected to the VBUS port.

[0010] In some embodiments, the overvoltage detection module includes a switch tube PM7, a switch tube PM8, a switch tube NM7, a switch tube NM8, a switch tube NM9, a voltage regulator diode D1, a resistor R1, a resistor R2, a resistor R3, a resistor R4, a capacitor C1 and a current source Ibias3, the source of the switch tube PM7 is connected to the first end of the resistor R1, the first end of the capacitor C1, the anode of the voltage regulator diode D1, the first end of the resistor R3, the first end of the resistor R2, the output end of the switch module and the VBUS port, the drain of the switch tube PM7 is connected to the second end of the resistor R1, the second end of the capacitor C1 and the controlled end of the switch module, the gate of the switch tube PM7 is connected to the cathode of the voltage regulator diode D1, The second end of the resistor R3 is connected to the drain of the switch tube NM8; the second end of the resistor R2 is connected to the source of the switch tube PM8 and the positive end of the current source Ibias3, the gate of the switch tube PM8 is connected to the reference voltage source, the drain of the switch tube PM8 is connected to the gate of the switch tube NM7, the drain of the switch tube NM7, the gate of the switch tube NM8 and the gate of the switch tube NM9, the drain of the switch tube NM9 is connected to the resistor R4 and the second input end of the logic control module, the second end of the resistor R4 is connected to the voltage source module, the source of the switch tube NM7, the source of the switch tube NM8, the source of the switch tube NM9 and the negative end of the current source Ibias3 are grounded.

[0011] In some embodiments, the current sampling unit includes a first current mirror and a second current mirror, and the current comparison unit includes a third current mirror; the first current mirror mirrors the load current according to a first proportional coefficient; the second current mirror mirrors the output current of the first current mirror according to a second proportional coefficient; the third current mirror is connected to a reference current source, and mirrors the preset reference current according to a third proportional coefficient to generate a second preset current; the current comparison unit compares the output current of the second current mirror with the second preset current, and outputs the current limiting signal when the output current of the second current mirror is greater than the second preset current; wherein the second preset current is the product of the third proportional coefficient and the preset reference current; the output current of the second current mirror is the product of the load current, the first proportional coefficient and the second proportional coefficient.

[0012] In some embodiments, the current comparison unit includes a current source Ibias1, a switch tube PM1, a switch tube PM2, a switch tube PM3, a switch tube NM1 and a Schmitt trigger SMT, the source of the switch tube PM1 is connected to the source of the switch tube PM2, the source of the switch tube PM3 and the voltage source module, and the switch tube PM1 and the switch tube PM3 constitute the third current mirror; the gate of the switch tube PM1 is connected to the gate of the switch tube PM2, the gate of the switch tube PM3, the drain of the switch tube PM1 and the positive end of the current source Ibias1, the drain of the switch tube PM2 is connected to the drain of the switch tube NM1 and the input end of the Schmitt trigger SMT, the drain of the switch tube PM3 is connected to the gate of the switch tube NM1 and the signal output end of the current sampling unit, the output end of the Schmitt trigger SMT is connected to the first input end of the drain control module, and the source of the switch tube NM1 and the negative end of the current source Ibias1 are grounded.

[0013] In some embodiments, the current sampling unit includes a switch tube PM4, a switch tube PM5, a switch tube PM6, a switch tube NM2, a switch tube NM3, a switch tube NM4, a switch tube NM5 and a switch tube NM6, the gate of the switch tube PM6 is connected to the logic control module, the source of the switch tube PM6 is connected to the source of the switch tube PM4, the source of the switch tube PM5 and the voltage source module, the drain of the switch tube PM6 is connected to the gate of the switch tube PM4, the gate of the switch tube PM5 and the drain of the switch tube PM2, the switch tube PM4 and the switch tube PM5 constitute the first current mirror; the drain of the switch tube PM4 and the drain of the switch tube NM6 The drain of the switch tube PM5 is connected to the input end of the switch module and the drain of the switch tube NM5, the gate of the switch tube NM6 is connected to the gate of the switch tube NM5, the source of the switch tube NM5 and the drain of the switch tube NM4, the source of the switch tube NM6 is connected to the drain of the switch tube NM3, the gate of the switch tube NM3, the gate of the switch tube NM2 and the gate of the switch tube NM4, the drain of the switch tube NM2 is connected to the gate of the switch tube NM1, the switch tube NM2 and the switch tube NM3 form a second current mirror, and the source of the switch tube NM2, the source of the switch tube NM3 and the source of the switch tube NM4 are grounded.

[0014] In order to solve the above technical problems, another technical solution adopted in the embodiment of the present invention is: providing a charger, comprising: a USB port; an external switch tube; and the charging circuit as described above.

[0015] The beneficial effects of the embodiments of the present invention are as follows: Different from the prior art, the embodiments of the present invention identify the load device through VBUS pre-charging and current limiting detection, and cooperate with the overvoltage protection function, thereby improving the recognition accuracy and compatibility of the charging device, and having high integration and simple structure. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 is a structural schematic diagram of a charging circuit provided by an embodiment of the present invention;

[0017] Figure 2 is a structural schematic diagram of another charging circuit provided by an embodiment of the present invention;

[0018] Figure 3 It is a circuit structure diagram of a charging circuit provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0019] In order to facilitate the understanding of the present application, the present application is described in more detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that when an element is described as "fixed to" another element, it can be directly on another element or there can be one or more centered elements therebetween. When an element is described as "connected" to another element, it can be directly connected to another element or there can be one or more centered elements therebetween. The orientation or positional relationship indicated by the terms "upper", "lower", "inner", "outer", "bottom" and the like used in this specification is based on the orientation or positional relationship shown in the accompanying drawings, only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first", "second", "third" and the like are used only for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0020] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used in this specification and in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" used in this specification includes any and all combinations of one or more of the related listed items.

[0021] In addition, the technical features involved in the different embodiments of the present application described below can be combined with each other as long as they do not conflict with each other.

[0022] The technical solution in this application will be described below in conjunction with the accompanying drawings.

[0024] like Figure 1As shown, an embodiment of the present invention provides a charging circuit 10, including a voltage source module 110, a current limiting detection module 140, a switch module 120, a logic control module 130 and a charge pump module 150. The charging circuit 10 realizes compatible charging of different types of USB devices through intelligent detection and control.

[0025] Specifically, the voltage source module 110 is connected to the VBUS port 30 through the switch module 120. When the USB device 40 is inserted into the VBUS port 30, the voltage source module 110 first provides a pre-charge voltage to the USB device 40 through the switch module 120. The pre-charge voltage is used to detect the type and load characteristics of the USB device 40. The voltage source module 110 can be a low-voltage regulated power supply, and its output voltage is lower than the normal charging voltage to ensure the safety of the detection process.

[0026] The switch module 120 serves as a switch control unit between the voltage source module 110 and the VBUS port 30. In this embodiment, the switch module 120 includes a high-voltage switch tube for isolating the internal low-voltage circuit from the external high voltage that may appear. The on and off of the switch module 120 is controlled by the logic control module 130 through a drive signal.

[0027] The current limiting detection module 140 is configured to detect the load current of the VBUS port 30. When the USB device 40 is inserted and starts to draw current from the VBUS port 30, the current limiting detection module 140 monitors the magnitude of the load current in real time. If the load current exceeds the preset first threshold current, it indicates that a high-power device (such as a mobile phone, tablet, etc.) is connected. At this time, the current limiting detection module 140 outputs a current limiting signal to the logic control module 130. The current limiting detection module 140 can use a current sampling resistor in conjunction with a comparator to implement the current detection function.

[0028] The logic control module 130 is the control center of the entire charging circuit. When the charging circuit is powered on, the logic control module 130 first outputs a driving signal to turn on the switch module 120, so that the voltage source module 110 can provide a pre-charging voltage for the USB device 40. After receiving the current limiting signal from the current limiting detection module 140, the logic control module 130 controls the charge pump module 150 to turn on the external switch tube 20, directly connects the external power supply 50 to the USB device 40, and starts the normal charging process.

[0029] The charge pump module 150 is mainly used to drive the gate of the external switch tube 20. Since the external switch tube 20 usually requires a higher gate drive voltage, the charge pump module 150 achieves reliable control of the external switch tube 20 by boosting the internal low voltage to the required level. The operation of the charge pump module 150 is controlled by the logic control module 130.

[0030] The external switch tube 20 may be a MOSFET device, with its source connected to the external power supply 50 and its drain connected to the VBUS port 30. When the external switch tube 20 is turned on, the external power supply 50 can directly provide charging power to the USB device 40. The external power supply 50 is usually a rectified and filtered DC power supply, and its voltage value meets the requirements of the USB charging specification.

[0031] In some embodiments, the current limiting detection module includes a current sampling unit and a current comparison unit, which are used to detect the load current of the VBUS port. The current sampling unit mirrors the load current according to a first proportionality coefficient, and the current comparison unit compares the sampled current with a preset reference current. When the sampled current exceeds a preset current threshold, a current limiting signal is output.

[0032] The current sampling unit includes a first current mirror and a second current mirror. The first current mirror mirrors the load current of the VBUS port according to a first proportional coefficient n1. In specific implementation, the input end of the first current mirror is connected to the VBUS port, and the load current I1 is mirrored according to the proportional coefficient n1, and the output current is n1×I1.

[0033] The second current mirror is connected to the output end of the first current mirror, and mirrors the output current of the first current mirror according to the second proportional coefficient n2. The second current mirror performs a secondary mirroring of the received current n1×I1 according to the proportional coefficient n2, and the final output current is n1×n2×I1. Through the cascade connection of the two-stage current mirror, the load current is accurately amplified.

[0034] The current comparison unit includes a third current mirror, which is connected to a reference current source. The reference current source provides a stable current I0, and the third current mirror mirrors the reference current according to a third proportional coefficient n0 to generate a second preset current I0×n0. The preset current is used as a threshold reference for determining the load size.

[0035] The current comparison unit compares the sampled current n1×n2×I1 output by the second current mirror with the preset current I0×n0 generated by the third current mirror. When the sampled current is greater than the preset current, that is, n1×n2×I1>I0×n0, the current comparison unit outputs a current limiting signal, indicating that a high-power load device is connected to the VBUS port.

[0036] By properly setting the proportional coefficients n1, n2 and n0 of the three current mirrors, accurate identification of load devices of different power levels can be achieved. The use of current mirrors not only provides accurate current detection capability, but also has the advantages of simple structure and good temperature characteristics.

[0037] The charging process can be divided into the following stages:

[0038] The first stage is an initial detection stage: when the USB device 40 is just inserted, the logic control module 130 enables the switch module 120 and the voltage source module 110 provides a pre-charging voltage.

[0039] The second stage is the load identification stage: the current limiting detection module 140 detects the load current and determines the device type. For low-power devices (such as smart watch bases, etc.), the voltage source module 110 can directly provide continuous power.

[0040] The third stage is the normal charging stage: for high-power devices, when current limiting is detected, the external switch tube 20 is turned on through the charge pump module 150 and the device enters the normal charging mode.

[0041] The hierarchical power supply method can not only accurately identify different types of USB devices, but also avoid voltage fluctuations caused by transient large currents, thereby improving the stability and reliability of charging. At the same time, due to the high and low voltage isolation design, the entire circuit has good safety. The circuit structure is simple, the integration is high, it is easy to implement and the cost is low.

[0042] Based on the attached Figure 2 As shown, the embodiment of the present invention provides another implementation scheme of the charging circuit 10. Figure 1 In comparison, this implementation adds an overvoltage detection module 160, which further improves the safety performance of the charging process by monitoring the voltage of the VBUS port 30 in real time.

[0043] The charging circuit 10 includes a voltage source module 110, a current limiting detection module 140, a switch module 120, a logic control module 130, an overvoltage detection module 160 and a charge pump module 150. The voltage source module 110 is connected to the VBUS port 30 through the switch module 120, and the charge pump module 150 is connected to the external switch tube 20.

[0044] The overvoltage detection module 160 is configured to detect the output voltage of the VBUS port 30. When the output voltage exceeds the preset reference voltage, the overvoltage detection module 160 outputs an overvoltage signal to the logic control module 130. After receiving the overvoltage signal, the logic control module 130 immediately stops outputting the driving signal, turns off the switch module 120, and cuts off the connection between the voltage source module 110 and the VBUS port 30, thereby protecting the internal low-voltage circuit from damage.

[0045] When the charging circuit works normally, the logic control module 130 first outputs a driving signal to turn on the switch module 120, so that the voltage source module 110 provides a pre-charging voltage to the USB device 40 through the switch module 120. The current limiting detection module 140 monitors the load current of the VBUS port 30 in real time, and when the load current exceeds the first preset current, the current limiting detection module 140 outputs a current limiting signal to the logic control module 130.

[0046] After receiving the current limiting signal, the logic control module 130 controls the charge pump module 150 to turn on the external switch tube 20, so that the external power supply 50 supplies power to the USB device 40 through the external switch tube 20. At the same time, the logic control module 130 stops outputting the driving signal, turns off the switch module 120, and cuts off the power supply of the voltage source module 110.

[0047] If the overvoltage detection module 160 detects that the voltage of the VBUS port 30 exceeds the preset reference voltage, it immediately outputs an overvoltage signal to the logic control module 130. After receiving the overvoltage signal, the logic control module 130 stops outputting the driving signal to ensure that the switch module 120 is in the off state to prevent the high voltage from damaging the internal circuit.

[0048] The introduction of the overvoltage detection module 160 enables the charging circuit 10 to form a dual protection mechanism: on the one hand, it realizes the identification and power supply control of high-power devices through current limiting detection, and on the other hand, it realizes rapid response and protection to abnormal high voltage through overvoltage detection.

[0049] The specific work process can be divided into the following stages:

[0050] The first stage is power-on initialization: after the charging circuit is powered on, the logic control module 130 outputs a driving signal, the switch module 120 is turned on, and the voltage source module 110 starts to supply power to the VBUS port 30. At the same time, the overvoltage detection module 160 starts to monitor the voltage of the VBUS port 30 in real time.

[0051] The second stage is device identification: when the USB device 40 is plugged into the VBUS port 30, the current limiting detection module 140 starts to detect the load current. If the detected current is less than the first preset current, the voltage source module 110 is kept powered; if the detected current exceeds the first preset current, a current limiting signal is output.

[0052] The third stage is power supply switching: the logic control module 130 controls the charge pump module 150 to turn on the external switch tube 20 according to the current limiting signal, switches to the external power supply 50 for power supply, and turns off the switch module 120. During the whole process, the overvoltage detection module 160 continuously monitors the voltage of the VBUS port 30, and immediately triggers protection once overvoltage occurs.

[0053] In practical applications, by reasonably setting the thresholds of the first preset current and the preset reference voltage, accurate identification and reliable power supply of different types of USB devices can be achieved. The response time of the overvoltage detection module 160 should be fast enough to ensure that the high voltage can be cut off in time to avoid damage to the internal circuit.

[0054] The description of the above implementation modes is not intended to limit the present invention. Any equivalent substitution or modification made by those skilled in the art based on the present invention shall fall within the protection scope of the present invention.

[0055] Figure 3 Show Figure 2 The specific structure of the charging circuit shown in the figure, the charging circuit provided in this embodiment includes a voltage source module 110, a current limiting detection module 140, a switch module 120, a logic control module 130, an overvoltage detection module 160 and a charge pump module 150. The voltage source module 110 is connected to the VBUS port through the switch module 120, and the charge pump module 150 is connected to the external switch tube 20.

[0056] The voltage source module is composed of a switch tube PM4, a switch tube PM5 and a switch tube PM6. The switch tube PM4 and the switch tube PM5 form a current mirror for providing a stable power supply voltage. The gate of the switch tube PM6 is connected to the logic control module 130 for controlling the on and off of the voltage source module 110.

[0057] The current limiting detection module 140 includes a current sampling unit and a current comparison unit. The current sampling unit is composed of devices such as switch tube PM4, switch tube PM5, switch tube NM5 and switch tube NM6, and is used to sample the load current of the VBUS port. The current comparison unit includes a current source Ibais1, a switch tube PM1, a switch tube PM2, a switch tube PM3, a switch tube NM1 and a Schmitt trigger SMT. The switch tube PM1 and the switch tube PM3 form a current mirror to provide a reference current; the switch tube PM2 and the switch tube NM1 are used for current comparison; when the sampled current exceeds the reference current, the Schmitt trigger SMT outputs a current limiting signal.

[0058] The switch module 120 is implemented by a high-voltage PMOS tube HVPM1. The gate of the switch tube HVPM1 is connected to the first output terminal of the logic control module 130, the drain is connected to the power output terminal of the current limiting detection module 140, and the source is connected to the VBUS port. By controlling the on and off of the switch tube HVPM1, the connection control between the voltage source module 110 and the VBUS port is realized.

[0059] The logic control module 130 includes a control unit 131, an AND logic gate I3, a switch tube HVNM1 and a current source Ibais2. The input end of the control unit 131 is connected to the signal output end of the current limiting detection module 140, the first output end of the control unit 131 is connected to the first input end of the AND logic gate I3, and the second output end of the control unit 131 is connected to the input end of the charge pump module. The second input end of the AND logic gate I3 is connected to the output end of the overvoltage detection module 160, and the output end of the AND logic gate I3 is connected to the gate of HVNM1. The drain of the switch tube HVNM1 is connected to the controlled end of the switch module 120, and the source of the switch tube HVNM1 is grounded through the current source Ibais2.

[0060] The overvoltage detection module 160 is composed of a switch tube PM7, a switch tube PM8, a switch tube NM7, a switch tube NM8, a switch tube NM9, a voltage stabilizing diode D1, a resistor R1, a resistor R2, a resistor R3, a resistor R4 and a capacitor C1. The source of the switch tube PM7 is simultaneously connected to the first end of the resistor R1, the first end of the capacitor C1, the anode of the voltage stabilizing diode D1, the first end of the resistor R3, the first end of the resistor R2, the output end of the switch module 120 and the VBUS port. The drain of the switch tube PM7 is connected to the second end of R1, the second end of the capacitor C1 and the controlled end of the switch module 120. The gate of the switch tube PM7 is connected to the cathode of the voltage stabilizing diode D1, the second end of the resistor R3 and the drain of the switch tube NM8. The second end of the resistor R2 is connected to the source of the switch tube PM8 and the positive end of the current source Ibias3, and the gate of the switch tube PM8 is connected to the reference voltage source Vref. The drain of the switch tube PM8 is connected to the gate of the switch tube NM7 and the drain of the switch tube NM7, the gate of the switch tube NM8 and the gate of the switch tube NM9. The drain of the switch tube NM9 is connected to the resistor R4 and the second input terminal of the logic control module 130.

[0061] The charge pump module 150 is responsible for providing a driving voltage for the gate of the external switch tube 20. After receiving the control signal from the logic control module 130, the charge pump module 150 outputs an appropriate voltage level to drive the external switch tube 3 to turn on, so that the external power supply can supply power to the USB device.

[0062] The above modules work together to realize intelligent detection and power supply control of USB devices. When the charging circuit is powered on, the logic control module outputs a drive signal to turn on the switch module, and the voltage source module provides pre-charging for the device through the VBUS port. The current limiting detection module monitors the load current in real time, and outputs a current limiting signal when it exceeds the preset threshold. After receiving the current limiting signal, the logic control module controls the charge pump module to turn on the external switch tube and switch to an external power supply. At the same time, the overvoltage detection module continuously monitors the VBUS port voltage and triggers protection once overvoltage occurs. The close cooperation between modules ensures the safety and reliability of the charging process.

[0063] The specific working principle of the circuit is as follows:

[0064] After the circuit is powered on normally, the logic control module outputs the enable control signal EN_CTRL. Since the VBUS terminal voltage is 0 at this time, the VBUS_OV signal is also high, the enable signal ENABLE is high, and the entire module is in the enabled state. The current source Ibais1 is generated inside the chip and is transmitted to the switch tubes PM2 and PM3 through the switch tube PM1 in a mirror relationship.

[0065] In the initial stage of operation, the switch tube PM3 pulls up the node b when the current of the switch tube NM2 is small. After the node b is pulled up, the switch tube NM1 is fully turned on, and then the node a is pulled down. After the node a is pulled down, the switch tubes PM4 and PM5 are turned on, and VDD provides a pull-up voltage source for the detection circuit through the switch tube PM5. When the enable signal ENABLE is 1, the switch tube HVNM1 will be turned on, and the current source Ibais2 will pull down the node c, thereby turning on the switch tube HVPM1. At this time, the VBUS port is pulled up to the voltage source voltage, the pull-up path is established, and the VBUS voltage = VDD.

[0066] When the pull-up path is established, the current limiting detection module 140 starts working. Switch tubes NM2, NM3, NM4, NM5, NM6 and PM3, PM4 and PM5 form a current sampling type current comparator, which is used to limit the maximum current output capacity of PM5. Its working principle is: PM4 and PM5 are in a mirror relationship, which is used to sample the current load of PM5. Assuming that the width-to-length ratio between them is n1, when a device is inserted, a load on the device side will draw a large current from the VBUS port. The current flows through PM5 and is recorded as I1. Since PM4 and PM5 are in a mirror relationship, PM4 will mirror the current I1 by n1 times, and flow into NM3 through NM6. NM3 and NM2 are also in a current mirror relationship, assuming that their width-to-length ratio is n2. Switch NM2 will mirror the current in switch NM3 by n2 times, so the current flowing into switch NM2 is I1×n1×n2. According to the circuit design, assuming that the current of current source Ibais1 is I0, and the width-to-length ratio of switch PM3 to switch PM1 is n0, the current of switch PM3 is I0×n0.

[0067] The circuit behaves differently in two cases:

[0068] When the device is not inserted or a small device is inserted, the VBUS port is in an idle or low-load state, I1 is at a small value, and I1×n1×n2 < I0×n0. At this time, the switching transistor PM3 will continuously pull up the b node, and then the a node will be continuously pulled down, and the voltage source can continuously supply power to VBUS to ensure the normal operation of the external load.

[0069] When a large device is inserted, I1 gradually increases until I1×n1×n2 > I0×n0. At this time, the current source of the switching transistor PM3 is not sufficient to support the sink current of the switching transistor NM2, the b node is pulled down, the switching transistor NM1 is turned off, and the a node is pulled up by the switching transistor PM2. The output API_VBUS_DET of the Schmidt trigger SMT changes from low to high and is transmitted to the logic control module 130. The logic control module 130 determines that a large device has been inserted into the VBUS port. At the same time, due to the increase of the a node, the conductivity of the switching transistor PM5 gradually becomes worse until it is turned off. Since the enable signal ENABLE becomes low, the switching transistor HVNM1 will also be turned off by the logic control circuit, and the c node is released and rises to the same potential as the VBUS port voltage through the resistor R1. After the internal pull-up voltage source is turned off, the control logic module 130 will turn on the charge pump to connect the external device to the VBUS port, and the external device will charge the USB device with high power.

[0070] The working principle of the overvoltage detection module 160 is as follows: when the pull-up source of the VBUS port exists, if an abnormal high voltage appears at the VBUS port, the overvoltage detection module 160 will quickly turn off the switching module 120 between the VBUS port and the pull-up source to protect the internal circuit. The specific implementation method: the reference voltage source Vref and the current source Ibais3 satisfy Vref + R2×Ibais3 > VDD to ensure that normal operation does not trigger protection. When VBUS = VDD, that is, VBUS < Vref + R2×Ibais3, the switching transistor PM8 is cut off, and there is no current in the switching transistors NM7, NM8, and NM9. The d node is pulled to the same potential by VBUS through R3. Therefore, the switching transistor PM7 is cut off, and the VBUS power supply path works normally. When the voltage satisfies: VBUS > vref + R2×Ibais3 > VDD, the switching transistor PM8 starts to conduct and generates current, and the current is mirrored to the switching transistors NM8 and NM9 through the switching transistor NM7. In order to achieve the purpose of quick turn-off, the ratio of the switching transistors NM8 and NM9 to the switching transistor NM7 is usually set large to ensure that the switching transistor NM8 can quickly pull down the d node. When the d node is pulled low, the switching transistor PM7 is turned on, the c node is pulled to the same potential as the VBUS port voltage, and the switching transistor HVPM1 is cut off, and the high voltage cannot flow into the internal circuit through the switching transistor HVPM1. At the same time, the switching transistor NM9 will also be pulled low, the VBUS_OV output is set to 0, and the internal pull-up source will also be synchronously turned off to further protect the internal circuit.

[0071] Different from the prior art, the embodiments of the present invention identify the load device through VBUS pre-charging and current limiting detection, and cooperate with the overvoltage protection function, thereby improving the recognition accuracy and compatibility of the charging device, and has high integration and simple structure.

[0072] In some embodiments of the present application, a charger is also provided, which includes a USB port; an external switch tube; and a charging circuit as described in any of the above embodiments.

[0073] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Under the concept of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes in different aspects of the present application as above, which are not provided in detail for the sake of simplicity. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features can be replaced by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A charging circuit, characterized in that: include: Voltage source module, current limiting detection module, switch module, logic control module, overvoltage detection module and charge pump module; The voltage source module is connected to the VBUS port through the switch module, and the charge pump module is connected to the external switch tube; The logic control module is configured to output a driving signal when powered on to turn on the switch module so that the voltage source module supplies power to the USB device; The current limiting detection module is configured to detect the load current of the VBUS port, and output a current limiting signal when the load current is greater than a first preset current; The logic control module is further configured to control the charge pump module to turn on the external switch tube in response to the current limiting signal, so that the external power supply supplies power to the USB device.

2. The circuit according to claim 1, characterized in that Also includes an overvoltage detection module, the overvoltage detection module is configured to detect the output voltage of the VBUS port, and output an overvoltage signal when the output voltage is greater than a preset reference voltage; The logic control module is further configured to stop outputting the driving signal in response to the overvoltage signal to turn off the switch module.

3. The circuit according to claim 1, characterized in that The current limiting detection module includes: a current sampling unit and a current comparison unit; The current sampling unit samples the load current; The current comparison unit is used for comparing the load current with the preset reference current, and outputting the current limiting signal when the load current is greater than the first preset current.

4. The circuit according to claim 1, characterized in that The logic control module includes a control unit, an AND logic gate I3, a switch tube HVNM1 and a current source Ibais2. The input end of the control unit is connected to the signal output end of the current limiting detection module, the first output end of the control unit is connected to the first input end of the AND logic gate I3, the second output end of the control unit is connected to the input end of the charge pump module, the second input end of the AND logic gate I3 is connected to the output end of the overvoltage detection module, the output end of the AND logic gate I3 is connected to the gate of the switch tube HVNM1, the drain of the switch tube HVNM1 is connected to the controlled end of the switch module, the source of the switch tube HVNM1 is connected to the positive end of the current source Ibais2, and the negative end of the current source Ibais2 is grounded.

5. The circuit according to claim 1, characterized in that The switch module includes a switch tube HVPM1, The gate of the switch tube HVPM1 is connected to the first output end of the logic control module, the drain of the switch tube HVPM1 is connected to the power output end of the current limiting detection module, and the source of the switch tube HVPM1 is connected to the VBUS port.

6. The circuit according to claim 2, characterized in that The overvoltage detection module includes a switch tube PM7, a switch tube PM8, a switch tube NM7, a switch tube NM8, a switch tube NM9, a voltage stabilizing diode D1, a resistor R1, a resistor R2, a resistor R3, a resistor R4, a capacitor C1 and a current source Ibias3. The source of the switch tube PM7 is connected to the first end of the resistor R1, the first end of the capacitor C1, the anode of the voltage-stabilizing diode D1, the first end of the resistor R3, the first end of the resistor R2, the output end of the switch module and the VBUS port; the drain of the switch tube PM7 is connected to the second end of the resistor R1, the second end of the capacitor C1 and the controlled end of the switch module; the gate of the switch tube PM7 is connected to the cathode of the voltage-stabilizing diode D1, the second end of the resistor R3 and the drain of the switch tube NM8; The second end of the resistor R2 is connected to the source of the switch tube PM8 and the positive end of the current source Ibias3, the gate of the switch tube PM8 is connected to the reference voltage source, the drain of the switch tube PM8 is connected to the gate of the switch tube NM7, the drain of the switch tube NM7, the gate of the switch tube NM8 and the gate of the switch tube NM9, the drain of the switch tube NM9 is connected to the resistor R4 and the second input end of the logic control module, the second end of the resistor R4 is connected to the voltage source module, the source of the switch tube NM7, the source of the switch tube NM8, the source of the switch tube NM9 and the negative end of the current source Ibias3 are grounded.

7. The circuit according to claim 3, characterized in that The current sampling unit includes a first current mirror and a second current mirror, and the current comparison unit includes a third current mirror; The first current mirror mirrors the load current according to a first proportionality coefficient; The second current mirror mirrors the output current of the first current mirror according to a second proportionality coefficient; The third current mirror is connected to the reference current source, and mirrors the preset reference current according to a third proportional coefficient to generate a second preset current; The current comparison unit compares the output current of the second current mirror with the second preset current, and outputs the current limiting signal when the output current of the second current mirror is greater than the second preset current; The second preset current is the product of the third proportional coefficient and the preset reference current; and the output current of the second current mirror is the product of the load current, the first proportional coefficient and the second proportional coefficient.

8. The circuit according to claim 7, characterized in that The current comparison unit includes a current source Ibias1, a switch tube PM1, a switch tube PM2, a switch tube PM3, a switch tube NM1 and a Schmitt trigger SMT. The source of the switch tube PM1 is connected to the source of the switch tube PM2, the source of the switch tube PM3 and the voltage source module, and the switch tube PM1 and the switch tube PM3 form the third current mirror; The gate of the switch tube PM1 is connected to the gate of the switch tube PM2, the gate of the switch tube PM3, the drain of the switch tube PM1 and the positive end of the current source Ibias1, the drain of the switch tube PM2 is connected to the drain of the switch tube NM1 and the input end of the Schmitt trigger SMT, the drain of the switch tube PM3 is connected to the gate of the switch tube NM1 and the signal output end of the current sampling unit, the output end of the Schmitt trigger SMT is connected to the first input end of the drain control module, and the source of the switch tube NM1 and the negative end of the current source Ibias1 are grounded.

9. The circuit according to claim 8, characterized in that The current sampling unit includes a switch tube PM4, a switch tube PM5, a switch tube PM6, a switch tube NM2, a switch tube NM3, a switch tube NM4, a switch tube NM5 and a switch tube NM6. The gate of the switch tube PM6 is connected to the logic control module, the source of the switch tube PM6 is connected to the source of the switch tube PM4, the source of the switch tube PM5 and the voltage source module, the drain of the switch tube PM6 is connected to the gate of the switch tube PM4, the gate of the switch tube PM5 and the drain of the switch tube PM2, and the switch tube PM4 and the switch tube PM5 constitute the first current mirror; The drain of the switch tube PM4 is connected to the drain of the switch tube NM6, the drain of the switch tube PM5 is connected to the input end of the switch module and the drain of the switch tube NM5, the gate of the switch tube NM6 is connected to the gate of the switch tube NM5, the source of the switch tube NM5 and the drain of the switch tube NM4, the source of the switch tube NM6 is connected to the drain of the switch tube NM3, the gate of the switch tube NM3, the gate of the switch tube NM2 and the gate of the switch tube NM4, the drain of the switch tube NM2 is connected to the gate of the switch tube NM1, the switch tube NM2 and the switch tube NM3 form a second current mirror, and the source of the switch tube NM2, the source of the switch tube NM3 and the source of the switch tube NM4 are grounded.

10. A charger, characterized in that: include: USB port; External switch tube; as well as A charging circuit as claimed in any one of claims 1 to 9.