A charging and discharging circuit, a charging module, a terminal device, a power utilization system and a method

By designing the switching unit and controller in the charging and discharging circuit, the problem of damage to terminal equipment when the external power supply is abnormal was solved, achieving safe and reliable power supply and charging, and reducing the complexity and cost of the controller.

CN123144355APending Publication Date: 2026-11-20HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510645383.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-19
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing terminal devices cannot be effectively powered and charged without an external power source, and are prone to damage when the external power source is abnormal, affecting safety and reliability.

Method used

A charging and discharging circuit is designed, including a first switching unit, a boost circuit, a buck circuit, a charging and discharging transistor, and a controller. The controller switches the circuit path under different voltage conditions to ensure that the battery pack is charged and the load is powered, while preventing abnormal voltage from damaging the circuit components.

Benefits of technology

It enables protection of the battery pack and load in the event of an external power failure, improving the safety and reliability of terminal equipment, reducing the complexity and cost of the controller, and improving power supply efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123144355A_ABST
    Figure CN123144355A_ABST
Patent Text Reader

Abstract

The application provides a charging and discharging circuit, a charging module, a terminal device, a power utilization system and a method. The charging and discharging circuit comprises a first switching unit, a voltage boosting circuit, a voltage reducing circuit, a charging and discharging transistor and a controller. The controller is configured to, when an output voltage of an adapter is in a first preset range, control the first switching unit to transmit the output voltage to the voltage boosting circuit; when the output voltage is greater than a first threshold value, control the voltage boosting circuit to transmit the output voltage to the voltage reducing circuit, control the voltage reducing circuit to perform voltage reduction processing on the output voltage, and output a charging voltage to a battery pack and the charging and discharging transistor respectively, and control the charging and discharging transistor to supply power to a load based on the charging voltage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic technology, and in particular to a charging and discharging circuit, a charging module, a terminal device, a power supply system, and a method. Background Technology

[0002] Currently, mobile terminal devices such as laptops, tablets, mobile phones, in-vehicle devices, and wearable devices rely on their internal batteries to power their loads when there is no external power source. Conversely, when an external power source is available, the devices need to draw energy from it to power their loads and simultaneously charge their internal batteries. Therefore, a charging and discharging circuit is needed to maintain the operation of these terminal devices and improve their safety. Summary of the Invention

[0003] This application provides a charging and discharging circuit, a charging module, a terminal device, a power supply system, and a method for maintaining the operation of the terminal device and improving the safety of its use.

[0004] In a first aspect, embodiments of this application provide a charging and discharging circuit, which may include: a first switching unit, a boost circuit, a buck circuit, a charging and discharging transistor, and a controller; the input terminal of the first switching unit is used to receive the output voltage of the adapter, the output terminal of the first switching unit is connected to the input terminal of the boost circuit, and the control terminal of the first switching unit is connected to the controller; the output terminal of the boost circuit is connected to the input terminal of the buck circuit, and the control terminal of the boost circuit is connected to the controller; the output terminal of the buck circuit, the first terminal of the charging and discharging transistor, and the battery pack are connected, and the control terminal of the buck circuit is connected to the controller; the second terminal of the charging and discharging transistor is connected to the load, and the control terminal of the charging and discharging transistor is connected to the controller; the controller is used to: control the first switching unit to transmit the output voltage to the boost circuit when the output voltage of the adapter is within a first preset range; control the boost circuit to transmit the output voltage to the buck circuit when the output voltage is greater than a first threshold; control the buck circuit to perform buck reduction processing on the output voltage and output charging voltage to the battery pack and the charging and discharging transistor respectively; and control the charging and discharging transistor to supply power to the load based on the charging voltage.

[0005] Thus, when the adapter's output voltage exceeds the first threshold, the charging voltage output by the buck circuit can be transmitted to the battery pack and the charge / discharge transistor, respectively. The charge / discharge transistor supplies power to the load based on the charging voltage. In this way, the charge / discharge circuit can charge the battery pack while supplying power to the load, achieving simultaneous power supply and charging. Furthermore, if the output voltage exceeds the first preset range, it may indicate an adapter malfunction. This malfunction could be due to a faulty adapter itself or a lightning strike on the power grid connected to the adapter. In this case, the first switching unit can disconnect, preventing the adapter's output voltage from entering the boost circuit, buck circuit, and charge / discharge transistor, thereby preventing the corresponding voltage from entering the load and battery pack. This avoids damage to the boost circuit, buck circuit, load, and battery pack, thus improving the reliability and safety of the charge / discharge circuit.

[0006] It is important to note that the first switching unit primarily functions as a switch and is not used for voltage regulation. Its impact on the output voltage is minimal or negligible. Therefore, when the adapter's output voltage is within the first preset range, the adapter is operating normally. At this point, the output voltage can be transmitted to the boost circuit, where subsequent boost and buck circuits process the output voltage to charge the battery pack and supply power to the load. Furthermore, devices with switching functions can fulfill the function of the first switching unit, simplifying its structure and reducing the cost of the charging and discharging circuit. However, if the first switching unit also has voltage regulation capabilities, the controller needs to control not only the voltage regulation of the first switching unit but also the voltage regulation of the boost or buck circuit when boosting or bucking the output voltage. This increases the controller's complexity and computational load, leading to increased cost and power consumption. Furthermore, it may cause control errors, resulting in significant deviations in the overall voltage regulation, affecting load power supply and battery charging, and ultimately impacting the normal operation of the terminal equipment. If the first switching unit does not have a voltage regulation function, the controller can control the voltage regulation degree of the boost circuit or buck circuit. This can not only reduce the cost and power consumption of the controller, but also reduce the factors that cause voltage regulation deviation, improve the accuracy of the controller, ensure the normal power supply to the load and the charging of the battery pack, and ensure the normal operation of the terminal equipment.

[0007] Optionally, the controller is also configured to: when the output voltage is less than a second threshold, control the boost circuit to boost the output voltage and output a charging voltage; control the buck circuit to output the charging voltage to the battery pack and the charge / discharge transistor respectively; and control the charge / discharge transistor to supply power to the load based on the charging voltage; the second threshold is less than or equal to the first threshold. That is, when the output voltage is less than the second threshold, it indicates that the output voltage is low and needs to be boosted. In this case, the controller controls the boost circuit to boost the output voltage and then transmits it to the battery pack and the charge / discharge transistor through the buck circuit. When the output voltage is greater than the first threshold, it indicates that the output voltage is high and needs to be bucked. In this case, the controller controls the buck circuit to buck the output voltage and then transmit it to the battery pack and the charge / discharge transistor.

[0008] Optionally, the charging and discharging circuit further includes a second switching unit. The input terminal of the second switching unit is connected to the output terminal of the boost circuit, and the output terminal of the second switching unit is connected to the load and the second terminal of the charging and discharging transistor, respectively. The control terminal of the second switching unit is connected to a controller. The controller is further configured to: control the boost circuit to boost the output voltage and output a supply voltage when the output voltage is less than a second threshold; control the second switching unit to transmit the supply voltage to the load and the charging and discharging transistor, respectively; and control the charging and discharging transistor to charge the battery pack based on the supply voltage. The second threshold is less than or equal to the first threshold. Thus, when the output voltage is less than the second threshold, the boost circuit is controlled to boost the output voltage, and then the second switching unit is controlled to directly transmit the boosted supply voltage to the load. At the same time, the buck circuit will not transmit the supply voltage to the battery pack. That is, when a second switching unit is provided, the boosted supply voltage is preferentially output through the second switching unit; when no second switching unit is provided, it is output through the buck circuit. This provides more transmission paths for the power supply voltage, preventing the buck circuit from failing to provide power to the load and battery pack when it malfunctions, thus ensuring the normal operation of the charging and discharging circuit.

[0009] Furthermore, the second switching unit includes a first transistor. The first terminal of the first transistor is connected to the output terminal of the boost circuit, and the second terminal of the first transistor is connected to the load and the second terminal of the charge / discharge transistor, respectively. The control terminal of the first transistor is connected to the controller. Since controlling the seventh and ninth transistors to conduct is required when selecting the output supply voltage through the buck circuit, two transistors need to be controlled at this time. However, the second switching unit includes only one transistor, and the supply voltage can be output by conducting this single transistor. Compared with the supply voltage transmission through the buck circuit, the number of transistors conducting is reduced, thereby reducing voltage drop, reducing losses, and improving power supply efficiency.

