Power failure protection circuit, power failure protection system and electronic equipment

By designing a power-down protection circuit in electronic devices and using voltage detection signals to perform read and write protection in advance, the data loss problem of storage modules during the development and debugging stages is solved, the system reliability and data integrity are improved, and the equipment is prevented from losing function. .

CN118897616APending Publication Date: 2024-11-05GUANGZHOU AUTOMOBILE GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410869690.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-11-05

AI Technical Summary

Technical Problem

In electronic devices, storage modules are prone to data loss, damage or read and write errors during the development, debugging and software upgrade stages, resulting in the system software not being able to operate normally and even causing the equipment to lose its functions. How to effectively protect power outage has become an urgent solution. question.

Method used

Design a power-down protection circuit, including a first voltage detection circuit and a main control module, outputs a detection signal by detecting the drastic change of the input voltage, and the main control module performs power-down read and write protection according to the detection signal to ensure that the input voltage changes drastically Protect early to improve the accuracy and reliability of power outage prediction.

Benefits of technology

By performing power-down read and write protection early, data loss and device loss are effectively prevented, data integrity and system reliability of storage modules are improved, and electronic devices can take timely measures when the risk of power-down occurs to avoid software loss and equipment loss Turn into bricks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118897616A_ABST
    Figure CN118897616A_ABST
Patent Text Reader

Abstract

The invention discloses a power failure protection circuit, a power failure protection system and electronic equipment, the power failure protection circuit comprises a first voltage detection circuit and a main control module; the first voltage detection circuit is used for being connected with a voltage input end, receiving input voltage of the voltage input end, and outputting a first detection signal when the input voltage meets a violent change condition; and the main control module is connected with the first voltage detection circuit and is used for executing power failure read-write protection according to the first detection signal. According to the technical scheme, the main control module executes the power-down read-write protection through the corresponding first detection signal when the input voltage meets the violent change condition, power-down prediction is achieved, the accuracy and reliability of power-down prediction are improved, and therefore the main control module can execute the power-down read-write protection in advance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power-off protection, and in particular to a power-off protection circuit, a power-off protection system and electronic equipment. Background Art

[0002] With the widespread application of electronic products and embedded systems, central controllers play an increasingly important role in various devices. For example, the Central Domain Controller (CDC) is responsible for managing and coordinating the communication and operation between multiple Electronic Control Units (ECUs) to ensure the efficient and safe operation of the electronic systems of the car.

[0003] The central controller usually contains several key components, including a microprocessor, input / output interfaces, and storage modules. The storage module is used in the central controller to store key operating systems, applications, and user data. The integrity and reliability of its data are critical to the normal operation of the entire system.

[0004] However, during the product development, debugging and software upgrade stages, occasional problems with abnormal storage data often occur. These abnormalities include partial data loss, data corruption, read and write errors, etc. In severe cases, they may cause the system software to fail to operate normally, or even cause software loss, bricking the device, and completely losing its function. Therefore, how to protect the storage module from power failure has become a technical problem that needs to be solved urgently. Summary of the invention

[0005] The embodiments of the present invention provide a power-off protection circuit, a power-off protection system and an electronic device to solve the problem of how to perform power-off protection on a storage module.

[0006] A power-off protection circuit comprises a first voltage detection circuit and a main control module;

[0007] The first voltage detection circuit is used to connect to the voltage input terminal, receive the input voltage of the voltage input terminal, and output a first detection signal when the input voltage meets the drastic change condition;

[0008] The main control module is connected to the first voltage detection circuit, and is used to perform power-off read-write protection according to the first detection signal.

[0009] Optionally, the drastic change condition is that a change slope corresponding to the input voltage is greater than a preset slope.

[0010] Optionally, the drastic change condition is that a voltage frequency corresponding to the input voltage is within a preset frequency range.

[0011] Optionally, the first voltage detection circuit includes a bandpass filter circuit or a differential circuit.

[0012] Optionally, the power-off protection circuit further includes a shaping circuit;

[0013] The input end of the shaping circuit is connected to the first voltage detection circuit, and the output end of the shaping circuit is connected to the main control module.

[0014] Optionally, the shaping circuit includes a first comparator and a first reference voltage circuit;

[0015] The first end of the first reference voltage circuit is used to connect to the second power supply end;

[0016] The non-inverting input terminal of the first comparator is connected to the first voltage detection circuit, the inverting input terminal of the first comparator is connected to the second terminal of the first reference voltage circuit, and the output terminal of the first comparator is connected to the main control module.

