A backup power switching circuit and motor controller thereof

CN122801550APending Publication Date: 2026-09-22HEFEI JUYI POWER SYST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611078005.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-20
Publication Date
2026-09-22

AI Technical Summary

Technical Problem

1、为保证正常工作状态下由主电源供电,备用电源电压必须低于主电源的最低工作电压(如9V),导致备用电源的电压设计灵活性不足,需专门配置低压备用电源

Benefits of technology

本发明通过电压监测单元和比较单元实时检测主电源电压,并在主电源掉电时由比较单元输出的切换信号经驱动单元主动控制可控开关导通,使备用电源无缝切入负载端,实现了主备电源的主动式快速切换,克服了传统二极管“或”逻辑被动切换中备用电源电压须低于主电源电压的限制,从而允许选用更高电压的备用电源以降低切入损耗、提升系统工作效率;同时,通过缓启动单元在可控开关导通时延缓其控制端的电压变化速率,有效抑制了切换过程中的浪涌冲击电流,避免了对后端负载的电流冲击,提高了电机控制器电源系统的可靠性和设计灵活性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122801550A_ABST
    Figure CN122801550A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of motor controller power management, and discloses a standby power switching circuit and a motor controller thereof, which comprise a main power input end, a standby power input end and a power output end, and further comprise: a controllable switch electrically connected between the standby power input end and the power output end; a voltage monitoring unit electrically connected with the main power input end and outputting a detection signal representing the main power voltage; a comparison unit with input ends electrically connected with the output end of the voltage monitoring unit and a reference signal end respectively and with an output end outputting a switching signal; a driving unit electrically connected between the output end of the comparison unit and the control end of the controllable switch; and a soft-start unit electrically connected with the control end of the controllable switch and used for delaying the voltage change rate of the control end when the controllable switch is turned on. The standby power voltage is allowed to be higher than the main power voltage, the circuit is simple, switching is fast, and the inrush current can be effectively inhibited.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power management technology for motor controllers, and more particularly to a backup power switching circuit for a motor controller and the motor controller thereof. Background Technology

[0002] In motor controller systems, low-voltage batteries (such as 12V lead-acid batteries) are typically used as the main power source. However, in actual operating conditions, the main power supply may experience transient power outages or voltage drops due to loose connectors, blown fuses, or excessive battery internal resistance. To prevent data loss or control logic malfunctions caused by system restarts, a backup power supply is usually required, with seamless switching in the event of a main power failure.

[0003] Existing power switching schemes mostly use diode OR logic connections, meaning the main power supply and backup power supply are output through diodes connected in parallel. While this scheme is simple in structure, it has the following drawbacks: 1. To ensure that the main power supply is used for normal operation, the backup power supply voltage must be lower than the minimum operating voltage of the main power supply (such as 9V). This results in insufficient flexibility in the voltage design of the backup power supply, and a low-voltage backup power supply needs to be specially configured.

[0004] 2. If the backup power supply voltage is too low, the operating current will be large when it is switched on, resulting in significant losses in diodes and lines, prominent heat generation issues, and may even cause the system voltage to fall below the undervoltage threshold, thus preventing normal operation.

[0005] To address the aforementioned issues, some existing technologies employ active switching schemes based on MOS switches. However, these schemes often involve complex circuit structures and do not adequately consider the suppression of surge current during the switching process.

[0006] Therefore, there is an urgent need for a backup power switching solution that is simple in circuitry, allows for flexible design of backup power supply voltage, enables rapid switching, and can effectively suppress surge impact. Summary of the Invention

[0007] The technical problem that this invention aims to solve is: how to provide an active backup power switching circuit that allows the backup power supply voltage to be higher than the main power supply voltage, has a simple circuit, switches quickly, and can effectively suppress inrush current.

[0008] In a first aspect, to solve the above-mentioned technical problems, a backup power switching circuit is provided, applied to a motor controller, including a main power input terminal, a backup power input terminal, and a power output terminal, and further comprising: A controllable switch is electrically connected between the backup power input terminal and the power output terminal; A voltage monitoring unit is electrically connected to the main power input terminal and outputs a detection signal characterizing the main power voltage. The comparison unit has its input terminals electrically connected to the output terminal and the reference signal terminal of the voltage monitoring unit, respectively, and its output terminal outputs a switching signal. The drive unit is electrically connected between the output terminal of the comparator unit and the control terminal of the controllable switch; and The soft-start unit is electrically connected to the control terminal of the controllable switch to delay the rate of voltage change at the control terminal when the controllable switch is turned on.

[0009] Furthermore, the soft-start unit includes an RC network; the RC network is connected to the control terminal of the controllable switch and is used to adjust the rising slope of the voltage at the control terminal when the controllable switch is turned on.

[0010] Preferably, the controllable switch is a PMOS transistor; the source of the PMOS transistor is connected to the backup power input terminal, and the drain is connected to the power output terminal.

[0011] Furthermore, it also includes an anti-backflow diode electrically connected between the main power input terminal and the power output terminal; the anode of the anti-backflow diode is electrically connected to the main power input terminal, and the cathode is electrically connected to the power output terminal; a diode that conducts in the same direction as the controllable switch is also connected in series between the backup power input terminal and the power output terminal.

[0012] Furthermore, the voltage monitoring unit includes a first voltage divider resistor and a second voltage divider resistor connected in series between the main power input terminal and ground; the intermediate node between the first voltage divider resistor and the second voltage divider resistor is connected to the comparison unit.

[0013] Furthermore, the comparison unit includes a comparator; the first input terminal of the comparator is electrically connected to the output terminal of the voltage monitoring unit, and the second input terminal of the comparator is electrically connected to the reference signal terminal.

[0014] Furthermore, the comparison unit also includes a hysteresis network; the hysteresis network is electrically connected between the output terminal of the comparator and the second input terminal of the comparator, so that the backup power switching circuit has different power-down switching thresholds and recovery switching thresholds.