[0010] Furthermore, the charging and discharging circuit also includes a third switching unit. The input terminal of the third switching unit is connected to the input terminal of the boost circuit, and the output terminal of the third switching unit is connected to the input terminal of the second switching unit. The controller is also used to: control the third and second switching units to transmit the output voltage to the load and the charging and discharging transistor when the output voltage meets the shoot-through condition, and control the charging and discharging transistor to charge the battery pack based on the output voltage. Thus, when the output voltage meets the shoot-through condition, it means that the output voltage is close to the charging voltage of the battery pack. At this time, the charging and discharging circuit does not need to perform boost and buck processing on the output voltage; it can directly transmit the output voltage to the battery pack. Therefore, the third switching unit mainly functions as a switch and is not used for voltage regulation. Its impact on the magnitude of the output voltage is small or even negligible. This not only reduces the control complexity and computational load of the controller, but also reduces the power consumption of the controller and improves the power supply efficiency.

[0011] The direct connection conditions include: the load's operating power is greater than or equal to a third threshold, and the output voltage is within a second preset range, where the lower limit of the second preset range is the difference between the load's maximum operating voltage and a first value, and the upper limit of the second preset range is the load's maximum operating voltage; or, the load's operating power is less than a third threshold, and the output voltage is within a third preset range, where the lower limit of the third preset range is the difference between the battery pack's charging voltage and a second value, and the upper limit of the third preset range is the sum of the battery pack's charging voltage and a third value.

[0012] Therefore, when the output voltage is within the third preset range, it indicates that the output voltage is close to the battery pack's charging voltage. When the load's operating power is less than the third threshold, it means that the operating power required by the current business being processed by the load is not high. Therefore, the voltage output to the load is not critical; it only needs to be close to the battery pack's charging voltage to meet the load's needs. In this case, the battery pack charging voltage is used as the reference, eliminating the need for voltage boosting or bucking of the output voltage. The charging and discharging transistors also do not require special processing and can be directly transmitted, thus reducing losses and improving efficiency. When the load's operating power is greater than or equal to the third threshold, it indicates that the operating power required by the current business being processed by the load is relatively high. In this case, the voltage output to the load needs to be close to the maximum operating voltage to meet the business's operating requirements. Therefore, the load is used as the reference. When the output voltage is within the second preset range, it means that the output voltage is close to the load's maximum operating voltage, which meets the load's needs. Therefore, the output voltage does not need to be boosted or bucked and can be directly transmitted, thus improving the load's operating efficiency.

[0013] Furthermore, the third switching unit includes a second transistor and a third transistor. The first terminal of the second transistor is connected to the input terminal of the boost circuit, and the second terminal of the second transistor is connected to the first terminal of the third transistor. Both the control terminals of the second and third transistors are connected to the controller. The second terminal of the third transistor is connected to the input terminal of the second switching unit. The body diodes in the second and third transistors have opposite directions. Since both the input and output terminals of the third switching unit have voltages, and the magnitudes of these voltages may differ under different conditions, the placement of the body diodes in the second and third transistors prevents bidirectional current backflow, thereby ensuring the normal operation of the charging and discharging circuit.

[0014] Optionally, the first switching unit includes a fourth transistor. The first terminal of the fourth transistor receives the output voltage, the second terminal is connected to the input terminal of the boost circuit, and the control terminal of the fourth transistor is connected to the controller. The anode of the body diode in the fourth transistor is connected to the input terminal of the boost circuit, and the cathode of the body diode receives the output voltage. Specifically, the controller controls the fourth transistor to conduct when the adapter's output voltage is within a first preset range, and controls the fourth transistor to cut off when the adapter's output voltage exceeds the first preset range. Thus, under the control of the controller, the fourth transistor can transmit the adapter's output voltage to the boost circuit, facilitating voltage boosting or bucking to meet the needs of the battery pack and load. Furthermore, the body diode in the fourth transistor prevents current from flowing into the boost circuit when the fourth transistor is in the off state, avoiding any impact on the boost circuit and ensuring the normal operation of the charging and discharging circuit.

[0015] Optionally, the lower limit of the first preset range is the difference between the adapter's rated output voltage and the fourth value, and the upper limit of the first preset range is the sum of the adapter's rated output voltage and the fifth value. The reason for this setting is that when the adapter is working normally, its output voltage is generally the rated output voltage. Furthermore, when the charging / discharging circuit is powered on, the controller communicates and negotiates with the adapter. At this time, the controller obtains the adapter's rated output voltage. Based on this rated output voltage, the controller can determine whether to use a boost circuit for voltage boosting or a buck circuit for voltage reduction, thereby meeting the needs of the battery pack and the load. However, in abnormal situations, the adapter's output voltage may deviate from the rated output voltage, for example, it may be higher or lower than the rated output voltage. If the lower output voltage is transmitted to the boost and buck circuits, the controller will still control the boost and buck circuits according to the condition when receiving the rated output voltage. This may result in the voltage output to the battery pack and load not meeting the requirements, causing the battery pack and load to malfunction. If the higher output voltage is transmitted to the boost and buck circuits, it may damage the boost and buck circuits, which may in turn damage the battery pack and load. Therefore, both lower and higher output voltages are unacceptable and not allowed. Therefore, a first preset range is determined based on the rated output voltage. When the output voltage is within the first preset range, the first switching unit is controlled to transmit the output voltage to the boost circuit. This can meet the needs of the battery pack and load, and also avoid damage to the boost and buck circuits, thereby preventing damage to the battery pack and load and improving the safety of use.

[0016] Optionally, the boost circuit includes an inductor, a fifth transistor, and a sixth transistor. The first terminal of the inductor receives the output voltage, and the second terminal of the inductor, the first terminal of the fifth transistor, and the second terminal of the sixth transistor are connected. The second terminal of the fifth transistor is connected to the input terminal of the buck circuit, and the control terminal of the fifth transistor is connected to the controller. The first terminal of the sixth transistor is connected to ground, and the control terminal of the sixth transistor is connected to the controller. Specifically, the controller is used to: when the output voltage is greater than a first threshold, control the fifth transistor to conduct and the sixth transistor to cut off, so that the output voltage can be transmitted to the buck circuit through the inductor and the fifth transistor, allowing the buck circuit to step down the output voltage; when the output voltage is less than a second threshold, control the fifth and sixth transistors to conduct alternately, thus boosting the output voltage.

[0017] Optionally, the buck circuit includes: a seventh transistor, an eighth transistor, a ninth transistor, and a capacitor; the first terminal of the seventh transistor, the second terminal of the eighth transistor, the battery pack, and the first terminal of the charge / discharge transistor are connected; the second terminal of the seventh transistor, the first terminal of the capacitor, and the output terminal of the boost circuit are connected; the control terminal of the seventh transistor is connected to the controller; the first terminal of the eighth transistor, the second terminal of the second capacitor, and the second terminal of the ninth transistor are connected; the control terminal of the eighth transistor is connected to the controller; the first terminal of the ninth transistor is connected to ground; and the control terminal of the ninth transistor is connected to the controller. Specifically, the controller is used to: when the output voltage is greater than a first threshold, control the seventh and eighth transistors to conduct alternately, and maintain a consistent conduction state between the seventh and ninth transistors, thus achieving voltage bucking; when the output voltage is less than a second threshold, control the eighth transistor to conduct, and control both the seventh and ninth transistors to be cut off, thus transmitting the boosted voltage output from the boost circuit to the battery pack and the charge / discharge transistor, thereby achieving voltage transmission.

[0018] Secondly, embodiments of this application also provide a charging module, which includes: a circuit board, and a charging and discharging circuit as described in the first aspect and any embodiment of the first aspect, wherein the charging and discharging circuit is disposed on the circuit board.

[0019] It should be understood that since the principle by which this charging module solves the problem is similar to that of the aforementioned charging and discharging circuit, the implementation and technical effects of this charging module can be found in the implementation and technical effects of the aforementioned charging and discharging circuit, and the repetitions will not be repeated.

[0020] Thirdly, embodiments of this application also provide a terminal device, which may include: a battery pack and a charging module as described in the second aspect and any of the embodiments described above, wherein the charging module is connected to the battery pack. Optionally, the terminal device may be, but is not limited to, mobile terminal devices such as laptops, tablets, mobile phones, in-vehicle devices, and wearable devices.

[0021] It should be understood that since the principle by which this terminal device solves the problem is similar to that of the aforementioned charging module, the implementation and technical effects of this terminal device can be found in the implementation and technical effects of the aforementioned charging module, and the repetitions will not be repeated.

[0022] Fourthly, embodiments of this application also provide an electrical system, which may include: an adapter and a terminal device as described in the third aspect and any one of the embodiments described above, wherein the adapter is connected to the power interface of the terminal device.

[0023] It should be understood that since the principle of this power system in solving problems is similar to that of the aforementioned terminal equipment, the implementation and technical effects of this power system can be found in the implementation and technical effects of the aforementioned terminal equipment, and the repetitions will not be repeated.

[0024] Fifthly, embodiments of this application also provide a charging and discharging control method, implemented using the charging and discharging circuit described in the first aspect and any embodiment of the first aspect. The charging and discharging control method includes: when the output voltage of the adapter is within a first preset range, a first switching unit transmits the output voltage to a boost circuit; when the output voltage is greater than a first threshold, the boost circuit transmits the output voltage to a buck circuit, the buck circuit performs buck processing on the output voltage, and outputs a charging voltage to the battery pack and the charging and discharging transistor respectively; and controlling the charging and discharging transistor to supply power to the load based on the charging voltage.

