A power-off data write protection circuit for vehicle-mounted equipment
By designing a power-off data write protection circuit in the on-board equipment, using the power detection and power supply stage division of the energy storage parts, the problems of data loss and memory damage during power outage of the on-board equipment are solved, and data protection and hardware security are achieved.
Patent Information
- Application Number
- CN202421251632.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-03
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2034-06-03
AI Technical Summary
In the face of unexpected power outages, existing vehicle terminal equipment is difficult to effectively protect the stored data from being lost, and the memory hardware may be damaged.
A vehicle-mounted equipment power-off data writing protection circuit is designed. By detecting the power of the energy storage part, the power supply of the energy storage part after power-off is divided into two stages: high voltage and low voltage. After the energy storage part enters the low voltage stage, the processor stops writing data to the memory.
Ensure that the data stored in the memory is not lost and the memory hardware is avoided. At the same time, the overall circuit design is simple, the power consumption is small, and the cost is low, and it is suitable for a wide range of applications.
Smart Images

Figure CN222704988U_ABST
Abstract
Description
Technical Field
[0001] The utility model relates to the field of equipment power-off protection, in particular to a power-off data writing protection circuit for vehicle-mounted equipment. Background Art
[0002] With the continuous advancement of automobile technology and the rapid development of new energy vehicles, vehicle-mounted terminal equipment has made significant progress in intelligence and diversity. These devices not only need to meet the growing functional requirements, but also must ensure stable operation in complex working environments. Especially in the face of unexpected power outages, how to protect stored data from loss has become the focus of the industry.
[0003] At present, the power-off protection function of vehicle-mounted terminal equipment is mainly realized through two solutions:
[0004] Solution 1: Battery powered protection solution
[0005] This solution detects whether the external power supply is disconnected and then switches to the internal battery for power supply. When the external power supply is disconnected, the system relies on the internal battery to continue to supply power to maintain the normal operation of the device and data storage, and then shuts down manually or automatically after a fixed period of power supply. However, this solution has obvious limitations. First, the battery life and capacity are limited. When the battery ages, the capacity decreases, or the ambient temperature exceeds its operating range, the battery may not be able to provide enough power to support the device to complete the data write operation. Secondly, if the processor suddenly loses power due to insufficient battery power during the data writing process, it may cause data in the memory to be disordered or the storage device to be damaged.
[0006] Solution 2: Supercapacitor power supply protection solution
[0007] Some vehicle-mounted terminal devices use a supercapacitor power supply protection solution. This solution also detects the external power supply status and switches to supercapacitor power supply when the power is off. The supercapacitor automatically shuts down after it is fully discharged. However, the supercapacitor discharges quickly. When the amount of data to be written is large, the supercapacitor may not provide enough discharge time to support complete data writing, which may result in incomplete data writing or damage to the storage device. Utility Model Content
[0008] In order to solve the above problems, the purpose of the utility model is to provide a power-off data write protection circuit for vehicle-mounted equipment. By detecting the power level of the energy storage component, the power supply of the energy storage component after power failure is divided into two stages: high voltage and low voltage. After the energy storage component enters the low voltage stage, the processor stops writing data to the memory, thereby ensuring that the data stored in the memory is not lost and avoiding damage to the memory hardware.
[0009] The utility model is realized by the following technical solutions:
[0010] A power-off data write protection circuit for vehicle-mounted equipment, comprising:
[0011] External power access module, used to access external power supply and output power supply;
[0012] An external power detection module, connected to the external power access module, for detecting whether an external power source is input and sending an external power detection signal;
[0013] Energy storage module, including energy storage components;
[0014] A switching module, the energy storage component, the external power access module and the external power detection module are all connected to the switching module, and the switching module is used to switch the power detection module or the energy storage component to access the power supply line according to the external power detection signal; the output end of the switching module supplies power to the external power detection circuit;
[0015] An energy storage detection module is connected to the energy storage component and the switching module, and the energy storage detection module is used to detect the power of the energy storage component and send out an energy storage voltage signal; the switching module supplies power to the energy storage detection module;
[0016] The processor is connected to the memory and transmits the processed data to the memory for storage; the external power detection module, the energy storage detection module and the switching module are all connected to the processor, the output end of the switching module supplies power to the processor and the memory, and the processor is used to write data to the memory according to the change of the external power detection signal and stop writing data to the memory according to the change of the energy storage voltage signal.
[0017] Furthermore, the energy storage module also includes a charging component, which is connected between the external power access module and the energy storage component and is used to charge the energy storage component.
[0018] Furthermore, the energy storage component is a battery or a supercapacitor.
[0019] Furthermore, the external power detection module includes a first switch component and a second switch component, the second switch component is connected to the output end of the external power access module, and switches the input of a high level or a low level to the switching module according to whether there is an external power input; the first switch component is respectively connected to the second switch component and the processor, and switches the input of a high level or a low level to the processor according to the high level or low level of the second switch component.
[0020] Furthermore, the second switch component includes a voltage divider and a second transistor, the output end of the external power access module is connected to the base of the second transistor through the voltage divider, the emitter of the second transistor is grounded, and the collector is connected to the output end of the switching module through a second current limiting resistor, and the collector of the second transistor is connected to the input end of the switching module.
[0021] Furthermore, the first switch component includes a first transistor connected to the collector of the second transistor, the emitter of the first transistor is grounded, the collector is connected to the output end of the switching module through a first current limiting resistor, and the collector of the first transistor is connected to the processor.
[0022] Furthermore, the energy storage detection module includes a voltage divider and a comparator, one input end of the comparator is connected to the output end of the switching module, one input end of the comparator is connected to the energy storage element through the voltage divider, the other input end of the comparator is grounded, and the output end of the comparator is connected to the processor, wherein the comparator has its own reference voltage comparison circuit.
[0023] Furthermore, the voltage divider includes a diode, a fifth resistor and an eighth resistor connected in series, a common end of the fifth resistor and the eighth resistor is connected to an input end of the comparator; and a cathode of the diode is connected to the fifth resistor.
[0024] Furthermore, the external power access module includes a transient voltage suppression circuit, an anti-reverse connection circuit and a voltage filtering circuit connected in sequence, the transient voltage suppression circuit is connected to the external circuit, and the output end of the voltage filtering circuit is the power supply end of the external power access module.
[0025] Furthermore, the switching module includes a switching circuit and a step-down circuit, and two input ends of the switching circuit are respectively connected to the output end of the external power access module and the energy storage component.
[0026] Compared with the prior art, the technical solution of the utility model and its beneficial effects are as follows:
[0027] (1) In the present invention, if the external power supply fails, the switching module switches to the energy storage module for power supply, and the processor starts writing data to the memory. The energy storage detection module detects the power of the energy storage module and sends the energy storage voltage signal to the processor. If the processor receives a signal that the power of the energy storage module is lower than the preset value, the processor will no longer write data to the memory and send a related sleep instruction to notify the memory to enter the waiting power-off state. The power supply time of the energy storage component is divided into two stages. In the first stage, the processor writes data to the memory, and in the second stage, the connection between the memory and the processor is stopped, thereby ensuring that the data stored in the memory is not lost and the memory hardware is not damaged.
[0028] (2) The external power access module of the utility model includes a transient voltage suppression circuit, an anti-reverse connection circuit and a voltage filtering circuit connected in sequence, so as to realize the reverse connection protection and interference suppression and filtering functions, and ensure the stable power supply of the equipment.
[0029] (3) The overall circuit design of the utility model is simple, the power consumption is low, the cost is low, and it can be widely used. Each module can be realized through a simple circuit, and there is no special requirement for the processor interface. The interrupt interface or the ordinary IO port can meet the requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 It is a module block diagram of a power-off data write protection circuit for an on-board device provided by an embodiment of the utility model;
[0031] Figure 2 It is a block diagram of an external power access module provided by an embodiment of the utility model;
[0032] Figure 3 It is a circuit schematic diagram of the external power access module provided by the embodiment of the utility model;
[0033] Figure 4 It is a module block diagram of the switching module provided in the embodiment of the utility model;
[0034] Figure 5 It is a circuit schematic diagram of the external power detection module provided by the embodiment of the utility model;
[0035] Figure 6 It is a circuit schematic diagram of the energy storage detection module provided in the embodiment of the utility model. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical scheme and advantages of the embodiment of the utility model clearer, the technical scheme in the embodiment of the utility model will be clearly and completely described below in conjunction with the drawings in the embodiment of the utility model. Obviously, the described embodiment is a part of the embodiment of the utility model, not all of the embodiments. It should be understood that the specific embodiments described here are only used to explain the utility model and are not used to limit the utility model. Based on the embodiments in the utility model, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the utility model.
[0037] See also Figure 1 A power-off data write protection circuit for vehicle-mounted equipment includes an external power access module, an external power detection module, an energy storage module, a switching module, an energy storage detection module, a processor and a memory.
[0038] The external power detection module is connected to the external power access module. The output ends of the external power detection module, the switching module and the energy storage detection module are all connected to the processor. The output end of the switching module supplies power to the external power detection module, the energy storage detection module and the processor.
[0039] The external power access module is connected to an external power source, detects whether the external power source is input, and sends an external power detection signal to the switching module and the processor. If the external power source loses power, the switching module switches to the energy storage module for power supply, and the processor starts writing data to the memory. The energy storage detection module detects the power of the energy storage module and sends the energy storage voltage signal to the processor. If the processor receives a signal that the power of the energy storage module is lower than the preset value, the processor will no longer write data to the memory, and send relevant sleep instructions to notify the memory to enter the waiting power-off state, ensuring sufficient power supply time in the second stage, thereby effectively protecting the data already stored in the memory, and at the same time the memory hardware is not damaged.
[0040] See also Figure 2 and Figure 3 The external power access module includes a transient voltage suppression circuit, an anti-reverse connection circuit and a voltage filtering circuit connected in sequence. The transient voltage suppression circuit is connected to the external power supply, and the output end of the voltage filtering circuit is the power supply end of the external power access module. It realizes the reverse connection protection and interference suppression and filtering functions to ensure stable power supply of the equipment.
[0041] See also Figure 4 The switching module includes a switching circuit and a step-down circuit. The two input ends of the switching circuit are respectively connected to the output end of the external power access module and the energy storage device, so as to realize the power supply switching output of the external power and the energy storage device, and then reduce the voltage to the working voltage range of the processor and the detection module. In addition, the switching circuit is controlled by the output signal of the external power detection module.
[0042] The energy storage module includes a charging component and an energy storage device. The charging component is connected between the output end of the external power access module and the energy storage device to charge the energy storage device. The energy storage device is a battery or a super capacitor.
[0043] See also Figure 5 The external power detection module includes a first switch component and a second switch component. The second switch component is connected to the output terminal P_BUS_OUT of the external power access module, and switches the input of high level or low level to the switching module according to whether there is an external power input. The first switch component is connected to the second switch component and the processor respectively, and switches the input of high level or low level to the processor according to the high level or low level of the second switch component.
[0044] In this example, the second switch component includes a voltage divider and a second transistor Q2. The output terminal P_BUS_OUT of the external power access module is connected to the base of the second transistor Q2 through the voltage divider. The emitter of the second transistor Q2 is grounded, and the collector is connected to the output terminal P_3V3 of the switching module through the second current limiting resistor R2. The collector of the second transistor Q2 is connected to the input terminal of the switching module, that is, the external power detection signal / VCC_CAR_OFF signal is input to the switching module.
[0045] The first switch component includes a first transistor Q1 connected to the collector of the second transistor Q2, the emitter of the first transistor Q1 is grounded, and the collector is connected to the output end P_3V3 of the switching module through the first current limiting resistor R1, and the collector of the first transistor Q1 is connected to the processor, that is, the external power detection signal FIQ_CAR signal is input to the processor.
[0046] When the output terminal P_BUS_OUT of the external power access module normally outputs the power supply, the power supply is transmitted to the base of the second transistor Q2 after voltage division by resistors R3 and R6, that is, the base of the second transistor Q2 inputs a high level, the second transistor Q2 is turned on, and the collector of the second transistor Q2 changes from a high level to a low level. At this time, the external power detection signal / VCC_CAR_OFF input to the switching module is a low level. When / VCC_CAR_OFF is a low level, the switching circuit connects the external power access module to the power supply line. The base of the first transistor Q1 changes to a low level, the first transistor Q1 is turned off, and the collector of the first transistor Q1 changes from a low level to a high level, that is, the external power detection signal FIQ_CAR input to the processor is a high level, and the processor determines that the external power supply is normal. In this embodiment, the second transistor Q2 and the first transistor Q1 both use NPN transistors, and of course, PNP transistors can also be used to adaptively adjust the switching module and the action of the processor when receiving high and low levels.
[0047] When the external power supply is powered off, the base pin of the second transistor Q2 is at a low level, the second transistor Q2 is turned off, the collector of Q2 changes from a low level to a high level, and when the external power detection module inputs a high level to the switching module, it indicates that the external power supply is powered off. The base of the first transistor Q1 also changes to a high level, the first transistor Q1 is turned on, and the 3rd pin of the first transistor Q1 changes from a high level to a low level. That is, the external power detection signal FIQ_CAR input to the processor is at a low level, and the processor determines that the external power supply is disconnected. In this embodiment, the second transistor Q2 and the first transistor Q1 are both NPN transistors, and of course, PNP transistors can also be used to adaptively adjust the actions of the switching module and the processor when they receive high and low levels.
[0048] See also Figure 6The energy storage detection module includes a voltage divider and a comparator U1. One input end of the comparator U1 is connected to the output end P_SUP of the energy storage device through the voltage divider. The other input end of the comparator U1 is grounded. The output end FIQ2&CAP of the comparator is connected to the processor and to the output end of the switching module through a resistor R7. The comparator has a built-in reference voltage comparison circuit. The input voltage value of the energy storage device is compared with the reference voltage, and finally a high or low level is output.
[0049] The voltage divider includes a diode D3, a fifth resistor R5 and an eighth resistor R8 connected in series, the common end of the fifth resistor R5 and the eighth resistor R8 is connected to an input end of the comparator U1; the cathode of the diode is connected to the fifth resistor R5. The detection threshold is set by connecting the voltage divider resistors in series, and the output voltage of the supercapacitor is proportionally converted to a range within the input withstand voltage of the comparator.
[0050] The output terminal P_SUP is connected to the supercapacitor voltage output terminal, and CJ is the voltage divider output terminal; the fifth resistor R5 and the eighth resistor R8 are a series voltage divider circuit, and the resistance value of the fifth resistor R5 and the eighth resistor R8 is used to set the supercapacitor voltage detection threshold. The comparator U1 has a reference voltage comparison circuit inside. In this embodiment, the reference voltage value is selected to be 2.7V. When the input voltage of the 3rd pin of the comparator U1 is higher than 2.7V, the 1st pin of the first transistor U1 outputs a low level, and when the input voltage of the 3rd pin of the comparator U1 is lower than 2.7V. The 1st pin of the comparator U1 outputs a high level. When the processor receives the energy storage detection signal from a low level to a high level, it stops writing data to the memory and sends a sleep instruction to the memory. This ensures that the data stored in the memory is not lost, and the memory hardware is not damaged.
[0051] It can be understood that controlling the switching of the switching circuit by high and low level signals is a conventional means, for example, controlling the switching of the working state of the relay by high and low levels, thereby changing the power supply of the access line; the processor controls the high and low levels to control the cutting off of the signal or the sending of a certain instruction, which are all conventional technologies in the field and will not be repeated here.
[0052] The above description shows and describes the preferred embodiments of the utility model. It should be understood that the utility model is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be modified within the scope of the utility model concept of this article through the above teachings or the technology or knowledge of the relevant field. The changes and modifications made by those skilled in the art do not deviate from the spirit and scope of the utility model, and should be within the scope of protection of the claims attached to the utility model.
Claims
1. A power-off data write protection circuit for an on-vehicle device, characterized in that: include: External power access module, used to access external power supply and output power supply; An external power detection module, connected to the external power access module, for detecting whether an external power source is input and sending an external power detection signal; Energy storage module, including energy storage components; A switching module, the energy storage component, the external power access module and the external power detection module are all connected to the switching module, and the switching module is used to switch the power detection module or the energy storage component to access the power supply line according to the external power detection signal; the output end of the switching module supplies power to the external power detection circuit; An energy storage detection module is connected to the energy storage component and the switching module, and is used to detect the power of the energy storage component and send out an energy storage voltage signal; the output end of the switching module supplies power to the energy storage detection module; The processor is connected to the memory and transmits the processed data to the memory for storage; the external power detection module, the energy storage detection module and the switching module are all connected to the processor, the output end of the switching module supplies power to the processor and the memory, and the processor is used to write data to the memory according to the change of the external power detection signal and stop writing data to the memory according to the change of the energy storage voltage signal.
2. The vehicle-mounted device power-off data write protection circuit according to claim 1, characterized in that: The energy storage module also includes a charging component, which is connected between the external power access module and the energy storage component and is used to charge the energy storage component.
3. The vehicle-mounted device power-off data write protection circuit according to claim 2, characterized in that: The energy storage component is a battery or a super capacitor.
4. The vehicle-mounted device power-off data write protection circuit according to claim 1, characterized in that: The external power detection module includes a first switch component and a second switch component. The second switch component is connected to the output end of the external power access module, and switches the input of a high level or a low level to the switching module according to whether there is an external power input; the first switch component is respectively connected to the second switch component and the processor, and switches the input of a high level or a low level to the processor according to the high level or low level of the second switch component.
5. The vehicle-mounted device power-off data write protection circuit according to claim 4, characterized in that: The second switch component includes a voltage divider and a second transistor. The output end of the external power access module is connected to the base of the second transistor through the voltage divider. The emitter of the second transistor is grounded, and the collector is connected to the output end of the switching module through a second current limiting resistor. The collector of the second transistor is connected to the input end of the switching module.
6. The vehicle-mounted device power-off data write protection circuit according to claim 5, characterized in that: The first switch component includes a first transistor connected to the collector of the second transistor, the emitter of the first transistor is grounded, the collector is connected to the output end of the switching module through a first current limiting resistor, and the collector of the first transistor is connected to the processor.
7. The vehicle-mounted device power-off data write protection circuit according to claim 1, characterized in that: The energy storage detection module includes a voltage divider and a comparator, one input end of the comparator is connected to the output end of the switching module, one input end of the comparator is connected to the energy storage component through the voltage divider, the other input end of the comparator is grounded, and the output end of the comparator is connected to the processor, wherein the comparator has its own reference voltage comparison circuit.
8. The vehicle-mounted device power-off data write protection circuit according to claim 7, characterized in that: The voltage divider comprises a diode, a fifth resistor and an eighth resistor connected in series, a common end of the fifth resistor and the eighth resistor is connected to an input end of the comparator; and a cathode of the diode is connected to the fifth resistor.
9. The vehicle-mounted device power-off data write protection circuit according to claim 1, characterized in that: The external power access module comprises a transient voltage suppression circuit, an anti-reverse connection circuit and a voltage filtering circuit connected in sequence. The transient voltage suppression circuit is connected to the external circuit, and the output end of the voltage filtering circuit is the power supply end of the external power access module.
10. The vehicle-mounted device power-off data write protection circuit according to claim 1, characterized in that: The switching module comprises a switching circuit and a step-down circuit, and two input ends of the switching circuit are respectively connected to the output end of the external power access module and the energy storage component.