[0015] Furthermore, the hysteresis network includes a feedback resistor; one end of the feedback resistor is electrically connected to the output terminal of the comparator, and the other end is electrically connected to the second input terminal of the comparator.

[0016] Furthermore, the reference signal terminal includes a reference voltage generation circuit; the reference voltage generation circuit includes a third voltage divider resistor and a fourth voltage divider resistor, one end of the third voltage divider resistor is electrically connected to the power supply terminal, the other end is electrically connected to one end of the fourth voltage divider resistor and the second input terminal of the comparator, and the other end of the fourth voltage divider resistor is grounded.

[0017] Furthermore, the driving unit includes an NPN transistor; the base of the NPN transistor is electrically connected to the output terminal of the comparator unit, the collector is electrically connected to the gate of the PMOS transistor, and the emitter is grounded; the gate of the PMOS transistor is also electrically connected to the backup power input terminal through a pull-up resistor.

[0018] Furthermore, the soft-start unit includes a fifth resistor, a sixth resistor, and a first capacitor; the fifth resistor and the sixth resistor are connected in series between the backup power input terminal and ground; the gate of the PMOS transistor is electrically connected to the intermediate node of the fifth resistor and the sixth resistor; the first capacitor is connected in parallel with the sixth resistor.

[0019] Furthermore, it also includes an output filter capacitor; the output filter capacitor is electrically connected between the power output terminal and ground.

[0020] A second aspect of the present invention provides a motor controller, including the aforementioned backup power switching circuit.

[0021] Compared with the prior art, the present invention has at least the following beneficial effects: This invention uses a voltage monitoring unit and a comparison unit to detect the main power supply voltage in real time. When the main power supply fails, the switching signal output by the comparison unit actively controls the controllable switch to turn on via the drive unit, enabling seamless switching of the backup power supply to the load. This achieves active and rapid switching between the main and backup power supplies, overcoming the limitation that the backup power supply voltage must be lower than the main power supply voltage in the passive switching of traditional diode "OR" logic. This allows for the selection of a higher voltage backup power supply to reduce switching losses and improve system efficiency. At the same time, by using a soft-start unit to delay the rate of voltage change at the controllable switch's control terminal when it is turned on, the surge current during the switching process is effectively suppressed, avoiding current impact on the downstream load and improving the reliability and design flexibility of the motor controller power supply system. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a circuit schematic diagram disclosed in an embodiment of the present invention.

[0024] In the picture: 100. Main power input terminal; 110. Backup power input terminal; 120. Power output terminal; 200. Controllable switch; 210. Drive unit; 220. Soft start unit; 300. Voltage monitoring unit; 310. Comparison unit. Detailed Implementation

[0025] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0026] This invention aims to provide a backup power switching circuit for motor controllers to prevent low-voltage power failure. The circuit mainly includes a main power input terminal 100, a backup power input terminal 110, a power output terminal 120, a controllable switch 200, a drive unit 210, a soft-start unit 220, a voltage monitoring unit 300, and a comparison unit 310. It can replace the passive switching scheme using diode backup power, allowing the use of a higher backup voltage and enabling rapid power switching while suppressing surge current impacts caused by switching.

[0027] like Figure 1 As shown, in this embodiment, the backup power switching circuit includes a main power input terminal KL30, a backup power input terminal KL30_Backup, and a power output terminal Vout. The main power input terminal KL30 is used to connect to the main power supply, which is typically a low-voltage battery in the motor controller system, such as a 12V lead-acid battery. The backup power input terminal KL30_Backup is used to connect to a backup power supply, which can be a backup battery, supercapacitor, or other energy storage device. The power output terminal Vout is used to connect to the load, which is a load circuit in the motor controller system that requires uninterrupted power supply, such as a control chip, drive circuit, or sensor.

[0028] A reverse-current protection diode D5 is connected between the main power input terminal KL30 and the power output terminal Vout. The anode of diode D5 is connected to the main power input terminal KL30, and the cathode is connected to the power output terminal Vout.

[0029] Those skilled in the art will understand that when the main power supply voltage is normal, the main power supply supplies power to the power output terminal Vout through diode D5; when the main power supply voltage drops or disappears, diode D5 is reverse-cut off to prevent the current of the backup power supply from flowing back to the main power supply input terminal KL30, thereby ensuring that all the energy of the backup power supply is supplied to the load, while avoiding adverse effects of the backflow current on the main power supply side circuit.

[0030] A controllable switch M1 is connected between the backup power input terminal KL30_Backup and the power output terminal Vout. In this embodiment, the controllable switch M1 is implemented using a PMOS transistor. The source of the PMOS transistor M1 is connected to the backup power input terminal KL30_Backup, and the drain is connected to the power output terminal Vout. The gate of the PMOS transistor M1 serves as the control terminal of the controllable switch, used to receive control signals to control the conduction and turn-off of the PMOS transistor M1. When the PMOS transistor M1 is turned on, the backup power supply supplies power to the power output terminal Vout via the PMOS transistor M1; when the PMOS transistor M1 is turned off, the path between the backup power supply and the power output terminal Vout is cut off.

[0031] It should be noted that although a PMOS transistor is used to implement the controllable switch 200 in this embodiment, other types of power switching devices can be used for the controllable switch 200 in other embodiments, such as NMOS transistors, depletion-mode MOSFETs, insulated-gate bipolar transistors (IGBTs), or relays, as long as they can achieve the on and off functions under the control of the drive unit 210. The PMOS transistor is the preferred option for the controllable switch 200 because it conducts when the gate voltage is lower than the source voltage and the voltage difference is sufficiently large. Its control logic is relatively simple, and it has low on-resistance and low conduction loss, making it suitable for low-voltage, high-current power switching applications.