[0025] Optionally, the charging and discharging control method further includes: when the output voltage is less than the second threshold, the boost circuit boosts the output voltage and outputs the supply voltage, the second switching unit transmits the supply voltage to the load and the charging and discharging transistor respectively, and the charging and discharging transistor charges the battery pack based on the supply voltage.

[0026] The second threshold is less than or equal to the first threshold; the charging and discharging circuit also includes a second switching unit, the input terminal of which is connected to the output terminal of the boost circuit, the output terminal of which is connected to the load and the second terminal of the charging and discharging transistor respectively, and the control terminal of which is connected to the controller.

[0027] Optionally, the charge-discharge control method further includes: when the output voltage meets the pass-through condition, the third switching unit and the second switching unit transmit the output voltage to the load and the charge-discharge transistor, and control the charge-discharge transistor to charge the battery pack based on the output voltage;

[0028] The charging and discharging circuit also includes a third switching unit, the input of which is connected to the input of the boost circuit, and the output of which is connected to the input of the second switching unit.

[0029] It should be understood that since the principle of this charge-discharge control method is similar to that of the aforementioned charge-discharge circuit, the implementation and technical effects of this charge-discharge control method can be found in the implementation and technical effects of the aforementioned charge-discharge circuit, and the repetitions will not be repeated. Attached Figure Description

[0030] Figure 1 This is a schematic diagram of the structure of an electrical system provided in an embodiment of this application;

[0031] Figure 2This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application;

[0032] Figure 3 This is a schematic diagram of a charging and discharging circuit provided in an embodiment of this application;

[0033] Figure 4 This is a schematic diagram of a specific structure of a charging and discharging circuit provided in an embodiment of this application;

[0034] Figure 5 A schematic diagram illustrating the connection relationship between an inductor and a capacitor in one scenario, as provided in an embodiment of this application;

[0035] Figure 6 A schematic diagram illustrating the connection relationship between inductors and capacitors in another scenario provided by an embodiment of this application;

[0036] Figure 7 A schematic diagram of the specific structure of another charging and discharging circuit provided in the embodiments of this application;

[0037] Figure 8 A schematic diagram of another charging and discharging circuit provided in the embodiments of this application;

[0038] Figure 9 A schematic diagram of another charging and discharging circuit provided in the embodiments of this application;

[0039] Figure 10 This is a schematic diagram of another charging and discharging circuit provided in an embodiment of this application.

[0040] Figure label:

[0041] 101-Memory, 102-Processor, 103-Sensor assembly, 104-Multimedia assembly, 105-Power supply, 106-Input / output interface, 11-First switching unit, 12-Second switching unit, 13-Third switching unit, 20-Boost circuit, 30-Buck circuit, 40-Controller, 200-Battery pack, M0-Charge / discharge transistor, M1-First transistor, M2-Second transistor, M3-Third transistor, M4-Fourth transistor, M5-Fifth transistor, M6-Sixth transistor, M7-Seventh transistor, M8-Eighth transistor, M9-Ninth transistor, M10-Tenth transistor, L-Inductor, C-Capacitor, APT-Adapter, R L - Load, GND - Ground, V0 - Output voltage, D2 - Body diode in the second transistor, D3 - Body diode in the third transistor, D4 - Body diode in the fourth transistor, D10 - Body diode in the tenth transistor, k1 - First port, k2 - Second port, P1 - Node. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of this application clearer, the application will now be described in further detail with reference to the accompanying drawings.

[0043] It should be noted that the same reference numerals in the accompanying drawings of this application denote the same or similar structures, and therefore repeated descriptions of them will be omitted. Terms expressing position and direction described in this application are illustrative based on the accompanying drawings, but may be modified as needed, and all such modifications are included within the scope of protection of this application. The accompanying drawings of this application are for illustrating relative positional relationships only and do not represent actual scale.

[0044] It should be noted that, in this application, the words "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner. In the embodiments of this application, the words "first," "second," etc., do not limit the number or order. The term "connection" is used to indicate an electrical connection, including direct connection via wires or connectors or indirect connection via other devices.

[0045] To facilitate understanding of the technical solutions provided in the embodiments of this application, their application scenarios are first described below. The technical solutions provided in the embodiments of this application can be applied to power systems, which may include adapters and terminal devices. The adapter is connected to the power interface of the terminal device. The adapter can charge the battery in the terminal device and also supply power to the load in the terminal device, enabling the terminal device to function normally. The terminal device may include, but is not limited to, personal computers, server computers, mobile devices (such as mobile phones, tablets, media players, etc.), wearable devices, in-vehicle devices, consumer terminal devices, mobile robots, and drones.

[0046] Figure 1 An exemplary schematic diagram of an electrical system provided in an embodiment of this application is shown below. See also: Figure 1As shown, the power system includes an adapter and a terminal device. The terminal device includes a charging module, a load, and a battery pack. The charging module includes a charging / discharging circuit and a circuit board, with the charging / discharging circuit mounted on the circuit board. The charging / discharging circuit has an input terminal, a first output terminal, and a second output terminal. The output terminal of the adapter is connected to the input terminal of the charging / discharging circuit, the first output terminal of the charging / discharging circuit is connected to the load, and the second output terminal of the charging / discharging circuit is connected to the battery pack. The adapter provides input voltage to the terminal device, the charging / discharging circuit converts the input voltage provided by the adapter into an output voltage, and the battery pack stores and releases electrical energy. When the adapter provides input voltage to the terminal device, the charging / discharging circuit converts the input voltage into an output voltage, which can be used to power the load and charge the battery pack. When the input terminal of the charging / discharging circuit does not receive input voltage, the battery pack can provide a discharge voltage, which can then power the load through the charging / discharging circuit.

[0047] Figure 2 An exemplary schematic diagram of a terminal device provided in an embodiment of this application is shown below. See also: Figure 2 As shown, the terminal device is illustrated using a laptop computer as an example. The terminal device may include: a memory 101, a processor 102, a sensor assembly 103, a multimedia assembly 104, a power supply 105, and an input / output interface 106.

[0048] The memory 101 is used to store data, software programs, and software modules.

[0049] The processor 102 is the control center of the terminal device. It connects various parts of the device through various interfaces and lines. It performs various functions of the terminal device and processes data by running or executing software programs and / or software modules stored in the memory 101 and calling data stored in the memory 101.

[0050] Sensor assembly 103 includes one or more sensors for providing various aspects of the terminal device's status assessment. Sensor assembly 103 may include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor. Sensor assembly 103 can detect the terminal device's acceleration / deceleration, orientation, on / off state, relative positioning of components, or temperature changes, etc. Furthermore, sensor assembly 103 may also include a light sensor for detecting ambient light. Figure 2 Only a portion of the sensors are shown in the image.

[0051] The multimedia component 104 includes a screen, which can be a touch panel, and when the screen is a touch panel, it can be implemented as a touchscreen to receive input signals from the user. In addition, the multimedia component 104 may also include a camera for capturing image information. Of course, the multimedia component 104 may also include other devices, which can be configured according to actual needs and are not specifically limited here.

[0052] Power supply 105 is used to provide power to various components of the terminal device. Power supply 105 may include a power management system, one or more power supplies, or other components associated with the generation, management, and distribution of power by the terminal device. In embodiments of this application, power supply 105 may include the charging / discharging circuit or charging module provided herein, and power supply 105 may also include a battery pack. The charging / discharging circuit can be used to power the aforementioned components and also to charge the battery pack.

[0053] Input / output interface 106 provides an interface between processor 102 and peripheral interface modules, such as keyboards, mice, or universal serial bus (USB) devices.

[0054] Although not shown, the terminal device may also include audio components and communication components, such as a microphone for the audio component and a wireless fidelity (WiFi) module or a Bluetooth module for the communication component. These will not be elaborated further in the embodiments of this application. Those skilled in the art will understand that… Figure 2 The terminal device structure shown does not constitute a limitation on the terminal device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. It should be understood that the load may specifically be a processor 102, a memory 101, a sensor assembly 103, a multimedia assembly 104, etc.

[0055] Furthermore, at least some of the structures in the memory 101, processor 102, sensor assembly 103, multimedia assembly 104, power supply 105, and input / output interface 106 can be disposed on the circuit board. For example, but not limited to, the charging and discharging circuit in the power supply 105 is disposed on the circuit board. Various structures can be connected and supported through the circuit board, thereby enabling the power supply 105 to supply power to other structures.