[0017] Optionally, the power-off protection circuit further includes a second voltage detection circuit;

[0018] The second voltage detection circuit is used to be connected to the voltage input terminal, and is used to output a second detection signal according to the input voltage of the voltage input terminal, wherein the second detection signal is a signal formed when the input voltage is less than the first voltage threshold;

[0019] The main control module is connected to the second voltage detection circuit, and performs power-off read-write protection according to the second detection signal.

[0020] Optionally, the second voltage detection circuit includes a voltage acquisition circuit and a power-off detection circuit;

[0021] The voltage collection circuit is connected to the voltage input terminal and is used to collect the input voltage;

[0022] The power-off detection circuit is connected to the voltage acquisition circuit and the main control module, and is used to output the second detection signal when the input voltage is less than the first voltage threshold.

[0023] Optionally, the voltage acquisition circuit includes a first voltage divider circuit;

[0024] A first end of the first voltage divider circuit is connected to a voltage input end, a second end of the first voltage divider circuit is grounded, and an output end of the first voltage divider circuit is connected to the power-off detection circuit.

[0025] Optionally, the voltage acquisition circuit further includes a first switch circuit;

[0026] The first switch circuit is arranged in series between the first end of the first voltage divider circuit and the voltage input end, and the control end of the first switch circuit is used to receive a switch control signal, and the switch control signal is used to control the first switch circuit to be turned on or off.

[0027] Optionally, the power-off detection circuit includes a first diode, a second voltage divider circuit, a third voltage divider circuit, a second diode and a second switch circuit;

[0028] The anode of the first diode is connected to the voltage collection circuit, the cathode of the first diode is connected to the first end of the second voltage divider circuit, the second end of the second voltage divider circuit is grounded, the output end of the second voltage divider circuit is connected to the cathode of the second diode, and the anode of the second diode is connected to the first end of the third voltage divider circuit;

[0029] The second end of the third voltage divider circuit is connected to the first power supply end, and the output end of the third voltage divider circuit is connected to the control end of the second switch circuit;

[0030] A first end of the second switch circuit is connected to the first power supply end, and a second end of the second switch circuit is connected to the main control module.

[0031] A power-off protection system comprises a storage module and the above-mentioned power-off protection circuit;

[0032] The main control module of the power-off protection circuit is connected to the storage module, and is used for performing power-off read-write protection on the storage module according to the first detection signal and / or the second detection signal.

[0033] An electronic device comprises the above-mentioned power-off protection system.

[0034] The above-mentioned power-off protection circuit, power-off protection system and electronic device are connected to the voltage input end through the first voltage detection circuit, receive the input voltage of the voltage input end, and output the first detection signal when the input voltage meets the drastic change condition; and are connected to the first voltage detection circuit through the main control module, and are used to perform power-off read-write protection according to the first detection signal. Since there is a greater risk of power off when the input voltage meets the drastic change condition, the main control module performs power-off read-write protection after receiving the first detection signal, thereby realizing power-off prediction, improving the accuracy and reliability of power-off prediction, and enabling the main control module to perform power-off read-write protection early. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0036] Figure 1 is a circuit diagram of a power-off protection circuit in one embodiment of the present invention;

[0037] Figure 2 is a circuit diagram of a first voltage detection circuit in one embodiment of the present invention;

[0038] Figure 3 is a circuit diagram of a bandpass filter in one embodiment of the present invention;

[0039] Figure 4 is a circuit diagram of a shaping circuit in one embodiment of the present invention;

[0040] Figure 5 1 is a circuit diagram of a power-off protection system in one embodiment of the present invention.

[0041] In the figure: 1. power-off protection circuit; 11. first voltage detection circuit; 12. first voltage detection circuit; 121. voltage acquisition circuit; 1211. first voltage-dividing circuit; 1212. first switch circuit; 1213. fourth voltage-dividing circuit; 1214. third switch circuit; 122. power-off detection circuit; 1221. second voltage-dividing circuit; 1222. third voltage-dividing circuit; 1223. second switch circuit; 13. main control module; 14. shaping circuit; 141. first reference voltage circuit; 2. storage module. DETAILED DESCRIPTION

[0042] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0043] It should be understood that the present invention can be implemented in different forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, providing these embodiments will make the disclosure thorough and complete and fully convey the scope of the present invention to those skilled in the art. In the accompanying drawings, the sizes and relative sizes of layers and regions may be exaggerated for clarity. The same reference numerals throughout represent the same elements.