[0032] A diode D4 is also connected between the backup power input terminal KL30_Backup and the power output terminal Vout. Diode D4 is connected in series with PMOS transistor M1. Specifically, the anode of diode D4 is connected to the backup power input terminal KL30_Backup, and the cathode is connected to the source of PMOS transistor M1; or, in another embodiment, the anode of diode D4 is connected to the drain of PMOS transistor M1, and the cathode is connected to the power output terminal Vout. In other words, diode D4 and PMOS transistor M1 are connected in series between the backup power input terminal KL30_Backup and the power output terminal Vout, and the conduction direction of diode D4 is the same as the current direction when PMOS transistor M1 is turned on, that is, current is allowed to flow from the backup power input terminal KL30_Backup to the power output terminal Vout.

[0033] Those skilled in the art will understand that when PMOS transistor M1 is turned on, diode D4 is also forward-biased, and the backup power supply supplies power to the power output terminal Vout via PMOS transistor M1 and diode D4; when PMOS transistor M1 is turned off, diode D4 is reverse-biased, preventing current from the main power supply or other paths from flowing back to the backup power input terminal KL30_Backup, thereby protecting the backup power supply. Furthermore, during the transient process of PMOS transistor M1 turning on, due to the charging effect of parasitic capacitance, the gate voltage needs a certain amount of time to rise. During this period, PMOS transistor M1 is not yet fully turned on, and diode D4 can serve as an auxiliary path, providing initial current support to the load, which helps to achieve a smooth transition during power switching.

[0034] The backup power switching circuit 100 also includes a voltage monitoring unit 300. The voltage monitoring unit 300 is connected to the main power input terminal KL30 and is used to output a detection signal characterizing the main power voltage.

[0035] In this embodiment, the voltage monitoring unit 300 includes a first voltage divider resistor R6 and a second voltage divider resistor R7. One end of the first voltage divider resistor R6 is connected to the main power input terminal KL30, and the other end is connected to one end of the second voltage divider resistor R7 and the inverting input terminal of the comparator unit 310. The other end of the second voltage divider resistor R7 is grounded. The first voltage divider resistor R6 and the second voltage divider resistor R7 form a resistor voltage divider network. After the main power supply voltage is divided by the first voltage divider resistor R6 and the second voltage divider resistor R7, a voltage divider signal is formed on the second voltage divider resistor R7. This voltage divider signal is the detection signal characterizing the main power supply voltage and is input to the comparator unit 310.

[0036] The voltage monitoring unit 300 is implemented using a resistor divider network, which has advantages such as simple structure, low cost, fast response speed, and high reliability. Its voltage division ratio is determined by the resistance ratio of the first voltage divider resistor R6 and the second voltage divider resistor R7. In practical design, the resistance values ​​of the first voltage divider resistor R6 and the second voltage divider resistor R7 should be reasonably selected based on the normal operating voltage range of the main power supply, the input voltage range of the comparator unit 310, and the required switching threshold. For example, when the main power supply voltage is 12V, if the acceptable input voltage range for the inverting input terminal of the comparator unit 310 is 0~5V, then the voltage division ratio of the first voltage divider resistor R6 and the second voltage divider resistor R7 should ensure that when the main power supply voltage is within the normal operating range, the voltage at the inverting input terminal does not exceed the input common-mode range of the comparator unit 310.

[0037] The backup power switching circuit 100 also includes a comparison unit 310. The comparison unit 310 is connected to both the output terminal and the reference signal terminal of the voltage monitoring unit 300, and outputs a switching signal. In this embodiment, the comparison unit 310 includes a comparator U6. The inverting input terminal (IN-) of the comparator U6 is connected to the output terminal of the voltage monitoring unit 300, specifically the intermediate node between the first voltage divider resistor R6 and the second voltage divider resistor R7, and is used to receive a detection signal characterizing the main power supply voltage. The non-inverting input terminal (IN+) of the comparator U6 is connected to the reference signal terminal and is used to receive the reference signal Vref. The output terminal (OUT) of the comparator U6 outputs the switching signal.

[0038] Those skilled in the art will understand that comparator U6 compares the voltage at the inverting input terminal with the voltage at the non-inverting input terminal. When the voltage at the inverting input terminal is higher than the voltage at the non-inverting input terminal, comparator U6 outputs a low level; when the voltage at the inverting input terminal is lower than the voltage at the non-inverting input terminal, comparator U6 outputs a high level. Since the voltage at the inverting input terminal is obtained by dividing the main power supply voltage through resistors, the output level of comparator U6 reflects the relationship between the main power supply voltage and a preset threshold.

[0039] Specifically, when the main power supply voltage is normal (e.g., within the range of 9V~16V), after voltage division by the first voltage divider resistor R6 and the second voltage divider resistor R7, the voltage at the inverting input terminal of comparator U6 is higher than the reference voltage at the non-inverting input terminal, and comparator U6 outputs a low level. This low-level switching signal is output to the drive unit 210. When the main power supply voltage drops below a preset threshold, after voltage division by the first voltage divider resistor R6 and the second voltage divider resistor R7, the voltage at the inverting input terminal of comparator U6 is lower than the reference voltage at the non-inverting input terminal, comparator U6 flips, and outputs a high level. This high-level switching signal is output to the drive unit 210.

[0040] The reference signal terminal is used to provide a reference signal Vref to the non-inverting input of comparator U6. In this embodiment, the reference signal terminal includes a reference voltage generation circuit. The reference voltage generation circuit includes a fourth voltage divider resistor R11, a fifth voltage divider resistor R12, and a power supply terminal V8. One end of the fourth voltage divider resistor R11 is connected to the power supply terminal V8, and the other end is connected to one end of the fifth voltage divider resistor R12 and the non-inverting input of comparator U6. The other end of the fifth voltage divider resistor R12 is grounded. The power supply terminal V8 is connected to a power supply voltage, which can be taken from a backup power supply or an independent reference voltage source.