[0056] For the charging and discharging circuit, in scenarios without an external power source, the battery needs to discharge, and the charging and discharging circuit provides energy to the load of the terminal device. In scenarios with an external power source, energy needs to be obtained from the external power source and used to provide energy to the load of the terminal device, while simultaneously charging the battery within the terminal device to maintain its normal operation. Furthermore, in abnormal situations, such as, but not limited to, adapter malfunctions or lightning strikes to the power grid connected to the adapter, the charging and discharging circuit must be protected from damage to further prevent damage to the battery pack and load, thereby improving the safety of the charging and discharging circuit and the terminal device.

[0057] Based on this, embodiments of this application provide a charging and discharging circuit for maintaining the operation of a terminal device and improving safety. Exemplarily, the charging and discharging circuit provided in this application includes: a first switching unit, a boost circuit, a buck circuit, a charging and discharging transistor, and a controller; the input terminal of the first switching unit is used to receive the output voltage of the adapter, the output terminal of the first switching unit is connected to the input terminal of the boost circuit, and the control terminal of the first switching unit is connected to the controller; the output terminal of the boost circuit is connected to the input terminal of the buck circuit, and the control terminal of the boost circuit is connected to the controller; the output terminal of the buck circuit, the first terminal of the charging and discharging transistor, and the battery pack are connected, and the control terminal of the buck circuit is connected to the controller; the second terminal of the charging and discharging transistor is connected to the load, and the control terminal of the charging and discharging transistor is connected to the controller; the controller is used to: control the first switching unit to transmit the output voltage to the boost circuit when the output voltage of the adapter is within a first preset range; control the boost circuit to transmit the output voltage to the buck circuit when the output voltage is greater than a first threshold; control the buck circuit to step down the output voltage and then output a charging voltage to the battery pack and the charging and discharging transistor respectively; and control the charging and discharging transistor to supply power to the load based on the charging voltage.

[0058] Thus, when the adapter's output voltage exceeds the first threshold, the charging voltage output by the buck circuit can be transmitted to the battery pack and the charge / discharge transistor, respectively. The charge / discharge transistor supplies power to the load based on the charging voltage. In this way, the charge / discharge circuit can charge the battery pack while supplying power to the load, achieving simultaneous power supply and charging. Furthermore, if the output voltage exceeds the first preset range, it may indicate an adapter malfunction. This malfunction could be due to a faulty adapter itself or a lightning strike on the power grid connected to the adapter. In this case, the first switching unit can disconnect, preventing the adapter's output voltage from entering the boost circuit, buck circuit, and charge / discharge transistor, thereby preventing the corresponding voltage from entering the load and battery pack. This avoids damage to the boost circuit, buck circuit, load, and battery pack, thus improving the reliability and safety of the charge / discharge circuit.

[0059] It is important to note that the first switching unit primarily functions as a switch and is not used for voltage regulation. Its impact on the output voltage is minimal or negligible. Therefore, when the adapter's output voltage is within the first preset range, the adapter is operating normally. At this point, the output voltage can be transmitted to the boost circuit, where subsequent boost and buck circuits process the output voltage to charge the battery pack and supply power to the load. Furthermore, devices with switching functions can fulfill the function of the first switching unit, simplifying its structure and reducing the cost of the charging and discharging circuit. However, if the first switching unit also has voltage regulation capabilities, the controller needs to control not only the voltage regulation of the first switching unit but also the voltage regulation of the boost or buck circuit when boosting or bucking the output voltage. This increases the controller's complexity and computational load, leading to increased cost and power consumption. Furthermore, it may cause control errors, resulting in significant deviations in the overall voltage regulation, affecting load power supply and battery charging, and ultimately impacting the normal operation of the terminal equipment. If the first switching unit does not have a voltage regulation function, the controller can control the voltage regulation degree of the boost circuit or buck circuit. This can not only reduce the cost and power consumption of the controller, but also reduce the factors that cause voltage regulation deviation, improve the accuracy of the controller, ensure the normal power supply to the load and the charging of the battery pack, and ensure the normal operation of the terminal equipment.

[0060] The following description is based on specific embodiments.

[0061] Figure 3 An exemplary schematic diagram of a charging and discharging circuit provided in an embodiment of this application is shown below. Figure 3 As shown, the charging and discharging circuit may include: a first switching unit 11, a boost circuit 20, a buck circuit 30, a charging and discharging transistor M0, and a controller 40; the input terminal of the first switching unit 11 is used to receive the output voltage V0 of the adapter APT, the output terminal of the first switching unit 11 is connected to the input terminal of the boost circuit 20, and the control terminal of the first switching unit 11 is connected to the controller 40; the output terminal of the boost circuit 20 is connected to the input terminal of the buck circuit 30, and the control terminal of the boost circuit 20 is connected to the controller 40; the output terminal of the buck circuit 30 and the first terminal of the charging and discharging transistor M0 are connected to the battery pack 200, and the control terminal of the buck circuit 30 is connected to the controller 40; the second terminal of the charging and discharging transistor M0 is connected to the load R. L Connect the control terminal of the charge / discharge transistor M0 to the control terminal.

[0062] The controller 40 is configured to: when the output voltage V0 of the adapter APT is within a first preset range, control the first switching unit 11 to transmit the output voltage V0 to the boost circuit 20; when the output voltage V0 is greater than a first threshold, control the boost circuit 20 to transmit the output voltage V0 to the buck circuit 30, control the buck circuit 30 to step down the output voltage V0, and then output charging voltage to the battery pack 200 and the charge / discharge transistor M0 respectively; and control the charge / discharge transistor M0 to charge the load R based on the charging voltage. L powered by.

[0063] Thus, when the output voltage V0 of the adapter APT is greater than the first threshold, the charging voltage output by the buck circuit 30 can be transmitted to the battery pack 200 and the charge / discharge transistor M0 respectively. The charge / discharge transistor M0 uses the charging voltage as the load R. L Power supply, so that the charging and discharging circuit can supply power to the load R L Based on the power supply, the battery pack 200 is charged, thus achieving simultaneous power supply and charging. Furthermore, when the output voltage V0 is within a first preset range, under the control of the controller 40, the first switching unit 11 can transmit the output voltage V0 to the boost circuit 20, with minimal or negligible impact on the magnitude of the output voltage V0. When the output voltage V0 exceeds the first preset range, it may indicate a malfunction in the adapter APT. This malfunction could be due to a fault in the adapter APT itself, a lightning strike on the power grid connected to the adapter APT, or other similar issues. In this case, the first switching unit 11 can disconnect, preventing the output voltage V0 of the adapter APT from entering the boost circuit 20, the buck circuit, and the charge / discharge transistor M0, thereby preventing the corresponding voltage from entering the load R. L And battery pack 200, avoid impacting boost circuit 20, buck circuit 30, and load R. L This will prevent damage to the battery pack 200, thereby improving the reliability of the charging and discharging circuit and the safety of its use.

[0064] Furthermore, the controller 40 can also be used to: control the boost circuit 20 to boost the output voltage V0 and output a charging voltage when the output voltage V0 is less than a second threshold; control the buck circuit 30 to output the charging voltage to the battery pack 200 and the charge / discharge transistor M0 respectively; and control the charge / discharge transistor M0 to output the charging voltage to the load R based on the charging voltage. L Power supply; the second threshold is less than or equal to the first threshold.

[0065] In other words, when the output voltage V0 is less than the second threshold, it indicates that the output voltage V0 is small and needs to be boosted. At this time, the controller 40 controls the boost circuit 20 to boost the output voltage V0, and then transmits it to the battery pack 200 and the charge / discharge transistor M0 through the buck circuit 30. When the output voltage V0 is greater than the first threshold, it indicates that the output voltage V0 is large and needs to be bucked. At this time, the controller 40 controls the buck circuit 30 to buck the output voltage V0, and then transmits it to the battery pack 200 and the charge / discharge transistor M0.

[0066] The first threshold and the second threshold can be determined based on factors such as the type of terminal device including the charging and discharging circuit and the charging voltage of the battery pack 200, and the first threshold and the second threshold can be the same or different. For example, the terminal device is a laptop computer, and the load R in the laptop computer... L The required supply voltage is generally high, such as, but not limited to, 20V, and the charging voltage of the battery pack 200 is also around 20V. In this case, both the first and second thresholds can be 20V. If the adapter APT is a low-voltage adapter, and the output voltage V0 provided by the adapter APT is around 5V, the output voltage V0 is less than the second threshold. In this case, the controller 40 controls the boost circuit 20 to boost the output voltage V0 to 20V, and then transmits it to the battery pack 200 and the charge / discharge transistor M0 through the buck circuit 30. Since the voltage supplied to the battery pack 200 is approximately the charging voltage, the battery pack 200 can be charged. Under the control of the controller 40, the charge / discharge transistor M0 transmits the 20V voltage to the load R. L Implemented as load R L Power is supplied to ensure the normal operation of the laptop. If the adapter APT is a high-voltage adapter, and the output voltage V0 provided by the adapter APT is around 28V, the output voltage V0 is greater than the first threshold. At this time, the controller 40 controls the boost circuit 20 to transmit the output voltage V0 to the buck circuit 30. The buck circuit 30 reduces the output voltage V0 to 20V before transmitting it to the battery pack 200 and the charge / discharge transistor M0. Since the voltage supplied to the battery pack 200 is approximately the charging voltage, the battery pack 200 can be charged. Under the control of the controller 40, the charge / discharge transistor M0 transmits the 20V voltage to the load R. L Implemented as load R L Power is supplied to ensure the normal operation of the laptop. Therefore, the charging and discharging circuit provided in this application embodiment is compatible with adapters (APTs) of different output voltages and different types of adapters (APTs), thereby allowing the selection of the appropriate operating mode according to different adapters (APTs), expanding the application scenarios of the charging and discharging circuit.