[0044] It should be understood that when an element or layer is referred to as being "on, adjacent to, connected to or coupled to other elements or layers, it may be directly on, adjacent to, connected to or coupled to other elements or layers, or there may be intervening elements or layers. In contrast, when an element is referred to as being "directly on, directly adjacent to, directly connected to or directly coupled to other elements or layers, there may be no intervening elements or layers. It should be understood that, although the terms first, second, third, etc. may be used to describe various elements, components, regions, layers and / or parts, these elements, components, regions, layers and / or parts should not be limited by these terms. These terms are only used to distinguish one element, component, region, layer or part from another element, component, region, layer or part. Therefore, without departing from the teachings of the present invention, the first element, component, region, layer or part discussed below may be represented as a second element, component, region, layer or part.

[0045] Spatially relative terms such as "under," "beneath," "below," "under," "above," "above," and the like may be used herein for ease of description to describe the relationship of an element or feature shown in the figures to other elements or features. It should be understood that the spatially relative terms are intended to include different orientations of the device in use and operation in addition to the orientations shown in the figures. For example, if the device in the accompanying drawings is flipped, then the elements or features described as "under other elements" or "under" or "under" will be oriented as "above" the other elements or features. Thus, the exemplary terms "under" and "under" may include both upper and lower orientations. The device may be otherwise oriented (rotated 90 degrees or other orientations) and the spatial descriptors used herein are interpreted accordingly.

[0046] The purpose of the terms used herein is only to describe specific embodiments and is not intended to be limiting of the present invention. When used herein, the singular forms "a", "an" and " / the" are also intended to include plural forms, unless the context clearly indicates another way. It should also be understood that the terms "consisting of" and / or "comprising" when used in this specification determine the presence of features, integers, steps, operations, elements and / or parts, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, parts and / or groups. When used herein, the term "and / or" includes any and all combinations of the relevant listed items.

[0047] In order to fully understand the present invention, detailed structures and steps will be presented in the following description to illustrate the technical solutions proposed by the present invention. The preferred embodiments of the present invention are described in detail below, but in addition to these detailed descriptions, the present invention may also have other implementations.

[0048] The present embodiment provides a power-off protection circuit 1, which is applied in an electronic device, and the electronic device includes a power-off protection system. Exemplarily, the power-off protection system includes a storage module 2 and the above-mentioned power-off protection circuit 1; a main control module 13 of the power-off protection circuit 1 is connected to the storage module 2, and is used to perform power-off read-write protection on the storage module 2.

[0049] Exemplarily, the electronic device may be an electronic device in an electric vehicle, such as a central domain controller.

[0050] This embodiment provides a power-off protection circuit 1, such as Figure 1 As shown, it includes a first voltage detection circuit 11 and a main control module 13; the first voltage detection circuit 11 is used to connect to the voltage input terminal, receive the input voltage of the voltage input terminal, and output a first detection signal when the input voltage meets the drastic change condition; the main control module 13 is connected to the first voltage detection circuit 11, and is used to perform power-off read-write protection according to the first detection signal.

[0051] Among them, the main control module 13 is a microprocessor in the above-mentioned central domain controller, and the microprocessor is connected to the storage module 2. The storage module 2 is preferably a flash memory module. The voltage input terminal is used to connect an energy storage module. For example, a power battery and / or an energy storage battery in an electric vehicle. The first detection signal is an electrical signal formed by the first voltage detection circuit 11 when the input voltage meets the drastic change condition. In this embodiment, the input voltage is received by the first voltage detection circuit 11, and the first detection signal is output when the input voltage meets the drastic change condition. Since there is a greater risk of power failure when the input voltage meets the drastic change condition, the main control module 13 performs power failure read-write protection after receiving the first detection signal, thereby realizing power failure prediction, improving the accuracy and reliability of power failure prediction, and enabling the main control module 13 to perform power failure read-write protection early.

[0052] In one embodiment, the drastic change condition is that the change slope corresponding to the input voltage is greater than the preset slope. The preset slope can be set based on experience. As an example, the first voltage detection circuit 11 includes a voltage slope detection circuit. In this embodiment, the voltage slope detection circuit can adopt a voltage slope detection circuit known to those skilled in the art to ensure that the change slope corresponding to the input voltage can be detected, and when the change slope corresponding to the input voltage is greater than the preset slope, it can output an electrical signal to the main control module 13 to instruct the main control module 13 to perform power-off read-write protection. It can be understood that when the change slope corresponding to the input voltage is greater than the preset slope, it means that there is a greater risk of power failure in the input voltage at this time. Therefore, the degree of drastic change of the input voltage can be judged by the change slope corresponding to the input voltage, so as to more accurately predict power failure.

