A main power supply switching device and method
By designing a main and backup power switching device including a voltage comparison module, a switching control module and a controllable switch module, the problem of high cost of the main and backup power switching scheme in the prior art is solved, and low-cost power switching and stable load power supply are achieved.
Patent Information
- Application Number
- CN202111555072.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-17
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2041-12-17
AI Technical Summary
In the prior art, the cost of the main and backup power switching solution is relatively high, and no effective solution has been proposed.
A main and backup power switching device is designed, including a voltage comparison module, a switching control module, a first controllable switch module, a second controllable switch module and a hysteresis control module. The voltage of the main power supply and the backup power supply is compared through the voltage comparison module. The switching control module controls the on and off of the controllable switch module based on the comparison results, and realizes automatic switching between the main and backup power supply.
The cost of the main and backup power switching scheme is reduced, the use of special control chips is avoided, and the purpose of powering the load is achieved by the main power supply or backup power supply is achieved. At the same time, frequent switching of the main power supply and backup power supply voltage is almost equal.
Smart Images

Figure CN114256963B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of electronic technology, and in particular to a main and standby power supply switching device and method. Background Art
[0002] Many electronic and electrical products use dual power supplies to ensure that the products can operate continuously and reliably. Take the power supply of vehicle-mounted equipment as an example. The vehicle-mounted equipment is powered by a car battery. The power supply environment is complex and the power supply of the equipment will fluctuate greatly. In order to ensure the stable and reliable operation of the vehicle-mounted equipment, a main-backup dual power supply solution is usually adopted. When the main power supply cannot provide reliable power supply due to power supply fluctuations, the equipment automatically switches to the backup power supply, which involves a main-backup power supply switching solution. At present, there are related technologies that use dedicated main-backup power supply switching control chips or other chips to achieve main-backup power supply switching, but the chip cost is relatively high, which is not conducive to the promotion and application of vehicle-mounted power supply equipment.
[0003] With regard to the high cost problem of the main and standby power supply switching solution existing in the related art, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present invention provide a main and standby power supply switching device and method, so as to at least solve the problem of high cost of the main and standby power supply switching solution existing in the related art.
[0005] According to one embodiment of the present invention, there is provided a main-standby power switching device, comprising: a voltage comparison module, a switching control module, a first controllable switch module, a second controllable switch module and a hysteresis control module, wherein the voltage comparison module is respectively connected to the main power supply and the backup power supply, and the voltage comparison module is used to compare the voltages of the main power supply and the backup power supply; the first controllable switch module is respectively connected to the main power supply and the load, and the second controllable switch module is respectively connected to the backup power supply and the load; the switching control module is connected to the voltage comparison module, and is connected to the first controllable switch module and the second controllable switch module, and the switching control module is used to control the on and off of the first controllable switch module and the second controllable switch module based on the comparison result of the voltage comparison module; the hysteresis control module is respectively connected to the switching control module and the voltage comparison module, and the switching control module performs hysteresis control on the voltage comparison module through the hysteresis control module.
[0006] In an exemplary embodiment, the first input end of the voltage comparison module is configured to be connected to the main power supply, and the second input end of the voltage comparison module is configured to be connected to the backup power supply; the first input end of the first controllable switch module is configured to be connected to the main power supply, and the first input end of the second controllable switch module is configured to be connected to the backup power supply; the first output end of the voltage comparison module is connected to the first input end of the switching control module, the first output end of the switching control module is connected to the second input end of the first controllable switch module, and the second output end of the switching control module is connected to the second input end of the second controllable switch module; the output end of the first controllable switch module is configured to be connected to the load, and the output end of the second controllable switch module is configured to be connected to the load; the input end of the hysteresis control module is connected to the second output end of the switching control module, and the first output end and the second output end of the hysteresis control module are respectively connected to the third input end and the fourth input end of the voltage comparison module.
[0007] In an exemplary embodiment, the switching control module is used to control the first controllable switch module to be in an on state and the second controllable switch module to be in an off state when the comparison result of the voltage comparison module meets the first target condition; the switching control module is used to control the first controllable switch module to be in an off state and the second controllable switch module to be in an on state when the comparison result meets the second target condition.
[0008] In an exemplary embodiment, at least one of the following is included: the first target condition includes that the voltage value of the main power supply is greater than the voltage value of the backup power supply; the second target condition includes that the difference between the voltage value of the backup power supply and the voltage value of the main power supply is greater than a preset threshold.
[0009] In an exemplary embodiment, the preset threshold value includes: a hysteresis voltage provided by the hysteresis control module.
[0010] In an exemplary embodiment, the voltage comparison module includes: a transistor pair and a first transistor, wherein the emitter of the first sub-transistor included in the transistor pair is connected to the main power supply, and the emitter of the second sub-transistor included in the transistor pair is connected to the backup power supply; the collector of the first sub-transistor is connected to the base of the first transistor through a first resistor, the collector of the second sub-transistor is connected to the emitter of the first transistor, and the collector of the second sub-transistor is connected to the base of the first transistor through a first capacitor; the collector of the first transistor is connected to the first input end of the switching control module.
[0011] In an exemplary embodiment, the base of the first sub-transistor is connected to the first output end of the hysteresis control module, the base of the second sub-transistor is connected to the second output end of the hysteresis control module, and the base of the first sub-transistor and the base of the second sub-transistor are connected through a second resistor.
[0012] In an exemplary embodiment, the hysteresis control module includes a MOS transistor, wherein a source electrode and a drain electrode of the MOS transistor are respectively connected to two ends of the second resistor.
[0013] In an exemplary embodiment, the switching control module includes: a second transistor and a third transistor, wherein the base of the second transistor is connected to the first output terminal of the voltage comparison module through a third resistor, the emitter of the second transistor is configured to be grounded, and the collector of the second transistor is connected to the second input terminal of the second controllable switch module and the input terminal of the hysteresis control module through a fourth resistor; the emitter of the third transistor is configured to be connected to the load, and the collector of the third transistor is connected to the second input terminal of the first controllable switch module through a fifth resistor.
[0014] According to another embodiment of the present invention, a main-backup power supply switching method is also provided, which is applied to any of the devices described above, including: the voltage comparison module compares the voltage of the main power supply with the voltage of the backup power supply to obtain a comparison result, wherein the comparison result is used to indicate the numerical relationship between the voltage of the main power supply and the voltage of the backup power supply; and the switching control module controls the on and off of the first controllable switch module and the second controllable switch module based on the comparison result.
[0015] In an exemplary embodiment, the voltage comparison module compares the voltages of the main power supply and the backup power supply, including: the switching control module performs hysteresis control on the voltage comparison module through the hysteresis control module to form a hysteresis voltage; and the voltage comparison module compares the voltages of the main power supply and the backup power supply based on the hysteresis voltage.
[0016] In an exemplary embodiment, the switching control module controls the on and off of the first controllable switch module and the second controllable switch module based on the comparison result, including: when the switching control module determines that the comparison result meets the first target condition, the first controllable switch module is controlled to be in the on state, and the second controllable switch module is controlled to be in the off state; when the switching control module determines that the comparison result meets the second target condition, the first controllable switch module is controlled to be in the off state, and the second controllable switch module is controlled to be in the on state.
[0017] In an exemplary embodiment, at least one of the following is included: the first target condition includes that the voltage value of the main power supply is greater than the voltage value of the backup power supply; the second target condition includes that the difference between the voltage value of the backup power supply and the voltage value of the main power supply is greater than a preset threshold.
[0018] In an exemplary embodiment, the voltage comparison module compares the voltage of the main power supply with the voltage of the backup power supply to obtain a comparison result, including: when the hysteresis voltage is zero, the voltage comparison module compares the voltage of the main power supply with the voltage of the backup power supply to obtain a first comparison result; when the hysteresis voltage is non-zero, the voltage comparison module compares the sum of the voltage of the main power supply and the hysteresis voltage with the voltage of the backup power supply to obtain a second comparison result.
[0019] Through the present invention, the voltage comparison module is respectively connected to the main power supply and the backup power supply, and compares the voltages of the main power supply and the backup power supply. The first controllable switch module is connected between the main power supply and the load, and the second controllable switch module is connected between the backup power supply and the load. The switching control module is connected to the voltage comparison module. The switching control module controls the on and off of the first controllable switch module and the second controllable switch module based on the comparison result of the voltage comparison module, thereby achieving the purpose of supplying power to the load by the main power supply or the backup power supply, avoiding the high cost problem caused by the use of dedicated control chips in the related art. Therefore, the high cost problem of the main and backup power supply switching solutions existing in the related art is solved, and the effect of reducing costs is achieved. At the same time, the switching control module also performs hysteresis control on the voltage comparison module through the hysteresis control module, thereby preventing the power supply state from frequently switching between the main power supply and the backup power supply when the voltages of the main power supply and the backup power supply are almost equal. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 This is an example of a main power supply switching solution in the related art. Figure 1 ;
[0021] Figure 2 This is an example of a main power supply switching solution in the related art. Figure 2 ;
[0022] Figure 3 This is an example of a main power supply switching solution in the related art. Figure 3 ;
[0023] Figure 4 is a structural block diagram of a main and standby power switching device according to an embodiment of the present invention;
[0024] Figure 5is a schematic diagram of the working state of the main and standby power supply switching solution according to an embodiment of the present invention;
[0025] Figure 6 is an example diagram of a main and standby power supply switching circuit according to a specific embodiment of the present invention;
[0026] Figure 7 is a circuit schematic diagram of a voltage comparison module according to a specific embodiment of the present invention;
[0027] Figure 8 is a schematic diagram of the relationship between the main and standby power supply voltages according to a specific embodiment of the present invention;
[0028] Fig. 9 is a flow chart of a method for switching between a primary power supply and a secondary power supply according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with the embodiments.
[0030] 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.
[0031] In the related art, a dedicated main and standby power supply switching control chip is used to control the power transistor to realize the switching of the main and standby power supplies. Figure 1 This is an example of a main power supply switching solution in the related art. Figure 1 The main disadvantage of this solution is that the cost of the dedicated main and standby power switching control chip is high; there is also a power monitoring chip to control the power transistor to achieve the switching of the main and standby power supplies, such as Figure 2 As shown, Figure 2 This is an example of a main power supply switching solution in the related art. Figure 2 The main disadvantage of this solution is that the power monitoring chip is used to realize the switching of the main and standby power supplies. The power monitoring chip itself requires a relatively stable working voltage, and an additional power monitoring chip power supply solution needs to be designed, which makes the whole solution more complicated. In addition, there are also solutions in the related technology that use diodes to realize automatic switching of the main and standby power supplies, such as Figure 3 As shown, Figure 3 This is an example of a main power supply switching solution in the related art. Figure 3 The main disadvantage of this solution is that the diode has a voltage drop, which makes this design unusable in high-power applications or applications that are sensitive to the voltage drop of the power supply path. In view of the above problems existing in the related art, the embodiment of the present invention proposes a simple and low-cost solution to achieve the switching of the main and standby power supplies. The embodiment of the present invention is described below with reference to the accompanying drawings.
[0032] In this embodiment, a main power supply switching device is provided. Figure 4 is a structural block diagram of the main and standby power switching device of an embodiment of the present invention, such as Figure 4 As shown, the device includes: a voltage comparison module 402, a switching control module 404, a first controllable switch module 406 (ie Figure 4 The controllable switch module 1 in the embodiment of the present invention is a controllable switch module 1, the second controllable switch module 408 (i.e. Figure 4 The controllable switch module 2) and the hysteresis control module 410 in the embodiment of the present invention, wherein the voltage comparison module is respectively connected to the main power supply and the backup power supply, and the voltage comparison module is used to compare the voltages of the main power supply and the backup power supply; the first controllable switch module is respectively connected to the main power supply and the load, and the second controllable switch module is respectively connected to the backup power supply and the load; the switching control module is connected to the voltage comparison module, and is connected to the first controllable switch module and the second controllable switch module, and the switching control module is used to control the on and off of the first controllable switch module and the second controllable switch module based on the comparison result of the voltage comparison module; the hysteresis control module is respectively connected to the switching control module and the voltage comparison module, and the switching control module performs hysteresis control on the voltage comparison module through the hysteresis control module.
[0033] Through the above-mentioned device, the voltage comparison module is connected to the main power supply and the backup power supply respectively, and compares the voltages of the main power supply and the backup power supply. The first controllable switch module is connected between the main power supply and the load, and the second controllable switch module is connected between the backup power supply and the load. The switching control module is connected to the voltage comparison module. The switching control module controls the on and off of the first controllable switch module and the second controllable switch module based on the comparison result of the voltage comparison module, thereby achieving the purpose of supplying power to the load by the main power supply or the backup power supply, avoiding the high cost problem caused by the use of dedicated control chips in the related technology. Therefore, the high cost problem of the main and backup power supply switching schemes existing in the related technology is solved, and the effect of reducing costs is achieved. At the same time, the switching control module also performs hysteresis control on the voltage comparison module through the hysteresis control module, thereby preventing the power supply state from frequently switching between the main power supply and the backup power supply when the voltages of the main power supply and the backup power supply are almost equal.
[0034] The above device can be applied to electronic products and electrical products, such as vehicle-mounted equipment, for example, the above device can be used to provide dual power supply to vehicle-mounted electronic products, but it is not limited to this. The following is an example of the above device being applied to vehicle-mounted equipment (only an exemplary description, in actual application, it can also be applied to other devices or modules):
[0035] In the above embodiment, the voltage comparison module in the above device can be connected to the main power supply and the backup power supply of the vehicle-mounted equipment respectively. For example, the main power supply can be a car battery, and the backup power supply can be a backup battery, or other backup power supplies. The voltage comparison module is used to compare the voltages of the main power supply and the backup power supply. The first controllable switch module in the above device is connected to the main power supply and the load respectively, and the second controllable switch module is connected to the backup power supply and the load respectively, that is, the first controllable switch module is connected between the main power supply and the load, and the second controllable switch module is connected between the backup power supply and the load; the switching control module in the above device is connected to the voltage comparison module, and is also connected to the first controllable switch module and the second controllable switch module, and the switching control module is connected according to the voltage The comparison result of the comparison module is used to control the on and off of the first controllable switch module and the second controllable switch module, thereby controlling the power supply of the load by the main power supply or the backup power supply, thereby achieving the purpose of powering the load by the main power supply or the backup power supply. The device does not use a dedicated control chip, which avoids the high cost problem caused by the use of dedicated control chips in the related technology. Therefore, the high cost problem of the main and backup power supply switching schemes in the related technology is solved, and the effect of reducing costs is achieved. In addition, the above-mentioned device also includes a hysteresis control module, and the switching control module can also perform hysteresis control on the voltage comparison module through the hysteresis control module, thereby preventing the power supply state from frequently switching between the main power supply and the backup power supply when the voltages of the main power supply and the backup power supply are almost equal.
[0036] In the above device, the voltage comparison module is used to compare the voltages of the main power supply and the backup power supply, and output the comparison result to the switching control module. The switching control module controls the on and off of the controllable switch module 1 and the controllable switch module 2 according to the output result of the voltage comparison module. At the same time, the switching control module performs hysteresis control on the voltage comparison module through the hysteresis control module.
[0037] In an optional embodiment, the first input end of the voltage comparison module is configured to be connected to the main power supply, and the second input end of the voltage comparison module is configured to be connected to the backup power supply; the first input end of the first controllable switch module is configured to be connected to the main power supply, and the first input end of the second controllable switch module is configured to be connected to the backup power supply; the first output end of the voltage comparison module is connected to the first input end of the switching control module, the first output end of the switching control module is connected to the second input end of the first controllable switch module, and the second output end of the switching control module is connected to the second input end of the second controllable switch module; the output end of the first controllable switch module is configured to be connected to the load, and the output end of the second controllable switch module is configured to be connected to the load; the input end of the hysteresis control module is connected to the second output end of the switching control module, and the first output end and the second output end of the hysteresis control module are respectively connected to the third input end and the fourth input end of the voltage comparison module. In this embodiment, the first input terminal and the second input terminal of the voltage comparison module are respectively connected to the main power supply and the backup power supply to achieve the purpose of comparing the voltage of the main power supply with the backup voltage. The first input terminal of the switching control module is connected to the first output terminal of the voltage comparison module. In practical applications, the voltage comparison result of the voltage comparison module can be obtained based on the output of the first output terminal of the voltage comparison module. The first output terminal and the second output terminal of the switching control module are respectively connected to the second input terminal of the first controllable switch module and the second input terminal of the second controllable switch module, so that the switching control module can control the on and off of the first controllable switch module and the second controllable switch module based on the comparison result of the voltage comparison module. In practical applications, the first controllable switch module and the second controllable switch module are usually connected. One of the modules is turned on and the other is turned off, so that the purpose of supplying power to the load by the main power supply or the backup power supply can be achieved; in addition, the input end of the hysteresis control module is connected to the second output end of the switching control module, and the first output end and the second output end of the hysteresis control module are respectively connected to the third input end and the fourth input end of the voltage comparison module, that is, the switching control module performs hysteresis control on the voltage comparison module through the hysteresis control module, for example, the voltage of one of the main power supply and the backup power supply exceeds the voltage of the other power supply by a certain value (such as exceeding 0.2V, or 0.3V, or other values) before the power supply is switched, thereby avoiding the problem of frequent switching of the power supply status between the main and backup power supplies when the voltages of the main power supply and the backup power supply are almost equal.
[0038] In an optional embodiment, the switching control module is used to control the first controllable switch module to be in the on state and the second controllable switch module to be in the off state when the comparison result of the voltage comparison module meets the first target condition; the switching control module is used to control the first controllable switch module to be in the off state and the second controllable switch module to be in the on state when the comparison result meets the second target condition. In this embodiment, when the comparison result of the voltage comparison module meets the first target condition, the first controllable switch module is turned on and the second controllable switch module is turned off, that is, the load is powered by the main power supply; when the comparison result of the voltage comparison module meets the second target condition, the first controllable switch module is turned off and the second controllable switch module is turned on, that is, the load is powered by the backup power supply. Through this embodiment, the purpose of controlling the on and off of the first controllable switch module and the second controllable switch module based on the comparison result of the voltage comparison module is achieved.
[0039] In an optional embodiment, at least one of the following is included: the first target condition includes that the voltage value of the main power supply is greater than the voltage value of the backup power supply; the second target condition includes that the difference between the voltage value of the backup power supply and the voltage value of the main power supply is greater than a preset threshold. In this embodiment, for example, the first target condition is that the voltage value of the main power supply is greater than the voltage value of the backup power supply. At this time, the switching control module controls the first controllable switch module to be in the on state, and controls the second controllable switch module to be in the off state, that is, the main power supply supplies power to the load through the first controllable switch module; for example, the second target condition is that the difference between the voltage value of the backup power supply and the voltage value of the main power supply is greater than a preset threshold (such as 0.2V or 0.3V or other values). At this time, the switching control module controls the first controllable switch module to be in the off state, and controls the second controllable switch module to be in the on state, that is, the backup power supply supplies power to the load through the first controllable switch module; optionally, it can also be set that the first target condition is that the voltage of the backup power supply is greater than the voltage of the main power supply, and the second target condition is that the difference between the voltage value of the main power supply and the voltage value of the backup power supply is greater than the preset threshold. Through this embodiment, the purpose of switching the main power supply or the backup power supply to supply power to the load is achieved by setting the voltage values of the main power supply and the backup power supply to meet different conditions.
[0040] In an optional embodiment, the preset threshold value includes: the hysteresis voltage provided by the hysteresis control module. In this embodiment, the hysteresis voltage can be provided by the hysteresis control module, and the hysteresis control module is connected to the voltage comparison module. For example, the hysteresis control module is connected to a certain component or a partial circuit of the voltage comparison module. The hysteresis control module can control the component or the partial circuit to be in a short-circuit state or in a power-on state. When the component or the partial circuit is in the power-on state, the component or the partial circuit will generate a voltage in the circuit of the voltage comparison module, and a hysteresis voltage will be formed at this time. When the component or the partial circuit is in a short-circuit state, the component or the partial circuit will not generate a voltage in the circuit of the voltage comparison module. Through this embodiment, the purpose of generating the hysteresis voltage is achieved through the hysteresis control module, thereby avoiding the problem of frequent switching of the power supply state between the main power supply and the backup power supply when the voltages of the main power supply and the backup power supply are almost equal.
[0041] In an optional embodiment, the voltage comparison module includes: a transistor pair and a first transistor, wherein the emitter of the first sub-transistor included in the transistor pair is connected to the main power supply, and the emitter of the second sub-transistor included in the transistor pair is connected to the backup power supply; the collector of the first sub-transistor is connected to the base of the first transistor through a first resistor, the collector of the second sub-transistor is connected to the emitter of the first transistor, and the collector of the second sub-transistor is connected to the base of the first transistor through a first capacitor; the collector of the first transistor is connected to the first input end of the switching control module. In this embodiment, a circuit module composed of a transistor pair (e.g., a dual PNP pair), a first transistor (e.g., a PNP transistor) and other resistor-capacitor components is used to achieve the purpose of comparing the voltage of the main power supply with the voltage of the backup power supply. The comparison result can also be obtained through the collector of the first transistor, and the switching control module can also obtain the comparison result based on the collector of the first transistor. Optionally, the transistor pair can also use two independent PNP transistors, or a dual NPN pair. In practical applications, the first transistor can also be replaced by a PMOS tube. Through this embodiment, the purpose of comparing the voltages of the main power supply and the backup power supply is achieved, and the purpose of transmitting the comparison result to the switching control module can also be achieved.
[0042] In an optional embodiment, the base of the first sub-transistor is connected to the first output end of the hysteresis control module, the base of the second sub-transistor is connected to the second output end of the hysteresis control module, and the base of the first sub-transistor is connected to the base of the second sub-transistor through a second resistor. In this embodiment, a second resistor is connected between the base of the first sub-transistor and the base of the second sub-transistor, and the first output end and the second output end of the hysteresis control module are also connected between the base of the first sub-transistor and the base of the second sub-transistor, that is, the first output end and the second output end of the hysteresis control module are connected to the two ends of the second resistor. Through this embodiment, the purpose of performing hysteresis control on the voltage comparison module through the hysteresis control module is achieved.
[0043] In an optional embodiment, the hysteresis control module includes a MOS tube, wherein the source electrode and the drain electrode of the MOS tube are respectively connected to the two ends of the second resistor. In this embodiment, when the MOS tube is in the on state, the second resistor will be short-circuited, and when the MOS tube is in the off state, the second resistor will generate a voltage, that is, the on-off state of the hysteresis control module itself can control the second resistor to be in a short-circuit state or a power-on state to generate a voltage, and then control the voltage comparison module to generate a hysteresis voltage. Optionally, the above-mentioned MOS tube can be a PMOS tube or an NMOS tube.
[0044] In an optional embodiment, the switching control module includes: a second triode and a third triode, wherein the base of the second triode is connected to the first output terminal of the voltage comparison module through a third resistor, the emitter of the second triode is configured to be grounded, and the collector of the second triode is connected to the second input terminal of the second controllable switch module and the input terminal of the hysteresis control module through a fourth resistor; the emitter of the third triode is configured to be connected to the load, and the collector of the third triode is connected to the second input terminal of the first controllable switch module through a fifth resistor. In this embodiment, the voltage comparison module achieves the purpose of controlling the second controllable switch module and the first controllable switch module through the second triode and the third triode included therein.
[0045] Obviously, the above-described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. The present invention is specifically described below in conjunction with the embodiments:
[0046] Figure 5 is a schematic diagram of the working state of the main and standby power supply switching scheme according to an embodiment of the present invention, such as Figure 5As shown in the figure, when the main power supply is supplied, if the backup power supply is greater than the main power supply + hysteresis voltage, it switches to the backup power supply; when the backup power supply is supplied, if the main power supply is greater than the backup power supply, it switches to the main power supply. The function of the hysteresis voltage is to prevent the power supply state from frequently switching between the main and backup power supplies when the voltages of the main and backup power supplies are almost equal.
[0047] Figure 6 is an example diagram of a main and standby power switching circuit according to a specific embodiment of the present invention. Figure 6 As shown, function module 1 is a voltage comparison module, function module 2 is a switching control module, function module 3 is a hysteresis control module, function modules 4 and 5 are controllable switch modules (corresponding to the aforementioned second controllable switch module and the first controllable switch module, respectively). Figure 6 The main and standby power switching circuit and principle are explained in the following figure:
[0048] The voltage comparison module is composed of a dual PNP transistor pair Q1 (corresponding to the aforementioned transistor pair), a PNP transistor Q3 (corresponding to the aforementioned first transistor), and a number of resistors and capacitors. Among them, R1, C2, R15, C5, and C3 are non-essential components, Q3 can be replaced with a P-channel MOS tube, and Q1 can be replaced with two independent PNP transistors.
[0049] The special connection of Q1A (corresponding to the second sub-transistor) and Q1B (corresponding to the first sub-transistor) constitutes a unique voltage comparator with voltage hysteresis function. At the same time, Q1A and Q1B are connected symmetrically to form a compensation effect, which can minimize the impact of Vbe changes caused by temperature changes, Vce and Ic current changes on voltage comparison accuracy.
[0050] When the backup power supply voltage is less than the main power supply voltage - the hysteresis voltage, Q1B is turned on, Q1A is turned off, pin 3 of Q1 is the main power supply voltage, and pin 6 of Q1 is 0V, so Q3 is not turned on, and pin 3 of Q3 (corresponding to the first output terminal of the aforementioned voltage comparison module) is 0V.
[0051] When the main power supply voltage - hysteresis voltage < backup power supply < main power supply + hysteresis voltage, Q1B is turned on, Q1A is turned on, Q1's 3rd pin is the main power supply voltage, and Q1's 6th pin is the backup power supply voltage. If the main power supply voltage > the backup power supply voltage, Q3 is not turned on, and Q3's 3rd pin is 0V; if the main power supply voltage < the backup power supply voltage, Q3 is turned on, and Q3's 3rd pin is the backup power supply voltage.
[0052] When the backup power supply voltage is greater than the main power supply + hysteresis voltage, Q1B is not conducting, Q1A is conducting, pin 3 of Q1 is at 0V, pin 6 of Q1 is at the backup power supply voltage, Q3 is conducting, and pin 3 of Q3 is at the backup power supply voltage.
[0053] The switching control module is composed of a PNP transistor Q2 (corresponding to the third transistor mentioned above), an NPN transistor Q4 (corresponding to the second transistor mentioned above) and several resistors and capacitors, among which R5 is a non-essential component. Q2 can be replaced by a P-channel MOS tube, and Q4 can be replaced by an N-channel MOS tube.
[0054] When the voltage comparison module outputs 0V voltage, Q4 is not conducting, Q2 is also not conducting, and then the function module 4 is controlled not to be conducting, the function module 5 is conducting, and the load power supply is provided by the main power supply;
[0055] When the voltage comparison module outputs a higher voltage, Q4 is turned on, Q2 is also turned on, and then the function module 4 is controlled to be turned on, and the function module 5 is not turned on, and the load power supply is provided by the backup power supply;
[0056] It should be noted that the switching control module has a dead zone control function, that is, it ensures that the functional module 4 and the functional module 5 are not turned on at the same time.
[0057] In particular, during the switching process, during the dead time when both functional modules 4 and 5 are in the off state, the diode combination circuit formed by the diodes or parasitic diodes of functional modules 4 and 5 ensures that the power supply of the load power supply will not be interrupted, thereby achieving seamless switching.
[0058] The functional module 3 in this embodiment is a hysteresis control module. M2 in the embodiment (corresponding to the MOS tube included in the aforementioned hysteresis control module) is only one of the implementation examples of this scheme. The main principle is to short-circuit the resistor R7 (corresponding to the aforementioned second resistor). Any other implementation method that can realize the short-circuit function of R7 is within the protection scope of the present invention.
[0059] Functional modules 4 and 5 in this embodiment are controllable switch modules. M1 (corresponding to the aforementioned second controllable switch module) and M3 (corresponding to the aforementioned first controllable switch module) in the implementation example are only one of the implementation examples of this implementation scheme. The controllable switch module in this scheme has the basic characteristics of having a diode combination structure and two controllable fully conductive paths. When the two controllable fully conductive paths are both turned off, the diode combination structure supplies power to the load power supply; the diode can be an independent diode device, or a structure with diode function parasitic on other devices, such as the body diode of a MOS tube. Any implementation method with the above characteristics is within the protection scope of this patent.
[0060] In the above embodiment, the voltage comparison module is the basis for the realization of the power switching solution. The voltage comparison module adopts an original circuit structure and only uses three transistors to realize the accurate voltage comparison function. It also has a hysteresis function and is the core of the solution. Figure 7The circuit principle of the voltage comparison module is further explained in detail. Figure 7 4 is a circuit schematic diagram of a voltage comparison module according to a specific embodiment of the present invention.
[0061] The minimum elements of the voltage comparison module are as follows: Figure 7 As shown, it includes PNP transistor Q1A, PNP transistor Q1B, resistors R3, R14, R7, R6, and R9, and M2 is a hysteresis control component (corresponding to the aforementioned hysteresis control module).
[0062] V1, V2 and C are the input ports of the circuit, and A and B are the output ports of the circuit.
[0063] The A and B output states are related to the conduction states of Q1A and Q1B, and the truth table is shown in Table 1 below.
[0064] Table 1
[0065] Q1A on state Q1B on state A point level status Level status of point B State 1 Shutdown Shutdown 0V 0V State 2 Conductivity Shutdown V1 0V State 3 Conductivity Conductivity V1 V2 State 4 Shutdown Conductivity 0V V2
[0066] In this embodiment, in order to obtain the maximum level change of point A and point B, state 2 and state 4 are used as the two states of this comparison circuit.
[0067] Next, the relationship between the conduction state of Q1A and Q1B and V1 and V2 will be analyzed in detail.
[0068] Since Q1A and Q1B use paired tubes, the Vbe of Q1A and Q1B are basically the same.
[0069] The on condition of Q1A is: V1-VD (voltage at point D)>Vbe; the off condition of Q1A is: V1-VD <Vbe。
[0070] The on condition of Q1B is: V2-VE (voltage at point E)>Vbe; the off condition of Q1B is: V1-VE <Vbe。
[0071] When the voltage at point C is a higher voltage, M2 is not conducting.
[0072] When the circuit is in state 2, Q1A is on and Q1B is off, then:
[0073]
[0074] From this we can deduce:
[0075]
[0076] It can be seen from the above formula that when in state 2, V1 needs to be greater than V2
[0077] When the circuit is in state 4, Q1B is on and Q1A is off, then:
[0078]
[0079] From this we can deduce:
[0080]
[0081] From the above formula, we can see that when in state 4, V2 needs to be larger than V1.
[0082] When the voltage at point C is a lower voltage and M2 is turned on, R7 is short-circuited by M2, so the equivalent resistance is 0 ohms.
[0083] When the circuit is in state 2, Q1A is turned on and Q1B is turned off. According to the above formula (1), it can be obtained that:
[0084] V1>V2, formula (3);
[0085] When the circuit is in state 4, Q1B is turned on and Q1A is turned off. According to the above formula (2), it can be obtained that:
[0086] V2>V1, formula (4).
[0087] Since the voltages at points A and B are compared through the output of Q3 (pin 3 of Q3), the truth table is shown in Table 2 below, considering the output state of Q3:
[0088] Table 2
[0089]
[0090] Since the on and off of M2 is controlled by the output of Q3, the truth table considering the on state of M2 is shown in Table 3 below:
[0091] Table 3
[0092]
[0093] Since the conduction state of Q1A and Q1B is controlled by the voltage of V1 (backup power supply) and V2 (main power supply), now consider switching from state 4 to state 2 and from state 2 to state 4. The voltage relationship between V1 (backup power supply) and V2 (main power supply) is as follows: Figure 8 As shown, Figure 8 4 is a schematic diagram of the relationship between the main and standby power supply voltages according to a specific embodiment of the present invention.
[0094] Assume that at time t0 The comparison circuit is in state 4, at which time Q3 is turned off, the output of pin 3 of Q3 is 0V, and M2 is in the off state.
[0095] Assume that from time t0 to t1, the voltage V2 starts to drop, and at time t1 Then the comparison circuit enters state 3. At this time, V2 > V1 - Vbe, Q3 is turned off, the output of pin 3 of Q3 is 0V, and M2 is in the off state.
[0096] From time t1 to t2, V2 continues to drop, and at time t2 (It is necessary to ensure V2 > V1 - Vbe by reasonably selecting the resistance value) Then the comparison circuit enters state 2, Q3 conducts, the output of pin 3 of Q3 is V1, and M2 enters the conducting state. Once M2 conducts, the condition for the comparison circuit to remain in state 2 becomes V2 < V1. Since at this time Therefore, the condition V2 < V1 can be more easily satisfied.
[0097] Assume that from time t2 to t3, V2 starts to rise. When V2 > V1, the comparison circuit enters state 4, Q3 is turned off, the output of pin 3 of Q3 is 0V, and M2 starts to turn off. Once M2 is turned off, the comparison circuit may enter state 3, but at this time V2 is definitely greater than V1 - Vbe, so Q3 remains off, and the output state of pin 3 of Q3 remains unchanged, staying at 0V.
[0098] It can also be seen from this that the hysteresis voltage of the comparison circuit is:
[0099]
[0100] Since Vbe is much smaller than V1, this hysteresis voltage is little affected by Vbe, that is to say, this hysteresis voltage is little affected by temperature. At the same time, it can also be seen that by adjusting the ratio of R7 and R14, the magnitude of the hysteresis voltage can be adjusted.
[0101] It should be noted that in the above embodiment, an accurate voltage comparison function can be completed by using simple discrete devices, with low cost; the main and standby power supply switching scheme itself does not require an additional stable power supply voltage, and the implementation of the entire scheme is simple; moreover, only during a short dead time, the diode combining method is used to supply power to the load, and otherwise, a low-impedance path is used to supply power to the load, which can be applied to occasions with large current and sensitive to power supply voltage drop; through the embodiment of the present invention, a voltage comparison structure is formed by using two symmetric PNP triodes, which has temperature, voltage, current compensation, and voltage hysteresis functions; and the scheme of this embodiment has a switching control circuit structure with dead time control, which can be used to prevent reverse current between the main and standby power supplies; at the same time, the controllable switch module has a diode combining structure, and the diode combining structure is used to supply power to the load during the switching dead time, so as to ensure that the power supply to the load will not be interrupted.
[0102] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0103] In this embodiment, a method for switching between a primary power supply and a secondary power supply is also provided, which is applied to any of the above-mentioned devices. Fig. 9 is a flow chart of a method for switching between a primary power supply and a secondary power supply according to an embodiment of the present invention. Fig. 9 As shown, the method comprises the following steps:
[0104] Step 902: the voltage comparison module compares the voltage of the main power supply with the voltage of the backup power supply to obtain a comparison result, wherein the comparison result is used to indicate a numerical relationship between the voltage of the main power supply and the voltage of the backup power supply;
[0105] Step 904: The switching control module controls the on and off of the first controllable switch module and the second controllable switch module based on the comparison result.
[0106] In an optional embodiment, the voltage comparison module compares the voltages of the main power supply and the backup power supply, including: the switching control module performs hysteresis control on the voltage comparison module through the hysteresis control module to form a hysteresis voltage; and the voltage comparison module compares the voltages of the main power supply and the backup power supply based on the hysteresis voltage.
[0107] In an optional embodiment, the switching control module controls the on and off of the first controllable switch module and the second controllable switch module based on the comparison result, including: when the switching control module determines that the comparison result meets the first target condition, the first controllable switch module is controlled to be in the on state, and the second controllable switch module is controlled to be in the off state; when the switching control module determines that the comparison result meets the second target condition, the first controllable switch module is controlled to be in the off state, and the second controllable switch module is controlled to be in the on state.
[0108] In an optional embodiment, it includes at least one of the following: the first target condition includes that the voltage value of the main power supply is greater than the voltage value of the backup power supply; the second target condition includes that the difference between the voltage value of the backup power supply and the voltage value of the main power supply is greater than a preset threshold.
[0109] In an optional embodiment, the voltage comparison module compares the voltage of the main power supply with the voltage of the backup power supply to obtain a comparison result, including: when the hysteresis voltage is zero, the voltage comparison module compares the voltage of the main power supply with the voltage of the backup power supply to obtain a first comparison result; when the hysteresis voltage is non-zero, the voltage comparison module compares the sum of the voltage of the main power supply and the hysteresis voltage with the voltage of the backup power supply to obtain a second comparison result.
[0110] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0111] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0112] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0113] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0114] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0115] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0116] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0117] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A main and standby power switching device, characterized in that: include: A voltage comparison module, a switching control module, a first controllable switch module, a second controllable switch module and a hysteresis control module, wherein: The voltage comparison module is connected to the main power supply and the backup power supply respectively, and is used to compare the voltage of the main power supply with the voltage of the backup power supply; The first controllable switch module is connected to the main power supply and the load respectively, and the second controllable switch module is connected to the backup power supply and the load respectively; The switching control module is connected to the voltage comparison module, and is connected to the first controllable switch module and the second controllable switch module. The switching control module is used to control the on and off of the first controllable switch module and the second controllable switch module based on the comparison result of the voltage comparison module; The hysteresis control module is connected to the switching control module and the voltage comparison module respectively, and the switching control module performs hysteresis control on the voltage comparison module through the hysteresis control module; The voltage comparison module includes: a transistor pair and a first transistor, wherein the emitter of the first sub-transistor included in the transistor pair is connected to the main power supply, and the emitter of the second sub-transistor included in the transistor pair is connected to the backup power supply; the collector of the first sub-transistor is connected to the base of the first transistor through a first resistor, the collector of the second sub-transistor is connected to the emitter of the first transistor, and the collector of the second sub-transistor is connected to the base of the first transistor through a first capacitor; the collector of the first transistor is connected to the first input end of the switching control module.
2. The device according to claim 1, characterized in that The first input terminal of the voltage comparison module is configured to be connected to the main power supply, and the second input terminal of the voltage comparison module is configured to be connected to the backup power supply; The first input end of the first controllable switch module is configured to be connected to the main power supply, and the first input end of the second controllable switch module is configured to be connected to the backup power supply; The first output end of the voltage comparison module is connected to the first input end of the switching control module, the first output end of the switching control module is connected to the second input end of the first controllable switch module, and the second output end of the switching control module is connected to the second input end of the second controllable switch module; The output end of the first controllable switch module is configured to be connected to the load, and the output end of the second controllable switch module is configured to be connected to the load; The input end of the hysteresis control module is connected to the second output end of the switching control module, and the first output end and the second output end of the hysteresis control module are connected to the third input end and the fourth input end of the voltage comparison module respectively.
3. The device according to claim 1, characterized in that The switching control module is used for controlling the first controllable switch module to be in an on state and controlling the second controllable switch module to be in an off state when the comparison result of the voltage comparison module meets the first target condition; The switching control module is used for controlling the first controllable switch module to be in an off state and controlling the second controllable switch module to be in an on state when the comparison result satisfies a second target condition.
4. The device according to claim 3, characterized in that Include at least one of the following: The first target condition includes that the voltage value of the main power supply is greater than the voltage value of the backup power supply; The second target condition includes that a difference between a voltage value of the backup power supply and a voltage value of the main power supply is greater than a preset threshold.
5. The device according to claim 4, characterized in that The preset thresholds include: The hysteresis voltage provided by the hysteresis control module.
6. The device according to claim 1, characterized in that The base of the first sub-transistor is connected to the first output end of the hysteresis control module, the base of the second sub-transistor is connected to the second output end of the hysteresis control module, and the base of the first sub-transistor and the base of the second sub-transistor are connected through a second resistor.
7. The device according to claim 6, characterized in that The hysteresis control module includes a MOS tube, wherein a source electrode and a drain electrode of the MOS tube are respectively connected to two ends of the second resistor.
8. The device according to claim 2, characterized in that The switching control module includes: a second triode and a third triode, wherein: The base of the second triode is connected to the first output terminal of the voltage comparison module through a third resistor, the emitter of the second triode is configured to be grounded, and the collector of the second triode is connected to the second input terminal of the second controllable switch module and the input terminal of the hysteresis control module through a fourth resistor; The emitter of the third triode is configured to be connected to the load, and the collector of the third triode is connected to the second input end of the first controllable switch module through a fifth resistor.
9. A method for switching between a primary power supply and a standby power supply, characterized in that: The device according to any one of claims 1 to 8 comprises: The voltage comparison module compares the voltage of the main power supply with the voltage of the backup power supply to obtain a comparison result, wherein the comparison result is used to indicate a numerical relationship between the voltage of the main power supply and the voltage of the backup power supply; The switching control module controls the on and off of the first controllable switch module and the second controllable switch module based on the comparison result; The voltage comparison module includes: a transistor pair and a first transistor, wherein the emitter of the first sub-transistor included in the transistor pair is connected to the main power supply, and the emitter of the second sub-transistor included in the transistor pair is connected to the backup power supply; the collector of the first sub-transistor is connected to the base of the first transistor through a first resistor, the collector of the second sub-transistor is connected to the emitter of the first transistor, and the collector of the second sub-transistor is connected to the base of the first transistor through a first capacitor; the collector of the first transistor is connected to the first input end of the switching control module.
10. The method according to claim 9, characterized in that The voltage comparison module compares the voltage of the main power supply with the voltage of the backup power supply, including: The switching control module performs hysteresis control on the voltage comparison module through the hysteresis control module to form a hysteresis voltage; The voltage comparison module compares the voltages of the main power source and the backup power source based on the hysteresis voltage.
11. The method according to claim 9, characterized in that The switching control module controls the on and off of the first controllable switch module and the second controllable switch module based on the comparison result, including: When determining that the comparison result meets the first target condition, the switching control module controls the first controllable switch module to be in an on state, and controls the second controllable switch module to be in an off state; When determining that the comparison result meets the second target condition, the switching control module controls the first controllable switch module to be in an off state, and controls the second controllable switch module to be in an on state.
12. The method according to claim 11, characterized in that Include at least one of the following: The first target condition includes that the voltage value of the main power supply is greater than the voltage value of the backup power supply; The second target condition includes that a difference between a voltage value of the backup power supply and a voltage value of the main power supply is greater than a preset threshold.
13. The method according to claim 10, characterized in that The voltage comparison module compares the voltage of the main power supply with the voltage of the backup power supply to obtain a comparison result, including: When the hysteresis voltage is zero, the voltage comparison module compares the voltage of the main power supply with the voltage of the backup power supply to obtain a first comparison result; When the hysteresis voltage is non-zero, the voltage comparison module compares the sum of the voltage of the main power supply and the hysteresis voltage with the voltage of the backup power supply to obtain a second comparison result.
Citation Information
Patent Citations
Control circuit powered by double power supplies in switched manner
CN106208358A
Power supply switching circuit
CN202134953U