DC power failure detection circuit
By designing a DC power failure detection circuit, a comparator is used to detect the power supply status, and an energy storage unit is used to extend the MCU power supply time. This solves the problem of data loss when electronic devices lose power, ensuring data security and equipment reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- GUANGDONG A OK TECH GRAND DEV CO LTD
- Filing Date
- 2025-05-23
- Publication Date
- 2026-05-12
AI Technical Summary
When electronic devices lose power, data cannot be saved in time, causing the devices to malfunction. Existing technologies are insufficient to effectively prevent data loss.
A DC power failure detection circuit is adopted, which uses a comparator to detect whether the external DC power supply is lost, and provides a short-term power supply to the control chip MCU through an energy storage unit to ensure the execution of data storage actions.
When the DC power supply fails, the control chip MCU can promptly perform data storage actions to prevent data loss and provide the MCU with response time to ensure equipment reliability.
Smart Images

Figure CN224231945U_ABST
Abstract
Description
Technical Field
[0001] This utility model relates to the field of power failure detection circuit technology, specifically to a DC power failure detection circuit. Background Technology
[0002] During the use of electronic devices, when a power failure occurs or the power supply is depleted, the voltage suddenly drops to a very low level, causing a power outage. This prevents the electronic device from functioning properly, and data lost during the power outage cannot be saved in time. Therefore, it is crucial to take appropriate measures promptly when electronic devices lose power to ensure data security and device reliability. Utility Model Content
[0003] To address the shortcomings of existing technologies, a DC power failure detection circuit is provided.
[0004] To achieve the above objectives, this utility model provides a DC power failure detection circuit, including a comparator U3, a first voltage divider unit, a second voltage divider unit, a control chip MCU, a voltage regulator component, and an energy storage unit. The input terminal of the voltage regulator component is connected to an external DC power supply, and the output terminal of the voltage regulator component is connected to the energy storage unit and the VDD terminal of the control chip MCU. The non-inverting input terminal of the comparator U3 is connected to the first voltage divider unit, and one end of the first voltage divider unit is connected to the external DC power supply and the input terminal of the voltage regulator component, while the other end is grounded. The inverting input terminal of the comparator U3 is connected to the second voltage divider unit, and one end of the second voltage divider unit is connected to the output terminal of the voltage regulator component, while the other end is grounded. The positive power supply terminal of the comparator U3 is connected to the output terminal of the voltage regulator component, and the negative power supply terminal of the comparator U3 is grounded. The output terminal of the comparator U3 is connected to the IO pin of the control chip MCU, and the VDD pin of the control chip MCU is connected to the output terminal of the energy storage unit and the voltage regulator component, while the other end of the energy storage unit is grounded.
[0005] According to one embodiment of the present invention, the voltage regulator assembly includes a first filter unit, a voltage regulator chip U2, and a second filter unit. One end of the first filter unit is connected to an external DC power supply and the input terminal of the voltage regulator chip U2, and the other end is connected to the input terminal of the voltage regulator chip U2. The output terminal of the voltage regulator chip U2 is connected to the second filter unit. The other end of the second filter unit is connected to an energy storage unit and the VDD pin of the control chip MCU. The other end of the second filter unit is also connected to the positive power supply terminal of the second voltage divider unit and the comparator U3.
[0006] According to one embodiment of the present invention, the energy storage unit includes a capacitor C7, one end of which is connected to the VDD pin of the control chip MCU and the output terminal of the voltage regulator component, and the other end is grounded.
[0007] According to one embodiment of the present invention, a third filtering unit is also included. One end of the third filtering unit is connected to the VDD pin of the control chip MCU, the output terminal of the energy storage unit and the voltage regulator component, and the other end is grounded.
[0008] According to one embodiment of the present invention, it further includes a diode D1, the positive terminal of which is connected to an external DC power supply, and the negative terminal of which is connected to the input terminal of a voltage regulator component.
[0009] According to one embodiment of the present invention, it further includes a diode D3, the positive terminal of which is connected to the second filter unit, and the negative terminal is connected to the energy storage unit and the VDD pin of the control chip MCU respectively.
[0010] According to one embodiment of the present invention, the first voltage divider unit includes resistors R1 and R5. One end of resistor R1 is connected to the input terminal of an external DC power supply and a voltage regulator component, and the other end is connected to resistor R5 and the non-inverting input terminal of comparator U3, respectively. The other end of resistor R5 is grounded. The second voltage divider unit includes resistors R2 and R6. One end of resistor R2 is connected to the output terminal of the voltage regulator component, and the other end is connected to resistor R6 and the inverting input terminal of comparator U3, respectively. The other end of resistor R6 is grounded.
[0011] According to one embodiment of the present invention, a resistor R4 is also included. One end of the resistor R4 is connected to the output terminal of the comparator U3, and the other end is connected to the IO pin of the control chip MCU.
[0012] According to one embodiment of the present invention, it further includes a resistor R3. One end of the resistor R3 is connected to the power supply terminal of the comparator U3 and the output terminal of the voltage regulator component, and the other end of the resistor R3 is connected to the output terminal of the comparator U3 and the IO pin of the control chip MCU.
[0013] The beneficial effects of this invention are as follows: Comparator U3 detects whether the external DC power supply is down. When the external DC power supply is normal, comparator U3 outputs a high-level signal, and the MCU control chip operates normally. When the external DC power supply is down, the output of comparator U3 outputs a low-level signal. Upon detecting the low-level signal, the MCU control chip executes data storage to prevent data loss. Furthermore, after the external power supply fails, the energy storage unit discharges itself, briefly supplying power to the MCU control chip, giving the MCU sufficient time to trigger emergency measures. Attached Figure Description
[0014] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0015] Figure 1 This is a diagram of the DC power failure detection circuit in the embodiment.
[0016] Explanation of reference numerals in the attached figures
[0017] 1. First voltage divider unit; 2. Second voltage divider unit; 3. Voltage regulator assembly; 31. First filter unit; 32. Second filter unit; 4. Energy storage unit; 5. Third filter unit. Detailed Implementation
[0018] The following drawings will disclose several embodiments of this utility model. For clarity, many practical details will be described in the following description. However, it should be understood that these practical details should not be used to limit this utility model. That is, in some embodiments of this utility model, these practical details are not essential. In addition, for the sake of simplicity, some conventional structures and components will be shown in the drawings in a simple schematic manner.
[0019] Furthermore, in this utility model, the use of terms such as "first" and "second" is for descriptive purposes only and does not specifically refer to any order or sequence, nor is it intended to limit the utility model. They are merely used to distinguish components or operations described with the same technical terms and should not be construed as indicating or implying their relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, such a combination should be considered non-existent and not within the scope of protection claimed by this utility model.
[0020] Please refer to Figure 1 , Figure 1 This is a circuit diagram for DC current detection. This embodiment provides a DC power failure detection circuit, which includes a comparator U3, a first voltage divider unit 1, a second voltage divider unit 2, a control chip MCU, a voltage regulator component 3, and an energy storage unit 4. During connection, the input terminal of the voltage regulator component 3 is connected to an external DC power supply. The DC power supplied by the external DC power supply is regulated by the voltage regulator component 3 to maintain a rated voltage output, thus powering the circuit.
[0021] Specifically, the non-inverting input of comparator U3 is connected to the first voltage divider unit 1, one end of which is connected to both the external DC power supply and the input of the voltage regulator component 3, while the other end is grounded. The inverting input of comparator U3 is connected to the second voltage divider unit 2, one end of which is connected to the output of the voltage regulator component 3, and the other end is grounded. The positive power supply terminal of comparator U3 is connected to the output of the voltage regulator component 3, and the negative power supply terminal is grounded. The control chip MCU has an IO pin, a VDD pin, and a GND pin, with the GND pin grounded. The output of comparator U3 is connected to the IO pin of the control chip MCU, and the VDD pin of the control chip MCU is connected to both the output of the voltage regulator component 3 and the energy storage unit 4, with the other end of the energy storage unit 4 grounded.
[0022] In practical applications, the DC power failure detection circuit has a DCIN terminal, which is connected to an external DC power supply. The external DC power supply is input through the DCIN terminal to provide power to the DC power failure detection circuit. The voltage regulator component 3 receives the electrical signal output from the DC power supply and regulates it to maintain a rated output voltage to power the comparator U3 and the control chip MCU. Specifically, when the external power supply is normal, the voltage regulator component 3 outputs an electrical signal to charge the energy storage unit 4 and power the control chip MCU. Simultaneously, the electrical signal output from the external DC power supply is input to the first voltage divider unit 1, which divides the signal and inputs it to the non-inverting input of the comparator U3. The second voltage divider unit 2 receives the electrical signal output from the voltage regulator component 3 and divides it. The signal output from the voltage regulator component 3 is then divided by the second voltage divider unit 2 and input to the inverting input of the comparator U3. After the external DC power supply output signal is regulated by voltage regulator 3, the voltage output of voltage regulator 3 is less than the voltage of the external DC power supply output signal. This causes the voltage division value of the second voltage divider unit 2 to be less than the voltage division value of the first voltage divider unit 1. Consequently, the voltage at the non-inverting input of comparator U3 is greater than the voltage at the inverting input. At this time, comparator U3 outputs a high-level signal to the control chip MCU. After the MCU receives the high-level signal from comparator U3, it determines that the external DC power supply is in normal working condition and continues to operate normally. When the external DC power supply fails, the voltage provided by the external DC power supply gradually decreases, causing the voltage at the non-inverting input of comparator U3 to gradually decrease as well. Within a certain period of time, the output voltage of the external DC power supply remains within the operating voltage range of voltage regulator 3, which maintains its rated output voltage, ensuring a stable input at the inverting input of comparator U3. When the output voltage of the external DC power supply drops to a certain value, the voltage at the non-inverting input of comparator U3 becomes lower than the voltage at the inverting input, and the output of comparator U3 outputs a low-level signal. The MCU's I / O interface receives this low-level signal and determines that the circuit is in a power-down state. The MCU then performs data saving measures to prevent data loss due to a sudden power outage. Simultaneously, when the voltage output of the external DC power supply is insufficient to power the voltage regulator 3, the regulator 3 has no output. In this case, the energy storage unit 4 discharges to power the MCU, preventing a direct power outage after the external DC power supply fails and providing the MCU with reaction time.
[0023] Thus, comparator U3 detects whether the external DC power supply is down. When the external DC power supply is normal, comparator U3 outputs a high-level signal, and the MCU control chip operates normally. When the external DC power supply is down, comparator U3 outputs a low-level signal. Upon detecting the low-level signal, the MCU control chip executes data storage to prevent data loss. Furthermore, after the external power supply fails, the energy storage unit 4 discharges itself, briefly supplying power to the MCU control chip, giving the MCU time to trigger emergency measures.
[0024] In this example, energy storage unit 4 includes capacitor C7. One end of capacitor C7 is connected to the VDD pin of the control chip MCU and the output terminal of the voltage regulator component 3, while the other end of capacitor C7 is grounded. It should be noted that capacitor C7 is a polarized capacitor. In practical applications, a larger capacity capacitor can be used to extend the power supply time to the control chip MCU.
[0025] Furthermore, the voltage regulator component 3 includes a first filter unit 31, a voltage regulator chip U2, and a second filter unit 32. One end of the first filter unit 31 is connected to an external DC power supply, and the other end is connected to the input terminal of the voltage regulator chip U2. The output terminal of the voltage regulator chip U2 is connected to one end of the second filter unit 32. The other end of the second filter unit 32 is connected to both the energy storage unit 4 and the VDD pin of the control chip MCU.
[0026] In practical applications, the electrical signal output from an external DC power supply is input to the voltage regulator component 3. The first filter unit 31 receives the electrical signal from the external DC power supply, filters it, and then outputs the filtered signal to the input terminal of the voltage regulator chip U2. The voltage regulator chip U2 receives the electrical signal output from the first filter unit 31 and converts it into an electrical signal with a rated voltage value for output. The second filter unit 32 receives the electrical signal output from the voltage regulator chip U2, filters it, and outputs it. The electrical signal output after filtering by the second filter unit 32 powers the energy storage unit 4, the control chip MCU, the second voltage divider unit 2, and the comparator U3, respectively. In this example, the voltage regulator chip U2 converts the electrical signal output from the external DC power supply into a stable +5V voltage output.
[0027] Specifically, the first filter unit 31 includes capacitors C1 and C2. One end of capacitor C1 is connected to both the external DC power supply and the input terminal of the voltage regulator chip U2, while the other end of capacitor C1 is grounded. Capacitor C2 is connected in parallel with capacitor C1. Both capacitors C1 and C2 are used for filtering.
[0028] The second filtering unit 32 includes capacitors C3 and C4. One end of capacitor C3 is connected to the output terminal of the voltage regulator chip U2 and the VDD pin of the control chip MCU, respectively. The other end of capacitor C3 is grounded. Capacitor C4 is connected in parallel with capacitor C3. Capacitors C3 and C4 are used for filtering.
[0029] The DC power failure detection circuit also includes diode D1. The anode of diode D1 is connected to an external DC power supply, and the cathode of diode D1 is connected to the input terminal of voltage regulator component 3. Diode D1 is used for freewheeling and prevents current from flowing in the reverse direction in the circuit.
[0030] The DC power failure detection circuit also includes a third filter unit 5. One end of the third filter unit 5 is connected to the VDD pin of the control chip MCU, the output terminal of the voltage regulator component 3, and the energy storage unit 4, respectively, while the other end of the third filter unit 5 is grounded. The third filter unit 5 is used for filtering. The electrical signal output from the output terminal of the voltage regulator component 3 is filtered by the third filter unit 5 and then input to the VDD pin of the voltage regulator chip U2, thereby powering the control chip MCU.
[0031] In addition, the DC power failure detection circuit also includes diode D3. The anode of diode D3 is connected to the output terminal of voltage regulator component 3, and the cathode of diode D1 is connected to both the energy storage unit 4 and the VDD pin of the control chip MCU. Diode D3 is used for rectification; the supply voltage output from the second output terminal of voltage regulator component 3 is rectified by diode D3 and then output to the energy storage unit 4 and the VDD pin of the control chip MCU. Simultaneously, diode D3 prevents current from flowing in the reverse direction in the circuit.
[0032] In one embodiment, the DC power failure detection circuit further includes a diode D2, the positive terminal of which is connected to the output terminal of the voltage regulator component 3 and the positive terminal of the diode D3, and the other end of which outputs a +5V power supply voltage.
[0033] Furthermore, the first voltage divider unit 1 includes resistors R1 and R5. One end of resistor R1 is connected to the external DC power supply and the input terminal of the voltage regulator component 3, respectively, and the other end is connected to resistor R5 and the non-inverting input terminal of comparator U3, respectively. The other end of resistor R5 is grounded. The second voltage divider unit 2 includes resistors R2 and R6. One end of resistor R2 is connected to the output terminal of the voltage regulator component 3, and the other end is connected to resistor R6 and the inverting input terminal of comparator U3, respectively.
[0034] Resistors R1 and R5 are used to divide the voltage of the electrical signal output from the external DC power supply, ensuring that the voltage at the non-inverting input of comparator U3 meets the requirements. Resistors R2 and R6 are used to divide the voltage of the electrical signal output from the voltage regulator component 3, ensuring that the voltage at the inverting input of comparator U3 meets the requirements. It should be noted that in practical applications, the values of resistors R1, R5, R2, and R6 can be selected according to the specific model of comparator U3. By changing the values of resistors R1 and R5, the voltage required at the non-inverting input of comparator U3 can be matched; similarly, by changing the values of resistors R2 and R6, the voltage required at the inverting input can be matched. Furthermore, by increasing or decreasing the input voltage at the inverting input of comparator U3, the response time of comparator U2 when the external DC power supply fails can be altered, thus meeting the voltage requirements at both the non-inverting and inverting inputs of comparator U3.
[0035] In addition, the DC power failure detection circuit also includes resistor R4. One end of resistor R4 is connected to the output of comparator U3, and the other end is connected to the I / O pin of the control chip MCU. Resistor R4 is used for current limiting. The signal output from comparator U3 is input to the control chip MCU after passing through resistor R4, preventing excessive current limiting from damaging the control chip MCU.
[0036] The DC power failure detection circuit also includes resistor R3. One end of resistor R3 is connected to the supply voltage, and the other end is connected to the output of comparator U3 and the I / O pin of the control chip MCU. Resistor R3 is a pull-up resistor, used to keep the uncertain level signal output by comparator U3 at a high level.
[0037] The DC power failure detection circuit also includes capacitor C5. One end of capacitor C5 is connected to the output terminal of voltage regulator component 3 and the positive power supply terminal of comparator U3, while the other end is grounded. Capacitor C5 is used to filter the electrical signal output by voltage regulator component 3. The filtered electrical signal is then input to comparator U3 to power it.
[0038] The above description is merely an embodiment of this utility model and is not intended to limit the scope of this utility model. Various modifications and variations can be made to this utility model by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of this utility model should be included within the scope of the claims of this utility model.
Claims
1. A DC power failure detection circuit, characterized in that, include: The system comprises a comparator U3, a first voltage divider unit (1), a second voltage divider unit (2), a control chip MCU, a voltage regulator component (3), and an energy storage unit (4). The input terminal of the voltage regulator component (3) is connected to an external DC power supply, and the output terminal of the voltage regulator component (3) is connected to the energy storage unit (4) and the VDD terminal of the control chip MCU. The non-inverting input terminal of the comparator U3 is connected to the first voltage divider unit (1), and one end of the first voltage divider unit (1) is connected to the external DC power supply and the input terminal of the voltage regulator component (3), while the other end is grounded. The inverting input terminal of comparator U3 is connected to the second voltage divider unit (2), and one end of the second voltage divider unit (2) is connected to the output terminal of the voltage regulator component (3), and the other end is grounded; the positive power supply terminal of comparator U3 is connected to the output terminal of the voltage regulator component (3), and the negative power supply terminal of comparator U3 is grounded; the output terminal of comparator U3 is connected to the IO pin of the control chip MCU, and the VDD pin of the control chip MCU is connected to the energy storage unit (4) and the output terminal of the voltage regulator component (3) respectively, and the other end of the energy storage unit (4) is grounded.
2. The DC power failure detection circuit according to claim 1, characterized in that, The voltage regulator component (3) includes a first filter unit (31), a voltage regulator chip U2 and a second filter unit (32). One end of the first filter unit (31) is connected to an external DC power supply and the input terminal of the voltage regulator chip U2, and the other end is connected to the input terminal of the voltage regulator chip U2. The output terminal of the voltage regulator chip U2 is connected to the second filter unit (32). The other end of the second filter unit (32) is connected to the energy storage unit (4) and the VDD pin of the control chip MCU. The other end of the second filter unit (32) is also connected to the positive power supply terminal of the second voltage divider unit (2) and the comparator U3.
3. The DC power failure detection circuit according to claim 1, characterized in that, The energy storage unit (4) includes a capacitor C7. One end of the capacitor C7 is connected to the VDD pin of the control chip MCU and the output terminal of the voltage regulator component (3), and the other end is grounded.
4. The DC power failure detection circuit according to claim 1, characterized in that, It also includes a third filter unit (5), one end of which is connected to the VDD pin of the control chip MCU, the output of the energy storage unit (4) and the voltage regulator component (3), and the other end is grounded.
5. The DC power failure detection circuit according to claim 1, characterized in that, It also includes a diode D1, the positive terminal of which is connected to an external DC power supply, and the negative terminal of which is connected to the input terminal of the voltage regulator component (3).
6. The DC power failure detection circuit according to claim 2, characterized in that, It also includes a diode D3, the positive terminal of which is connected to the second filter unit (32), and its negative terminal is connected to the energy storage unit (4) and the VDD pin of the control chip MCU respectively.
7. The DC power failure detection circuit according to claim 1, characterized in that, The first voltage divider unit (1) includes resistors R1 and R5. One end of resistor R1 is connected to an external DC power supply and the input terminal of the voltage regulator component (3), and the other end is connected to resistor R5 and the non-inverting input terminal of comparator U3. The other end of resistor R5 is grounded. The second voltage divider unit (2) includes resistors R2 and R6. One end of resistor R2 is connected to the output terminal of the voltage regulator component (3), and the other end is connected to resistor R6 and the inverting input terminal of comparator U3. The other end of resistor R6 is grounded.
8. The DC power failure detection circuit according to claim 1, characterized in that, It also includes a resistor R4, one end of which is connected to the output of the comparator U3, and the other end is connected to the IO pin of the control chip MCU.
9. The DC power failure detection circuit according to claim 1, characterized in that, It also includes a resistor R3, one end of which is connected to the power supply terminal of the comparator U3 and the output terminal of the voltage regulator component (3), and the other end of which is connected to the output terminal of the comparator U3 and the IO pin of the control chip MCU.