[0041] In this design, the fourth voltage divider resistor R11 and the fifth voltage divider resistor R12 form a reference voltage divider network. The voltage at the power supply terminal V8 is divided by the fourth and fifth voltage divider resistors R11 and R12, resulting in a stable reference voltage across the fifth voltage divider resistor R12. This reference voltage is then input to the non-inverting input of comparator U6. The specific value of the reference voltage is determined by the voltage at the power supply terminal V8 and the resistance ratio of the fourth and fifth voltage divider resistors R11 and R12. In practical designs, the resistance values ​​of the fourth and fifth voltage divider resistors R11 and R12 should be appropriately selected based on the required switching threshold and the normal operating voltage range of the main power supply.

[0042] Preferably, the power supply terminal V8 is connected to the voltage of the backup power input terminal KL30_Backup. Since the voltage of the backup power input terminal KL30_Backup is relatively stable (especially after the main power supply fails, the backup power supply can still maintain the output voltage), using the backup power supply as the power source for the power supply terminal V8 ensures that the comparator U6 can still operate normally after the main power supply fails, thus reliably completing the power switching. Alternatively, the power supply terminal V8 can also be connected to a high-precision reference voltage output from a dedicated reference voltage source chip (such as a voltage reference IC) to obtain a more stable and accurate reference signal.

[0043] The backup power switching circuit 100 also includes a hysteresis network. The hysteresis network is connected between the output and non-inverting input of comparator U6, and is used to enable the backup power switching circuit 100 to have different power-down switching thresholds and recovery switching thresholds. In this embodiment, the hysteresis network includes a feedback resistor R13. One end of the feedback resistor R13 is connected to the output of comparator U6, and the other end is connected to the non-inverting input of comparator U6.

[0044] Those skilled in the art will understand that when the output of comparator U6 is low, the feedback resistor R13 feeds the low level of the output back to the non-inverting input, pulling the voltage at the non-inverting input down to a lower value (compared to the reference voltage without a hysteresis network). At this time, if the main power supply voltage drops, the voltage at the inverting input also drops. Comparator U6 will only flip when it drops below this lower non-inverting input voltage. The main power supply voltage corresponding to this lower voltage value is the power-down switching threshold. When comparator U6 flips, the output becomes high, and the feedback resistor R13 feeds the high level back to the non-inverting input, pulling the voltage at the non-inverting input up to a higher value. At this time, if the main power supply voltage recovers and rises, the voltage at the inverting input also rises. Comparator U6 will only flip again when it rises above this higher non-inverting input voltage. The main power supply voltage corresponding to this higher voltage value is the recovery switching threshold.

[0045] Therefore, the hysteresis network gives the backup power switching circuit 100 a hysteresis characteristic—the power-down switching threshold is lower than the recovery switching threshold, and a certain hysteresis voltage is formed between the two. The existence of this hysteresis voltage prevents the comparator U6 from frequently switching, causing the PMOS transistor M1 to repeatedly turn on and off, when the main power supply voltage fluctuates near the switching threshold, thus avoiding system oscillation and improving the stability and reliability of power switching. The magnitude of the hysteresis voltage is jointly determined by the resistance value of the feedback resistor R13 and the resistance values ​​of the fourth voltage divider resistor R11 and the fifth voltage divider resistor R12. In practical designs, the resistance value of the feedback resistor R13 should be reasonably selected according to the required hysteresis voltage. Typically, a hysteresis voltage design within the range of 0.1~0.5V is sufficient for most application requirements.

[0046] The backup power switching circuit 100 also includes a drive unit 210. The drive unit 210 is connected between the output of the comparator unit 310 and the control terminal of the controllable switch 200, and is used to drive the controllable switch 200 to turn on or off according to the switching signal. In this embodiment, the drive unit 210 includes an NPN transistor Q1. The base of the NPN transistor Q1 is connected to the output of the comparator U6, the collector is connected to the gate of the PMOS transistor M1, and the emitter is grounded.

[0047] The operating state of NPN transistor Q1 is controlled by the switching signal output by comparator U6. When comparator U6 outputs a low level, the base of NPN transistor Q1 is pulled low, and NPN transistor Q1 is in the off state. At this time, the gate of PMOS transistor M1 is pulled high to the potential of the backup power input terminal KL30_Backup through pull-up resistor R1, and the gate-source voltage Vgs of PMOS transistor M1 is close to 0V, and PMOS transistor M1 is in the off state. When comparator U6 outputs a high level, the base of NPN transistor Q1 receives a high-level drive, and NPN transistor Q1 enters the saturation conduction state. At this time, the gate of PMOS transistor M1 is pulled low to ground potential through the conducting NPN transistor Q1, and the absolute value of the gate-source voltage Vgs of PMOS transistor M1 increases. When the absolute value of Vgs exceeds the conduction threshold voltage Vgs(th) of PMOS transistor M1, PMOS transistor M1 conducts.

[0048] It should be noted that the driving unit 210 is implemented using an NPN transistor, which has advantages such as low cost, strong driving capability, and fast switching speed. However, in other embodiments, the driving unit 210 may also use other types of switching devices or driving circuits, such as NMOS transistors, Darlington transistors, optocoupler isolation drivers, or dedicated gate driver chips.

[0049] The gate of PMOS transistor M1 is also connected to the backup power input terminal KL30_Backup via a pull-up resistor R1. One end of the pull-up resistor R1 is connected to the backup power input terminal KL30_Backup, and the other end is connected to the gate of PMOS transistor M1 (i.e., connected to the collector of NPN transistor Q1). The function of the pull-up resistor R1 is to: when NPN transistor Q1 is off, pull the gate of PMOS transistor M1 high to the potential of the backup power input terminal KL30_Backup, thereby ensuring that PMOS transistor M1 is reliably turned off; when NPN transistor Q1 is on, the pull-up resistor R1 limits the current flowing from the backup power input terminal KL30_Backup to the collector of NPN transistor Q1, thus providing current limiting protection.

