Hysteresis circuit for power failure detection
By adding an additional load to both ends of the constant current module, the problem of inaccurate power-down detection of the constant current module is solved, the system stability is improved and the risk of overvoltage is avoided.
Patent Information
- Application Number
- CN202510309505.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2045-03-17
AI Technical Summary
The existing constant current module power-down detection circuit is not accurate enough under load changes, and excessive hysteresis windows or filtering time will lead to a risk of system stability and device overvoltage damage.
A hysteresis circuit for power-down detection is designed. By adding additional loads at both ends of the constant current module, the first controllable compensation load module is used to parallelize the additional loads to both ends of the constant current module according to the power-down prompt signal to enhance the hysteresis effect of the system.
This circuit can improve detection accuracy after the constant current module is powered off, enhance system stability, and avoid the risk of overvoltage caused by excessive filtering time.
Smart Images

Figure CN119834791A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of circuit technology, and in particular to a hysteresis circuit for power-off detection. Background Art
[0002] like Figure 1 As shown, in a circuit powered by a constant current module, when the constant current module loses power, other circuits in the system need to obtain information that the system is about to lose power, so as to record the power-off information of the system or make some adjustments to the load. The capacitor is used to provide power to other circuits in the system in a short period of time after the constant current module loses power. At present, many constant current modules do not specifically output power-off signals, so a module is needed to judge the situation that the system is about to lose power based on some node voltage or current information. In this process, in order to obtain a reliable power-off judgment result, the power-off judgment module often adopts a hysteresis design, such as using a hysteresis comparator or switching the detection threshold according to the detection output. However, due to the existence of load changes and other situations (changes in load and drive module), this conventional method of generating hysteresis in sampling means still has the problem of inaccurate detection; if a hysteresis detection window is designed too large to avoid unstable detection results, other problems will arise in application.
[0003] For example, when detecting power failure, if the voltage between the positive power line and the negative power line is less than a certain value, it is judged as power failure (the negative power line is subsequently regarded as a 0V reference point), and the load needs to be turned off after the system power failure is detected, and the load contains a module with certain energy storage characteristics (such as a motor coil with inductance characteristics). In this case, after the load is turned off, the residual energy will be released to the positive power line through the freewheeling diode, which will cause the voltage of the positive power line to rise briefly or even exceed the voltage of the normal working positive power line after the load is turned off; if you choose to increase the hysteresis window, it will affect the detection of the power failure judgment module during normal power-on, and you can only choose to increase the filtering time; but increasing the filtering time will cause the system state switching frequency to decrease, and when the positive power line needs a load to keep it from being over-voltage, too long a filtering time without load may bring the risk of overvoltage damage to the device.
[0004] In addition, when detecting power failure, if the current flowing through the current load (recorded as load A) is less than a certain value, it is determined as power failure, and when the system detects power failure, it needs to switch to another load (recorded as load B), but the current of load B at the same voltage is greater than that of load A. In this case, after the system detects power failure (load current is less than a certain threshold) and switches the load, the load current will increase; if too large a hysteresis window is selected, it will affect normal detection; if two specific hysteresis windows are designed based on two fixed loads, it will restrict the scope of application of the circuit; if too long a filtering time is set, it will restrict the state switching frequency of the system.
[0005] Therefore, a technical solution of a hysteresis circuit for power-off detection is needed, which can enhance the hysteresis effect of the system, improve the stability of the system, and improve the detection accuracy when the load changes after the constant current module loses power. Summary of the invention
[0006] In order to solve the above technical problems, the present invention provides a hysteresis circuit for power failure detection, comprising: Constant current module, used to provide constant current; A capacitor connected in parallel to both ends of the constant current module, for providing electrical energy in a short period of time after the constant current module loses power; A first load and driving module is connected in parallel to both ends of the constant current module and is used to operate under the drive of the constant current; A first power-off judgment module is connected in parallel to both ends of the constant current module, and is used to monitor whether the constant current module is powered off, and output a power-off prompt signal through its output end when the constant current module is powered off; A first controllable compensation load module is connected in parallel to both ends of the constant current module, and a control end thereof is electrically connected to the output end of the first power-off judgment module, and is used to connect an additional load in parallel to both ends of the constant current module according to the power-off prompt signal to enhance the hysteresis effect of the system.
[0007] In a possible implementation, the first load and driving module is provided with a control end; The control end of the first load and driving module is electrically connected to the output end of the first power-off judgment module; When the first load and driving module receives the power-off prompt signal, the internal load thereof is controlled to stop operating.
[0008] In a possible implementation, the first load and drive module includes a load control module and a load module; The input end of the load control module serves as the control end of the first load and the driving module, the output end thereof is electrically connected to the control end of the load module, the working voltage end thereof is electrically connected to the positive electrode of the constant current module, and the ground end thereof is electrically connected to the negative electrode of the constant current module; The working voltage terminal of the load module is electrically connected to the positive electrode of the constant current module, and the grounding terminal of the load module is electrically connected to the negative electrode of the constant current module.
[0009] In a possible implementation, the first load and driving module further includes a first clamping module connected in parallel to both ends of the constant current module.
[0010] In a possible implementation, the first controllable compensation load module includes a first NMOS tube and a first resistor; The first NMOS tube is connected in series with the first resistor and then connected in parallel to two ends of the constant current module, and a gate thereof is electrically connected to an output end of the first power-off judgment module; The first NMOS tube connects the first resistor as the additional load in parallel to two ends of the constant current module according to the power-off prompt signal.
[0011] In a possible implementation, the first controllable compensation load module further includes a second NMOS tube and a Zener diode; The source of the first NMOS tube is electrically connected to the cathode of the constant current module, and the drain of the first NMOS tube is electrically connected to the anode of the Zener diode; The cathode of the Zener diode is electrically connected to the first end of the first resistor; The second end of the first resistor is electrically connected to the source of the second NMOS tube; The gate of the second NMOS tube is used to access the first reference voltage, and the drain of the second NMOS tube is electrically connected to the positive electrode of the constant current module.
[0012] The present invention also provides another hysteresis circuit for power failure detection, comprising: Constant current module, used to provide constant current; A capacitor connected in parallel to both ends of the constant current module, for providing electrical energy in a short period of time after the constant current module loses power; A second load and driving module is connected in parallel to both ends of the constant current module, and is used to operate under the drive of the constant current and output a power-off fluctuation signal based on the change of the electric quantity parameter of the internal load; A second power-off judgment module, whose input end is electrically connected to the second load and the output end of the driving module, is used to monitor whether the constant current module is powered off according to the power-off fluctuation signal, and output a power-off prompt signal through its output end when the constant current module is powered off; A second controllable compensation load module is connected in parallel to both ends of the constant current module, and its control end is electrically connected to the output end of the second power-off judgment module, and is used to connect an additional load in parallel to both ends of the constant current module according to the power-off prompt signal to enhance the hysteresis effect of the system.
[0013] In a possible implementation, the second controllable compensation load module includes a third NMOS tube and a second resistor; The third NMOS tube is connected in series with the second resistor and then connected in parallel to the two ends of the constant current module, and its gate is electrically connected to the output end of the second power-off judgment module; The third NMOS tube connects the second resistor as the additional load in parallel to the two ends of the constant current module according to the power-off prompt signal.
[0014] In a possible implementation, the second controllable compensating load module further includes a logic gate unit; The source of the third NMOS tube is electrically connected to the first end of the second resistor, the drain of the third NMOS tube is electrically connected to the negative electrode of the constant current module, and the gate of the third NMOS tube is electrically connected to the output end of the logic gate unit; The second end of the second resistor is electrically connected to the negative electrode of the constant current module; The first input end of the logic gate unit is used to access the first system signal, and the second input end thereof is electrically connected to the output end of the second power-off judgment module; The logic gate unit may generate a control signal acting on the gate of the third NMOS tube based on the power-off prompt signal.
[0015] In a possible implementation, the second load and driving module includes a driving and sampling module and n loads; The positive electrodes of the n loads are respectively electrically connected to the positive electrode of the constant current module, and the negative electrodes of the n loads are respectively electrically connected to the n load interfaces of the driving and sampling module in sequence; The power-off judgment communication interface of the driving and sampling module serves as the output end of the second load and driving module, and its ground end is electrically connected to the negative electrode of the constant current module; Here, n is an integer greater than 1.
[0016] The technical solution provided by the present invention has at least the following beneficial effects: By applying the present invention, a hysteresis circuit for power-off detection suitable for a constant current module can be obtained. The circuit adds additional loads at both ends of the constant current module after the power-off judgment module (the first power-off judgment module, the second power-off judgment module) gives a power-off prompt signal, thereby avoiding setting an excessively large hysteresis window in the power-off judgment module and also avoiding an excessively long filtering time of the power-off judgment module. The hysteresis effect of the system can be enhanced, the stability of the system can be improved, and the detection accuracy can be improved when the load changes after the constant current module loses power. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a common constant current module power-off detection circuit diagram in the background technology; Figure 2 A circuit schematic diagram of a first hysteresis circuit for power failure detection provided by an embodiment of the present invention; Figure 3 A circuit schematic diagram of a second hysteresis circuit for power failure detection provided by an embodiment of the present invention; Figure 4 A circuit schematic diagram of a third hysteresis circuit for power failure detection provided by an embodiment of the present invention; Figure 5A circuit schematic diagram of a specific embodiment of a load control module and a load module provided by an embodiment of the present invention; Figure 6 A circuit schematic diagram of a first controllable compensating load module provided in an embodiment of the present invention; Figure 7 A circuit schematic diagram of a fourth hysteresis circuit for power failure detection provided by an embodiment of the present invention; Figure 8 A circuit schematic diagram of a second controllable compensating load module provided in an embodiment of the present invention; Fig. 9 A circuit schematic diagram of a fifth hysteresis circuit for power failure detection provided by an embodiment of the present invention; Fig.10 A circuit schematic diagram of a driving and sampling module provided in an embodiment of the present invention; In the accompanying drawings, 10, constant current module; 11, capacitor; 12, first load and driving module; 13, first power-off judgment module; 14, first controllable compensation load module; 22, second load and driving module; 23, second power-off judgment module; 24, second controllable compensation load module; 121, load control module; 122, load module; 123, first clamping module; 221, first load; 222, second load; 223, third load; 224, second clamping module; 225, driving and sampling module. DETAILED DESCRIPTION
[0018] In order to deepen the understanding of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. The embodiments are only used to explain the present invention and do not limit the protection scope of the present invention.
[0019] Please refer to Figures 1 to 6 The present invention provides a hysteresis circuit for power failure detection, comprising: A constant current module 10, used for providing a constant current; A capacitor 11 is connected in parallel to both ends of the constant current module 10 and is used to provide electrical energy in a short period of time after the constant current module 10 loses power; A first load and driving module 12 is connected in parallel to two ends of the constant current module 10 and is used to operate under the drive of the constant current; A first power-off judgment module 13 is connected in parallel to both ends of the constant current module 10, and is used to monitor whether the constant current module 10 is powered off, and output a power-off prompt signal through its output end when the constant current module 10 is powered off; The first controllable compensation load module 14 is connected in parallel to the two ends of the constant current module 10, and its control end is electrically connected to the output end of the first power-off judgment module 13, and is used to connect an additional load in parallel to the two ends of the constant current module 10 according to the power-off prompt signal to enhance the hysteresis effect of the system.
[0020] In this embodiment, the constant current module 10 can use a conventional constant current power supply, whose positive pole is led out through a positive power line, and whose negative pole is led out through a negative power line and grounded, to provide power to the system in the absence of power failure.
[0021] The capacitor 11 is located between the positive power line and the negative power line. After the constant current module 10 loses power, it provides power to other modules in a short term to maintain the normal operation of the first power failure judgment module 13, the first controllable compensation load module 14, and part of the first load and the driving module 12. The capacitance value C 11 10μF can be used.
[0022] The first load and drive module 12 may be a module having energy storage characteristics (such as a motor coil having inductance characteristics), including an electrical load and a drive circuit thereof, and is located between a positive power line and a negative power line.
[0023] The first power-off judgment module 13 is located between the positive power line and the negative power line. It can judge that the constant current module 10 is powered off by the change of the positive power line voltage, and give a power-off prompt signal. For example: the first power-off judgment module 13 can output a high-level signal as a power-off prompt signal when the voltage of the positive power line is lower than a certain threshold, indicating that the system is about to power off (that is, the constant current module 10 has been powered off, and after the electric energy stored in the capacitor 11 is used up, the entire system will also be powered off). Specifically, when the voltage of the positive power line is lower than 20V, the first power-off judgment module 13 outputs a 5V high-level signal through its output end. The first power-off judgment module 13 supports a detection hysteresis of 0.5V. When power-off is detected, the voltage of the positive power line needs to reach 20.5V to release the power-off state; at the same time, the first power-off judgment module 13 can have a built-in filter circuit with a shorter filtering time (to simplify the analysis, ignore the filtering time).
[0024] The first controllable compensating load module 14 can change the on-resistance between the positive and negative electrodes of the module according to the signal (power-off prompt signal) input outside the module, so as to connect the additional load in parallel to both ends of the constant current module 10. The module can enhance the hysteresis effect of the system by changing the load between the positive power line and the negative power line according to the power-off judgment result and system requirements. For example: the first controllable compensating load module 14 can add a load between the positive power line and the negative power line after receiving the high-level signal (i.e., the power-off prompt signal) output by the first power-off judgment module 13, until the system no longer needs to add this additional load (for example, the power-off detection stage has ended).
[0025] Compared with the common hysteresis generated by modifying the threshold point inside the power-off judgment module, the implementation of this circuit can enhance the hysteresis effect of the system, improve the stability of the system, and improve the detection accuracy when the load changes after the constant current module 10 loses power.
[0026] In one possible implementation, Figure 3 , the first load and driving module 12 is provided with a control terminal; The control end of the first load and driving module 12 is electrically connected to the output end of the first power-off determination module 13; When the first load and driving module 12 receives the power-off prompt signal, it controls the internal load to stop operating.
[0027] In this embodiment, the first load and driving module 12 receives the power-off prompt signal output by the first power-off judgment module 13 through a control terminal, and can control the load inside it to stop operating according to the power-off prompt signal.
[0028] In one possible implementation, Figure 4 , the first load and driving module 12 includes a load control module 121 and a load module 122; The input end of the load control module 121 serves as the control end of the first load and the driving module 12, the output end thereof is electrically connected to the control end of the load module 122, the working voltage end thereof is electrically connected to the positive electrode of the constant current module 10, and the ground end thereof is electrically connected to the negative electrode of the constant current module 10; The working voltage terminal of the load module 122 is electrically connected to the positive electrode of the constant current module 10 , and the ground terminal thereof is electrically connected to the negative electrode of the constant current module 10 .
[0029] In this embodiment, the load control module 121 controls and drives the normal operation of the load module 122. The load control module 121 can adopt a conventional module for controlling the operation of a motor, and the load module 122 can adopt a conventional motor operation structure. Figure 5 The load module 122 may include a motor M, a first PMOS transistor Qp1, a second PMOS transistor Qp2, a first NMOS transistor Qn1, a second NMOS transistor Qn2, a first diode D1, a second diode D2, a third diode D3, and a fourth diode D4. The output end of the load control module 121 includes four sub-ports Gp1, Gp2, Gn1, and Gn2, which are electrically connected to the gates of the first PMOS transistor Qp1, the second PMOS transistor Qp2, the first NMOS transistor Qn1, and the second NMOS transistor Qn2, respectively.
[0030] The sources of the first PMOS tube Qp1 and the second PMOS tube Qp2 are connected to the positive power line, and the sources of the first NMOS tube Qn1 and the second NMOS tube Qn2 are connected to the negative power line. The drains of the first PMOS tube Qp1 and the first NMOS tube Qn1 are connected to the positive terminal of the motor M, and the drains of the second PMOS tube Qp2 and the second NMOS tube Qn2 are connected to the negative terminal of the motor M. The positive electrode and the negative electrode of the first diode D1 are respectively connected to the drain and the source of the first PMOS tube Qp1, the positive electrode and the negative electrode of the second diode D2 are respectively connected to the source and the drain of the first NMOS tube Qn1, the positive electrode and the negative electrode of the third diode D3 are respectively connected to the drain and the source of the second PMOS tube Qp2, and the positive electrode and the negative electrode of the fourth diode D4 are respectively connected to the source and the drain of the second NMOS tube Qn2.
[0031] The load control module 121 controls the gate voltage of the first PMOS tube Qp1, the second PMOS tube Qp2, the first NMOS tube Qn1, and the second NMOS tube Qn2 to control the motor M. The first diode D1, the second diode D2, the third diode D3, and the fourth diode D4 have a conduction voltage drop of 0.4V when a current of 1.3A flows through them, and a conduction voltage drop of less than 0.4V when a current of 1A flows through them. When the voltage of the positive power line is 20V, the current of the motor M is 1A; when the voltage of the positive power line is 25V, the current of the motor M is 1.3A; the inductance of the motor coil is 5mH.
[0032] In a possible implementation, the first load and driving module 12 further includes a first clamping module 123 connected in parallel to two ends of the constant current module 10 .
[0033] In this embodiment, the first clamping module 123 can be implemented using a conventional clamping circuit, which starts working when the positive power line voltage is 28V and is responsible for protecting the circuit from overvoltage damage (if the motor M always runs when the constant current module 10 is not powered off, and the system has a first controllable compensating load module 14, then the clamping module can be reduced or even removed).
[0034] In one possible implementation, Figure 6 , the first controllable compensation load module 14 includes a first NMOS tube Q1 and a first resistor R1; The first NMOS transistor Q1 is connected in series with the first resistor R1 and then connected in parallel to two ends of the constant current module 10, and its gate is electrically connected to the output end of the first power-off judgment module 13; The first NMOS transistor Q1 connects the first resistor R1 as the additional load in parallel to two ends of the constant current module 10 according to the power-off prompt signal.
[0035] In this embodiment, the first NMOS transistor Q1 can be a conventional NMOS transistor, and the first resistor R1 can be a conventional resistor. When the power-off prompt signal is at a high level (such as 3.3V), the first NMOS transistor Q1 is turned on, and the first resistor R1 is connected in parallel to both ends of the constant current module 10 as an additional load.
[0036] In a possible implementation, the first controllable compensation load module 14 further includes a second NMOS transistor Q2 and a Zener diode Z1; The source of the first NMOS transistor Q1 is electrically connected to the cathode of the constant current module 10, and the drain thereof is electrically connected to the anode of the Zener diode Z1; The cathode of the Zener diode Z1 is electrically connected to the first end of the first resistor R1; The second end of the first resistor R1 is electrically connected to the source of the second NMOS transistor Q2; The gate of the second NMOS transistor Q2 is used to access the first reference voltage Vref, and the drain of the second NMOS transistor Q2 is electrically connected to the positive electrode of the constant current module 10 .
[0037] In this embodiment, the second NMOS tube Q2 can adopt a conventional NMOS tube, and the Zener diode Z1 adopts a conventional model. In the specific implementation, the gate of the second NMOS tube Q2 can be connected to the first reference voltage Vref of 15V, its drain is electrically connected to the positive power line, and its source is connected to one end of the first resistor R1 of 5 ohms. The other end of the first resistor R1 is connected to the cathode of the Zener diode Z1 with a reverse breakdown voltage V_z1 of 5.2V. The source of the first NMOS tube Q1 is grounded. The voltage (Vgs_nm2) between the gate and the source of the second NMOS tube Q2 when a current of 1.56A flows is 2V, the on-resistance of the first NMOS tube Q1 is negligible, and the threshold voltage is 0.7V.
[0038] In a specific embodiment, Figures 4 to 6 , when the constant current module 10 outputs 1.3A current and the motor M rotates, most of the current flows through the motor M. At this time, the first PMOS tube Qp1 and the second NMOS tube Qn2 are turned on, and the main current flows to the negative power line through the channel of the first PMOS tube Qp1, the motor M, and the channel of the second NMOS tube Qn2. Ignoring the power consumption of the circuits other than the motor M, the first controllable compensation load module 14 and the first clamping module 123, the positive power line voltage is approximately 25V at this time.
[0039] When the constant current module 10 loses power, the voltage of the positive power line starts to drop. When the voltage of the positive power line drops to 20V, the first power-off judgment module 13 outputs a 5V high level (power-off prompt signal). At this time, the load control module 121 outputs a signal to close the conductive channel of the first PMOS tube Qp1 and the second NMOS tube Qn2. At this time, the coil current in the motor M cannot change suddenly, and the electric energy in the coil needs to be released, so the current direction is from the negative power line through the second diode D2 through the motor M and then through the third diode D3 to the positive power line.
[0040] In the above situation, if there is no first controllable compensating load module 14, the voltage of the positive power line will be charged to more than 20.5V, the system will think that the power failure is released and restart the motor M, and then the voltage of the positive power line will drop to less than 20V due to the start of the motor M, and then the detection result of the first power failure judgment module 13 will not be able to get rid of this abnormal detection state after multiple cycles between power failure and power failure release.
[0041] In the above case, if there is a first controllable compensating load module 14, the first NMOS tube Q1 in the first controllable compensating load module 14 is turned on after power failure, the first reference voltage Vref=15V, Vgs_nm2 of the second NMOS tube Q2=2V, the reverse breakdown voltage V_z1 of the Zener diode Z1=5.2V, the turn-on voltage V_nm1 of the first NMOS tube Q1=0, the first resistor R1=5Ω, and at this time, the branch where the first NMOS tube Q1 is located flows through a current of (Vref-Vgs_nm2-V_z1-V_nm1) / R1=(15-2-5.2-0) / 5=1.56A. In this case, the voltage of the positive power line will not be charged to more than 20.5V due to the residual current of the coil of the motor M, and the detection result of the first power failure judgment module 13 will not be cycled multiple times between power failure and power release.
[0042] If the module generating the first reference voltage Vref is also powered by the positive power line, the first reference voltage Vref will continue to decrease as the positive power line decreases after the positive power line is less than 15V (or higher). When the voltage difference between the source of the second NMOS tube Q2 and the drain of the first NMOS tube Q1 drops below the breakdown voltage of the Zener diode Z1, 5.2V, the equivalent impedance of the first controllable compensation load module 14 will be very large. At this time, the circuit system can enter another stage, and the remaining electric energy of the capacitor 11 can be provided to other working circuits to improve energy utilization.
[0043] like Figures 7 to 10 The present invention also provides another hysteresis circuit for power failure detection, comprising: A constant current module 10, used for providing a constant current; A capacitor 11 is connected in parallel to both ends of the constant current module 10 and is used to provide electrical energy in a short period of time after the constant current module 10 loses power; The second load and driving module 22 is connected in parallel to the two ends of the constant current module 10, and is used to operate under the drive of the constant current and output a power-off fluctuation signal based on the change of the power parameter of the internal load; A second power-off judgment module 23, whose input end is electrically connected to the output end of the second load and the driving module 22, is used to monitor whether the constant current module 10 is powered off according to the power-off fluctuation signal, and output a power-off prompt signal through its output end when the constant current module 10 is powered off; The second controllable compensation load module 24 is connected in parallel to the two ends of the constant current module 10, and its control end is electrically connected to the output end of the second power-off judgment module 23, and is used to connect an additional load in parallel to the two ends of the constant current module 10 according to the power-off prompt signal to enhance the hysteresis effect of the system.
[0044] In this embodiment, the constant current module 10 can use a conventional constant current power supply, whose positive electrode is led out through a positive power line, and whose negative electrode is led out through a negative power line and grounded, to provide power to the system in a non-power-off state, such as providing 1.2 mA current. The second power-off judgment module 23 can be connected in parallel to both ends of the constant current module 10 or an external separate power supply to obtain a working voltage.
[0045] The capacitor 11 is located between the positive power line and the negative power line. When the second power-off judgment module 23 is connected in parallel to both ends of the constant current module 10, the capacitor 11 provides power to other modules for a short period of time after the constant current module 10 loses power to maintain the normal operation of the second power-off judgment module 23, the second controllable compensation load module 24, and part of the second load and the driving module 22. The capacitance value C 11 20μF can be used.
[0046] The second load and drive module 22 adopts multiple loads (such as load one, load two, and load three) to monitor the changes in the electrical parameters of the internal loads (such as changes in load current or load terminal voltage and terminal current) based on a combination of functions such as clamping, drive disable control, and voltage identification, and outputs a power-off fluctuation signal accordingly, which is located between the positive power line and the negative power line.
[0047] When the second power-off judgment module 23 is connected in parallel to both ends of the constant current module 10, the second power-off judgment module 23 is located between the positive power line and the negative power line, and the positive power line provides the electric energy required for the work, and judges whether the constant current module 10 is powered off according to the power-off fluctuation signal received at the input end. For example: assuming that the power-off fluctuation signal is a voltage signal, when the current power-off fluctuation signal is lower than 5V, it is determined that the constant current module 10 is powered off, and a 3.3V high-level signal can be output to the control end of the second controllable compensation load module 24 to indicate that the system is about to power off (that is, the constant current module 10 has been powered off, and after the electric energy stored in the capacitor 11 is used up, the entire system will also be powered off). The filtering time when judging the system power off is very short, and it is ignored in the following calculation. When judging the power-off release, the filtering time is 10ms, and the power-off fluctuation threshold is 5.5V, that is, when the power-off judgment signal is not lower than 5.5V, the power-off is determined to be released. It should be pointed out that the power-off fluctuation signal can also be a current signal or a power signal, etc., which can be selected according to the actual implementation needs.
[0048] The second controllable compensating load module 24 can change the on-resistance between the positive and negative electrodes of the module according to the signal (power-off prompt signal) input outside the module, so as to connect the additional load in parallel to both ends of the constant current module 10. The module can enhance the hysteresis effect of the system by changing the load between the positive power line and the negative power line according to the power-off judgment result and system requirements. For example: the second controllable compensating load module 24 can add a load between the positive power line and the negative power line after receiving the high-level signal (such as 3.3V) output by the second power-off judgment module 23, until the system no longer needs to add this additional load (for example, the power-off detection stage has ended).
[0049] Compared with the common hysteresis generated by modifying the threshold point inside the power-off judgment module, the implementation of this circuit can enhance the hysteresis effect of the system, improve the stability of the system, and improve the detection accuracy when the load changes after the constant current module 10 loses power.
[0050] In one possible implementation, Figure 8 , the second controllable compensation load module 24 includes a third NMOS tube Q3 and a second resistor R2; The third NMOS transistor Q3 is connected in series with the second resistor R2 and then connected in parallel to the two ends of the constant current module 10, and its gate is electrically connected to the output end of the second power-off judgment module 23; The third NMOS transistor Q3 connects the second resistor R2 as the additional load in parallel to the two ends of the constant current module 10 according to the power-off prompt signal.
[0051] In this embodiment, the third NMOS tube Q3 can be a conventional NMOS tube with a threshold voltage of 0.7 V. The second resistor R2 is a conventional resistor with a resistance of 256Ω. When the power-off prompt signal is at a high level (for example, 3.3 V), the third NMOS tube Q3 is turned on, and the second resistor R2 is connected in parallel to both ends of the constant current module 10 as an additional load.
[0052] In a possible implementation, the second controllable compensating load module 24 further includes a logic gate unit Logic; The source of the third NMOS transistor Q3 is electrically connected to the first end of the second resistor R2, the drain thereof is electrically connected to the negative electrode of the constant current module 10, and the gate thereof is electrically connected to the output end of the logic gate unit Logic; The second end of the second resistor R2 is electrically connected to the negative electrode of the constant current module 10; The first input end of the logic gate unit Logic is used to access the first system signal, and the second input end thereof is electrically connected to the output end of the second power-off judgment module 23; The logic gate unit Logic may generate a control signal acting on the gate of the third NMOS transistor Q3 based on the power-off prompt signal.
[0053] In this embodiment, the logic gate unit Logic can be a single AND gate A1, or a logic gate combination with AND function composed of other logic gates (such as two NAND gates). When the logic gate unit Logic is a single AND gate A1, the AND gate A1 adopts a conventional design, and the first system signal Vs can use a 3.3V voltage (which can be provided by other structures other than the positive power line, as long as a 3.3V stable voltage can be provided). Assuming that the power-off fluctuation signal is lower than 5V, it is determined that the constant current module 10 is powered off, then the second power-off judgment module 23 outputs a 3.3V high-level signal to an input port of the AND gate A1 in the second controllable compensation load module 24, indicating that the system is about to power off.
[0054] In a possible implementation, the second load and driving module 22 includes a driving and sampling module 225 and n loads; The positive electrodes of the n loads are respectively electrically connected to the positive electrode of the constant current module 10, and the negative electrodes of the n loads are electrically connected to the n load interfaces of the driving and sampling module 225 in sequence; The power-off judgment communication interface of the driving and sampling module 225 serves as the output end of the second load and driving module 22, and its ground end is electrically connected to the negative electrode of the constant current module 10; Here, n is an integer greater than 1.
[0055] In a specific embodiment, Fig. 9, n is 3, the first load is the first load 221, the second load is the second load 222, the third load is the third load 223, the first load interface of the driving and sampling module 225 is the first load interface, the second load interface is the second load interface, and the third load interface is the third load interface. Thus, the positive electrodes of the first load 221, the second load 222, and the third load 223 are respectively electrically connected to the positive electrode of the constant current module 10, and the respective negative electrodes are electrically connected to the first load interface, the second load interface, and the third load interface of the driving and sampling module 225 in sequence.
[0056] In this embodiment, the first load 221, the second load 222, and the third load 223 are all nonlinear loads of the same type, characterized by: the voltage difference between the two ends is 10V when the current is 1mA, the voltage difference between the two ends is 9V when the current is 0.8mA, and the voltage difference between the two ends is 6V when the current is 0.5mA. The three loads are all composed of diodes in series, but the types, quantities and parasitic parameters of the internal diodes are different. The positive poles of the first load 221, the second load 222, and the third load 223 are all connected to the positive power line. In the specific implementation, a second clamping module 224 can also be connected in parallel to the two ends of the constant current module 10.
[0057] When the constant current module 10 is powered normally, the driving and sampling module 225 connects the first load 221 in parallel to both ends of the constant current module 10 through the switch device, and disconnects the lines where the second load 222 and the third load 223 are located through the switch device, and outputs a low level to the second power-off judgment module 23 at the same time; when the constant current module 10 is powered off, the driving and sampling module 225 disconnects the line where the first load 221 is located through the switch device, and connects the second load 222 and the third load 223 in parallel to both ends of the constant current module 10 (that is, the second load 222 and the third load 223 are also connected in parallel) through the switch device, and outputs a high level to the second power-off judgment module 23 at the same time. The second clamping module 224 starts working at 16V and clamps the voltage of the positive power line at 16V. The driving and sampling module 225 samples the voltages of the negative electrodes of the first load 221, the second load 222, and the third load 223, respectively, and determines whether to open the switch devices corresponding to the first load 221, the second load 222, and the third load 223 according to the sampled voltage.
[0058] In a specific embodiment, Fig. 9 and Fig.10The driving and sampling module 225 includes a driving disable control module, a voltage identification module, a first current source S1, a second current source S2, a third current source S3, a first-NMOS transistor Qn11, a first-second NMOS transistor Qn12, a first-third NMOS transistor Qn13, a second-NMOS transistor Qn21, a second-second NMOS transistor Qn22, a second-third NMOS transistor Qn23, a third-NMOS transistor Qn31, a third-second NMOS transistor Qn32, and a third-third NMOS transistor Qn33. The first current source S1, the second current source S2, and the third current source S3 are all conventional current sources, and are regarded as ideal current sources in this embodiment. The first-first NMOS transistor Qn11, the first-second NMOS transistor Qn12, the first-third NMOS transistor Qn13, the second-first NMOS transistor Qn21, the second-second NMOS transistor Qn22, the second-third NMOS transistor Qn23, the third-first NMOS transistor Qn31, the third-second NMOS transistor Qn32, and the third-third NMOS transistor Qn33 are all conventional NMOS transistors.
[0059] The first disable driving signal interface G01 of the drive disable control module is connected to the gate of the first NMOS transistor Qn11, the second disable driving signal G02 is connected to the gate of the second NMOS transistor Qn21, and the third disable driving signal interface G03 is connected to the gate of the third NMOS transistor Qn31.
[0060] The drain of the first-first NMOS transistor Qn11, the drain and gate of the first-second NMOS transistor Qn12, and the gate of the first-third NMOS transistor Qn13 are connected to the positive electrode of the first current source S1.
[0061] The drain of the second-first NMOS transistor Qn21, the drain and gate of the second-second NMOS transistor Qn22, and the gate of the second-third NMOS transistor Qn23 are connected to the positive electrode of the second current source S2.
[0062] The drain of the third-first NMOS transistor Qn31, the drain and gate of the third-second NMOS transistor Qn32, the gate of the third-third NMOS transistor Qn33 and the positive electrode of the third current source S3 are connected.
[0063] The drive disabling control module is connected to the voltage identification module through a control line for transmitting voltage identification control instructions.
[0064] The driving and sampling module 225 is further provided with a first load interface J1, a second load interface J2, a third load interface J3, a power-off judgment communication interface Jd, and a common ground terminal interface Jg.
[0065] Inside the driving and sampling module 225: the first load interface J1, the second load interface J2, and the third load interface J3 are connected to the drains of the first three NMOS tubes Qn13, the second three NMOS tubes Qn23, and the third three NMOS tubes Qn33 in sequence, and are connected to the three voltage sampling terminals of the voltage identification module in sequence. The power-off judgment communication interface Jd is connected to the voltage identification module. The negative electrodes of the first current source S1, the second current source S2, and the third current source S3 and the sources of the first one NMOS tube Qn11, the first two NMOS tubes Qn12, the first three NMOS tubes Qn13, the second one NMOS tube Qn21, the second two NMOS tubes Qn22, the second three NMOS tubes Qn23, the third one NMOS tube Qn31, the third two NMOS tubes Qn32, and the third three NMOS tubes Qn33 are all connected to the common ground terminal interface Jg.
[0066] Outside the driving and sampling module 225: the first load interface J1, the second load interface J2, and the third load interface J3 are connected to the negative electrodes of the first load 221, the second load 222, and the third load 223 in sequence. The power-off judgment communication interface Jd is connected to the second power-off judgment module 23. The common ground terminal interface Jg is connected to the negative power line.
[0067] When the driving and sampling module 225 drives the load, the current is limited to 1mA (generated by a current mirror and a current source, the current source current is 100μA, and the current mirror ratio is 1:10). When each driving tube drives the load, the driving current is within 1mA, and the on-state voltage drop of the driving and sampling module 225 is negligible (hereinafter directly calculated as 0V). After the current reaches 1mA, the on-state voltage drop depends on the load terminal voltage. When the load is not driven, the disable drive signal corresponding to the drive becomes a high level, the gate of the driving tube is pulled to about 0V (less than the threshold voltage), and the driving tube is turned off. For example: When the driving and sampling module 225 drives the first load 221, the current is limited to 1mA (generated by a current mirror and a current source, the current source (first current source S1) current is 100μA, and the current mirror ratio is 1:10). When the driver tube (first three NMOS tubes Qn13) drives the load (first load 221), the driving current is within 1mA, and the conduction voltage drop of the driving and sampling module 225 is negligible. After the current reaches 1mA, the conduction voltage drop depends on the load terminal voltage (i.e., the voltage at the first load interface J1, that is, the voltage of the negative electrode of the first load 221). When the load (first load 221) is not driven, the corresponding disabled driving signal of the driving path (i.e., the signal on the first disabled driving signal interface G01) becomes a high level, and the gate of the driver tube (first three NMOS tubes Qn13) is pulled to about 0V (less than the threshold voltage), and the driver tube (first three NMOS tubes Qn13) is turned off.
[0068] In the specific implementation, when the constant current module 10 is not powered off, the driving and sampling module 225 is only connected to the first load 221. The constant current module 10 outputs 1.2mA current, and the current other than the second clamping module 224, the main load (i.e., the first load 221), and the second controllable compensation load module 24 is ignored. Then, the first load 221 flows through a current of 1mA, and the second clamping module 224 flows through a current of 0.2mA. The positive power line voltage is 16V, and the negative power line voltage is 0V. At this time, the negative voltage of the first load 221 is 6V, and the second power-off judgment module 23 does not detect that the constant current module 10 is powered off. The first system signal Vs is 3.3V.
[0069] When the constant current module 10 loses power, the second clamping module 224 no longer flows current, and the voltage of the positive power line begins to drop. When the voltage of the positive power line drops to 15V, the negative voltage of the first load 221 drops to 5V, and the second power-off judgment module 23 outputs a 3.3V (high level) power-off prompt signal. At this time, the driving and sampling module 225 disconnects the first load 221, connects the second load 222 and the third load 223, and short-circuits the negative poles of the second load 222 and the third load 223 (that is, the negative pole of the second load 222 is connected to the negative pole of the third load 223). The second load 222 flows through 0.5mA current, with a voltage drop of 6V; the third load 223 flows through 0.5mA current, with a voltage drop of 6V; then the negative voltage of the second load 222 or the third load 223 is 9V, that is, the voltage of the positive power line (15V) minus the voltage drop v_load_b (6V) of the second load 222 or the third load 223.
[0070] At this time, if there is no second controllable compensating load module 24, the negative electrode voltage of the second load 222 after the duration T=10ms is: 9-I 11 ×T / C 11 =9-(I 222 +I 223 )×T / C 11 =9-(0.0005+0.0005)×0.01 / 0.00002=8.5V, This value is higher than the power-off fluctuation threshold voltage of 5.5V, and the second power-off judgment module 23 will cancel the power-off prompt signal and set it to 0V (low level), where I 11 is the current of capacitor 11, C 11 is the capacitance value of capacitor 11, I 222 is the current flowing through the second load 222, I 223The driving and sampling module 225 will disconnect the second load 222 and the third load 223, and reconnect the first load 221. Then the power-off prompt signal will switch between low level and high level until the voltage of the negative electrode of the load is less than the power-off judgment threshold point no matter which load is connected, and then a 3.3V high level signal will be stably output.
[0071] If there is a second controllable compensation load module 24, and the first system signal Vs is 3.3V, then: the power-off prompt signal is 3.3V, the first system signal Vs is 3.3V, and the output of the AND gate A1 is 3.3V; the current consumed by the branch where the third NMOS tube Q3 is located is I Q3 =Vs-V Q3 / R2=(3.3-1) / 256≈8.98mA, where V Q3 is the threshold voltage of the third NMOS tube Q3; after a duration of T=10ms, the negative electrode voltage of the second load 222 is approximately: 9-I 11 ×T / C 11 =9-(I 222 +I 223 +I Q3 )×T / C 11 =9-(0.0005+0.0005+0.00898)×0.01 / 0.00002=4.01V, This value is lower than the power-off fluctuation threshold voltage of 5.5V, so there will be no problem of multiple switching between low and high levels of the power-off prompt signal. When the voltage of the positive power line is further reduced to 3.3V, the first system signal Vs can become a low level, and the on-resistance of the third NMOS tube Q3 branch becomes very large. The system can provide the remaining power of the capacitor 11 to other working circuits to improve energy utilization.
[0072] The above embodiments should not limit the present invention in any way, and any technical solutions obtained by equivalent replacement or equivalent conversion shall fall within the protection scope of the present invention.
Claims
1. A hysteresis circuit for power failure detection, characterized in that: include: Constant current module, used to provide constant current; A capacitor connected in parallel to both ends of the constant current module, for providing electrical energy in a short period of time after the constant current module loses power; A first load and driving module is connected in parallel to both ends of the constant current module and is used to operate under the drive of the constant current; A first power-off judgment module is connected in parallel to both ends of the constant current module, and is used to monitor whether the constant current module is powered off, and output a power-off prompt signal through its output end when the constant current module is powered off; The first controllable compensation load module is connected in parallel to the two ends of the constant current module, and its control end is electrically connected to the output end of the first power-off judgment module, and is used to connect an additional load in parallel to the two ends of the constant current module according to the power-off prompt signal to enhance the hysteresis effect of the system.
2. The hysteresis circuit according to claim 1, characterized in that: The first load and driving module are provided with a control terminal; The control end of the first load and driving module is electrically connected to the output end of the first power-off judgment module; When the first load and driving module receives the power-off prompt signal, the internal load thereof is controlled to stop operating.
3. The hysteresis circuit according to claim 2, characterized in that: The first load and drive module includes a load control module and a load module; The input end of the load control module serves as the control end of the first load and the driving module, the output end thereof is electrically connected to the control end of the load module, the working voltage end thereof is electrically connected to the positive electrode of the constant current module, and the ground end thereof is electrically connected to the negative electrode of the constant current module; The working voltage terminal of the load module is electrically connected to the positive electrode of the constant current module, and the grounding terminal of the load module is electrically connected to the negative electrode of the constant current module.
4. The hysteresis circuit according to claim 3, characterized in that: The first load and driving module further includes a first clamping module connected in parallel to both ends of the constant current module.
5. The hysteresis circuit according to claim 1, characterized in that: The first controllable compensation load module includes a first NMOS tube and a first resistor; The first NMOS tube is connected in series with the first resistor and then connected in parallel to two ends of the constant current module, and a gate thereof is electrically connected to an output end of the first power-off judgment module; The first NMOS tube connects the first resistor as the additional load in parallel to two ends of the constant current module according to the power-off prompt signal.
6. The hysteresis circuit according to claim 5, characterized in that: The first controllable compensation load module also includes a second NMOS tube and a Zener diode; The source of the first NMOS tube is electrically connected to the cathode of the constant current module, and the drain of the first NMOS tube is electrically connected to the anode of the Zener diode; The cathode of the Zener diode is electrically connected to the first end of the first resistor; The second end of the first resistor is electrically connected to the source of the second NMOS tube; The gate of the second NMOS tube is used to access the first reference voltage, and the drain of the second NMOS tube is electrically connected to the positive electrode of the constant current module.
7. A hysteresis circuit for power failure detection, characterized in that: include: Constant current module, used to provide constant current; A capacitor connected in parallel to both ends of the constant current module, for providing electrical energy in a short period of time after the constant current module loses power; A second load and driving module is connected in parallel to both ends of the constant current module, and is used to operate under the drive of the constant current and output a power-off fluctuation signal based on the change of the electric quantity parameter of the internal load; A second power-off judgment module, whose input end is electrically connected to the second load and the output end of the driving module, is used to monitor whether the constant current module is powered off according to the power-off fluctuation signal, and output a power-off prompt signal through its output end when the constant current module is powered off; A second controllable compensation load module is connected in parallel to both ends of the constant current module, and its control end is electrically connected to the output end of the second power-off judgment module, and is used to connect an additional load in parallel to both ends of the constant current module according to the power-off prompt signal to enhance the hysteresis effect of the system.
8. The hysteresis circuit according to claim 7, characterized in that: The second controllable compensation load module includes a third NMOS tube and a second resistor; The third NMOS tube is connected in series with the second resistor and then connected in parallel to the two ends of the constant current module, and its gate is electrically connected to the output end of the second power-off judgment module; The third NMOS tube connects the second resistor as the additional load in parallel to the two ends of the constant current module according to the power-off prompt signal.
9. The hysteresis circuit according to claim 8, characterized in that: The second controllable compensating load module further includes a logic gate unit; The source of the third NMOS tube is electrically connected to the first end of the second resistor, the drain of the third NMOS tube is electrically connected to the negative electrode of the constant current module, and the gate of the third NMOS tube is electrically connected to the output end of the logic gate unit; The second end of the second resistor is electrically connected to the negative electrode of the constant current module; The first input end of the logic gate unit is used to access the first system signal, and the second input end thereof is electrically connected to the output end of the second power-off judgment module; The logic gate unit may generate a control signal acting on the gate of the third NMOS tube based on the power-off prompt signal.
10. The hysteresis circuit according to claim 7, characterized in that: The second load and driving module includes a driving and sampling module and n loads; The positive electrodes of the n loads are respectively electrically connected to the positive electrode of the constant current module, and the negative electrodes of the n loads are respectively electrically connected to the n load interfaces of the driving and sampling module in sequence; The power-off judgment communication interface of the driving and sampling module serves as the output end of the second load and driving module, and its ground end is electrically connected to the negative electrode of the constant current module; Here, n is an integer greater than 1.
Citation Information
Patent Citations
Portable impedance self-adaption laser diode driving module
CN109346918A
Leakage protection detection circuit and control method thereof
CN109709440A
Miniature light emitting diode pixel circuit and driving method
CN115775524A
Dual-battery-driven direct current motor voltage stabilization control system and control method
CN116247985A
Input voltage power failure detection circuit and sound box
CN214413021U