[0067] It should be understood that the load R in a laptop L The power supply voltage is not necessarily 20V; it can be other voltages. Similarly, the charging voltage of the battery pack 200 is not necessarily around 20V. The charging voltage of the battery pack 200 depends on the number of batteries included and the charging voltage of each battery. Here, 20V is used as an example for illustration. Furthermore, the voltage that the adapter APT can provide is not limited to 5V or 28V; this is just an example.

[0068] For example, the first preset range can be an acceptable voltage range negotiated between the controller 40 and the adapter APT. The lower limit of the first preset range can be set as the difference between the rated output voltage of the adapter APT and the fourth value, and the upper limit of the first preset range can be set as the sum of the rated output voltage of the adapter APT and the fifth value. For example, the rated output voltage of the adapter APT is represented by Ve, the fourth value is represented by A4, and the fifth value is represented by A5. In this case, the first preset range is [Ve-A4, Ve+V5], where V4 and V5 can be the same or different. The values ​​of the fourth and fifth values ​​can be determined based on factors such as the rated output voltage of the adapter APT. For example, when the rated output voltage of the adapter APT is relatively low, such as 5V, the fourth and fifth values ​​can be set to be smaller, such as the fourth value being, but not limited to, 2V or 3V, and the fifth value being, but not limited to, 2V or 3V, etc. When the rated output voltage of the adapter APT is relatively high, the fourth and fifth values ​​can be set to be larger, such as the fourth value being, but not limited to, 4V, 5V, 6V or 7V, and the fifth value being, but not limited to, 4V, 5V, 6V or 7V, etc.

[0069] The reason for this configuration is that when the adapter APT is working normally, its output voltage V0 (i.e., the actual output voltage) is generally the rated output voltage. Furthermore, when the charging / discharging circuit is powered on, the controller 40 communicates and negotiates with the adapter APT. At this time, the controller 40 obtains the rated output voltage of the adapter APT. Based on this rated output voltage, the controller 40 can determine whether the boost circuit 20 should perform voltage boosting or the buck circuit 30 should perform voltage bucking, thereby satisfying the requirements of the battery pack 200 and the load R. L This is necessary. However, in abnormal situations, the output voltage V0 of the adapter APT may deviate from the rated output voltage. For example, the output voltage V0 may be higher or lower than the rated output voltage. If the lower output voltage V0 is transmitted to the boost circuit 20 and the buck circuit 30, the controller 40 will still control the boost circuit 20 and the buck circuit 30 according to the condition when receiving the rated output voltage. This may cause the output to the battery pack 200 and the load R to be affected. L The voltage does not meet the requirements, causing the battery pack 200 and the load R to...L It cannot function properly; if a higher output voltage V0 is transmitted to the boost circuit 20 and the buck circuit 30, it may damage the boost circuit 20 and the buck circuit 30, which in turn may damage the battery pack 200 and the load R. L Therefore, both lower and higher output voltages V0 are unacceptable and not permitted. Thus, based on the rated output voltage, a first preset range is determined. When the output voltage V0 is within this first preset range, the first switching unit 11 is controlled to transmit the output voltage V0 to the boost circuit 20. This satisfies the requirements of the battery pack 200 and the load R. L This also avoids damage to the boost circuit 20 and the buck circuit 30, thereby preventing damage to the battery pack 200 and the load R. L Damage can be mitigated, thereby improving the safety of use.

[0070] For example, the charge / discharge transistor M0 is based on the charging voltage for the load R. L When supplying power, if the load R L When the required supply voltage is close to the charging voltage, the charge / discharge transistor M0 can directly transmit the charging voltage to the load R without adjusting the charging voltage. L That's fine; if the load R L The required supply voltage differs significantly from the charging voltage. The charge / discharge transistor M0 can adjust the charging voltage to match the load R. L The required supply voltage to meet the load R L The power supply requirements.

[0071] The following is combined with Figure 4 As shown, the specific structures of the first switching unit 11, the boost circuit 20, and the buck circuit 30 are described respectively.

[0072] First switching unit 11 The first switching unit 11 may include a fourth transistor M4. The first terminal of the fourth transistor M4 is used to receive the output voltage V0, the second terminal of the fourth transistor M4 is connected to the input terminal of the boost circuit 20, and the control terminal of the fourth transistor M4 is connected to the controller 40. To avoid overly complex figures, Figure 4 The connection between the control terminal of the fourth transistor M4 and the controller 40 is not shown in the figure; the positive terminal of the body diode D4 in the fourth transistor M4 is connected to the input terminal of the boost circuit 20, and the negative terminal of the body diode D4 in the fourth transistor M4 is used to receive the output voltage V0.

[0073] Specifically, controller 40 is used to: turn on the fourth transistor M4 when the output voltage V0 of adapter APT is within a first preset range; and turn off the fourth transistor M4 when the output voltage V0 of adapter APT exceeds the first preset range. Thus, under the control of controller 40, the fourth transistor M4 can transmit the output voltage V0 of adapter APT to the boost circuit 20, thereby facilitating the boost or buck processing of the output voltage V0 to meet the requirements of battery pack 200 and load R. L This is necessary. Furthermore, by using the body diode D4 in the fourth transistor M4, current is prevented from flowing into the boost circuit 20 when the fourth transistor M4 is in the off state, thus avoiding any impact on the boost circuit 20 and ensuring the normal operation of the charging and discharging circuit.

[0074] Boost circuit 20 The boost circuit 20 may include an inductor L, a fifth transistor M5, and a sixth transistor M6. The first terminal of the inductor L is used to receive the output voltage V0. The second terminal of the inductor L, the first terminal of the fifth transistor M5, and the second terminal of the sixth transistor M6 are connected. The second terminal of the fifth transistor M5 is connected to the input terminal of the buck circuit 30, and the control terminal of the fifth transistor M5 is connected to the controller 40. The first terminal of the sixth transistor M6 is connected to the ground terminal GND, and the control terminal of the sixth transistor M6 is connected to the controller 40.

[0075] The controller 40 is specifically used to: when the output voltage V0 is greater than the first threshold, control the fifth transistor M5 to turn on and the sixth transistor M6 to turn off, so that the output voltage V0 can be transmitted to the buck circuit 30 through the inductor L and the fifth transistor M5, so that the buck circuit 30 can perform buck processing on the output voltage V0; when the output voltage V0 is less than the second threshold, control the fifth transistor M5 and the sixth transistor M6 to turn on alternately, so that the output voltage V0 can be boosted.

[0076] Step-down circuit 30 The step-down circuit 30 may include: a seventh transistor M7, an eighth transistor M8, a ninth transistor M9, and a capacitor C; the first terminal of the seventh transistor M7, the second terminal of the eighth transistor M8, the battery pack 200, and the first terminal of the charge / discharge transistor M0 are connected; the second terminal of the seventh transistor M7, the first terminal of the capacitor C, and the output terminal of the boost circuit 20 are connected; the control terminal of the seventh transistor M7 is connected to the controller 40; the first terminal of the eighth transistor M8, the second terminal of the second capacitor C, and the second terminal of the ninth transistor M9 are connected; the control terminal of the eighth transistor M8 is connected to the controller 40; the first terminal of the ninth transistor M9 is connected to the ground terminal GND; and the control terminal of the ninth transistor M9 is connected to the controller 40.

[0077] The controller 40 is specifically used to: when the output voltage V0 is greater than the first threshold, control the seventh transistor M7 and the eighth transistor M8 to conduct alternately, and keep the conduction states of the seventh transistor M7 and the ninth transistor M9 consistent, so as to realize the step-down processing of the output voltage V0; when the output voltage V0 is less than the second threshold, control the eighth transistor M8 to conduct, and control the seventh transistor M7 and the ninth transistor M9 to be cut off, so as to transmit the boosted voltage output by the boost circuit 20 to the battery pack 200 and the charge / discharge transistor M0, thereby realizing voltage transmission.

[0078] For example, the specific operation of the first switching unit 11, the boost circuit 20, and the buck circuit 30 is as follows:

[0079] 1. When the output voltage V0 of the adapter APT is greater than the first threshold, there is a first working mode and a second working mode, and these two working modes alternate.