[0053] In one embodiment, the drastic change condition is that the voltage frequency corresponding to the input voltage is within a preset frequency range. The preset frequency range can be set based on experience. According to the relevant technology, the input voltage is generally a sine wave. When the input voltage is a sine wave, the maximum value of the input voltage change slope is proportional to the voltage frequency. The higher the voltage frequency of the input voltage, the faster the rate of change of the input voltage, and the greater the slope corresponding to the input voltage. The greater the slope corresponding to the input voltage, the greater the probability of the input voltage powering off. Therefore, when the voltage frequency corresponding to the input voltage is within the preset frequency range, it means that the probability of the input voltage powering off is relatively high at this time, and the first voltage detection circuit 11 outputs a first detection signal, thereby accurately predicting whether the input voltage is powered off according to the voltage frequency corresponding to the input voltage, thereby improving the reliability of power-off protection.

[0054] In one embodiment, the first voltage detection circuit 11 includes a bandpass filter circuit or a differential circuit.

[0055] In this embodiment, the first voltage detection circuit 11 includes a bandpass filter circuit or a differential circuit, so that the corresponding resonant frequency of the bandpass filter circuit or the differential circuit can be configured, that is, the above-mentioned preset frequency range is configured, so that when the voltage frequency corresponding to the input voltage is within the preset frequency range, the first voltage detection circuit 11 can output a second detection signal, thereby judging that the input voltage change slope at this time is large, and there is a greater risk of power failure.

[0056] Furthermore, if Figure 3 As shown, the bandpass filter circuit includes resistors R11, R14, R16, R17, R22, capacitors C5 and C7, and a comparator U2A. The specific connection method is as follows: Figure 3 In this embodiment, the preset frequency range can be configured by resistor R14, resistor R16, capacitor C5 and capacitor C7.

[0057] It can be understood that when the voltage input terminal includes a first voltage input terminal BAT_MAIN and a second voltage input terminal BAT_BACKUP. When the first voltage input terminal BAT_MAIN and the second voltage input terminal BAT_BACKUP are respectively used to connect two different energy storage modules, two first voltage detection circuits 11 can be provided, and the input terminal of each first voltage detection circuit 11 is respectively connected to the first voltage input terminal BAT_MAIN and the second voltage input terminal BAT_BACKUP. In this way, power failure prediction is performed for different energy storage modules.

[0058] In one embodiment, the power-off protection circuit 1 further includes a shaping circuit 14 ; an input end of the shaping circuit 14 is connected to the first voltage detection circuit 11 , and an output end of the shaping circuit 14 is connected to the main control module 13 .

[0059] In this embodiment, by connecting the input end of the shaping circuit 14 to the first voltage detection circuit 11 and the output end of the shaping circuit 14 to the main control module 13, the analog quantity corresponding to the second detection signal is converted into a digital quantity that is easy for the main control module 13 to process through the shaping circuit 14.

[0060] In one embodiment, the shaping circuit 14 includes a first comparator U1A and a first reference voltage circuit 141; the first end of the first reference voltage circuit 141 is used to connect to the second power supply end; the non-inverting input end of the first comparator U1A is connected to the first voltage detection circuit 11, the inverting input end of the first comparator U1A is connected to the second end of the first reference voltage circuit 141, and the output end of the first comparator U1A is connected to the main control module 13.

[0061] As an example, the first reference voltage circuit 141 includes a resistor R818, a resistor R819 and a capacitor C662. The resistor R818 and the resistor R819 are arranged in series between the second power supply terminal and the ground, for example, between the 12V power supply terminal and the ground, and the connection node between the resistor R818 and the resistor R819 is connected to the inverting input terminal of the first comparator U1A of the first comparator U1A. Thus, the analog quantity corresponding to the second detection signal is converted into a digital quantity that is easy to process by the main control module 13 through the first comparator U1A. The connection node between the resistor R818 and the resistor R819 is also grounded through the capacitor C665.