[0050] The backup power switching circuit 100 also includes a soft-start unit 220. The soft-start unit 220 is connected to the control terminal of the controllable switch 200 and is used to delay the rate of voltage change at the control terminal when the controllable switch 200 is turned on. In this embodiment, the soft-start unit 220 includes an RC network. This RC network is connected to the gate of the PMOS transistor M1 and is used to adjust the rising slope of the gate voltage when the PMOS transistor M1 is turned on. Specifically, the RC network includes a sixth resistor R2, a seventh resistor R1 (i.e., a pull-up resistor R1), and a first capacitor C4. One end of the sixth resistor R2 is connected to the backup power input terminal KL30_Backup, and the other end is connected to the gate of the PMOS transistor M1. One end of the seventh resistor R1 is connected to the backup power input terminal KL30_Backup, and the other end is connected to the gate of the PMOS transistor M1. One end of the first capacitor C4 is connected to the gate of the PMOS transistor M1, and the other end is grounded.

[0051] It should be noted that in this embodiment, the seventh resistor R1 is also used as a pull-up resistor, the sixth resistor R2 and the seventh resistor R1 are connected in parallel between the backup power input terminal KL30_Backup and the gate of the PMOS transistor M1, and the first capacitor C4 is connected between the gate of the PMOS transistor M1 and ground. The sixth resistor R2, the seventh resistor R1 and the first capacitor C4 together form an RC network.

[0052] Those skilled in the art will understand that when comparator U6 outputs a high level and NPN transistor Q1 is turned on, the gate of PMOS transistor M1 is pulled low to ground potential through NPN transistor Q1. However, due to the presence of the first capacitor C4, the gate voltage cannot jump instantaneously, but gradually decreases according to the charging and discharging law of the RC circuit. Simultaneously, the voltage at the backup power input terminal KL30_Backup charges the first capacitor C4 through the sixth resistor R2 and the seventh resistor R1, further delaying the change in gate voltage. The rate of decrease of the gate voltage is determined by the product of the sixth resistor R2, the seventh resistor R1, and the first capacitor C4 (i.e., the RC time constant). By appropriately selecting the parameters of the sixth resistor R2, the seventh resistor R1, and the first capacitor C4, the gate voltage of PMOS transistor M1 can be controlled to decrease slowly at a desired slope, thereby gradually turning on PMOS transistor M1.

[0053] The on-resistance of PMOS transistor M1 gradually decreases, and the current flowing through it gradually increases, rather than instantaneously increasing to its maximum value. This effectively reduces the rate of change of current when the backup power supply switches to the load, preventing excessive surge current from adversely affecting the load and backup power supply. Especially when there is a large filter capacitor on the load side, without the soft-start unit 220, the instantaneous conduction of PMOS transistor M1 would cause the backup power supply to rapidly charge the filter capacitor, generating a large surge current that could lead to a sudden voltage drop in the backup power supply, excessive line voltage drop, or even damage to PMOS transistor M1. The soft-start unit 220 effectively solves this problem, improving the reliability and safety of the system.

[0054] Those skilled in the art should know that the specific parameters of the RC network (i.e., the values ​​of the sixth resistor R2, the seventh resistor R1, and the first capacitor C4) should be determined comprehensively based on the load characteristics, the output capability of the backup power supply, and the maximum allowable inrush current in the actual application scenario. For example, if the load-side filter capacitor is large, a larger RC time constant is required to make the conduction process of the PMOS transistor M1 smoother; if a faster switching speed is required, a smaller RC time constant is required to achieve a balance between suppressing inrush current and ensuring fast switching.

[0055] The backup power switching circuit 100 also includes an output filter capacitor C5. The output filter capacitor C5 is connected between the power output terminal Vout and ground, and is used to regulate and filter the output voltage at the power output terminal Vout. The function of the output filter capacitor C5 is to smooth the output voltage ripple and suppress voltage spikes during the main / backup power switching process and during steady-state power supply, ensuring that the power output terminal Vout outputs a stable DC voltage to supply the load. The capacitance value of the output filter capacitor C5 should be reasonably selected based on the load's operating current and allowable voltage ripple. Typically, in motor controller applications, the capacitance value of the output filter capacitor C5 is between tens and hundreds of microfarads.

[0056] The following provides a detailed description of the operation of the backup power switching circuit in this embodiment (normal power supply mode, power failure switching mode, and main power recovery mode).

[0057] I. Normal Power Supply Mode When the main power supply is operating normally, the main power input terminal KL30 is connected to the normal voltage. For a typical 12V lead-acid battery, the normal operating voltage range is 9V to 16V. At this time, the main power supply voltage is divided by the first voltage divider resistor R6 and the second voltage divider resistor R7, and a detection signal is formed on the second voltage divider resistor R7. This detection signal is input to the inverting input terminal of comparator U6. The non-inverting input terminal of comparator U6 is connected to the reference signal Vref generated by the voltage division of the fourth voltage divider resistor R11 and the fifth voltage divider resistor R12.

[0058] When the main power supply voltage is normal, the voltage value of the detection signal is higher than that of the reference signal Vref. Comparator U6 compares the voltage at the inverting input with the voltage at the non-inverting input. Since the voltage at the inverting input is higher than that at the non-inverting input, the output of comparator U6 is low. This low-level switching signal is applied to the base of NPN transistor Q1, pulling the base of NPN transistor Q1 low and putting NPN transistor Q1 in the off state.