[0080] First operating mode: If the output voltage V0 of the adapter APT is within the first preset range, it indicates that the difference between the output voltage V0 and the rated output voltage is small, and the output voltage V0 is basically equal to the rated output voltage. In this case, the controller 40 will control the fourth transistor M4 to transmit the output voltage V0 to the inductor L. The controller 40 controls the fifth transistor M5 to conduct and the sixth transistor M6 to cut off, allowing the output voltage V0 to be transmitted through the inductor L and the fifth transistor M5 to the seventh transistor M7 and the capacitor C. The controller 40 then controls the seventh transistor M7 and the ninth transistor M9 to conduct and controls the eighth transistor M8 to cut off. The charging / discharging transistor M0 is then turned on. At this time, the connection relationship between the inductor L and the capacitor C is as follows: Figure 5 As shown in (a), in this connection, the electrical energy provided by the adapter APT can not only charge the inductor L and capacitor C, but also the load R. L Powered by a 200V battery pack.

[0081] The second operating mode differs from the first in that the controller 40 turns on the eighth transistor M8 and turns off the seventh transistor M7 and the ninth transistor M9. In this mode, the connection relationship between the inductor L and the capacitor C is as follows: Figure 5 As shown in (b), in this connection, since the inductor L and capacitor C are connected in series, and capacitor C is connected between the inductor L and node P1, capacitor C can prevent the power supplied by adapter APT from being supplied to the load R. L Powered by battery pack 200, the electrical energy stored in capacitor C is used to power load R. L Powered by a 200V battery pack.

[0082] Based on the characteristics of inductor L, the current flowing through inductor L cannot change abruptly; the rate of change of current remains essentially constant. Therefore, in the first operating mode, combined with... Figure 5 The structure shown in (a) yields equation 1: V0 - V1 = L0 × (di / dt), where L0 represents the inductance of inductor L, di / dt represents the rate of change of the current flowing through inductor L, V0 represents the output voltage, and V1 represents the voltage at node P1; in the second operating mode, combined with Figure 5 The structure shown in (b) can be used to obtain the following relationship: V0-Vc-V1=L0×(di / dt), where Vc represents the voltage across capacitor C.

[0083] In the first operating mode, capacitor C is connected between node P1 and ground GND, so the voltage of capacitor C is equal to the voltage of node P1, i.e., Vc = V1 (relationship 3). When the duty cycle of the seventh transistor M7 is set to D1, di / dt in relation 1 can be transformed into di / D1, and di / dt in relation 2 can be transformed into di / (1-D1). After integrating relation 1, relation 2 and relation 3, we can obtain equation 1: V1 = V0 × 1 / (2-D1). Since D1 is less than 1, 1 / (2-D1) must be less than 1, and therefore V1 is less than V0. That is, the output voltage of the step-down circuit 30 is less than the input voltage, thus achieving step-down processing.

[0084] Furthermore, when the output voltage V0 of the adapter APT is greater than the first threshold, the fifth transistor M5 is always on and the sixth transistor M6 is always off. Therefore, the current first passes through the inductor L and then enters the buck circuit 30, where it is stepped down. Thus, the inductor L is located on the high-voltage side. When the current changes in the inductor L, according to Faraday's law of electromagnetic induction and Lenz's law, the inductor L generates an electromotive force (EMF) to resist the change in current. This EMF acts to prevent rapid changes in current, thus reducing the rate of change of current at the high-voltage side, and consequently reducing the current. At the low-voltage side, due to the decrease in voltage, the rate of change of current increases, and the inductor L's resistance to current becomes more pronounced, resulting in an increased current. Therefore, placing the inductor L on the high-voltage side reduces the current flowing through it, thereby reducing charging losses and improving charging efficiency.

[0085] 2. When the output voltage V0 is less than the second threshold, there are a third and a fourth working mode, and these two working modes alternate.

[0086] The third operating mode: If the output voltage V0 of the adapter APT is within the first preset range, it indicates that the difference between the output voltage V0 and the rated output voltage is small, and the output voltage V0 is basically equal to the rated output voltage. In this mode, the controller 40 will control the fourth transistor M4 to transmit the output voltage V0 to the inductor L. The controller 40 will control the fifth transistor M5 to turn on, the sixth transistor M6 to turn off, the seventh transistor M7 and the ninth transistor M9 to turn on, and the eighth transistor M8 to turn off. It will also control the charging / discharging transistor M0 to turn on. At this time, the connection relationship between the inductor L and the capacitor C is as follows: Figure 6 As shown in (a), in this connection, the electrical energy provided by the adapter APT can not only charge the inductor L and capacitor C, but also the load R. L Powered by a 200V battery pack.

[0087] The fourth operating mode: The difference between this fourth operating mode and the third operating mode is that the controller 40 controls the sixth transistor M6 to turn on and controls the fifth transistor M5 to turn off. At this time, the connection relationship between the inductor L and the capacitor C is as follows: Figure 6 As shown in (b) above. In this connection, the power supplied by the adapter APT charges the inductor L.

[0088] After alternating between the third and fourth operating modes, the voltage output to node P1 is the superposition of the electrical energy stored in inductor L and the electrical energy provided by adapter APT, thus achieving boost processing.

[0089] Figure 7 An exemplary schematic diagram of another charging and discharging circuit provided in an embodiment of this application is shown below. See also... Figure 7 As shown, the structure of this charging and discharging circuit is the same as that described above. Figure 4 The charging and discharging circuits described herein are basically similar in structure, with the difference being that the structure of the first switching unit 11 is different. For example, the first switching unit 11 further includes a tenth transistor M10. The first terminal of the tenth transistor M10 is connected to the second terminal of the fourth transistor M4. The second terminal of the tenth transistor M10 is connected to the input terminal of the boost circuit 20, for example, the second terminal of the tenth transistor M10 is connected to the inductor L. The control terminal of the tenth transistor M10 and the control terminal of the fourth transistor M4 are connected to the same port of the controller 40, for example, the first port k1. Of course, the control terminals of the fourth transistor M4 and the tenth transistor M10 can also be connected to different ports of the controller 40, as not shown in the diagram.

[0090] Furthermore, the anode of the body diode D10 in the tenth transistor M10 is connected to the second terminal of the fourth transistor M4, and the cathode of the body diode D10 in the tenth transistor M10 is connected to the inductor L. In this case, the body diode D4 in the fourth transistor M4 and the body diode D10 in the tenth transistor M10 are in opposite directions. Thus, the body diode D10 in the tenth transistor M10 prevents current from flowing back into the adapter APT, thereby avoiding any impact on the adapter APT and improving the safety of the adapter APT.

[0091] It should be understood that the structure of this charging and discharging circuit is similar to that described above. Figure 4 The similarities in the structure of the charging and discharging circuits described above can be found in the relevant descriptions above, and the repetitions will not be repeated here.

[0092] Figure 8 An exemplary schematic diagram of another charging and discharging circuit provided in an embodiment of this application is shown below. See also... Figure 8 As shown, the structure of this charging and discharging circuit is the same as that described above. Figure 4 or Figure 7 The charging and discharging circuits described in the text are basically similar in structure, except that the charging and discharging circuit also includes a second switching unit 12, and Figure 8 Therefore Figure 7 As illustrated below. Exemplarily, the input terminal of the second switching unit 12 is connected to the output terminal of the boost circuit 20, and the output terminal of the second switching unit 12 is connected to the load R. L The second terminal of the charging / discharging transistor M0 is connected to the second terminal, and the control terminal of the second switching unit 12 is connected to the controller 40. The controller 40 is also used to: control the boost circuit 20 to boost the output voltage V0 and output the supply voltage when the output voltage V0 is less than the second threshold, and control the second switching unit 12 to transmit the supply voltage to the load R respectively. L And charge / discharge transistor M0, and control charge / discharge transistor M0 to charge battery pack 200 based on supply voltage.

[0093] Thus, when the output voltage V0 is less than the second threshold, the boost circuit 20 can be controlled to boost the output voltage V0, and then the second switching unit 12 can be controlled to directly transmit the boosted supply voltage to the load R. L Meanwhile, the buck circuit 30 will no longer transmit the supply voltage to the battery pack 200. That is, when the second switching unit 12 is provided, the boosted supply voltage is preferentially output through the second switching unit 12; when the second switching unit 12 is not provided, it is output through the buck circuit 30. This provides more transmission paths for the supply voltage, preventing the buck circuit 30 from failing to supply power to the load R when it malfunctions. LThe battery pack 200 provides electrical energy, thereby ensuring the normal operation of the charging and discharging circuit.