[0062] Understandably, if Figure 4 As shown, when the voltage input terminal includes a first voltage input terminal BAT_MAIN and a second voltage input terminal BAT_BACKUP. When the first voltage input terminal BAT_MAIN and the second voltage input terminal BAT_BACKUP are respectively used to connect two different energy storage modules, when two first voltage detection circuits 11 are set, a second comparator U1B can be set accordingly. Exemplarily, the non-inverting input terminal of the first comparator U1A is connected to the output terminal SIGNAL_A of a first voltage detection circuit 11, the inverting input terminal of the first comparator U1A is connected to the second end of the first reference voltage circuit 141, and the output terminal SIGNAL_D of the first comparator U1A is connected to the main control module 13. The non-inverting input terminal of the second comparator U1B is connected to the output terminal SIGNAL_B of another first voltage detection circuit 11, the inverting input terminal of the second comparator U1B is connected to the second end of the first reference voltage circuit 141, and the output terminal SIGNAL_C of the second comparator U1B is connected to the main control module 13. The non-inverting input terminal and the output terminal of the first comparator U1A are connected via a resistor R826, and the non-inverting input terminal and the output terminal of the second comparator U1B are connected via a resistor R827.

[0063] As an example, a first input filter circuit is provided between the non-inverting input terminal of the first comparator U1A and a first voltage detection circuit 11, and the output terminal of the first comparator U1A is connected to the first output filter circuit. A second input filter circuit is provided between the non-inverting input terminal of the second comparator U1B and another first voltage detection circuit 11, and the output terminal of the second comparator U1B is connected to the second output filter circuit.

[0064] Exemplarily, the first input filter circuit includes capacitor C660, resistor R820, resistor R822, resistor R824 and capacitor C663. The first output filter circuit includes resistor R828 and capacitor C667. The second input filter circuit includes capacitor C661, resistor R821, resistor R823, resistor R825 and capacitor C664. The second output filter circuit includes resistor R829 and capacitor C668. The specific connection method is as follows: Figure 4 As shown, no further description is given here.

[0065] In one embodiment, if Figure 5 As shown, the power-off protection circuit 1 also includes a second voltage detection circuit 12. The second voltage detection circuit is used to connect the voltage input terminal, and is used to output a second detection signal according to the input voltage of the voltage input terminal, and the second detection signal is a signal formed when the input voltage is less than the first voltage threshold; the main control module 13 is connected to the second voltage detection circuit 12, and performs power-off read-write protection according to the second detection signal.

[0066] The first voltage threshold is a voltage threshold selected based on actual experience.

[0067] In this embodiment, by configuring the second voltage detection circuit 12, the second voltage detection circuit 12 outputs a second detection signal when it detects that the input voltage is less than the first voltage threshold, thereby realizing power-off prediction according to the first voltage threshold, and then the main control module 13 performs power-off read-write protection according to the second detection signal, that is, when the input voltage is less than the first voltage threshold.

[0068] It can be understood that the second voltage detection circuit 12 is used to connect the voltage input terminal and output the second detection signal according to the input voltage of the voltage input terminal, so that the main control module 13 can predict power failure according to the first detection signal and the second detection signal, that is, the power failure prediction is performed through two voltage detection circuits, thereby improving the accuracy and reliability of the power failure prediction, so that the main control module 13 can execute power failure read and write protection early.

[0069] In one embodiment, the second voltage detection circuit 12 includes a voltage acquisition circuit 121 and a power-off detection circuit 122; the voltage acquisition circuit 121 is connected to the voltage input terminal and is used to acquire the input voltage; the power-off detection circuit 122 is connected to the voltage acquisition circuit 121 and the main control module 13, and is used to output a second detection signal when the input voltage is less than the first voltage threshold.

[0070] In this embodiment, after the voltage acquisition circuit 121 acquires the input voltage, it outputs it to the power-off detection circuit 122. When the power-off detection circuit 122 determines that the input voltage is less than the first voltage threshold, it outputs a second detection signal. It can be understood that the implementation method of the power-off detection circuit 122 determining that the input voltage is less than the first voltage threshold can be implemented by a hardware circuit or by software control.

[0071] In one embodiment, the voltage acquisition circuit 121 includes a first voltage divider circuit 1211; the first end of the first voltage divider circuit 1211 is connected to the voltage input end, the second end of the first voltage divider circuit 1211 is grounded, and the output end of the first voltage divider circuit 1211 is connected to the power-off detection circuit 122.

[0072] As an example, the first voltage-dividing circuit 1211 includes a first voltage-dividing resistor R1 and a third voltage-dividing resistor R3, which are arranged in series between the voltage input terminal and the ground, and the connection node between the first voltage-dividing resistor R1 and the third voltage-dividing resistor R3 is the output terminal of the first voltage-dividing circuit 1211, which is connected to the power-off detection circuit 122, so that the input voltage is collected through the voltage-dividing effect of the first voltage-dividing resistor R1 and the third voltage-dividing resistor R3. Furthermore, the connection node between the first voltage-dividing resistor R1 and the third voltage-dividing resistor R3 is also grounded through the capacitor C1.