[0059] When NPN transistor Q1 is off, the gate of PMOS transistor M1 is pulled high to the potential of the backup power input terminal KL30_Backup through pull-up resistor R1 (the seventh resistor). At this time, the source of PMOS transistor M1 is also connected to the backup power input terminal KL30_Backup, so the gate-source voltage Vgs of PMOS transistor M1 is approximately 0V. The absolute value of this voltage is less than the absolute value of the turn-on threshold voltage Vgs(th) of PMOS transistor M1, so PMOS transistor M1 is in the off state, and the voltage at the backup power input terminal cannot be transmitted to the power output terminal Vout through PMOS transistor M1.

[0060] In the normal power supply path, the voltage at the main power input terminal KL30 is transmitted to the power output terminal Vout via diode D5. Since diode D5 is forward-biased, its forward voltage drop is typically 0.3V~0.7V (depending on the diode type and current). The voltage at the power output terminal Vout is approximately equal to the main power supply voltage minus the forward voltage drop of diode D5. The load is powered by the main power supply via diode D5.

[0061] In normal power supply mode, the path between the backup power input terminal KL30_Backup and the power output terminal Vout is completely cut off because PMOS transistor M1 is turned off. Effective isolation is achieved between the backup power supply and the main power supply through the reverse cutoff of diodes D5 and D4, ensuring they do not interfere with each other. Diode D5 prevents current from the backup power supply from flowing back to the main power input terminal KL30, and diode D4 prevents current from the main power supply from flowing back to the backup power input terminal KL30_Backup.

[0062] II. Power Failure Switching Mode (If the main power supply fails, it switches to the backup power supply) When the main power supply fails or the voltage drops, for example due to loose connectors, blown fuses, or excessive battery internal resistance, the voltage at the main power input terminal KL30 begins to decrease. As the main power supply voltage decreases, the detection signal voltage obtained after voltage division by the first voltage divider resistor R6 and the second voltage divider resistor R7 also decreases.

[0063] When the main power supply voltage drops below the preset power-down switching threshold, the voltage at the inverting input of comparator U6 is lower than the reference signal Vref at the non-inverting input (due to the hysteresis network, the voltage at the non-inverting input is at a lower value at this time). Comparator U6 flips, and its output changes from low to high. This high-level switching signal is applied to the base of NPN transistor Q1, and the base of NPN transistor Q1 receives a high-level drive, causing NPN transistor Q1 to enter saturation conduction.

[0064] When NPN transistor Q1 is turned on, the gate of PMOS transistor M1 is pulled down to ground potential through the collector-emitter path of NPN transistor Q1. Under the action of the soft-start unit 220 (RC network), the gate voltage of PMOS transistor M1 does not jump to ground potential instantaneously, but gradually decreases at a controlled slope. Specifically, the first capacitor C4 discharges through NPN transistor Q1, while the voltage at the backup power input terminal KL30_Backup charges the first capacitor C4 through the sixth resistor R2 and the seventh resistor R1. The combined effect of these two factors determines the rate of decrease of the gate voltage.

[0065] As the gate voltage of PMOS transistor M1 gradually decreases, the absolute value of the gate-source voltage Vgs gradually increases. When the absolute value of Vgs exceeds the turn-on threshold voltage Vgs(th) of PMOS transistor M1, PMOS transistor M1 begins to conduct. The on-resistance of PMOS transistor M1 gradually decreases as the gate voltage further decreases, and the current flowing through PMOS transistor M1 gradually increases.

[0066] After PMOS transistor M1 is turned on, the voltage at the backup power input terminal KL30_Backup is transferred to the power output terminal Vout via PMOS transistor M1 and diode D4. Because the on-resistance Rds(on) of PMOS transistor M1 is very small when it is turned on, its voltage drop is much smaller than the forward voltage drop of diode D5. Therefore, after PMOS transistor M1 is fully turned on, the voltage at the power output terminal Vout is pulled up to a level close to the voltage at the backup power input terminal KL30_Backup, and the load is powered by the backup power supply via PMOS transistor M1 and diode D4.

[0067] It should be noted that during the process of PMOS transistor M1 from the start of conduction to full conduction, diode D4 is always forward-biased, providing a path for the backup power supply current. Once PMOS transistor M1 is fully turned on, its on-resistance is extremely low, and the current mainly flows through it. The voltage drop across diode D4 is only its forward conduction voltage drop, resulting in minimal losses. Furthermore, after a mains power failure, diode D5 reverse-biased cutoff prevents backup power current from flowing back to the mains power input terminal KL30.

[0068] Because the comparator U6 has an extremely short response time, the NPN transistor Q1 switches very quickly, and the conduction speed of the PMOS transistor M1 is controlled within a suitable range by the RC network, the entire switching process can be completed in a very short time (typically tens of microseconds to milliseconds), achieving seamless switching from main power to backup power. During the switching process, the voltage at the power output terminal Vout will not experience a significant drop or interruption, ensuring continuous power supply to the load.

[0069] Next, the calculation method for the switching threshold of the backup power switching circuit will be explained in detail.

[0070] Let the voltage at the non-inverting input of comparator U6 at the instant of switching be VIN+_OFF. This voltage is determined by the reference signal Vref and the hysteresis network. When comparator U6 outputs a low level, the feedback resistor R13 feeds the low level back to the non-inverting input. The voltage at the non-inverting input is: VIN+_OFF = V8 × (R11 / / R13) / (R12 + R11 / / R13), where V8 is the voltage at the power supply terminal V8, R11 is the resistance of the fourth voltage divider resistor, R12 is the resistance of the fifth voltage divider resistor, R13 is the resistance of the feedback resistor, and (R11 / / R13) represents the equivalent parallel resistance of the fourth voltage divider resistor R11 and the feedback resistor R13.