[0094] Furthermore, when the adapter APT is connected to the charging / discharging circuit, the battery pack 200 needs to be charged, and the load R... L When power is needed, the power provided by the adapter APT is used partly to charge the battery pack 200 and partly to power the load R. L Power supply; when battery pack 200 is fully charged, controller 40 will control the charge / discharge transistor M0 to turn off, stopping charging of battery pack 200, but will continue to supply power to load R. L Power supply. When the adapter APT is disconnected from the charging / discharging circuit, the load R... L When power is needed, the controller 40 will control the charging and discharging transistor M0 to turn on, so that the electrical energy released by the battery pack 200 can be used to power the load R. L Power is supplied to ensure the normal operation of terminal equipment.

[0095] Furthermore, the second switching unit 12 may include a first transistor M1, the first terminal of which is connected to the output terminal of the boost circuit 20, and the second terminal of which is connected to the load R. L The second terminal of the charging / discharging transistor M0 is connected to the second terminal, and the control terminal of the first transistor M1 is connected to the controller 40. Since the seventh transistor M7 and the ninth transistor M9 need to be turned on when selecting to output the supply voltage through the buck circuit 30, it is necessary to control the conduction of two transistors at this time. The second switching unit 12 includes one transistor, and the supply voltage can be output by turning on this one transistor. Compared with the supply voltage transmitted by the buck circuit 30, the number of transistors turned on is reduced, thereby reducing voltage drop, reducing losses, and improving power supply efficiency.

[0096] It should be understood that the structure of this charging and discharging circuit is similar to that described above. Figure 4 or Figure 7 The similarities in the structure of the charging and discharging circuits described above can be found in the relevant descriptions above, and the repetitions will not be repeated here.

[0097] Figure 9 An exemplary schematic diagram of another charging and discharging circuit provided in an embodiment of this application is shown below. See also... Figure 9 As shown, the structure of this charging and discharging circuit is the same as that described above. Figure 4 or Figure 7 The charging and discharging circuits described in the text are basically similar in structure, except that the charging and discharging circuit also includes a third switching unit 13, and Figure 9 Therefore Figure 7As illustrated below. Exemplarily, the input terminal of the third switching unit 13 is connected to the input terminal of the boost circuit 20, and the output terminal of the third switching unit 13 is connected to the input terminal of the buck circuit 30; the controller 40 is further configured to: control the third switching unit 13 and the buck circuit 30 to transmit the output voltage V0 to the battery pack 200 and the charge / discharge transistor M0 when the output voltage V0 meets the pass-through condition, and control the charge / discharge transistor M0 to load R based on the output voltage V0. L powered by.

[0098] Thus, if the output voltage V0 meets the pass-through condition, it means that the output voltage V0 is close to the charging voltage of the battery pack 200. At this time, the charging and discharging circuit does not need to perform boosting and bucking processing on the output voltage V0. The output voltage V0 can be directly transmitted to the battery pack 200. Therefore, the third switching unit 13 mainly plays the role of switching and is not used for voltage regulation. Its influence on the magnitude of the output voltage V0 is small or even negligible. This can not only reduce the control complexity of the controller 40 and reduce the amount of calculation of the controller 40, but also reduce the power consumption of the controller 40 and improve the power supply efficiency.

[0099] The pass-through condition may include: load R L The operating power is less than the third threshold, and the output voltage V0 is within the third preset range. The lower limit of the third preset range is the difference between the charging voltage of the battery pack 200 and the second value, and the upper limit of the third preset range is the sum of the charging voltage of the battery pack 200 and the third value. The second and third values ​​can be the same or different. The second and third values ​​can be determined based on the charging voltage that the battery pack 200 can accept, and the third threshold can be determined based on the voltage required for the operation. No specific limitations are imposed here.

[0100] Thus, when the output voltage V0 is within the third preset range, it indicates that the output voltage V0 is close to the charging voltage of the battery pack 200, under the load R L When the operating power of the load RL is less than the third threshold, it indicates that the operating power required for the current service being processed by the load RL is not large. Therefore, at this time, the power required for the opposite load R is not large. L The output voltage doesn't have high requirements; it only needs to be close to the charging voltage of the 200mAh battery pack to meet the load R. L Therefore, in this case, the battery pack charging at 200 is used as the reference. This eliminates the need for boosting or bucking the output voltage V0, and the charging / discharging transistor M0 also requires no special processing and can be directly transmitted, thereby reducing losses and improving efficiency.

[0101] For example, the third switching unit 13 may include a second transistor M2 and a third transistor M3. The first terminal of the second transistor M2 is connected to the input terminal of the boost circuit 20, and the second terminal of the second transistor M2 is connected to the first terminal of the third transistor M3. The control terminals of both the second transistor M2 and the third transistor M3 are connected to the controller 40. For example, the control terminals of the second transistor M2 and the third transistor M3 are connected to the same port of the controller 40, such as the second port k2, or they are connected to different ports of the controller 40. The second terminal of the third transistor M3 is connected to the input terminal of the buck circuit 30. The body diode D2 in the second transistor M2 and the body diode D3 in the third transistor M3 have opposite directions. Since both the input and output terminals of the third switching unit 13 have voltage, and the magnitude of the voltage at both terminals may vary under different conditions, by setting the body diode D2 in the second transistor M2 and the body diode D3 in the third transistor M3, bidirectional current reverse flow can be avoided, thereby ensuring the normal operation of the charging and discharging circuit.

[0102] It should be understood that the structure of this charging and discharging circuit is similar to that described above. Figure 4 or Figure 7 The similarities in the structure of the charging and discharging circuits described above can be found in the relevant descriptions above, and the repetitions will not be repeated here.

[0103] Figure 10 An exemplary schematic diagram of another charging and discharging circuit provided in an embodiment of this application is shown below. See also... Figure 10 As shown, the structure of this charging and discharging circuit is the same as that described above. Figure 8 The charging and discharging circuits described herein are basically similar in structure, with the difference being that the charging and discharging circuit includes a third switching unit 13 in addition to the second switching unit 12. For example, the input terminal of the third switching unit 13 is connected to the input terminal of the boost circuit 20, and the output terminal of the third switching unit 13 is connected to the input terminal of the second switching unit 12. The controller 40 is further configured to: when the output voltage V0 meets the pass-through condition, control the third switching unit 13 and the second switching unit 12 to transmit the output voltage V0 to the load R. L And charge / discharge transistor M0, and control charge / discharge transistor M0 to charge battery pack 200 based on output voltage V0.

[0104] Thus, if the output voltage V0 meets the pass-through condition, it means that the output voltage V0 is close to the charging voltage of the battery pack 200. At this time, the charging and discharging circuit does not need to perform boosting and bucking processing on the output voltage V0. The output voltage V0 can be directly transmitted to the battery pack 200. Therefore, the third switching unit 13 mainly plays the role of switching and is not used for voltage regulation. Its influence on the magnitude of the output voltage V0 is small or even negligible. This can not only reduce the control complexity of the controller 40 and reduce the amount of calculation of the controller 40, but also reduce the power consumption of the controller 40 and improve the power supply efficiency.

[0105] The pass-through condition may include: load R L The operating power is greater than or equal to the third threshold, and the output voltage V0 is within the second preset range, the lower limit of the second preset range being the load R. L The difference between the maximum operating voltage and the first value, and the upper limit of the second preset range is the load R. L Maximum operating voltage; or, load R L The operating power is less than the third threshold, and the output voltage V0 is within the third preset range. The lower limit of the third preset range is the difference between the charging voltage of the battery pack 200 and the second value, and the upper limit of the third preset range is the sum of the charging voltage of the battery pack 200 and the third value. The first value can be determined based on the load R. L The voltage required for the operating power is determined, but no specific limit is specified here.

[0106] Thus, when the output voltage V0 is within the third preset range, it indicates that the output voltage V0 is close to the charging voltage of the battery pack 200, under the load R L When the operating power is less than the third threshold, it indicates that the load R L The current processing power required is not high, so the opposing load R is currently... L The output voltage doesn't have high requirements; it only needs to be close to the charging voltage of the 200mAh battery pack to meet the load R. L Therefore, in this case, the battery pack charging at 200V is used as the baseline. This eliminates the need for boosting or bucking the output voltage V0, and the charge / discharge transistor M0 requires no special processing; it can be directly transmitted, thus reducing losses and improving efficiency. Under load R... L When the operating power is greater than or equal to the third threshold, it indicates that the load R L The current processing task requires a large amount of operating power, so power is supplied to the load R. L The output voltage needs to be close to the maximum operating voltage to meet the operational requirements of the business. Therefore, in this case, the load R is used. L Based on this, when the output voltage V0 is within the second preset range, it indicates that the output voltage V0 is close to the load R. L The maximum operating voltage can meet the load RL This eliminates the need for boosting or bucking the output voltage V0, allowing for direct transmission and thus improving the load capacity R. L Work efficiency.

[0107] For example, the third switching unit 13 may also include a second transistor M2 and a third transistor M3, and the arrangement of the second transistor M2 and the third transistor M3 is the same as described above. Figure 9 The embodiments described herein are the same, except that the second terminal of the third transistor M3 is connected to the input terminal of the second switching unit 12.