[0073] Further, the voltage input terminal includes a first voltage input terminal BAT_MAIN and a second voltage input terminal BAT_BACKUP. The first voltage input terminal BAT_MAIN and the second voltage input terminal BAT_BACKUP are respectively used to connect two different energy storage modules. The voltage acquisition circuit 121 also includes a fourth voltage divider circuit 1213. The first end of the first voltage divider circuit 1211 is connected to the first voltage input terminal BAT_MAIN, the second end of the first voltage divider circuit 1211 is grounded, and the output end of the first voltage divider circuit 1211 is connected to the power-off detection circuit 122. The first end of the fourth voltage divider circuit 1213 is connected to the second voltage input terminal BAT_BACKUP, the second end of the fourth voltage divider circuit 1213 is grounded, and the output end of the fourth voltage divider circuit 1213 is connected to the power-off detection circuit 122. In this example, when the battery vehicle includes two energy storage modules and the two energy storage modules can communicate with the central domain controller at the same time, it is necessary to collect the input voltages of the two energy storage modules to predict power failure of the input voltage corresponding to each energy storage module. Therefore, the voltage collection of two different energy storage modules is achieved through the first voltage divider circuit 1211 and the fourth voltage divider circuit 1213.

[0074] Exemplarily, the fourth voltage-dividing circuit 1213 includes a second voltage-dividing resistor R2 and a fourth voltage-dividing resistor R4, which are arranged in series between the second voltage input terminal BAT_BACKUP and the ground, and the connection node between the second voltage-dividing resistor R2 and the fourth voltage-dividing resistor R4 is the output terminal of the fourth voltage-dividing circuit 1213, which is connected to the power-off detection circuit 122, so that the input voltage corresponding to the second voltage input terminal BAT_BACKUP is collected through the voltage-dividing effect of the second voltage-dividing resistor R2 and the fourth voltage-dividing resistor R4. The connection node between the second voltage-dividing resistor R2 and the fourth voltage-dividing resistor R4 is also grounded through a capacitor C2.

[0075] In one embodiment, if Figure 2 As shown, the voltage acquisition circuit 121 also includes a first switch circuit 1212; the first switch circuit 1212 is arranged in series between the first end of the first voltage divider circuit 1211 and the voltage input end, and the control end of the first switch circuit 1212 is used to receive a switch control signal, and the switch control signal is used to control the first switch circuit 1212 to be turned on or off.

[0076] In this embodiment, the first switch circuit 1212 is controlled by a switch control signal, so that the timing of the voltage acquisition circuit 121 acquiring the input voltage can be controlled according to actual needs, thereby avoiding real-time acquisition of the input voltage and reducing power consumption.

[0077] As an example, the first switching circuit 1212 includes a first transistor Q1A and a second transistor Q1B, the first end of the first transistor Q1A is connected to the voltage input end, the second end of the first transistor Q1A is connected to the first end of the first voltage divider circuit 1211, the third end of the first transistor Q1A is connected to the second end of the second transistor Q1B, the first end of the second transistor Q1B is grounded, and the third end of the second transistor Q1B is a control end for receiving a switch control signal.

[0078] In this example, the first transistor Q1A and the second transistor Q1B are preferably triodes, and the first transistor Q1A and the second transistor Q1B are bipolar transistors of different types. As an example, the first transistor Q1A is a PNP triode, and the second transistor Q1B is an NPN triode. The first end of the first transistor Q1A is a collector, the second end of the first transistor Q1A is an emitter, and the third end of the first transistor Q1A is a base. The first end of the second transistor Q1B is a collector, the second end of the second transistor Q1B is an emitter, and the third end of the second transistor Q1B is a base.