[0071] The voltage at the inverting input of comparator U6 is obtained by dividing the main power supply voltage through the first voltage divider resistor R6 and the second voltage divider resistor R7. At the moment of switching, the voltage at the inverting input is equal to the voltage at the non-inverting input, that is: VIN- = VKL30_OFF × R7 / (R6 + R7), where VKL30_OFF is the main power supply voltage value corresponding to the main power supply power-down switching threshold, R6 is the resistance value of the first voltage divider resistor, and R7 is the resistance value of the second voltage divider resistor.

[0072] According to the flip condition of comparator U6 (the voltage at the inverting input terminal is equal to the voltage at the non-inverting input terminal), we can obtain: VKL30_OFF× R7 / (R6 + R7) = VIN+_OFF.

[0073] Therefore, the power-down switching threshold VKL30_OFF is: VKL30_OFF = VIN+_OFF × (R6 + R7) / R7. Substituting the expression for VIN+_OFF into this formula, we can obtain the relationship between the power-down switching threshold and the parameters of each resistor. This formula shows that by appropriately selecting the resistance values ​​of the first voltage divider resistor R6, the second voltage divider resistor R7, the fourth voltage divider resistor R11, the fifth voltage divider resistor R12, and the feedback resistor R13, the required power-down switching threshold can be precisely set.

[0074] III. Main Power Recovery Mode When the main power supply returns to normal, for example, after the connectors are properly reconnected or the fuse is replaced, the voltage at the main power input terminal KL30 begins to rise. As the main power supply voltage rises, the detection signal voltage obtained after voltage division by the first voltage divider resistor R6 and the second voltage divider resistor R7 also rises accordingly.

[0075] When the main power supply voltage rises above the preset recovery switching threshold, the voltage at the inverting input of comparator U6 is higher than the reference signal Vref at the non-inverting input (due to the hysteresis network, the voltage at the non-inverting input is higher at this time). Comparator U6 flips again, and its output changes from high to low. This low-level switching signal is applied to the base of NPN transistor Q1, pulling the base of NPN transistor Q1 low, and NPN transistor Q1 exits the saturation conduction state and enters the cutoff state.

[0076] When NPN transistor Q1 is turned off, the gate of PMOS transistor M1 is pulled high to the potential of the backup power input terminal KL30_Backup through pull-up resistor R1 (the seventh resistor). The gate-source voltage Vgs of PMOS transistor M1 is approximately 0V, and its absolute value is less than the absolute value of the turn-on threshold voltage Vgs(th). Therefore, PMOS transistor M1 is turned off, and the backup power supply path through PMOS transistor M1 and diode D4 is cut off.

[0077] Meanwhile, the voltage at the main power input terminal KL30 is transmitted to the power output terminal Vout via diode D5. Since diode D5 is forward-biased, the main power supply resumes power supply to the load, and the system returns to normal power supply mode. After PMOS transistor M1 is turned off, diode D4 is reverse-biased to prevent current from the main power supply from flowing back to the backup power input terminal KL30_Backup.

[0078] Throughout the process of mains power restoration and switching back to mains power, diode D5 remains connected between the mains power input terminal KL30 and the power output terminal Vout. When the mains power voltage recovers to a level higher than the power output terminal Vout, diode D5 automatically conducts, allowing the mains power to supply power to the load. Initially, during the mains power restoration phase, PMOS transistor M1 is not yet fully turned off, and both the mains power and backup power may supply power to the load simultaneously. However, due to the isolation provided by diodes D5 and D4, no current circulation occurs between the two power supplies. As PMOS transistor M1 completely turns off, the backup power supply completely exits the power supply mode, and the system smoothly transitions to mains power supply mode.

[0079] Next, the calculation method for the recovery switching threshold of the backup power switching circuit is explained in detail.

[0080] Let the voltage at the non-inverting input of comparator U6 at the instant of switching be VIN+_ON. When comparator U6 outputs a high level, feedback resistor R13 feeds the high level back to the non-inverting input. This high level is also affected by the base forward voltage drop of NPN transistor Q1. The voltage at the non-inverting input is: VIN+_ON = (V8 × R11 × R13 + VB_Q1 × R11 × R12) / (R11 × R12 + R12 × R13 + R11 × R13), where VB_Q1 is the base forward voltage drop of NPN transistor Q1 (typically 0.6V~0.7V for silicon transistors), and the meanings of the other parameters are the same as above.

[0081] The voltage at the inverting input of comparator U6 is obtained by dividing the main power supply voltage through the first voltage divider resistor R6 and the second voltage divider resistor R7. At the instant of switching, the voltage at the inverting input is equal to the voltage at the non-inverting input, that is: VIN- = VKL30_ON × R7 / (R6 + R7), where VKL30_ON is the main power supply voltage value corresponding to the main power supply recovery switching threshold.

[0082] According to the flip condition of comparator U6 (the voltage at the inverting input terminal is equal to the voltage at the non-inverting input terminal), we can obtain: VKL30_ON× R7 / (R6 + R7) = VIN+_ON.

[0083] Therefore, the recovery switching threshold VKL30_ON is: VKL30_ON = VIN+_ON × (R6 + R7) / R7. Substituting the expression for VIN+_ON, we can obtain the relationship between the recovery switching threshold and the parameters of each resistor and the base forward voltage drop of the NPN transistor Q1. From this formula, it can be seen that the recovery switching threshold is higher than the power-down switching threshold, and the difference between the two is the hysteresis voltage. This hysteresis voltage is jointly determined by the feedback resistor R13 and the base forward voltage drop of the NPN transistor Q1.

[0084] Using the above two formulas for switching threshold and recovery switching threshold, those skilled in the art can, according to actual needs, independently or collaboratively set the power-down switching threshold and recovery switching threshold by adjusting the resistance values ​​of the first voltage divider resistor R6, the second voltage divider resistor R7, the fourth voltage divider resistor R11, the fifth voltage divider resistor R12, and the feedback resistor R13, thereby achieving precise control of the switching point.

