Power switching system and method thereof, computer readable storage medium and processor
By using a switching circuit composed of field effect transistors in a dual-power supply system, adaptive switching between multiple power supplies is achieved, and the problems of large losses and low efficiency in the prior art are solved, ensuring that the load can be powered stably and efficiently.
Patent Information
- Application Number
- CN202110015205.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-06
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2041-01-06
AI Technical Summary
In the prior art, in the dual power supply system, due to the large conduction voltage of the diode, the power supply loss is large and the efficiency is low, and the battery voltage decreases after passing through the diode, so the load cannot be effectively driven.
Multiple switching circuits are adopted, and each switching circuit is connected with a field effect transistor. The state of the field effect transistor is controlled through the control circuit, and adaptive switching between multiple power supplies is realized to ensure that the target power supply can effectively supply the load.
Through the switching circuit composed of field effect transistors, adaptive switching of power supply in multi-power supply system is realized, reducing losses, improving efficiency, and ensuring that the load can be powered stably and efficiently.
Smart Images

Figure CN112711320B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of switching, and in particular to a power switching system and method thereof, a computer-readable storage medium and a processor. Background Art
[0002] Many portable electronic products are powered by batteries and use an AC adapter as an external power source, that is, dual power supply. When the adapter is not plugged in, the load is powered by the battery; when the adapter is plugged in, the load is powered by the adapter. In the design of this dual power supply system, the relevant technology is to connect a diode in series with the adapter branch and the battery branch, and require the adapter power supply voltage to be greater than the battery voltage. This solution is simple to design, but due to the large conduction voltage of the diode, the power supply loss is large and the efficiency is low. It will also cause the battery voltage to drop too much after passing through the diode and cannot drive the load, resulting in a poor user experience.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present invention provide a power switching system and method thereof, a computer-readable storage medium and a processor, so as to at least solve the technical problems in the related art of large power loss and low efficiency when multiple power supplies are switched for power supply.
[0005] According to one aspect of an embodiment of the present invention, a power switching system is provided, which includes: multiple power supplies; multiple switching circuits, the input ends of the multiple switching circuits are connected to the multiple power supplies in a one-to-one correspondence, the output ends of the multiple switching circuits are connected to a load, a field effect transistor is connected between the input end and the output end of each switching circuit, and the multiple switching circuits are used to switch a target power supply among the multiple power supplies to power the load based on the states of the multiple field effect transistors; a control circuit, the multiple output ends of the control circuits are connected to the control ends of the multiple switching circuits in a one-to-one correspondence, the control ends of the multiple switching circuits are respectively connected to the multiple field effect transistors, and the control circuit is used to control the states of the multiple field effect transistors.
[0006] Optionally, each switching circuit includes: a first field effect transistor, the source of the first field effect transistor is connected to the input end of each switching circuit, the gate of the first field effect transistor is connected to the first control end of each switching circuit, and the first control end of each switching circuit is connected to the first output end of the control circuit; a second field effect transistor, the drain of the second field effect transistor is connected to the drain of the first field effect transistor, the source of the second field effect transistor is connected to the output end of each switching circuit, the gate of the second field effect transistor is connected to the second control end of each switching circuit, and the second control end of each switching circuit is connected to the second output end of the control circuit.
[0007] Optionally, each switching circuit also includes: a first resistor connected in series between the source and the gate of the first field effect transistor; a first diode, the anode of the first diode is connected to the gate of the first field effect transistor, and the cathode of the first diode is connected to the source of the first field effect transistor; a second resistor connected in series between the source and the gate of the second field effect transistor; a second diode, the anode of the second diode is connected to the gate of the second field effect transistor, and the cathode of the second diode is connected to the source of the second field effect transistor.
[0008] Optionally, the control circuit includes: a controller, the controller is used to generate multiple control instructions; multiple drive circuits, the input ends of the multiple drive circuits are connected one-to-one with multiple output ends of the controller, and the output ends of the multiple drive circuits are connected one-to-one with multiple output ends of the control circuit, wherein the multiple drive circuits are used to control the states of multiple field effect transistors based on multiple control instructions.
[0009] Optionally, each driving circuit includes: a first transistor, the emitter of the first transistor is connected to the ground, the base of the first transistor is connected to the first input terminal of each driving circuit, and the first input terminal of each driving circuit is connected to the first output terminal of the controller; a third resistor, the first end of the third resistor is connected to the collector of the first transistor, the second end of the third resistor is connected to the first output terminal of each driving circuit, and the first output terminal of each driving circuit is connected to the first control terminal of the switching circuit; a second transistor, the emitter of the second transistor is connected to the ground, the base of the second transistor is connected to the second input terminal of each driving circuit, and the second input terminal of each driving circuit is connected to the second output terminal of the controller; a fourth resistor, the first end of the fourth resistor is connected to the collector of the second transistor, the second end of the fourth resistor is connected to the second output terminal of each driving circuit, and the second output terminal of each driving circuit is connected to the second output terminal of the switching circuit.
[0010] Optionally, each driving circuit further includes: a fifth resistor connected in series between the base of the first transistor and the first input terminal of each driving circuit; and a sixth resistor connected in series between the base of the second transistor and the second input terminal of each driving circuit.
[0011] Optionally, the system also includes: a detection circuit, wherein an input end of the detection circuit is connected to a first power supply among multiple power supplies, an output end of the detection circuit is connected to an input end of a control circuit, the detection circuit is used to detect a voltage of the first power supply, and the control circuit is used to control the states of multiple field effect transistors based on the voltage of the first power supply.
[0012] Optionally, the detection circuit includes: a seventh resistor, a first end of the seventh resistor is connected to the input end of the detection circuit, and a second end of the seventh resistor is connected to the output end of the detection circuit; an eighth resistor, a first end of the eighth resistor is connected to the second end of the seventh resistor and the output end of the detection circuit, and a second end of the eighth resistor is grounded.
[0013] Optionally, the detection circuit further includes: a ninth resistor connected in series between the second end of the seventh resistor and the output end of the detection circuit; and a capacitor connected in parallel with the eighth resistor.
[0014] Optionally, the multiple power supplies include: a first power supply for converting alternating current into a first direct current; and a second power supply for outputting a second direct current.
[0015] According to another aspect of an embodiment of the present invention, a power switching method is also provided, the method comprising: determining a target power supply among multiple power supplies through a control circuit, wherein the multiple power supplies are switched respectively through multiple switching circuits, and each switching circuit is connected to a field effect transistor; controlling the states of the multiple field effect transistors through the control circuit, wherein the states include: an on state or an off state; based on the states of the multiple field effect transistors, switching the target power supply through multiple switching circuits to power a load, wherein the switching circuit is composed of field effect transistors.
[0016] Optionally, a target power supply among multiple power supplies is determined by a control circuit, and the method further includes: detecting a voltage value of a first power supply among the multiple power supplies by a detection module; and determining the target power supply based on the voltage of the first power supply by the control circuit.
[0017] Optionally, the target power supply is determined based on the voltage of the first power supply by the control circuit, and the method also includes: judging whether the voltage of the first power supply is greater than a first preset voltage; determining the first power supply as the target power supply when the voltage of the first power supply is greater than the first preset voltage; and determining the second power supply as the target power supply when the voltage of the first power supply is less than or equal to the first preset voltage, wherein the second power supply is a power supply other than the first power supply among the multiple power supplies.
[0018] Optionally, when the first power supply is determined to be the target power supply, the states of multiple field effect transistors are controlled by a control circuit, and the method also includes: controlling the second field effect transistor in the switching circuit corresponding to the second power supply to be turned off by the control circuit; controlling the first field effect transistor in the switching circuit corresponding to the first power supply to be turned on by the control circuit; controlling the first field effect transistor in the switching circuit corresponding to the second power supply to be turned off by the control circuit; and controlling the second field effect transistor in the switching circuit corresponding to the first power supply to be turned on by the control circuit.
[0019] Optionally, when the second power supply is determined to be the target power supply, the states of multiple field effect transistors are controlled by a control circuit, and the method also includes: controlling the first field effect transistor in the switching circuit corresponding to the first power supply to be turned off by the control circuit; and controlling the second field effect transistor in the switching circuit corresponding to the second power supply to be turned on by the control circuit.
[0020] Optionally, when the second power supply is determined to be the target power supply, the states of multiple field effect transistors are controlled by a control circuit, and the method also includes: judging by the control circuit whether the voltage of the first power supply is less than the second preset voltage, and whether the voltage of the first power supply rises to the first preset voltage within a preset time period; when the voltage of the first power supply is less than the second preset voltage, and the voltage of the first power supply does not rise to the first preset voltage within the preset time period, controlling the first field effect transistor in the switching circuit corresponding to the first power supply to be turned off by the control circuit, and controlling the second field effect transistor in the switching circuit corresponding to the second power supply to be turned on; when the voltage of the first power supply is greater than or equal to the second preset voltage, or when the voltage of the first power supply rises to the first preset voltage within the preset time period, controlling the first field effect transistor and the second field effect transistor in the switching circuit corresponding to the first power supply to be turned off by the control circuit, and controlling the first field effect transistor in the switching circuit corresponding to the second power supply to be turned on.
[0021] Optionally, when a first power supply among multiple power supplies supplies power to a second power supply among the multiple power supplies, the method also includes: controlling the first field effect transistor and the second field effect transistor in the switching circuit corresponding to the first power supply to be turned on through a control circuit, and controlling the first field effect transistor and the second field effect transistor in the switching circuit corresponding to the second power supply to be turned on.
[0022] Optionally, the method also includes: determining whether the voltage of the first power supply is greater than or equal to a third preset voltage; when the voltage of the first power supply is less than the third preset voltage, controlling the second field effect transistor in the switching circuit corresponding to the first power supply to be turned off through the control circuit, and controlling the second field effect transistor in the switching circuit corresponding to the second power supply to be turned off.
[0023] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium includes a stored program. When the program is executed, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned power switching method.
[0024] According to another aspect of an embodiment of the present invention, a processor is further provided, and the processor is used to run a program, wherein the power switching method described above is executed when the program is run.
[0025] In an embodiment of the present invention, a target power source among multiple power sources is determined by a control circuit, and the states of multiple field effect transistors are controlled by the control circuit. Then, based on the states of the multiple field effect transistors, multiple switching circuits are used to switch the target power source to power the load. In the related art, a diode is connected in series to each of the multiple power supply branches. Since the diode has a large conduction voltage, the power supply loss is large and the efficiency is low. It also causes the battery voltage to drop too much after passing through the diode and cannot drive the load. The present invention adopts a field effect transistor to form a switching circuit, and controls the on / off state of the field effect transistor through a control circuit, so as to achieve the purpose of determining the target power source among multiple power sources to power the load, thereby realizing the technical effect of adaptive power switching in a multi-power supply system, and further solving the technical problem of large loss and low efficiency when multiple power sources switch power supply in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0027] Figure 1 is a schematic diagram of a power switching system according to an embodiment of the present invention;
[0028] Figure 2 is a schematic diagram of an optional power switching principle diagram according to an embodiment of the present invention;
[0029] Figure 3 is a schematic diagram of an optional power switching system according to an embodiment of the present invention;
[0030] Figure 4 is a schematic diagram of an optional switching circuit power supply path according to an embodiment of the present invention;
[0031] Figure 5 is a schematic diagram of an optional switching circuit power supply path according to an embodiment of the present invention;
[0032] Figure 6 is a schematic diagram of an optional switching circuit power supply path according to an embodiment of the present invention;
[0033] Figure 7 is a schematic diagram of an optional switching circuit power supply path according to an embodiment of the present invention;
[0034] Figure 8 is a flow chart of an optional circuit switching method according to an embodiment of the present invention;
[0035] Fig. 9 is a flow chart of a power switching method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0036] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0037] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0038] Example 1
[0039] According to an embodiment of the present invention, a power switching system is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0040] According to an embodiment of the present invention, a power switching system is provided. Figure 1 is a schematic diagram of a power switching system according to an embodiment of the present invention. Figure 1 As shown, the power switching system includes: multiple power supplies 12, multiple switching circuits 14 and a control circuit 16.
[0041] Among them, the input ends of the multiple switching circuits are connected to the multiple power supplies one-to-one, the output ends of the multiple switching circuits are connected to the load 10, a field effect transistor 142 is connected between the input end and the output end of each switching circuit, and the multiple switching circuits are used to switch the target power supply among the multiple power supplies to power the load based on the states of the multiple field effect transistors; the multiple output ends of the control circuit are connected to the control ends of the multiple switching circuits one-to-one, the control ends of the multiple switching circuits are respectively connected to the multiple field effect transistors, and the control circuit is used to control the states of the multiple field effect transistors.
[0042] Among them, each of the multiple power supplies can supply power to the load. The specific power supply that supplies power to the load needs to be determined by a certain control signal. Each power supply can be an AC power supply or a DC power supply.
[0043] In an optional embodiment, the multiple power sources can be a combination of an adapter and a battery, or a combination of three or more other power sources. The combination of multiple power sources is not specifically limited herein, wherein the adapter can be a Type-C port adapter that supports the fast charging protocol, or a DC port adapter, or a Mini USB interface adapter, or a Lightning interface adapter; the battery can be a battery pack or a power bank, and the battery voltage can be direct battery output or DC / DC regulated output.
[0044] Among them, the number of field effect transistors in each switching circuit in the multiple switching circuits is at least 1, and power switching is performed by controlling the conduction and shutdown of each field effect transistor, and switching to the target power supply to power the load, wherein the target power supply is any one of the multiple power supplies.
[0045] Among them, multiple output ends of the control circuit can be used to send control signals to the control end of the switching circuit, and the control end of the switching circuit is connected to the field effect transistor, so as to control the working state of the field effect transistor after receiving the corresponding control signal.
[0046] Furthermore, the control circuit may include a controller, and the controller may control multiple switching circuits respectively through multiple control ports, and each switching circuit receives a control signal output by a connected control port.
[0047] In an optional embodiment, the controller may be composed of two control chips, one on the mainboard side and the other on the battery side, namely MCU UND1 and MCU UND2. UND1 and UND2 may communicate through multiple pins or may communicate through a single pin. MCU UND1 and MCU UND2 may send control signals to corresponding switching circuits respectively, and each switching circuit controls the conduction and disconnection of a field effect transistor based on the control signal.
[0048] In an embodiment of the present invention, a target power source among multiple power sources is determined by a control circuit, and the states of multiple field effect transistors are controlled by the control circuit. Then, based on the states of the multiple field effect transistors, multiple switching circuits are used to switch the target power source to power the load. In the related art, a diode is connected in series to each of the multiple power supply branches. Since the diode has a large conduction voltage, the power supply loss is large and the efficiency is low. It also causes the battery voltage to drop too much after passing through the diode and cannot drive the load. The present invention adopts a field effect transistor to form a switching circuit, and controls the on / off state of the field effect transistor through a control circuit, so as to achieve the purpose of determining the target power source among multiple power sources to power the load, thereby realizing the technical effect of adaptive power switching in a multi-power supply system, and further solving the technical problem of large loss and low efficiency when multiple power sources switch power supply in the related art.
[0049] Optionally, each switching circuit includes: a first field effect transistor, the source of the first field effect transistor is connected to the input end of each switching circuit, the gate of the first field effect transistor is connected to the first control end of each switching circuit, and the first control end of each switching circuit is connected to the first output end of the control circuit; a second field effect transistor, the drain of the second field effect transistor is connected to the drain of the first field effect transistor, the source of the second field effect transistor is connected to the output end of each switching circuit, the gate of the second field effect transistor is connected to the second control end of each switching circuit, and the second control end of each switching circuit is connected to the second output end of the control circuit.
[0050] In an optional embodiment, when multiple power sources are adapters and batteries, Figure 2 As shown, the system includes: two switching circuits, the input end of one switching circuit is the Vaadapter end, which is connected to the adapter; the input end of the other switching circuit is the Vbatter end, which is connected to the battery; the output ends of the two switching circuits are the Vbus ends, which are connected to the load. For example, take the switching circuit connected to the adapter as an example:
[0051] The switching circuit includes a first field effect transistor Q8 and a second field effect transistor Q1, wherein the source of Q8 is connected to the Vaadapter terminal of the switching circuit, the Vaadapter terminal of the switching circuit is used to receive the electric energy input by the adapter, the gate of Q8 is connected to the first control terminal of the switching circuit, the first control terminal of the switching circuit is connected to the I / O1 port of the control circuit (i.e., the first output terminal mentioned above), the switching circuit can receive the control signal output by the I / O1 port of the control circuit through the first control terminal, and control the working state of Q8 through the control signal; the drain of Q1 is connected to the drain of Q8, the source of Q1 is connected to the Vbus terminal of the switching circuit, the gate of Q1 is connected to the second control terminal of the switching circuit, the second control terminal of the switching circuit is connected to the I / O2 port of the control circuit (i.e., the second output terminal mentioned above), the switching circuit receives the control signal output by the I / O2 port of the control circuit through the second control terminal, and controls the working state of Q1 through the control signal, wherein the working states of Q1 and Q8 can be on and off states. Similarly, for the switching circuit connected to the battery, the first field effect transistor may be Q3, and the second field effect transistor may be Q2. The connection method and function of Q2 and Q3 are consistent with those of the above switching circuit, and are not described in detail here.
[0052] Optionally, each switching circuit also includes: a first resistor connected in series between the source and the gate of the first field effect transistor; a first diode, the anode of the first diode is connected to the gate of the first field effect transistor, and the cathode of the first diode is connected to the source of the first field effect transistor; a second resistor connected in series between the source and the gate of the second field effect transistor; a second diode, the anode of the second diode is connected to the gate of the second field effect transistor, and the cathode of the second diode is connected to the source of the second field effect transistor.
[0053] The resistance values of the first resistor and the second resistor may be 4.7 kΩ, the first diode and the second diode may be voltage-stabilizing diodes, and whether to add the first diode and the second diode may also be determined according to actual conditions.
[0054] In an optional embodiment, when multiple power sources are adapters and batteries, Figure 2As shown, the switching circuit connected to the adapter is still used as an example for explanation: the switching circuit also includes a first resistor R13, a first diode D4, a second resistor R2 and a second diode D1, wherein R13 is connected in series between the source and gate of Q8; the positive electrode of D4 is connected to the gate of Q8, and the negative electrode of D4 is connected to the source of Q8; R2 is connected in series between the source and gate of Q1; the positive electrode of D1 is connected to the gate of Q1, and the negative electrode of D1 is connected to the source of Q1. Similarly, for the switching circuit connected to the battery, the first resistor can be R4, the first diode can be D3, the second resistor can be R3, the second diode can be D2, and the connection method and function of R4, D3, R3 and D2 are consistent with those of the above-mentioned switching circuit, which will not be repeated here.
[0055] Optionally, the control circuit includes: a controller, the controller is used to generate multiple control instructions; multiple drive circuits, the input ends of the multiple drive circuits are connected one-to-one with multiple output ends of the controller, and the output ends of the multiple drive circuits are connected one-to-one with multiple output ends of the control circuit, wherein the multiple drive circuits are used to control the states of multiple field effect transistors based on multiple control instructions.
[0056] In an optional embodiment, when multiple power sources are adapters and batteries, Figure 2 As shown, the control circuit includes a controller, and the controller may include UND1 and UND2. The control instructions may be high or low levels issued by the controller. The input end of each driving circuit receives the control instructions output by the corresponding output end of the controller. After receiving the control instructions, each driving circuit controls the working state of the corresponding field effect transistor. Pin 1 and pin 4 of UND1 are connected to both ends of capacitor C2. At the same time, pin 1 of UND1 is connected to the power supply VCC, pin 4 of UND1 is connected to the ground, pin 2 of UND1 is connected to the I / O1 port of the control circuit, pin 3 of UND1 is an AD port for AD conversion, pin 5 of UND1 is connected to the I / O3 port of the control circuit, pin 6 of UND1 is connected to the I / O2 port of the control circuit, pin 7 and pin 8 of UND1 are connected to pin 7 and pin 8 of UND2 respectively, pin 1 and pin 4 of UND2 are connected to both ends of capacitor C3. At the same time, pin 1 of UND2 is connected to the power supply VCC, pin 4 of UND2 is connected to the ground, and pin 6 of UND2 is connected to the I / O4 port of the control circuit.
[0057] Optionally, each driving circuit includes: a first transistor, the emitter of the first transistor is connected to the ground, the base of the first transistor is connected to the first input terminal of each driving circuit, and the first input terminal of each driving circuit is connected to the first output terminal of the controller; a third resistor, the first end of the third resistor is connected to the collector of the first transistor, the second end of the third resistor is connected to the first output terminal of each driving circuit, and the first output terminal of each driving circuit is connected to the first control terminal of the switching circuit; a second transistor, the emitter of the second transistor is connected to the ground, the base of the second transistor is connected to the second input terminal of each driving circuit, and the second input terminal of each driving circuit is connected to the second output terminal of the controller; a fourth resistor, the first end of the fourth resistor is connected to the collector of the second transistor, the second end of the fourth resistor is connected to the second output terminal of each driving circuit, and the second output terminal of each driving circuit is connected to the second control terminal of the switching circuit.
[0058] The resistance values of the third resistor and the fourth resistor may be 10 kΩ.
[0059] In an optional embodiment, when multiple power sources are adapters and batteries, Figure 2 As shown, for example, a driving circuit for driving a switching circuit connected to an adapter is taken as an example for explanation: the driving circuit includes: a first transistor Q7, a third resistor R15, a second transistor Q4 and a fourth resistor R8, wherein the emitter of Q7 is connected to the ground, and the base of Q7 is connected to the I / O1 port of the control circuit; the first end of R15 is connected to the collector of Q7, and the second end of R15 is connected to the first output end of the driving circuit, and the first output end of the driving circuit is connected to the first control end of the switching circuit; the emitter of Q4 is connected to the ground, and the base of Q4 is connected to the I / O2 port of the control circuit; the first end of R8 is connected to the collector of Q4, and the second end of R8 is connected to the second output end of the driving circuit, and the second output end of the driving circuit is connected to the second control end of the switching circuit. Similarly, for the driving circuit for driving the switching circuit connected to the battery, the first transistor can be Q6, the third resistor can be R11, the second transistor can be Q5, and the fourth resistor can be R10. The connection method and function of Q6, R11, Q5 and R10 are consistent with those of the above-mentioned driving circuit and will not be repeated here.
[0060] It should be noted that the function of R13 and R15 is voltage division. When Q7 receives a control instruction to turn on, resistors R13 and R15 form a voltage division circuit to provide the driving voltage VGS required for Q8 to turn on. Similarly, R2 and R8 have the same function and will not be described in detail here.
[0061] Optionally, each driving circuit further includes: a fifth resistor connected in series between the base of the first transistor and the first input terminal of each driving circuit; and a sixth resistor connected in series between the base of the second transistor and the second input terminal of each driving circuit.
[0062] The resistance values of the fifth resistor and the sixth resistor may be 4.7 kΩ.
[0063] In an optional embodiment, when multiple power sources are adapters and batteries, Figure 2 As shown, the driving circuit for driving the switching circuit connected to the adapter is still used as an example for explanation: the driving circuit also includes a fifth resistor R14 and a sixth resistor R7, wherein R14 is connected in series between the base of Q7 and the I / O1 port of the control circuit; R7 is connected in series between the base of Q4 and the I / O2 port of the control circuit. Similarly, for the driving circuit for driving the switching circuit connected to the battery, the fifth resistor can be R12, and the sixth resistor can be R9. The connection method and function of R12 and R9 are consistent with those of the above-mentioned driving circuit, and are not described here.
[0064] Optionally, the system also includes: a detection circuit, wherein an input end of the detection circuit is connected to a first power supply among multiple power supplies, an output end of the detection circuit is connected to an input end of a control circuit, the detection circuit is used to detect a voltage of the first power supply, and the control circuit is used to control the states of multiple field effect transistors based on the voltage of the first power supply.
[0065] In an optional embodiment, when multiple power sources are adapters and batteries, Figure 2 As shown, the first power source is an adapter, the input end of the detection circuit is the Vaadapter end, and the output end of the detection circuit is the AD end, wherein the detection circuit detects the voltage value of the adapter and transmits the AD signal to the AD end of the control circuit. After the control circuit calculates, the relevant control instructions are sent to the drive circuit to realize the on or off control of the field effect transistor based on the voltage value of the adapter.
[0066] Optionally, the detection circuit includes: a seventh resistor, a first end of the seventh resistor is connected to the input end of the detection circuit, and a second end of the seventh resistor is connected to the output end of the detection circuit; an eighth resistor, a first end of the eighth resistor is connected to the second end of the seventh resistor and the output end of the detection circuit, and a second end of the eighth resistor is grounded.
[0067] The resistance value of the seventh resistor may be 75 kΩ, and the resistance value of the eighth resistor may be 20 kΩ.
[0068] In an optional embodiment, if Figure 2As shown, the detection module includes a seventh resistor R1 and an eighth resistor R6, wherein the first end of R1 is connected to the Vaadapter end of the detection circuit, and the second end of R1 is connected to the AD port of the detection circuit; the first end of R6 is connected to the second end of R1 and the AD port of the detection circuit, and the second end of R6 is grounded.
[0069] Optionally, the detection circuit further includes: a ninth resistor connected in series between the second end of the seventh resistor and the output end of the detection circuit; and a capacitor connected in parallel with the eighth resistor.
[0070] The resistance value of the ninth resistor may be 470Ω or other resistance values, and the capacitance value of the capacitor may be 0.1uf.
[0071] In an optional embodiment, if Figure 2 As shown, the detection module also includes a ninth resistor R5 and a capacitor C1, wherein R5 is connected in series between the second end of R1 and the AD port of the detection circuit; and the capacitor C1 is connected in parallel with R6. The capacitor here mainly plays a filtering role. If the voltage detection accuracy requirement is not high, it can be kept unchanged. If the voltage detection accuracy requirement is high, it is necessary to add a capacitor for filtering.
[0072] Optionally, the multiple power supplies include: a first power supply for converting alternating current into a first direct current; and a second power supply for outputting a second direct current.
[0073] The first power source in the above steps may be an adapter, and the second power source may be a battery.
[0074] Combine the following Figure 2 A preferred embodiment of the present invention is described in detail.
[0075] The detection module detects the voltage value of the first power supply from the Vaadapter end, and sends the detected voltage signal to the control circuits UND1 and UND2. The control circuit performs relevant operations according to the voltage value of the first power supply at the Vaadapter end. The controller sends relevant control instructions to the drive circuit through ports 1 to 8 of the controllers UND1 and UND2. After receiving the control instructions from the controller, the drive circuit drives Q8, Q1, Q2, and Q3 in the switching circuit to turn on and off, and determines and switches the power supply from the adapter and the battery to the load.
[0076] In yet another optional embodiment, Figure 3 As shown, if the multiple power sources are adapters and batteries, the adapter, battery, load terminal, and control terminal (i.e., the control circuit mentioned above) are connected to the switching circuit respectively, then the first power source can be the adapter and the second power source can be the battery. When the battery power supply is switched to the adapter power supply, the initial power supply path is as follows Figure 4As shown, Vbatter supplies power to the load through field effect transistors Q3 and Q2, and field effect transistors Q1 and Q8 are turned off; the mainboard controller UND1 monitors the Vaadapter voltage in real time AD, and when Vaadapter rises to the Vb threshold (where Vb is set according to the working voltage, Vb>Va), the controller power-on program is triggered, Q2 is turned off→Q8 is turned on→Q3 is turned off→Q1 is turned on, and the switching is completed.
[0077] In another optional embodiment, if the multiple power sources are an adapter and a battery, the first power source may be the adapter, and the second power source may be the battery. When the adapter power supply is switched to the battery power supply, and the battery is not rechargeable or the battery is rechargeable and in standby mode, the initial power supply path is as follows: Figure 5 As shown, Vaadapter supplies power to the load through field effect transistors Q8 and Q1, and field effect transistors Q2 and Q3 are turned off. When the mainboard controller UND1 monitors the Vaadapter voltage in real time AD, when the voltage drops to the Va threshold, Va is set according to the working voltage, triggering the controller power-off program, turning off Q8, turning on Q3, and switching the battery to output. At this time, the Vbus power supply path is as follows Figure 6 shown.
[0078] There are two situations when Vadapter drops to the Va threshold: the first is that the adapter is unplugged; the second is that the adapter is affected by the load and the power supply is insufficient:
[0079] At this time, the Vaadapter voltage is detected to determine which situation it belongs to. If the Vaadapter is directly powered off to the ground and lasts for Tm, where Tm can be 2s, and the voltage does not recover, it is considered that the adapter is unplugged, and Q8 is turned off and Q2 is turned on to complete the switch; if the Vaadapter does not fall to the ground, for example, the output voltage of the adapter fluctuates, or it rises again after falling to the ground, for example, the adapter is pulled by the load and enters a restart, it is considered that the adapter is affected by the load and the power supply is insufficient. Q8 and Q1 are turned off, Q3 is turned on, and the switch is completed. This situation indicates that the adapter does not meet the power requirements of the entire machine, and the entire machine needs to remind the user to replace the adapter.
[0080] In another optional embodiment, if the multiple power sources are an adapter and a battery, the first power source may be an adapter, and the second power source may be a battery. When the adapter power supply is switched to the battery power supply and the battery is rechargeable and in a charging state, the initial power supply path is as follows: Figure 7As shown, Vaadapter supplies power to the load Vbus through field effect transistors Q8 and Q1, and Vaadapter charges the battery Vbatter through field effect transistors Q8, Q1, Q2, and Q3. The mainboard controller UND1 monitors the Vaadapter voltage in real time AD. When Vaadapter drops to the Va threshold, Va is set according to the working voltage, triggering the controller power-off program, turning off Q1 and Q8, and switching the battery to output. After that, the two situations of Vaadapter dropping below the Va threshold are judged, which are consistent with the description of the above embodiment and will not be repeated here.
[0081] Example 2
[0082] According to an embodiment of the present invention, a power switching method is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0083] The method provided in the above embodiment of the present invention can be executed by the power switching system in the above embodiment. The specific implementation scheme and preferred application scenario are the same as those in the above embodiment and will not be described in detail here.
[0084] Figure 8 is a flow chart of a power switching method according to an embodiment of the present invention. Figure 8 As shown, the method comprises the following steps:
[0085] Step S802: determining a target power source among a plurality of power sources through a control circuit.
[0086] Wherein, the multiple power supplies are switched respectively through multiple switching circuits, and each switching circuit is connected with a field effect transistor.
[0087] Step S804, controlling the states of the plurality of field effect transistors by means of a control circuit.
[0088] The state includes: an on state or an off state.
[0089] Step S806 , based on the states of the plurality of field effect transistors, switching the target power source through the plurality of switching circuits to supply power to the load.
[0090] The switching circuit is composed of field effect transistors.
[0091] Optionally, determining a target power supply among multiple power supplies through a control circuit includes: detecting a voltage value of a first power supply among the multiple power supplies through a detection module; and determining the target power supply based on the voltage of the first power supply through the control circuit.
[0092] Optionally, the target power supply is determined based on the voltage of the first power supply through the control circuit, including: judging whether the voltage of the first power supply is greater than a first preset voltage; determining the first power supply as the target power supply when the voltage of the first power supply is greater than the first preset voltage; and determining the second power supply as the target power supply when the voltage of the first power supply is less than or equal to the first preset voltage, wherein the second power supply is a power supply other than the first power supply among the multiple power supplies.
[0093] Optionally, when the first power source is determined to be the target power source, controlling the states of the plurality of field effect transistors by the control circuit includes:
[0094] Controlling the second field effect transistor in the switching circuit corresponding to the second power source to turn off by the control circuit;
[0095] Controlling the first field effect transistor in the switching circuit corresponding to the first power source to turn on through the control circuit;
[0096] Controlling the first field effect transistor in the switching circuit corresponding to the second power supply to turn off by the control circuit;
[0097] The second field effect transistor in the switching circuit corresponding to the first power source is controlled to be turned on by the control circuit.
[0098] Optionally, when the second power supply is determined to be the target power supply, the states of multiple field effect transistors are controlled by a control circuit, including: controlling the first field effect transistor in the switching circuit corresponding to the first power supply to be turned off by the control circuit; and controlling the second field effect transistor in the switching circuit corresponding to the second power supply to be turned on by the control circuit.
[0099] Optionally, when the second power source is determined to be the target power source, controlling the states of the plurality of field effect transistors by the control circuit includes:
[0100] Determining by the control circuit whether the voltage of the first power supply is less than the second preset voltage, and whether the voltage of the first power supply rises to the first preset voltage within a preset time period;
[0101] When the voltage of the first power supply is less than the second preset voltage and the voltage of the first power supply does not rise to the first preset voltage within a preset time period, the first field effect transistor in the switching circuit corresponding to the first power supply is controlled to be turned off by the control circuit, and the second field effect transistor in the switching circuit corresponding to the second power supply is controlled to be turned on;
[0102] When the voltage of the first power supply is greater than or equal to the second preset voltage, or when the voltage of the first power supply rises to the first preset voltage within a preset time period, the control circuit controls the first field effect transistor and the second field effect transistor in the switching circuit corresponding to the first power supply to be turned off, and controls the first field effect transistor in the switching circuit corresponding to the second power supply to be turned on.
[0103] Optionally, when a first power supply among multiple power supplies supplies power to a second power supply among the multiple power supplies, the method also includes: controlling the first field effect transistor and the second field effect transistor in the switching circuit corresponding to the first power supply to be turned on through a control circuit, and controlling the first field effect transistor and the second field effect transistor in the switching circuit corresponding to the second power supply to be turned on.
[0104] Optionally, the method also includes: determining whether the voltage of the first power supply is greater than or equal to a third preset voltage; when the voltage of the first power supply is less than the third preset voltage, controlling the second field effect transistor in the switching circuit corresponding to the first power supply to be turned off through the control circuit, and controlling the second field effect transistor in the switching circuit corresponding to the second power supply to be turned off.
[0105] Combine the following Fig. 9 A preferred embodiment of the present invention is described in detail. Fig. 9 As shown, the method may include the following steps:
[0106] Step S901, start;
[0107] Step S902, determine whether the adapter is inserted, if yes, execute step S906; if no, execute step S903;
[0108] Step S903, battery power supply; during the battery power supply process, if the adapter is inserted, execute step S906;
[0109] Step S904, the power is exhausted;
[0110] Step S905, shut down;
[0111] Step S906, if the adapter is inserted, the adapter supplies power; during the process of the adapter supplying power, if the adapter is unplugged, execute step S903.
[0112] In the above steps, the adapter and the battery are used as power sources, and a method for the power supply and the adapter to supply power to the load is specifically described. First, it is determined whether the adapter is inserted. If the adapter is inserted, the power supply at this time is the adapter. At the same time, there is also a situation where the adapter is unplugged after the adapter is inserted. The situation where the adapter is unplugged and the situation where the adapter is not inserted can be considered as the same situation. In this case, the power supply of the load is the battery. At this time, when the battery is exhausted, the load is shut down.
[0113] Example 3
[0114] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium includes a stored program. When the program is executed, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned power switching method.
[0115] Example 4
[0116] According to another aspect of an embodiment of the present invention, a processor is further provided, and the processor is used to run a program, wherein the power switching method described above is executed when the program is run.
[0117] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0118] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0119] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0120] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0121] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0122] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0123] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A power switching system, characterized in that: include: Multiple power sources, wherein the multiple power sources include: a first power source and a second power source, the first power source is an adapter, and the second power source is a battery; A plurality of switching circuits, wherein input ends of the plurality of switching circuits are connected to the plurality of power supplies in a one-to-one correspondence, output ends of the plurality of switching circuits are connected to a load, a field effect transistor is connected between the input end and the output end of each switching circuit, and the plurality of switching circuits are used to switch a target power supply among the plurality of power supplies to supply power to the load based on the states of the plurality of field effect transistors; A control circuit, wherein a plurality of output terminals of the control circuit are connected to the control terminals of the plurality of switching circuits in a one-to-one correspondence, the control terminals of the plurality of switching circuits are respectively connected to the plurality of field effect transistors, and the control circuit is used to control the states of the plurality of field effect transistors; a detection circuit, wherein an input end of the detection circuit is connected to a first power supply among the multiple power supplies, an output end of the detection circuit is connected to an input end of the control circuit, the detection circuit is used to detect a voltage of the first power supply, and the control circuit is used to control the states of the multiple field effect transistors based on the voltage of the first power supply; Wherein, each switching circuit includes at least a first field effect transistor and a second field effect transistor, the gate of the first field effect transistor is connected to the first control end of each switching circuit, and the first control end of each switching circuit is connected to the first output end of the control circuit; the gate of the second field effect transistor is connected to the second control end of each switching circuit, and the second control end of each switching circuit is connected to the second output end of the control circuit, the first output end of the control circuit is used to control the state of the first field effect transistor, and the second output end of the control circuit is used to control the state of the second field effect transistor, and the state includes: on state or off state.
2. The system according to claim 1, characterized in that Each of the switching circuits comprises: The first field effect transistor, the source of the first field effect transistor is connected to the input terminal of each switching circuit; The second field effect transistor, the drain of the second field effect transistor is connected to the drain of the first field effect transistor, and the source of the second field effect transistor is connected to the output end of each switching circuit.
3. The system according to claim 2, characterized in that Each of the switching circuits further comprises: A first resistor is connected in series between the source and the gate of the first field effect transistor; a first diode, wherein an anode of the first diode is connected to a gate of the first field effect transistor, and a cathode of the first diode is connected to a source of the first field effect transistor; A second resistor is connected in series between the source and the gate of the second field effect transistor; A second diode, wherein an anode of the second diode is connected to the gate of the second field effect transistor, and a cathode of the second diode is connected to the source of the second field effect transistor.
4. The system according to claim 1, characterized in that The control circuit comprises: A controller, the controller is used to generate a plurality of control instructions; A plurality of drive circuits, wherein the input ends of the plurality of drive circuits are connected one-to-one with the plurality of output ends of the controller, and the output ends of the plurality of drive circuits are connected one-to-one with the plurality of output ends of the control circuit, wherein the plurality of drive circuits are used to control the states of the plurality of field effect transistors based on the plurality of control instructions.
5. The system according to claim 4, characterized in that Each drive circuit includes: A first triode, wherein the emitter of the first triode is connected to the ground, the base of the first triode is connected to the first input terminal of each driving circuit, and the first input terminal of each driving circuit is connected to the first output terminal of the controller; a third resistor, wherein a first end of the third resistor is connected to the collector of the first transistor, a second end of the third resistor is connected to the first output end of each driving circuit, and the first output end of each driving circuit is connected to the first control end of the switching circuit; a second triode, wherein the emitter of the second triode is connected to the ground, the base of the second triode is connected to the second input terminal of each driving circuit, and the second input terminal of each driving circuit is connected to the second output terminal of the controller; A fourth resistor, wherein a first end of the fourth resistor is connected to the collector of the second transistor, a second end of the fourth resistor is connected to the second output end of each driving circuit, and the second output end of each driving circuit is connected to the second control end of the switching circuit.
6. The system according to claim 5, characterized in that Each of the driving circuits further comprises: A fifth resistor is connected in series between the base of the first transistor and the first input terminal of each driving circuit; A sixth resistor is connected in series between the base of the second transistor and the second input terminal of each driving circuit.
7. The system according to claim 1, characterized in that The detection circuit comprises: a seventh resistor, wherein a first end of the seventh resistor is connected to the input end of the detection circuit, and a second end of the seventh resistor is connected to the output end of the detection circuit; An eighth resistor, wherein a first end of the eighth resistor is connected to the second end of the seventh resistor and the output end of the detection circuit, and a second end of the eighth resistor is grounded.
8. The system according to claim 7, characterized in that The detection circuit also includes: A ninth resistor, connected in series between the second end of the seventh resistor and the output end of the detection circuit; A capacitor is connected in parallel with the eighth resistor.
9. The system according to any one of claims 1 to 8, characterized in that: The first power supply is used to convert alternating current into a first direct current; the second power supply is used to output a second direct current.
10. A power switching method, characterized in that: The method comprises: Determining a target power source among a plurality of power sources through a control circuit, wherein the plurality of power sources are switched respectively through a plurality of switching circuits, each switching circuit being connected to a field effect transistor; Controlling the states of the plurality of field effect transistors by the control circuit, wherein the states include: an on state or an off state; Based on the states of the plurality of field effect transistors, the target power source is switched to supply power to the load through the plurality of switching circuits, wherein the switching circuits are composed of field effect transistors; Wherein, each switching circuit includes at least a first field effect transistor and a second field effect transistor, the gate of the first field effect transistor is connected to the first control end of each switching circuit, and the first control end of each switching circuit is connected to the first output end of the control circuit; the gate of the second field effect transistor is connected to the second control end of each switching circuit, and the second control end of each switching circuit is connected to the second output end of the control circuit; the states of multiple field effect transistors are controlled by the control circuit, including controlling the state of the first field effect transistor by the first output end of the control circuit, and / or controlling the state of the second field effect transistor by the second output end of the control circuit.
11. The method according to claim 10, characterized in that The control circuit determines the target power supply among multiple power supplies, including: Detecting a voltage value of a first power source among the multiple power sources by means of a detection module; The target power source is determined by the control circuit based on the voltage of the first power source.
12. The method according to claim 11, characterized in that Determining the target power supply based on the voltage of the first power supply by the control circuit includes: Determining whether the voltage of the first power supply is greater than a first preset voltage; When the voltage of the first power source is greater than the first preset voltage, determining the first power source as the target power source; When the voltage of the first power source is less than or equal to the first preset voltage, a second power source is determined as the target power source, wherein the second power source is a power source among the multiple power sources except the first power source.
13. The method according to claim 12, characterized in that In the case where the first power source is determined to be the target power source, controlling the states of the plurality of field effect transistors by the control circuit includes: Controlling the second field effect transistor in the switching circuit corresponding to the second power source to turn off by the control circuit; Controlling the first field effect transistor in the switching circuit corresponding to the first power source to be turned on by the control circuit; Controlling the first field effect transistor in the switching circuit corresponding to the second power supply to turn off by the control circuit; The control circuit controls the second field effect transistor in the switching circuit corresponding to the first power source to be turned on.
14. The method according to claim 12, characterized in that In the case where the second power source is determined to be the target power source, controlling the states of the plurality of field effect transistors by the control circuit includes: Controlling the first field effect transistor in the switching circuit corresponding to the first power source to turn off by the control circuit; The control circuit controls the second field effect transistor in the switching circuit corresponding to the second power supply to be turned on.
15. The method according to claim 12, characterized in that In the case where the second power source is determined to be the target power source, controlling the states of the plurality of field effect transistors by the control circuit includes: Determining, by the control circuit, whether the voltage of the first power supply is less than a second preset voltage, and whether the voltage of the first power supply rises to the first preset voltage within a preset time period; When the voltage of the first power supply is less than the second preset voltage and the voltage of the first power supply does not rise to the first preset voltage within the preset time period, the first field effect transistor in the switching circuit corresponding to the first power supply is controlled to be turned off by the control circuit, and the second field effect transistor in the switching circuit corresponding to the second power supply is controlled to be turned on; When the voltage of the first power supply is greater than or equal to the second preset voltage, or when the voltage of the first power supply rises to the first preset voltage within the preset time period, the control circuit controls the first field effect transistor and the second field effect transistor in the switching circuit corresponding to the first power supply to be turned off, and controls the first field effect transistor in the switching circuit corresponding to the second power supply to be turned on.
16. The method according to any one of claims 10 to 15, characterized in that In a case where a first power source among the multiple power sources supplies power to a second power source among the multiple power sources, the method further includes: The control circuit controls the first field effect transistor and the second field effect transistor in the switching circuit corresponding to the first power supply to be turned on, and controls the first field effect transistor and the second field effect transistor in the switching circuit corresponding to the second power supply to be turned on.
17. The method according to claim 16, characterized in that The method further comprises: Determining whether the voltage of the first power supply is greater than or equal to a third preset voltage; When the voltage of the first power supply is less than the third preset voltage, the control circuit controls the second field effect transistor in the switching circuit corresponding to the first power supply to be turned off, and controls the second field effect transistor in the switching circuit corresponding to the second power supply to be turned off.
18. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the power switching method according to any one of claims 10 to 17.
19. A processor, characterized in that: The processor is used to run a program, wherein the program executes the power switching method described in any one of claims 10 to 17 when running.
Citation Information
Patent Citations
Power supply circuit, control method thereof, and display device
CN110718961A
Power supply switching hardware circuit, power supply circuit and electronic equipment
CN112186885A
Power switching system
CN213780904U