[0079] As an example, when the voltage input terminal includes a first voltage input terminal BAT_MAIN and a second voltage input terminal BAT_BACKUP. When the first voltage input terminal BAT_MAIN and the second voltage input terminal BAT_BACKUP are respectively used to connect two different energy storage modules, the voltage acquisition circuit 121 also includes a third switch circuit 1214. Exemplarily, the first voltage input terminal BAT_MAIN is used to connect the first end of a transistor Q1A. The third switch circuit 1214 includes a third transistor Q2A and a fourth transistor Q2B, the first end of the third transistor Q2A is connected to the second voltage input terminal BAT_BACKUP, the second end of the third transistor Q2A is connected to the first end of the first voltage divider circuit 1211, the third end of the third transistor Q2A is connected to the second end of the third transistor Q2A, the first end of the third transistor Q2A is grounded, and the third end of the third transistor Q2A is a control end for receiving a switch control signal. In this example, the third transistor Q2A and the fourth transistor Q2B are preferably triodes, and the third transistor Q2A and the fourth transistor Q2B are bipolar transistors of different types. As an example, the third transistor Q2A is a PNP transistor, and the fourth transistor Q2B is an NPN transistor. The first end of the third transistor Q2A is a collector, the second end of the third transistor Q2A is an emitter, and the third end of the third transistor Q2A is a base. The first end of the fourth transistor Q2B is a collector, the second end of the fourth transistor Q2B is an emitter, and the third end of the fourth transistor Q2B is a base.

[0080] In one embodiment, if Figure 2As shown, the power-off detection circuit 122 includes a first diode, a second voltage divider circuit 1221, a third voltage divider circuit 1222, a second diode and a second switch circuit 1223; the anode of the first diode is connected to the voltage acquisition circuit 121, the cathode of the first diode is connected to the first end of the second voltage divider circuit 1221, the second end of the second voltage divider circuit 1221 is grounded, the output end of the second voltage divider circuit 1221 is connected to the cathode of the second diode, and the anode of the second diode is connected to the first end of the third voltage divider circuit 1222; the second end of the third voltage divider circuit 1222 is connected to the first power supply end, and the output end of the third voltage divider circuit 1222 is connected to the control end of the second switch circuit 1223; the first end of the second switch circuit 1223 is connected to the first power supply end, and the second end of the second switch circuit 1223 is connected to the first power supply end.

[0081] POWER_DOWN_INT is connected to the main control module 13 .

[0082] In this embodiment, when the input voltage is relatively large, the first diode is turned on, and under the action of the second voltage divider circuit 1221, the cathode of the second diode is at a high potential, and the second diode is not turned on, so that the second switch circuit 1223 is not turned on, so that it is judged that the input voltage is not less than the conduction voltage of the first diode, and at this time, the second voltage detection circuit 12 will not generate a second detection signal. When the input voltage is relatively small, the first diode is not turned on, and the cathode of the second diode is at a low potential. Under the action of the first power supply terminal, such as the 5V power supply terminal, the second diode is turned on, so that the second switch circuit 1223 is turned on, so that it is judged that the input voltage is less than the conduction voltage of the first diode, so as to perform power failure prediction, and the second voltage detection circuit 12 generates a second detection signal. It can be understood that the conduction voltage of the first diode is the first voltage threshold in the above embodiment, and different types of second diodes can be selected to set different first voltage thresholds.

[0083] As an example, the second voltage divider circuit 1221 includes a resistor R5 and a resistor R9 connected in series, and a connection node between the resistor R5 and the resistor R9 is connected to the cathode of the second diode.

[0084] As an example, the third voltage divider circuit 1222 includes a resistor R6 and a resistor R8 connected in series, and a connection node between the resistor R6 and the resistor R8 is connected to the control end of the second switch circuit 1223 .

[0085] As an example, the second switch circuit 1223 includes a fifth transistor Q3. The fifth transistor is a triode, specifically a PNP type triode. The collector of the fifth transistor Q3 is the first end of the second switch circuit 1223, the emitter of the fifth transistor Q3 is the second end of the second switch circuit 1223, and the base of the fifth transistor Q3 is the control end of the second switch circuit 1223. A capacitor C3 and a resistor R7 are also provided between the second end of the second switch circuit 1223 and the main control module 13 for filtering.

[0086] As an example, when the voltage input terminal includes a first voltage input terminal BAT_MAIN and a second voltage input terminal BAT_BACKUP. When the first voltage input terminal BAT_MAIN and the second voltage input terminal BAT_BACKUP are respectively used to connect two different energy storage modules, the power-off detection circuit 122 further includes a third diode. The anode of the first diode is connected to the output terminal (BAT_MAIN_CTRL) of a voltage acquisition circuit 121, and the cathode of the first diode is connected to the first end of the second voltage divider circuit 1221. The anode of the third diode is connected to the output terminal (BAT_BACKUP_CTRL) of another voltage acquisition circuit 121, and the cathode of the third diode is connected to the first end of the second voltage divider circuit 1221.