[0085] In practical design, the selection of the above parameters should also consider the undervoltage protection threshold of the main power supply and the minimum operating voltage of the load. Generally, the power-down switching threshold should be set within a reasonable range above the main power supply undervoltage protection threshold and below the minimum operating voltage of the load to ensure that the backup power supply can switch in promptly before the main power supply voltage drops to a level that prevents the load from operating normally. The recovery switching threshold should be set above the voltage value at which the main power supply can operate stably to avoid premature switching back when the main power supply voltage is still unstable during the initial recovery phase, which could lead to system oscillation.

[0086] In a specific application scenario, the main power supply is a 12V lead-acid battery with a normal operating voltage range of 9~16V. The nominal voltage of the backup power supply is 15V, meaning the nominal voltage of the backup power supply is higher than the minimum operating voltage of the main power supply (9V). In this case, the power-down switching threshold can be set to approximately 8.5V (lower than the minimum operating voltage of the main power supply, 9V, to ensure switching occurs when the main power supply voltage drops below 9V and is about to fail), and the recovery switching threshold can be set to approximately 9.5V (higher than the minimum operating voltage of the main power supply, 9V, to ensure switching back only after the main power supply recovers to a stable voltage). This results in a hysteresis of approximately 1V between the power-down switching threshold and the recovery switching threshold, effectively preventing system oscillations caused by fluctuations in the main power supply voltage near the switching threshold.

[0087] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A backup power switching circuit, applied to a motor controller, comprising a main power input terminal (100), a backup power input terminal (110), and a power output terminal (120), characterized in that, Also includes: A controllable switch (200) is electrically connected between the backup power input terminal (110) and the power output terminal (120); A voltage monitoring unit (300) is electrically connected to the main power input terminal (100) and outputs a detection signal characterizing the main power voltage; The comparison unit (310) has its input terminal electrically connected to the output terminal and the reference signal terminal of the voltage monitoring unit (300) respectively, and its output terminal outputs a switching signal; The drive unit (210) is electrically connected between the output terminal of the comparison unit (310) and the control terminal of the controllable switch (200); as well as The soft-start unit (220) is electrically connected to the control terminal of the controllable switch (200) to delay the rate of voltage change at the control terminal when the controllable switch (200) is turned on.

2. The backup power switching circuit according to claim 1, characterized in that, The soft-start unit (220) includes an RC network; the RC network is connected to the control terminal of the controllable switch (200) and is used to adjust the rising slope of the voltage at the control terminal when the controllable switch (200) is turned on.

3. The backup power switching circuit according to claim 1, characterized in that, The controllable switch (200) is a PMOS transistor; the source of the PMOS transistor is connected to the backup power input terminal (110), and the drain is connected to the power output terminal (120).

4. The backup power switching circuit according to claim 1, characterized in that, It also includes an anti-backflow diode electrically connected between the main power input terminal (100) and the power output terminal (120); the anode of the anti-backflow diode is electrically connected to the main power input terminal (100), and the cathode is electrically connected to the power output terminal (120); a diode that conducts in the same direction as the controllable switch (200) is also connected in series between the backup power input terminal (110) and the power output terminal (120).

5. The backup power switching circuit according to claim 1, characterized in that, The voltage monitoring unit (300) includes a first voltage divider resistor and a second voltage divider resistor connected in series between the main power input terminal (100) and ground; the intermediate node between the first voltage divider resistor and the second voltage divider resistor is connected to the comparison unit (310).

6. The backup power switching circuit according to claim 1 or 5, characterized in that, The comparison unit (310) includes a comparator; the first input terminal of the comparator is electrically connected to the output terminal of the voltage monitoring unit (300), and the second input terminal of the comparator is electrically connected to the reference signal terminal.

7. The backup power switching circuit according to claim 6, characterized in that, The comparison unit (310) further includes a hysteresis network; the hysteresis network is electrically connected between the output terminal of the comparator and the second input terminal of the comparator, so that the backup power switching circuit has different power-down switching thresholds and recovery switching thresholds.

8. The backup power switching circuit according to claim 7, characterized in that, The hysteresis network includes a feedback resistor; one end of the feedback resistor is electrically connected to the output terminal of the comparator, and the other end is electrically connected to the second input terminal of the comparator.

9. The backup power switching circuit according to claim 6, characterized in that, The reference signal terminal includes a reference voltage generation circuit; the reference voltage generation circuit includes a third voltage divider resistor and a fourth voltage divider resistor, one end of the third voltage divider resistor is electrically connected to the power supply terminal, the other end is electrically connected to one end of the fourth voltage divider resistor and the second input terminal of the comparator, and the other end of the fourth voltage divider resistor is grounded.

10. The backup power switching circuit according to claim 3, characterized in that, The driving unit (210) includes an NPN transistor; the base of the NPN transistor is electrically connected to the output terminal of the comparator unit (310), the collector is electrically connected to the gate of the PMOS transistor, and the emitter is grounded; the gate of the PMOS transistor is also electrically connected to the backup power input terminal (110) through a pull-up resistor.

11. The backup power switching circuit according to claim 10, characterized in that, The soft-start unit (220) includes a fifth resistor, a sixth resistor, and a first capacitor; the fifth resistor and the sixth resistor are connected in series between the backup power input terminal (110) and ground; the gate of the PMOS transistor is electrically connected to the middle node of the fifth resistor and the sixth resistor; the first capacitor is connected in parallel with the sixth resistor.

12. The backup power switching circuit according to claim 1, characterized in that, It also includes an output filter capacitor; the output filter capacitor is electrically connected between the power output terminal (120) and ground.

13. A motor controller, characterized in that, Includes the backup power switching circuit as described in any one of claims 1 to 12.