Circuit detection method, switch safety circuit, device, vehicle and storage medium
By collecting multi-channel voltages of power-off switch circuits in new energy vehicles for fault detection, the problem of high failure rate in the design of emergency cut-off power switches in new energy vehicles is solved, and vehicle safety and fault detection efficiency in emergencies are improved.
Patent Information
- Application Number
- CN202410502406.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-24
- Publication Date
- 2024-08-30
AI Technical Summary
The elimination of the start-stop switch in new energy vehicles results in the inability to cut off power in an emergency, increasing the risk of traffic accidents, and the emergency power cut-off switch design has a high failure rate.
The first voltage and the second voltage output by the power-off switch circuit are obtained through the body controller, and fault detection is performed based on the switch voltage collected from multiple channels to reduce the detection failure rate and ensure switch safety through a dual-channel redundant design.
It improves the reliability and safety of vehicle power cutoff in emergency situations, reduces the failure rate of fault detection, and ensures that the switch works reliably in emergencies.
Smart Images

Figure CN118566775A
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of circuit detection, and specifically relates to a circuit detection method, a switch safety circuit, a device, a vehicle and a storage medium. Background Art
[0002] With the increasing popularity of new energy vehicles, the safety of new energy vehicles has received more and more attention. Since most new energy vehicles on the market have cancelled the start-stop switch, most new energy vehicles are temporarily unable to cut off the power through the switch in an emergency, which leads to the inability to stop the vehicle in dangerous driving scenarios, which can easily lead to traffic accidents. In related vehicles with emergency power cut-off switches, the design of the emergency power cut-off switch does not meet functional safety and has a high failure rate. Summary of the invention
[0003] In view of the above problems, the present application proposes a circuit detection method, a switch safety circuit, a device, a vehicle and a storage medium to improve the above problems.
[0004] In a first aspect, an embodiment of the present application provides a circuit detection method, which is applied to a switch safety circuit, wherein the switch safety circuit includes a body controller and a power-off switch circuit, and the body controller is connected in series with the power-off switch circuit. The method includes: when the power-off switch is pressed, obtaining a first voltage and a second voltage output by the power-off switch through the body controller, wherein the first voltage is a voltage at a first button switch interface in the power-off switch circuit acquired by a first switch detection interface in the body controller, and the second voltage is a voltage at a second button switch interface in the power-off switch circuit acquired by a second switch detection interface in the body controller; and performing fault detection on the power-off switch based on the first voltage and the second voltage.
[0005] In a second aspect, an embodiment of the present application provides a switch safety circuit, which is composed of a body controller and a power-off switch circuit connected in series; the body controller includes a first switch detection interface and a second switch detection interface connected to a sampling circuit, and the power-off switch circuit includes a first button switch interface and a second button switch interface connected to the detection circuit; the body controller is used to obtain a first voltage and a second voltage output by the power-off switch circuit when the power-off switch is pressed, the first voltage being the voltage at the first button switch interface collected by the first switch detection interface, and the second voltage being the voltage at the second button switch interface collected by the second switch detection interface; the body controller is also used to perform fault detection on the power-off switch based on the first voltage and the second voltage.
[0006] In the third aspect, an embodiment of the present application provides a circuit detection device, which operates on a switch safety circuit, wherein the switch safety circuit includes a body controller and a power-off switch circuit, and the body controller is connected in series with the power-off switch circuit, and the device includes: a voltage acquisition unit, which is used to acquire a first voltage and a second voltage output by the power-off switch circuit through the body controller when the power-off switch is pressed, wherein the first voltage is the voltage at the first button switch interface in the power-off switch circuit acquired by the first switch detection interface in the body controller, and the second voltage is the voltage at the second button switch interface in the power-off switch circuit acquired by the second switch detection interface in the body controller; and a detection unit, which is used to perform fault detection on the power-off switch based on the first voltage and the second voltage.
[0007] In a fourth aspect, an embodiment of the present application provides a vehicle, comprising a switch safety circuit, one or more processors and a memory; one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the above-mentioned method.
[0008] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a program code is stored, wherein the above method is executed when the program code is run.
[0009] The embodiments of the present application provide a circuit detection method, a switch safety circuit, a device, a vehicle, and a storage medium. When the power-off switch is pressed, the first voltage and the second voltage output by the power-off switch circuit are obtained through the vehicle body controller, wherein the first voltage is the voltage at the first key switch interface in the power-off switch circuit collected by the first switch detection interface in the vehicle body controller, and the second voltage is the voltage at the second key switch interface in the power-off switch circuit collected by the second switch detection interface in the vehicle body controller, and then the power-off switch is fault-detected based on the first voltage and the second voltage. Through the above method, when the power-off switch is pressed, the switch voltage is collected through the first switch detection interface and the second switch detection interface, so that the power-off switch can be fault-detected based on the switch voltages collected from multiple channels, thereby reducing the detection failure rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0011] Figure 1A flow chart of a circuit detection method proposed in an embodiment of the present application is shown;
[0012] Figure 2 A flow chart of a circuit detection method proposed in another embodiment of the present application is shown;
[0013] Figure 3 A circuit diagram of a switch safety circuit proposed in an embodiment of the present application is shown;
[0014] Figure 4 A circuit diagram of another switch safety circuit proposed in an embodiment of the present application is shown;
[0015] Figure 5 A circuit diagram of another switch safety circuit proposed in an embodiment of the present application is shown;
[0016] Figure 6 A circuit diagram of another switch safety circuit proposed in an embodiment of the present application is shown;
[0017] Figure 7 A circuit diagram of another switch safety circuit proposed in an embodiment of the present application is shown;
[0018] Figure 8 A structural block diagram of a circuit detection device proposed in an embodiment of the present application is shown;
[0019] Fig. 9 A structural block diagram of another circuit detection device proposed in an embodiment of the present application is shown;
[0020] Fig.10 A structural block diagram of a vehicle for executing a circuit detection method according to an embodiment of the present application is shown;
[0021] Fig.11 A storage unit in an embodiment of the present application is shown for storing or carrying a program code for implementing a circuit detection method according to an embodiment of the present application. DETAILED DESCRIPTION
[0022] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0023] The embodiment of the present application proposes a circuit detection method, a switch safety circuit, a device, a vehicle, and a storage medium. When the power-off switch is pressed, the first voltage and the second voltage output by the power-off switch circuit are obtained through the body controller, wherein the first voltage is the voltage at the first key switch interface in the power-off switch circuit collected by the first switch detection interface in the body controller, and the second voltage is the voltage at the second key switch interface in the power-off switch circuit collected by the second switch detection interface in the body controller, and then the power-off switch is detected for faults based on the first voltage and the second voltage. Through the above method, when the power-off switch is pressed, the switch voltage is collected through the first switch detection interface and the second switch detection interface, so that the power-off switch can be detected for faults based on the switch voltages collected from multiple channels, thereby reducing the detection failure rate.
[0024] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0025] See also Figure 1 A circuit detection method provided in an embodiment of the present application is applied to a switch safety circuit, wherein the switch safety circuit includes a body controller and a power-off switch circuit, wherein the body controller is connected in series with the power-off switch circuit, and the method includes:
[0026] Step S110: When the power-off switch is pressed, the first voltage and the second voltage output by the power-off switch circuit are obtained through the body controller, wherein the first voltage is the voltage at the first button switch interface in the power-off switch circuit collected by the first switch detection interface in the body controller, and the second voltage is the voltage at the second button switch interface in the power-off switch circuit collected by the second switch detection interface in the body controller.
[0027] In the embodiment of the present application, the power-off switch is a switch for emergency power cut-off, which is used to emergency cut off the power output of the power system when the vehicle loses control of the power or cannot brake, in order to ensure that the power is cut off by the switch when the vehicle loses control, to ensure that the vehicle stops safely, and to protect the safety of passengers and surrounding pedestrians. The power-off switch has two buttons inside, each button corresponds to a switch four-way contact pad, that is, each switch four-way contact pad has four contacts, and the pads are gold-plated to prevent oxidation. Among them, the two buttons inside the power-off switch are rubber buttons. Once the shell of the power-off switch is pressed, the button slider inside the power-off switch presses down the two rubber buttons at the same time to trigger the two emergency switch signals in the safety switch circuit, and the voltages on the first button switch interface and the second button switch interface are collected simultaneously by the body controller (Body Control Module, BCM).
[0028] The switch safety circuit in the embodiment of the present application is arranged in the power-off switch, which adopts a dual-way redundant design switch (that is, the switch safety circuit includes 2 switch IO port sampling, which is equivalent to the first switch detection interface and the second switch detection interface in the embodiment of the present application). When one of the switch IO fails, the second switch IO can be detected to ensure that it meets the functional ASILB requirements. The switch safety circuit has no-load and short-circuit detection functions. Once the circuit is disconnected or short-circuited, the body controller can determine the fault by detecting the no-load or short-circuit voltage, and then inform the user through human-computer interaction, host reminders, etc. The user can check and repair the power-off switch in advance to reduce the failure rate.
[0029] When the MCU (Microcontroller Unit) detects that the power-off switch is pressed, it controls the body controller to start collecting voltages at the first key switch interface and the second key switch interface in the power-off switch circuit, that is, starts collecting the first voltage and the second voltage.
[0030] Step S120: performing fault detection on the power-off switch based on the first voltage and the second voltage.
[0031] In the embodiment of the present application, after the first voltage and the second voltage are obtained, it can be determined whether the power-off switch is faulty based on the first voltage and the second voltage.
[0032] As one approach, if the first voltage or the second voltage is less than a first voltage threshold, it is determined that the power-off switch is short-circuited to ground.
[0033] Specifically, the first voltage threshold is a preset minimum voltage value that indicates that the power-off switch is not short-circuited to the ground. After obtaining the first voltage and the second voltage, the first voltage and the second voltage can be compared with the first voltage threshold respectively. If the first voltage or the second voltage is less than the first voltage threshold, it can be determined that the power-off switch is short-circuited to the ground.
[0034] As another way, if the first voltage and the second voltage are both greater than or equal to the first voltage threshold, and the first voltage and the second voltage are both less than the second voltage threshold, it is determined that the power-off switch is pressed normally.
[0035] Specifically, the second voltage threshold is a preset minimum voltage value indicating that the power-off switch is not pressed normally. After obtaining the first voltage and the second voltage, the first voltage and the second voltage can be compared with the first voltage threshold and the second voltage threshold respectively to obtain the first comparison result and the second comparison result.
[0036] After obtaining the first comparison result and the second comparison result, the first comparison result and the second comparison result are comprehensively considered. If it is determined that the first voltage and the second voltage are both greater than or equal to the first voltage threshold, and the first voltage and the second voltage are both less than the second voltage threshold, it can be determined that the power-off switch is pressed normally.
[0037] Optionally, if the first voltage or the second voltage is greater than or equal to the second voltage threshold, and the first voltage or the second voltage is less than a third voltage threshold, it is determined that the power-off switch is not pressed and is in a normal state.
[0038] Specifically, the third voltage threshold is a preset minimum voltage value that characterizes an open circuit fault of the power-off switch. After obtaining the first voltage and the second voltage, the first voltage and the second voltage can be compared with the first voltage threshold respectively. If the first voltage or the second voltage is greater than the first voltage threshold, the first voltage and the second voltage are compared with the second voltage threshold respectively. If the first voltage and the second voltage are both greater than or equal to the second voltage threshold, the first voltage and the second voltage are compared with the third voltage threshold respectively. If it is determined that the first voltage or the second voltage is less than the third voltage threshold, it can be determined that the power-off switch is not pressed and is in a normal state.
[0039] Optionally, if the first voltage or the second voltage is greater than or equal to the third voltage threshold, and the first voltage or the second voltage is less than a fourth voltage threshold, it is determined that the power-off switch has an open circuit fault.
[0040] Specifically, the fourth voltage threshold is a preset minimum voltage value that characterizes a short circuit fault in the power-off switch circuit. Similar to the above comparison process, the first voltage and the second voltage are compared with the first voltage threshold, the second voltage threshold, the third voltage threshold, and the fourth voltage threshold in sequence. If it is determined that the first voltage or the second voltage is greater than or equal to the third voltage threshold, and the first voltage or the second voltage is less than the fourth voltage threshold, it can be determined that the power-off switch circuit is faulty.
[0041] Optionally, if the first voltage or the second voltage is greater than or equal to the fourth voltage threshold, and the first voltage or the second voltage is less than the fifth voltage threshold, it is determined that the power-off switch power supply is short-circuited.
[0042] Specifically, the fifth threshold is a preset minimum voltage that indicates that the power-off switch is not in a circuit short-circuit fault. Similar to the above comparison process, the first voltage and the second voltage are compared with the first voltage threshold, the second voltage threshold, the third voltage threshold, the fourth voltage threshold, and the fifth voltage threshold in sequence. If it is determined that the first voltage or the second voltage is greater than or equal to the fourth voltage threshold, and the first voltage or the second voltage is less than the fifth voltage threshold, it can be determined that the power-off switch power supply is short-circuited.
[0043] In the embodiment of the present application, before the performing fault detection on the power-off switch based on the first voltage and the second voltage, the method further includes:
[0044] A first reference voltage, a second reference voltage, a third reference voltage, a fourth reference voltage and a fifth reference voltage are obtained, wherein the first reference voltage is a switch voltage collected by the vehicle body controller when the power-off switch is not pressed; the second reference voltage is a switch voltage collected by the vehicle body controller when the power-off switch is pressed; the third reference voltage is a switch voltage collected by the vehicle body controller when the first switch detection interface or the second switch detection interface is unloaded; the fourth reference voltage is a switch voltage collected by the vehicle body controller when the first switch detection interface or the second switch detection interface is short-circuited to the ground; the fifth reference voltage is a switch voltage collected by the vehicle body controller when the first switch detection interface or the second switch detection interface is short-circuited to the power supply; based on the second reference voltage and the fourth reference voltage, the first voltage threshold is determined; based on the first reference voltage and the second reference voltage, the second voltage threshold is determined; based on the first reference voltage and the third reference voltage, the third voltage threshold is determined; based on the third reference voltage and the fifth reference voltage, the fourth voltage threshold is determined; based on the fifth reference voltage, the fifth voltage threshold is determined.
[0045] Specifically, when the first voltage threshold is determined based on the second reference voltage and the fourth reference voltage, the first voltage threshold = (second reference voltage + fourth reference voltage) / 2; when the second voltage threshold is determined based on the first reference voltage and the second reference voltage, the second voltage threshold = (first reference voltage + second reference voltage) / 2; when the third voltage threshold is determined based on the first reference voltage and the third reference voltage, the third voltage threshold = (first reference voltage + third reference voltage) / 2; when the fourth voltage threshold is determined based on the third reference voltage and the fifth reference voltage, the fourth voltage threshold = (third reference voltage + fifth reference voltage) / 2; when the fifth voltage threshold is determined based on the fifth reference voltage, the fifth voltage threshold = the fifth reference voltage.
[0046] The present application provides a circuit detection method in which, when a power-off switch is pressed, switch voltage is collected through a first switch detection interface and a second switch detection interface, so that fault detection of the power-off switch can be performed based on multi-channel collected switch voltages, thereby reducing the detection failure rate.
[0047] See also Figure 2 A circuit detection method provided in an embodiment of the present application is applied to a switch safety circuit, wherein the switch safety circuit includes a body controller and a power-off switch circuit, wherein the body controller is connected in series with the power-off switch circuit, and the method includes:
[0048] Step S210: When the power-off switch is pressed, the first voltage and the second voltage output by the power-off switch circuit are obtained through the body controller, wherein the first voltage is the voltage at the first button switch interface in the power-off switch circuit collected by the first switch detection interface in the body controller, and the second voltage is the voltage at the second button switch interface in the power-off switch circuit collected by the second switch detection interface in the body controller.
[0049] Step S220: performing fault detection on the power-off switch based on the first voltage and the second voltage.
[0050] Step S230: If the vehicle body controller determines that the power-off switch is short-circuited to the ground, the vehicle body controller prompts the host computer through the bus that the power-off switch is short-circuited to the ground.
[0051] In an embodiment of the present application, if the body controller determines that the power-off switch is short-circuited to the ground, the body controller can send a prompt message to the host via the CAN (Controller Area Network) bus, which may include information such as "The power-off switch is short-circuited to the ground, please check the power-off switch".
[0052] As one approach, if the vehicle body controller determines that the power-off switch is normally pressed, the control turns off the ignition relay to cut off the power output.
[0053] If the body controller determines that the power-off switch is pressed normally, the body controller can control the ignition relay IG1 to be turned off according to the signal. At this time, the power supply of the whole vehicle becomes OFF and the powertrain cuts off the power output.
[0054] As another way, if the vehicle body controller determines that the power-off switch has an open circuit fault, the power-off switch open circuit fault is prompted to the host through the bus.
[0055] If the body controller determines that the power-off switch is open-circuited, the body controller may send a prompt message to the host through the CAN bus, and the prompt message may include information such as "power-off switch open-circuit fault, please check the power-off switch". The power-off switch open-circuit fault may mean that the power-off switch is suspended or the wiring harness is not properly connected.
[0056] Optionally, if the vehicle body controller determines that the power-off switch is short-circuited to the power supply, the power-off switch power supply short-circuit fault is prompted to the host through the bus.
[0057] If the body controller determines that the power-off switch is short-circuited to the power supply, the body controller may send a prompt message to the host through the CAN bus, and the prompt message may include information such as "power-off switch power supply short-circuit fault, please check the power-off switch".
[0058] Optionally, when the body controller determines that the power-off switch has not been pressed and is in a normal state, no prompt or warning is required.
[0059] The present application provides a circuit detection method. When the power-off switch is pressed, the switch voltage is collected through the first switch detection interface and the second switch detection interface, so that the power-off switch can be fault-detected based on the switch voltage collected in multiple channels, reducing the detection failure rate. At the same time, when it is determined that the power-off switch is faulty, the body controller can send the fault information to the host through the bus, and the host can display the fault warning on the central control screen to prompt the user to perform fault detection on the power-off switch to ensure that the power-off switch is safe and available in an emergency.
[0060] See also Figure 3 , an embodiment of the present application provides a switch safety circuit, the switch safety circuit is composed of a body controller 310 and a power-off switch circuit 320; the body controller 310 and the power-off switch circuit 320 are connected in series.
[0061] The body controller 310 includes a first switch detection interface MCU_SW1 and a second switch detection interface MCU_SW2 connected to the sampling circuit; the power-off switch circuit 320 includes a first key switch interface SW1 and a second key switch interface SW2 connected to the detection circuit.
[0062] The body controller 310 is used to obtain the first voltage and the second voltage output by the power-off switch circuit when the power-off switch is pressed, the first voltage being the voltage at the first button switch interface SW1 in the power-off switch circuit collected by the first switch detection interface, and the second voltage being the voltage at the second button switch interface SW2 in the power-off switch circuit collected by the second switch detection interface.
[0063] The body controller 310 is further configured to perform fault detection on the power-off switch based on the first voltage and the second voltage.
[0064] Specifically, Figure 4 As shown, the sampling circuit may include a first pull-up resistor 311 , a second pull-up resistor 312 , a first clamping diode 313 , a second clamping diode 314 , a first current limiting resistor 315 , a second current limiting resistor 316 , a first static protection capacitor 317 , and a second static protection capacitor 318 .
[0065] The detection circuit may include a first detection resistor 321 , a second detection resistor 322 , a third detection resistor 323 , a fourth detection resistor 324 , a first switch four-way contact pad 325 , and a second switch four-way contact pad 326 .
[0066] Among them, the first end of the first switch detection interface is connected to the microcontroller, the second end of the first switch detection interface is connected to the first end of the first current limiting resistor, the second end of the first current limiting resistor is connected to the first end of the first pull-up resistor, the first end of the first static protection capacitor and the first end of the first key switch interface, the second end of the first pull-up resistor is connected to the cathode of the first clamping diode, the anode of the first clamping diode is connected to the power supply, and the second end of the first static protection capacitor is grounded.
[0067] The first end of the second switch detection interface is connected to the microcontroller, the second end of the second switch detection interface is connected to the first end of the second current limiting resistor, the second end of the second current limiting resistor is connected to the first end of the second pull-up resistor, the first end of the second static protection capacitor and the first end of the second key switch interface, the second end of the second pull-up resistor is connected to the cathode of the second clamping diode, the anode of the second clamping diode is connected to the power supply, and the second end of the second static protection capacitor is grounded.
[0068] The first end of the first detection resistor is connected to the second end of the first key switch interface, and the second end of the first detection resistor is connected to the first end of the second detection resistor; the second end of the first detection resistor is connected to the first contact point of the first switch four-way contact pad, the second contact point of the first switch four-way contact pad, the first contact point of the second switch four-way contact pad, and the second contact point of the second switch four-way contact pad; the second end of the second detection resistor is grounded.
[0069] The first end of the third detection resistor is connected to the second end of the second key switch interface, and the second end of the third detection resistor is connected to the first end of the fourth detection resistor; the second end of the third detection resistor is connected to the third contact point of the first switch four-way contact pad, the fourth contact point of the first switch four-way contact pad, the third contact point of the second switch four-way contact pad, and the fourth contact point of the second switch four-way contact pad; the second end of the fourth detection resistor is grounded.
[0070] The fifth contact point of the first switch four-way contact pad and the fifth contact point of the second switch four-way contact pad are both grounded.
[0071] In such Figure 4In the safety switch circuit shown, the resistance of the first pull-up resistor and the second pull-up resistor can be 4.7K, and the first pull-up resistor and the second pull-up resistor are mainly used to convert the power-off switch circuit into a sampling voltage; the first clamping diode and the second clamping diode can be Schottky diode BAT54; the resistance of the first current limiting resistor and the second current limiting resistor can be 1K; the capacitance of the first static protection capacitor and the second static protection capacitor can be 4.7nF; the resistance of the first detection resistor and the third resistor can be 3K, and the accuracy is 1%; the resistance of the second detection resistor and the fourth detection resistor can be 6.8K, and the accuracy is 1%. Among them, the sampling resistor loop is composed of 4.7K+3K+6.8K, and the voltage at the first key switch interface and the second key switch interface is obtained by dividing 3K+6.8K.
[0072] In such Figure 4 In the safety switch circuit shown in the figure, when the power-off switch is not pressed, the first reference voltage collected by the body controller is When the power-off switch is pressed, the second reference voltage collected by the body controller is When SW1 or SW2 is unloaded, the safety switch circuit is as follows Figure 5 As shown, the switch equivalent resistance is greater than 10M, and 10M is used for calculation. At this time, the third reference voltage collected by the body controller is When SW1 or SW2 is short-circuited to ground, the safety switch circuit is as follows Figure 6 As shown, the switch equivalent resistance to ground is approximately 0R, and 0R is used for calculation. At this time, the fourth reference voltage collected by the body controller is Vsw1||2=0V; when SW1 or SW2 is short-circuited to the power supply, the safety switch circuit at this time is as follows Figure 7 As shown, the switch interface is connected to a 12V power supply. Since the MCU-SW1 and MCU-SW2 inside the body controller are protected by a current limiting resistor + a clamping diode, the switch voltage after short circuit is clamped to 5.6V. However, since the pull-up voltage sampled by the MCU is 5V, the fifth reference voltage after MCU sampling is Vsw1&2=5V.
[0073] After obtaining the first reference voltage, the second reference voltage, the third reference voltage, the fourth reference voltage and the fifth reference voltage in the above manner, the first voltage threshold, the second voltage threshold, the third voltage threshold, the fourth voltage threshold and the fifth voltage threshold can be calculated based on the first reference voltage, the second reference voltage, the third reference voltage, the fourth reference voltage and the fifth reference voltage. Specifically, the first voltage threshold = (the second reference voltage + the fourth reference voltage) / 2 = (0.8858 + 0) / 2 = 0.4429V; the second voltage threshold = (the first reference voltage + the second reference voltage) / 2 = (2.898 + 0.8858) / 2 = 1.891V; the third voltage threshold = (the first reference voltage + the third reference voltage) / 2 = (4.3 + 2.898) / 2 = 3.599V; the fourth voltage threshold = (the third reference voltage + the fifth reference voltage) / 2 = (4.3 + 5) / 2 = 4.65V; the fifth voltage threshold = the fifth reference voltage = 5V.
[0074] After the body controller obtains the first voltage and the second voltage output by the power-off switch circuit, if the body controller determines that Vsw1||2 is less than 0.4429V, it can be determined that the power-off switch is short-circuited to the ground, and the body controller sends a prompt message to the host through the CAN bus, and the prompt message is "The power-off switch is short-circuited to the ground, please check the power-off switch"; if the body controller determines that 0.4429V≤Vsw1&2<1.891V, it can be determined that the power-off switch is pressed normally. At this time, the body controller can control the ignition relay IG1 to turn off, the vehicle power supply becomes OFF, and the powertrain cuts off the power output; if the body controller determines that 1.891V≤Vsw 1||2<3.599V, it can be determined that the power-off switch has not been pressed and is in a normal state, and no prompt or warning is required at this time; if the body controller determines that 3.599V≤Vsw1||2<4.65V, it can be determined that the power-off switch is open-circuit fault, and the body controller can send a prompt message to the host through the CAN bus, and the prompt message is "the power-off switch is open-circuit fault, please check the power-off switch"; if the body controller determines that 4.65V≤Vsw1||2<5V, it can be determined that the power-off switch is short-circuited to the power supply. At this time, the body controller can send a prompt message to the host through the CAN bus, and the prompt message is "the power supply of the power-off switch is short-circuited fault, please check the power-off switch".
[0075] The present application provides a switch safety circuit which reduces the switch failure rate through a dual-path redundancy design.
[0076] See also Figure 8 , a circuit detection device 400 provided in an embodiment of the present application operates on a switch safety circuit, the switch safety circuit includes a body controller and a power-off switch circuit, the body controller is connected in series with the power-off switch circuit, and the device 400 includes:
[0077] The voltage acquisition unit 410 is used to acquire the first voltage and the second voltage output by the power-off switch circuit through the body controller when the power-off switch is pressed, wherein the first voltage is the voltage at the first button switch interface in the power-off switch circuit acquired by the first switch detection interface in the body controller, and the second voltage is the voltage at the second button switch interface in the power-off switch circuit acquired by the second switch detection interface in the body controller.
[0078] The detection unit 420 is configured to perform fault detection on the power-off switch based on the first voltage and the second voltage.
[0079] As a method, the detection unit 420 is specifically used to determine that the power-off switch is short-circuited to ground if the first voltage or the second voltage is less than a first voltage threshold; or, if the first voltage and the second voltage are both greater than or equal to the first voltage threshold, and the first voltage and the second voltage are both less than the second voltage threshold, determine that the power-off switch is normally pressed; or, if the first voltage or the second voltage is greater than or equal to the second voltage threshold, and the first voltage or the second voltage is less than a third voltage threshold, determine that the power-off switch is not pressed and is in a normal state; or, if the first voltage or the second voltage is greater than or equal to the third voltage threshold, and the first voltage or the second voltage is less than a fourth voltage threshold, determine that the power-off switch is open-circuited; or, if the first voltage or the second voltage is greater than or equal to the fourth voltage threshold, and the first voltage or the second voltage is less than the fifth voltage threshold, determine that the power supply of the power-off switch is short-circuited.
[0080] Further, the detection unit 420 is also specifically used to obtain a first reference voltage, a second reference voltage, a third reference voltage, a fourth reference voltage and a fifth reference voltage, wherein the first reference voltage is a switch voltage collected by the body controller when the power-off switch is not pressed; the second reference voltage is a switch voltage collected by the body controller when the power-off switch is pressed; the third reference voltage is a switch voltage collected by the body controller when the first key switch interface or the second key switch interface is unloaded; the fourth reference voltage is a switch voltage collected by the body controller when the first key switch interface or the second key switch interface is short-circuited to the ground; the fifth reference voltage is a switch voltage collected by the body controller when the first key switch interface or the second key switch interface is short-circuited to the power supply; based on the second reference voltage and the fourth reference voltage, the first voltage threshold is determined; based on the first reference voltage and the second reference voltage, the second voltage threshold is determined; based on the first reference voltage and the third reference voltage, the third voltage threshold is determined; based on the third reference voltage and the fifth reference voltage, the fourth voltage threshold is determined; based on the fifth reference voltage, the fifth voltage threshold is determined.
[0081] See also Fig. 9 , the device 400 further includes:
[0082] The prompt unit 430 is used to prompt the host computer through the bus if the body controller determines that the power-off switch is short-circuited to the ground; or, if the body controller determines that the power-off switch is pressed normally, control the ignition relay to be turned off to cut off the power output; or, if the body controller determines that the power-off switch is open-circuited, prompt the host computer through the bus of the power-off switch open-circuit fault; or, if the body controller determines that the power-off switch is short-circuited to the power supply, prompt the host computer through the bus of the power-off switch power supply short-circuit fault.
[0083] It should be noted that the device embodiment in the present application corresponds to the aforementioned method embodiment. The specific principles in the device embodiment can be found in the contents of the aforementioned method embodiment and will not be repeated here.
[0084] The following will be combined Fig.10 A vehicle provided in the present application is described.
[0085] See also Fig.10Based on the above circuit detection method and device, the embodiment of the present application also provides another vehicle 800 that can execute the above circuit detection method. The vehicle 800 includes one or more (only one is shown in the figure) processors 802, a memory 804, a network module 806, and a switch safety circuit 808 that are coupled to each other. Among them, the memory 804 stores a program that can execute the content of the above embodiment, and the processor 802 can execute the program stored in the memory 804.
[0086] Among them, the processor 802 may include one or more processing cores. The processor 802 uses various interfaces and lines to connect various parts of the entire vehicle 800, and executes various functions and processes data of the vehicle 800 by running or executing instructions, programs, code sets or instruction sets stored in the memory 804, and calling data stored in the memory 804. Optionally, the processor 802 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 802 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 802, but may be implemented separately through a communication chip.
[0087] The memory 804 may include a random access memory (RAM) or a read-only memory (ROM). The memory 804 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 804 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data created by the vehicle 800 during use (such as a phone book, audio and video data, chat record data), etc.
[0088] The network module 806 is used to receive and send electromagnetic waves, realize the mutual conversion between electromagnetic waves and electrical signals, and thus communicate with a communication network or other devices, such as communicating with a vehicle. The network module 806 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, user identity modules (SIM) cards, memories, etc. The network module 806 may communicate with various networks such as the Internet, corporate intranets, wireless networks, or communicate with other devices via wireless networks. The above-mentioned wireless networks may include cellular telephone networks, wireless local area networks, or metropolitan area networks. For example, the network module 806 may exchange information with a base station.
[0089] The switch safety circuit 808 is used to detect faults of the power-off switch. The power-off switch is used to cut off the power in an emergency. It is used to cut off the power output of the power system in an emergency when the vehicle loses control of the power or cannot brake. The purpose is to ensure that the power is cut off by the switch when the vehicle loses control, ensure that the vehicle stops safely, and protect the safety of passengers and surrounding pedestrians. The power-off switch has two buttons inside, each button corresponds to a switch four-way contact pad, that is, each switch four-way contact pad has four contacts, and the pads are gold-plated to prevent oxidation. Among them, the two buttons inside the power-off switch are rubber buttons. Once the shell of the power-off switch is pressed, the button slider inside the power-off switch presses down the two rubber buttons at the same time to trigger the two emergency switch signals in the safety switch circuit. The voltages on the first button switch interface and the second button switch interface are collected simultaneously by the body controller (Body Control Module, BCM).
[0090] Please refer to Fig.11 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable storage medium 900 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.
[0091] The computer-readable storage medium 900 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer-readable storage medium 900 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 900 has storage space for program code 910 that performs any method step in the above method. These program codes can be read from or written to one or more computer program products. The program code 910 can be compressed, for example, in an appropriate form.
[0092] The present application provides a circuit detection method, a switch safety circuit, a device, a vehicle, and a storage medium. When the power-off switch is pressed, the first voltage and the second voltage output by the power-off switch circuit are obtained through the vehicle body controller, wherein the first voltage is the voltage at the first key switch interface in the power-off switch circuit collected by the first switch detection interface in the vehicle body controller, and the second voltage is the voltage at the second key switch interface in the power-off switch circuit collected by the second switch detection interface in the vehicle body controller, and then the power-off switch is fault-detected based on the first voltage and the second voltage. Through the above method, when the power-off switch is pressed, the switch voltage is collected through the first switch detection interface and the second switch detection interface, so that the power-off switch can be fault-detected based on the switch voltages collected in multiple channels, thereby reducing the detection failure rate.
[0093] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.
Claims
1. A circuit detection method, characterized in that: Applied to a switch safety circuit, the switch safety circuit includes a body controller and a power-off switch circuit, the body controller is connected in series with the power-off switch circuit, and the method includes: When the power-off switch is pressed, a first voltage and a second voltage output by the power-off switch circuit are obtained through the vehicle body controller, wherein the first voltage is a voltage at a first key switch interface in the power-off switch circuit acquired by a first switch detection interface in the vehicle body controller, and the second voltage is a voltage at a second key switch interface in the power-off switch circuit acquired by a second switch detection interface in the vehicle body controller; Fault detection is performed on the power-down switch based on the first voltage and the second voltage.
2. The method according to claim 1, characterized in that The performing fault detection on the power-off switch based on the first voltage and the second voltage includes: If the first voltage or the second voltage is less than a first voltage threshold, it is determined that the power-off switch is short-circuited to ground; or, If the first voltage and the second voltage are both greater than or equal to the first voltage threshold, and the first voltage and the second voltage are both less than the second voltage threshold, it is determined that the power-off switch is pressed normally; or, If the first voltage or the second voltage is greater than or equal to the second voltage threshold, and the first voltage or the second voltage is less than a third voltage threshold, it is determined that the power-off switch is not pressed and is in a normal state; or, If the first voltage or the second voltage is greater than or equal to the third voltage threshold, and the first voltage or the second voltage is less than a fourth voltage threshold, it is determined that the power-off switch has an open circuit fault; or, If the first voltage or the second voltage is greater than or equal to the fourth voltage threshold, and the first voltage or the second voltage is less than the fifth voltage threshold, it is determined that the power-off switch power supply is short-circuited.
3. The method according to claim 2, characterized in that Before the performing fault detection on the power-off switch based on the first voltage and the second voltage, the method further includes: Acquire a first reference voltage, a second reference voltage, a third reference voltage, a fourth reference voltage and a fifth reference voltage, wherein the first reference voltage is the switch voltage collected by the body controller when the power-off switch is not pressed; the second reference voltage is the switch voltage collected by the body controller when the power-off switch is pressed; the third reference voltage is the switch voltage collected by the body controller when the first key switch interface or the second key switch interface is unloaded; the fourth reference voltage is the switch voltage collected by the body controller when the first key switch interface or the second key switch interface is short-circuited to the ground; the fifth reference voltage is the switch voltage collected by the body controller when the first key switch interface or the second key switch interface is short-circuited to the power supply; determining the first voltage threshold based on the second reference voltage and the fourth reference voltage; determining the second voltage threshold based on the first reference voltage and the second reference voltage; Determining the third voltage threshold based on the first reference voltage and the third reference voltage; Determining the fourth voltage threshold based on the third reference voltage and the fifth reference voltage; The fifth voltage threshold is determined based on the fifth reference voltage.
4. The method according to claim 2, characterized in that: The method further comprises: If the vehicle body controller determines that the power-off switch is short-circuited to the ground, the vehicle body controller prompts the host computer through the bus that the power-off switch is short-circuited to the ground; or, If the vehicle body controller determines that the power-off switch is pressed normally, the ignition relay is controlled to be turned off to cut off the power output; or, If the vehicle body controller determines that the power-off switch has an open circuit fault, the vehicle body controller prompts the host computer through the bus about the power-off switch open circuit fault; or, If the vehicle body controller determines that the power-off switch is short-circuited to the power supply, the power-off switch power supply short-circuit fault is prompted to the host through the bus.
5. A switch safety circuit as claimed in claims 1 to 4, characterized in that: The switch safety circuit is composed of a body controller and a power-off switch circuit connected in series; the body controller includes a first switch detection interface and a second switch detection interface connected to a sampling circuit, and the power-off switch circuit includes a first key switch interface and a second key switch interface connected to a detection circuit; The vehicle body controller is used to obtain a first voltage and a second voltage output by the power-off switch circuit when the power-off switch is pressed, wherein the first voltage is the voltage at the first key switch interface acquired by the first switch detection interface, and the second voltage is the voltage at the second key switch interface acquired by the second switch detection interface; The vehicle body controller is further configured to perform fault detection on the power-off switch based on the first voltage and the second voltage.
6. The switch safety circuit according to claim 5, characterized in that: The sampling circuit includes a first pull-up resistor, a second pull-up resistor, a first clamping diode, a second clamping diode, a first current limiting resistor, a second current limiting resistor, a first static protection capacitor and a second static protection capacitor; A first end of the first switch detection interface is connected to a microcontroller, a second end of the first switch detection interface is connected to a first end of the first current limiting resistor, a second end of the first current limiting resistor is connected to a first end of the first pull-up resistor, a first end of the first static protection capacitor, and a first end of the first key switch interface, a second end of the first pull-up resistor is connected to a cathode of the first clamping diode, an anode of the first clamping diode is connected to a power supply, and a second end of the first static protection capacitor is grounded; The first end of the second switch detection interface is connected to the microcontroller, the second end of the second switch detection interface is connected to the first end of the second current limiting resistor, the second end of the second current limiting resistor is connected to the first end of the second pull-up resistor, the first end of the second static protection capacitor and the first end of the second key switch interface, the second end of the second pull-up resistor is connected to the cathode of the second clamping diode, the anode of the second clamping diode is connected to the power supply, and the second end of the second static protection capacitor is grounded.
7. The switch safety circuit according to claim 5, characterized in that: The detection circuit includes a first detection resistor, a second detection resistor, a third detection resistor, a fourth detection resistor, a first switch four-way contact pad and a second switch four-way contact pad; The first end of the first detection resistor is connected to the second end of the first key switch interface, and the second end of the first detection resistor is connected to the first end of the second detection resistor; the second end of the first detection resistor is connected to the first contact point of the first switch four-way contact pad, the second contact point of the first switch four-way contact pad, the first contact point of the second switch four-way contact pad, and the second contact point of the second switch four-way contact pad; the second end of the second detection resistor is grounded; The first end of the third detection resistor is connected to the second end of the second key switch interface, and the second end of the third detection resistor is connected to the first end of the fourth detection resistor; the second end of the third detection resistor is connected to the third contact point of the first switch four-way contact pad, the fourth contact point of the first switch four-way contact pad, the third contact point of the second switch four-way contact pad, and the fourth contact point of the second switch four-way contact pad; the second end of the fourth detection resistor is grounded; The fifth contact point of the first switch four-way contact pad and the fifth contact point of the second switch four-way contact pad are both grounded.
8. A circuit detection device, characterized in that: The device operates in a switch safety circuit, the switch safety circuit includes a body controller and a power-off switch circuit, the body controller is connected in series with the power-off switch circuit, and the device includes: a voltage acquisition unit, configured to acquire, through the vehicle body controller, a first voltage and a second voltage output by the power-off switch circuit when the power-off switch is pressed, wherein the first voltage is a voltage at a first key switch interface in the power-off switch circuit acquired by a first switch detection interface in the vehicle body controller, and the second voltage is a voltage at a second key switch interface in the power-off switch circuit acquired by a second switch detection interface in the vehicle body controller; A detection unit is used to perform fault detection on the power-off switch based on the first voltage and the second voltage.
9. A vehicle, characterized in that: The device comprises a switch safety circuit and one or more processors; one or more programs are stored in the memory and configured so that the one or more processors execute the method according to any one of claims 1 to 4.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program code, wherein when the program code is executed by a processor, the method according to any one of claims 1 to 4 is executed.
Citation Information
Cited By
Power-off control method and device of vehicle, electronic equipment and storage medium
CN119261560A
Power-off control method and device of vehicle, electronic equipment and storage medium
CN119261560B