[0087] This embodiment provides a power-off protection system. Figure 5 As shown, it includes a storage module 2 and the above-mentioned power-off protection circuit 1; the main control module 13 of the power-off protection circuit 1 is connected to the storage module 2 and is used to perform power-off read-write protection on the storage module 2 according to the first detection signal.

[0088] Furthermore, when the power-off protection circuit 1 further includes a second voltage detection circuit 12, the main control module 13 can also perform power-off read-write protection on the storage module 2 according to the second detection signal output by the second voltage detection circuit 12. That is, the main control module 13 can perform power-off read-write protection on the storage module 2 as long as it receives any one of the first detection signal and the second detection signal.

[0089] This embodiment provides an electronic device, including the above-mentioned power-off protection system.

[0090] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A power-off protection circuit, It is characterized in that It includes a first voltage detection circuit and a main control module; The first voltage detection circuit is used to connect to the voltage input terminal, receive the input voltage of the voltage input terminal, and output a first detection signal when the input voltage meets the drastic change condition; The main control module is connected to the first voltage detection circuit, and is used to perform power-off read-write protection according to the first detection signal.

2. The power-off protection circuit according to claim 1, It is characterized in that The drastic change condition includes that the change slope corresponding to the input voltage is greater than a preset slope; and / or, The drastic change condition includes that a voltage frequency corresponding to the input voltage is within a preset frequency range.

3. The power-off protection circuit as claimed in claim 1, It is characterized in that The power-off protection circuit also includes a shaping circuit; the input end of the shaping circuit is connected to the first voltage detection circuit, and the output end of the shaping circuit is connected to the main control module; the shaping circuit includes a first comparator and a first reference voltage circuit; the first end of the first reference voltage circuit is used to connect to the second power supply end; the non-inverting input end of the first comparator is connected to the first voltage detection circuit, the inverting input end of the first comparator is connected to the second end of the first reference voltage circuit, and the output end of the first comparator is connected to the main control module.

4. The power-off protection circuit according to claim 1, It is characterized in that The power-off protection circuit also includes a second voltage detection circuit; The second voltage detection circuit is used to be connected to the voltage input terminal, and is used to output a second detection signal according to the input voltage of the voltage input terminal, wherein the second detection signal is a signal formed when the input voltage is less than the first voltage threshold; The main control module is connected to the second voltage detection circuit, and performs power-off read-write protection according to the second detection signal.

5. The power-off protection circuit as claimed in claim 4, It is characterized in that The second voltage detection circuit includes a voltage acquisition circuit and a power-off detection circuit; The voltage collection circuit is connected to the voltage input terminal and is used to collect the input voltage; The power-off detection circuit is connected to the voltage acquisition circuit and the main control module, and is used to output the second detection signal when the input voltage is less than the first voltage threshold.

6. The power-off protection circuit as claimed in claim 5, It is characterized in that The voltage acquisition circuit includes a first voltage dividing circuit; A first end of the first voltage divider circuit is connected to a voltage input end, a second end of the first voltage divider circuit is grounded, and an output end of the first voltage divider circuit is connected to the power-off detection circuit.

7. The power-off protection circuit as claimed in claim 6, It is characterized in that The voltage collection circuit also includes a first switch circuit; The first switch circuit is arranged in series between the first end of the first voltage divider circuit and the voltage input end, and the control end of the first switch circuit is used to receive a switch control signal, and the switch control signal is used to control the first switch circuit to be turned on or off.

8. The power-off protection circuit as claimed in claim 5, It is characterized in that The power-off detection circuit comprises a first diode, a second voltage-dividing circuit, a third voltage-dividing circuit, a second diode and a second switch circuit; The anode of the first diode is connected to the voltage collection circuit, the cathode of the first diode is connected to the first end of the second voltage divider circuit, the second end of the second voltage divider circuit is grounded, the output end of the second voltage divider circuit is connected to the cathode of the second diode, and the anode of the second diode is connected to the first end of the third voltage divider circuit; The second end of the third voltage divider circuit is connected to the first power supply end, and the output end of the third voltage divider circuit is connected to the control end of the second switch circuit; A first end of the second switch circuit is connected to the first power supply end, and a second end of the second switch circuit is connected to the main control module.

9. A power-off protection system, It is characterized in that Comprising a storage module and a power-off protection circuit as claimed in any one of claims 1 to 8; The main control module of the power-off protection circuit is connected to the storage module, and is used for performing power-off read-write protection on the storage module according to the first detection signal.

10. An electronic device, It is characterized in that It comprises the power-off protection system as claimed in claim 9.