[0108] It should be noted that the charging and discharging circuit described in this embodiment can be considered as described above. Figure 8 The embodiments described herein and the foregoing Figure 9 The embodiments described herein are combinations thereof, so the specific implementation of the second switching unit 12 can be found in the foregoing. Figure 8 The specific implementation of the third switching unit 13 in the embodiments described herein can be found in the foregoing. Figure 9 The embodiments described herein will not be repeated here.

[0109] It should be understood that the transistor in the embodiments of this application may refer to a metal oxide semiconductor (MOS), and the type of the transistor may include an N-type metal oxide semiconductor (NMOS) transistor and a P-type metal oxide semiconductor (PMOS) transistor. The transistor may also be other types of transistors, such as silver nitride transistors.

[0110] Obviously, those skilled in the art can make various modifications and variations to the embodiments of this application without departing from the spirit and scope of the embodiments of this application. Therefore, if these modifications and variations to the embodiments of this application fall within the scope of the claims of this application and their equivalents, this application also intends to include these modifications and variations.

Claims

1. A charging and discharging circuit, characterized in that, include: The system comprises a first switching unit, a boost circuit, a buck circuit, a charge / discharge transistor, and a controller. The input terminal of the first switching unit receives the output voltage from the adapter. The output terminal of the first switching unit is connected to the input terminal of the boost circuit, and the control terminal of the first switching unit is connected to the controller. The output terminal of the boost circuit is connected to the input terminal of the buck circuit, and the control terminal of the boost circuit is connected to the controller. The output terminal of the buck circuit, the first terminal of the charge / discharge transistor, and the battery pack are connected. The control terminal of the buck circuit is connected to the controller. The second terminal of the charge / discharge transistor is connected to the load, and the control terminal of the charge / discharge transistor is connected to the controller. The controller is used for: When the output voltage of the adapter is within a first preset range, the first switching unit is controlled to transmit the output voltage to the boost circuit; When the output voltage is greater than the first threshold, the boost circuit is controlled to transmit the output voltage to the buck circuit, the buck circuit is controlled to step down the output voltage, and then outputs charging voltage to the battery pack and the charge / discharge transistor respectively, and the charge / discharge transistor is controlled to supply power to the load based on the charging voltage.

2. The charging and discharging circuit as described in claim 1, characterized in that, The controller is further configured to: when the output voltage is less than a second threshold, control the boost circuit to boost the output voltage and output the charging voltage, control the buck circuit to output the charging voltage to the battery pack and the charge / discharge transistor respectively, and control the charge / discharge transistor to supply power to the load based on the charging voltage; the second threshold is less than or equal to the first threshold.

3. The charging and discharging circuit as described in claim 1, characterized in that, The charging and discharging circuit further includes a second switching unit, the input terminal of which is connected to the output terminal of the boost circuit, the output terminal of which is connected to the load and the second terminal of the charging and discharging transistor respectively, and the control terminal of which is connected to the controller. The controller is further configured to: when the output voltage is less than a second threshold, control the boost circuit to boost the output voltage and output a supply voltage, control the second switching unit to transmit the supply voltage to the load and the charge / discharge transistor respectively, and control the charge / discharge transistor to charge the battery pack based on the supply voltage; the second threshold is less than or equal to the first threshold.

4. The charging and discharging circuit as described in claim 3, characterized in that, The second switching unit includes a first transistor, the first terminal of which is connected to the output terminal of the boost circuit, the second terminal of which is connected to the load and the second terminal of the charge / discharge transistor, and the control terminal of which is connected to the controller.

5. The charging and discharging circuit as described in claim 3 or 4, characterized in that, The charging and discharging circuit further includes a third switching unit, the input terminal of which is connected to the input terminal of the boost circuit, and the output terminal of which is connected to the input terminal of the second switching unit. The controller is also configured to: control the third switching unit and the second switching unit to transmit the output voltage to the load and the charge / discharge transistor when the output voltage meets the pass-through condition, and control the charge / discharge transistor to charge the battery pack based on the output voltage.

6. The charging and discharging circuit as described in claim 5, characterized in that, The direct access conditions include: The operating power of the load is greater than or equal to a third threshold, and the output voltage is within a second preset range. The lower limit of the second preset range is the difference between the maximum operating voltage of the load and a first value, and the upper limit of the second preset range is the maximum operating voltage of the load. Alternatively, the operating power of the load is less than the third threshold, and the output voltage is within a third preset range, wherein the lower limit of the third preset range is the difference between the charging voltage of the battery pack and the second value, and the upper limit of the third preset range is the sum of the charging voltage of the battery pack and the third value.

7. The charging and discharging circuit as described in claim 5 or 6, characterized in that, The third switching unit includes a second transistor and a third transistor. The first terminal of the second transistor is connected to the input terminal of the boost circuit, and the second terminal of the second transistor is connected to the first terminal of the third transistor. The control terminals of the second transistor and the third transistor are both connected to the controller. The second terminal of the third transistor is connected to the input terminal of the second switching unit. The body diode in the second transistor and the body diode in the third transistor are in opposite directions.

8. The charging and discharging circuit according to any one of claims 1-7, characterized in that, The first switching unit includes a fourth transistor, the first terminal of which is used to receive the output voltage, the second terminal of which is connected to the input terminal of the boost circuit, and the control terminal of which is connected to the controller; the positive terminal of the body diode in the fourth transistor is connected to the input terminal of the boost circuit, and the negative terminal of the body diode in the fourth transistor is used to receive the output voltage.

9. The charging and discharging circuit according to any one of claims 1-8, characterized in that, The boost circuit includes an inductor, a fifth transistor, and a sixth transistor. The first terminal of the inductor is used to receive the output voltage. The second terminal of the inductor, the first terminal of the fifth transistor, and the second terminal of the sixth transistor are connected together. The second terminal of the fifth transistor is connected to the input terminal of the buck circuit, and the control terminal of the fifth transistor is connected to the controller. The first terminal of the sixth transistor is connected to the ground terminal, and the control terminal of the sixth transistor is connected to the controller.

10. The charging and discharging circuit according to any one of claims 1-9, characterized in that, The step-down circuit includes a seventh transistor, an eighth transistor, a ninth transistor, and a capacitor. The first terminal of the seventh transistor, the second terminal of the eighth transistor, the battery pack, and the first terminal of the charge / discharge transistor are connected. The second terminal of the seventh transistor, the first terminal of the capacitor, and the output terminal of the boost circuit are connected. The control terminal of the seventh transistor is connected to the controller. The first terminal of the eighth transistor, the second terminal of the second capacitor, and the second terminal of the ninth transistor are connected. The control terminal of the eighth transistor is connected to the controller. The first terminal of the ninth transistor is connected to ground. The control terminal of the ninth transistor is connected to the controller.

11. A charging module, characterized in that, include: The circuit board, and the charging / discharging circuit as described in any one of claims 1-10, wherein the charging / discharging circuit is disposed on the circuit board.

12. A terminal device, characterized in that, include: The battery pack, and the charging module as described in claim 11, wherein the charging module is connected to the battery pack.

13. An electrical system, characterized in that, include: The adapter, and the terminal device as described in claim 12, wherein the adapter is connected to the power interface of the terminal device.

14. A charging and discharging control method, characterized in that, The charging and discharging control method includes: When the output voltage of the adapter is within a first preset range, the first switching unit transmits the output voltage to the boost circuit; When the output voltage is greater than the first threshold, the boost circuit transmits the output voltage to the buck circuit. After the buck circuit reduces the output voltage, it outputs a charging voltage to the battery pack and the charge / discharge transistor, and controls the charge / discharge transistor to supply power to the load based on the charging voltage.

15. The charging and discharging control method as described in claim 14, characterized in that, The charging and discharging control method further includes: when the output voltage is less than a second threshold, the boost circuit boosts the output voltage and outputs a supply voltage, the second switching unit transmits the supply voltage to the load and the charging and discharging transistor respectively, and the charging and discharging transistor charges the battery pack based on the supply voltage; Wherein, the second threshold is less than or equal to the first threshold; the charging and discharging circuit further includes a second switching unit, the input terminal of the second switching unit is connected to the output terminal of the boost circuit, the output terminal of the second switching unit is connected to the load and the second terminal of the charging and discharging transistor respectively, and the control terminal of the second switching unit is connected to the controller.

16. The charging and discharging control method as described in claim 15, characterized in that, The charging and discharging control method further includes: when the output voltage meets the pass-through condition, the third switching unit and the second switching unit transmit the output voltage to the load and the charging and discharging transistor, and control the charging and discharging transistor to charge the battery pack based on the output voltage; The charging and discharging circuit further includes the third switching unit, the input terminal of which is connected to the input terminal of the boost circuit, and the output terminal of which is connected to the input terminal of the second switching unit.