Automatic fault injection and detection test tool
By designing automatic fault injection and testing test work, using simulation switch and data comparison technology, the lack of the lack of the problem of different fault injection status classification tests, the rapid and efficient failure injection test is achieved, and the test efficiency is improved.
Patent Information
- Application Number
- CN202411084681.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2025-01-28
AI Technical Summary
The prior art lacks classified testing of different fault injection states, resulting in inefficient testing.
Design a type of automatic fault injection and detection and testing work. Three injection status switching of ground, power supply and changing collection values is achieved by simulating switch, using USB and CAN bus to compare data to confirm the consistency of the injection state and detection status.
The fast and efficient fault injection test was achieved, which can complete the testing circuit testing the test circuit in a short time, which greatly improves the test efficiency.
Smart Images

Figure CN119375661A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fault testing, and in particular to an automatic fault injection and detection testing tool. Background Art
[0002] During the product design and circuit design process, it is necessary to test and verify the function and performance of the designed circuit, as well as fault detection and functional verification of the ADC interface, on-board power supply, GPIO control, high-current MOS control output, etc. in the hardware design.
[0003] According to some data, the corresponding function can be tested and verified by externally injecting the corresponding fault signal. The fault injection of the corresponding hardware peripheral design circuit can be divided into short circuit detection to ground, short circuit detection to power supply, and input change signal detection.
[0004] Chinese patent document CN112631248A discloses an "automatic continuous fault injection test device and method". The device includes: an industrial computer host, an ECU controller, a relay module and a data receiving and sending module are installed in a fault injection box by screws; the industrial computer touch screen and the connector are installed on the fault injection box by screws; the industrial computer touch screen is connected to the industrial computer host through an HDMI cable; the industrial computer host is connected to the data receiving and sending module through a USB cable; the data receiving and sending module is connected to the ECU controller through a first CAN cable, and is connected to the relay module through a second CAN cable, a third CAN cable, and an Ethernet cable; the ECU controller and the relay module are connected to the relay module through the first and second signal cables respectively; the industrial computer touch screen, the industrial computer host, and the ECU controller module are connected to the connector through the first, second, and third power cables respectively. The above technical solution lacks classified and targeted testing of different injection states. Summary of the invention
[0005] The present invention mainly solves the technical problem that the original technical solution lacks classification of different injection states for testing, and provides an automatic fault injection and detection test tool. The corresponding analog switch directly controls the switching of three injection states of ground, power supply and change collection value through software. The corresponding device to be tested reads the current fault state injected into the circuit to be tested, and compares the current switching state with the test tool through USB to confirm whether the injection state and the detection state are consistent. After the three states respectively collect and compare the returned data, the detection of one circuit to be tested is completed, and then the detection of the next circuit to be tested is continued according to the test process. As a whole, one function detection can be achieved in a short time, which greatly improves the test efficiency.
[0006] The above-mentioned technical problem of the present invention is mainly solved by the following technical scheme: the present invention includes a test tool, the test tool is connected to the device to be tested through the test tool signal harness, the test tool is connected to the computer host computer through the test tool USB harness, and the computer host computer is connected to the test tool through the docking CAN harness, the test tool includes a fault injection test circuit, and the fault injection test circuit includes an ADC circuit fault injection circuit, a power supply fault injection circuit and a PWM wave fault injection circuit.
[0007] The fault injection test circuit in the test fixture includes ADC circuit fault injection, power supply fault injection, PWM wave fault injection, high current MOS control output fault injection and GPIO control fault input circuit. The test fixture signal harness is used to connect the test signal between the test fixture and the device under test. The test fixture USB harness is used to connect the communication between the test fixture and the host computer.
[0008] Preferably, the test fixture further comprises an MCU control circuit, the MCU control circuit is respectively connected to the power output circuit, the fault injection circuit and the external communication circuit, and the fault injection test circuit is connected to the power circuit.
[0009] The test fixture mainly includes MCU control circuit, power output circuit, fault injection circuit and external communication circuit. The host computer and the test fixture exchange data with the MCU through the USB bus. The host computer sends the current fault injection test project. After receiving the corresponding instructions, the MCU controls the corresponding circuits to implement fault injection to the input circuit to the ground, the power supply and the corresponding set value. After each fault injection, the internal program of the device under test collects the current fault injection, returns the corresponding fault to the host computer through the CAN bus, and compares the data with the test items sent by the host computer to the test fixture to confirm that the injected fault is consistent with the measured fault. After recording and saving the test results, the next fault injection test is carried out. This design integrates the external fault injection test and data recording feedback into a fully automated line, which will greatly improve the overall test efficiency and reduce labor and time costs.
[0010] Preferably, the ADC signal fault injection circuit includes an analog switch, pin 2 of the analog switch is connected to the power supply end through a variable resistor, pin 3 is grounded, pin 4 is grounded, pin 5 is IN1, pin 6 is IN2, IN1 and IN2 are respectively connected to the GPIO port of the MCU, pin 7 is connected to the ADC signal fault injection end, pin 8 is connected to the power supply end, and pin 8 is grounded through capacitor C334.
[0011] The ADC signal fault injection circuit mainly implements three types of fault injection through single-pole three-throw switching of analog switches, namely short circuit to ground, short circuit to power supply and variable voltage injection. The analog switch is powered by an internal power supply, and the power supply voltage is selected as 5.5V. IN1 and IN2 are respectively connected to the GPIO port of the MCU, and the three-state switch switching of the analog switch is realized by controlling the high and low levels of the GPIO port output. IN1,2 is low level to close the switch, IN1 is high level, IN2 is low level, and the COM port is switched to the NO1 switch, that is, the COM port is connected to the NO1 road, to realize the variable voltage injection of the ADC port. IN1 is low level, IN2 is high level, the COM port is switched to the NO2 switch, that is, the COM port is connected to the NO2 road, to realize the injection of power supply short circuit. IN1 is high level, IN2 is high level, the COM port is switched to the NO3 switch, that is, the COM port is connected to the NO3 road, to realize the injection of short circuit to ground.
[0012] Preferably, the variable resistor includes a MOS tube and a multi-channel series resistor switch driven by the MOS tube. The variable voltage is selected by the MOS tube driving the multi-channel series resistor switch to achieve different resistance value voltage division to obtain variable voltage injection. The resistance value of the series resistor can be selected according to actual needs, and different resistance values and the number of resistors can be selected, such as 7 1K_1% resistors to achieve 0-7K resistance selection, and the resistance value and range can be adjusted according to actual conditions. At the same time, the corresponding digital adjustable chip can also be selected according to needs to achieve the selection of different resistance values.
[0013] Preferably, the power supply fault injection circuit includes a power supply switch circuit, and the power supply switch circuit includes a high-side and low-side switch chip, wherein the high-side switch in the high-side and low-side switch chip controls the high voltage short circuit, and the low-side switch controls the ground short circuit. The power supply fault injection circuit mainly includes a power supply switch circuit, a high voltage short circuit control, a ground short circuit control, and an internal current detection input. The circuit design is implemented using high-side and low-side switch chips, wherein the high-side switch is responsible for the circuit's high voltage short circuit control, and the low-side switch is responsible for the ground short circuit control.
[0014] Preferably, the power fault injection circuit further comprises a power fault design circuit, wherein the power fault design circuit connects the power input VIN to the DRAIN of the high-side switch Q1, and the output VOUT to the SOURCE; connects the DRAIN of the high-side switch Q2 to the high voltage 12V, and the SOURCE to the power input VIN; and connects the DRAIN of the low-side switch Q3 to the power input VIN, and the SOURCE to the ground.
[0015] Preferably, the PWM wave fault injection circuit includes an isolation chip, the IN signal is connected to the MCU pin to output the PWM signal, OUT is an external plug-in, and the corresponding PWM signal of the isolated back end is output, VIO is the level voltage of the MCU output end, and VISOIN is the PWM level voltage outputted by the isolation end, thereby realizing double isolation of the signal and the power supply.
[0016] The circuit is designed to connect the power input VIN to the DRAIN of the high-side switch Q1, and the output VOUT to the SOURCE. The power input VIN and the output VOUT are controlled by controlling the INPUT of the high-side switch to realize the disconnection of the power supply fault injection. At the same time, by connecting the DRAIN of the high-side switch Q2 to the high voltage (12V), and the SOURCE to the power input VIN, when the INPUT input of the high-side switch Q2 is high, the high-voltage short-circuit fault injection of the VIN power supply is realized. The DRAIN of the low-side switch Q3 is connected to the power input VIN, and the SOURCE is connected to the ground. When the INPUT input of the low-side switch Q3 is high, the short-circuit fault injection of the VIN power supply to the ground is realized.
[0017] Preferably, it also includes a large current MOS control output fault injection circuit, including a large current relay controlling the on / off function of the D and S terminals of the MOS tube. After U1 amplifies the current passing through the R1 terminal and converts the converted voltage into a sample, the pin 1 of U1 outputs the current amplified voltage value. The MCU collects the current output voltage of the pin 1 and converts it into a real-time detection current of the current across R1. The negative feedback resistor inside U1 adjusts the amplification factor of U1.
[0018] High-current MOS fault injection is mainly injected through short-circuit and open-circuit faults at the MOS end. The design scheme controls the on-off function of the D and S ends of the MOS tube through the internal high-current relay. The relay is selected with a current carrying capacity of more than 120A and a normally open type. When there is no current in the coil between 1 and 2 of the relay, that is, Q1A is not open, the relay RL1 is in an open state, and the relay between 4 and 5 is in a disconnected state, then the power input +Power_IN and +Power_OUT of the MOS or high-current control circuit are in a disconnected state. When there is an overcurrent between 1 and 2 of the relay, that is, Q1A is in saturation conduction, the relay RL1 is in a closed state, and the 4 and 5 pins of the relay are connected. The high current can be connected through the relay power input +Power_IN and +Power_OUT. The function of U1 is to sample and amplify the voltage converted by the current passing through the R1 end, and then output the current amplified voltage value through the 1 pin of U1. The MCU collects the current output voltage of the 1 pin and converts it into the current current at both ends of R1 to detect the current in real time, detect the current circuit to prevent overcurrent, and play a role in protecting the MOS and relay. The gain of U1 can be adjusted through the negative feedback resistor inside U1 to meet the amplification requirements of the voltage across R1.
[0019] Preferably, the host computer is connected to the test fixture via a docking CAN harness, which is used for communication between the device to be tested and the host computer.
[0020] Preferably, the test fixture is connected to the power supply terminal via a power adapter. The power adapter mainly provides power to the test fixture, and normally requires an output of 12V-2A load capacity output.
[0021] The beneficial effects of the present invention are as follows: through the corresponding analog switch, direct software control is performed on the three injection states of ground, power supply and change collection value switching, the corresponding device to be tested reads the current fault state of the circuit to be tested, and compares the current switching state of the test tooling through USB to confirm whether the injection state and the detection state are consistent, and the three states respectively collect and compare the returned data to complete the detection of one circuit to be tested, and then continue to detect the next circuit to be tested according to the test process. On the whole, one function detection can be achieved in a short time, greatly improving the test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a test principle connection structure diagram of the present invention.
[0023] Figure 2 The present invention is a test tool away from his principle diagram.
[0024] Figure 3 It is an analog switch circuit diagram of the present invention.
[0025] Figure 4 The present invention is a resistance switching circuit diagram.
[0026] Figure 5 The invention discloses a high side switch circuit diagram.
[0027] Figure 6 The invention discloses a low-side switch circuit diagram.
[0028] Figure 7 The invention discloses a circuit diagram for designing a power failure.
[0029] Figure 8 It is an internal block diagram of PWM signal isolation of the present invention.
[0030] Fig. 9 The invention discloses a GPIO fault control circuit diagram.
[0031] Fig.10 The invention discloses a high current MOS fault injection circuit diagram.
[0032] Fig.11 It is a test flow chart of the present invention. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the technical solution of the present invention is further described in detail below through embodiments and in combination with the accompanying drawings. It should be understood that the specific implementation method described here is only an optimal embodiment of the present invention, which is only used to explain the present invention and does not limit the scope of protection of the present invention. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0034] The present invention intends to test the control program inside the tooling equipment and the host computer data reading comparison through the fully automatic test mode, and directly output the corresponding test results such as Fig.11 In terms of test efficiency, fault injection directly switches three injection states (to ground, to power supply, and injection of changing acquisition values) through the corresponding analog switch. The corresponding device to be tested reads the current fault state of the circuit to be tested, and compares it with the current switching state of the test fixture through USB to confirm whether the injection state and the detection state are consistent. After the three states collect and compare the returned data, the detection of one circuit to be tested is completed, and then the detection of the next circuit to be tested is continued according to the test process. Overall, one function detection can be achieved in a short time, greatly improving the test efficiency. For operation, refer to Fig.11After the configuration is completed, the program automatically reads the configuration items and automatically tests the circuit to be tested, and displays the current feedback value on the host computer and outputs the test result PASSOR FAIL. During the entire test process, all connections are made through wiring harnesses to reduce the probability of damage to components and equipment.
[0035] Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the operations (or steps) as sequential processes, many of the operations (or steps) therein can be implemented in parallel, concurrently, or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the drawings; the process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0036] The technical solution of the present invention is further specifically described below through embodiments and in conjunction with the accompanying drawings.
[0037] Embodiment: An automatic fault injection and detection test tool of this embodiment, such as Figure 1 As shown, it includes a test tool, the test tool is connected to the device under test through the test tool signal harness, the test tool is connected to the computer host through the test tool USB harness, and the computer host is connected to the test tool through the docking CAN harness. The test tool includes a fault injection test circuit, and the fault injection test circuit includes an ADC circuit fault injection circuit, a power supply fault injection circuit, and a PWM wave fault injection circuit. The computer host is connected to the test tool through the docking CAN harness. The docking CAN harness is used for communication connection between the device under test and the host computer. The test tool is connected to the power supply terminal through a power adapter. The power adapter mainly provides power to the test tool, and the normal output needs to be 12V-2A load capacity output.
[0038] The fault injection test circuit in the test tool includes ADC circuit fault injection, power supply fault injection, PWM wave fault injection, high current MOS control output fault injection and GPIO control type fault input circuit. The test tool signal harness is used to test the connection of the test signal between the tool and the device under test. The test tool USB harness is used to test the communication connection between the tool and the host computer. The test tool also includes an MCU control circuit, which is respectively connected to the power output circuit, the fault injection circuit and the external communication circuit, and the fault injection test circuit is connected to the power circuit.
[0039] The test fixture mainly includes MCU control circuit, power output circuit, fault injection circuit and external communication circuit. The host computer and the test fixture exchange data with the MCU through the USB bus. The host computer sends the current fault injection test project. After receiving the corresponding instructions, the MCU controls the corresponding circuits to implement fault injection to the input circuit to the ground, the power supply and the corresponding set value. After each fault injection, the internal program of the device under test collects the current fault injection, returns the corresponding fault to the host computer through the CAN bus, and compares the data with the test items sent by the host computer to the test fixture to confirm that the injected fault is consistent with the measured fault. After recording and saving the test results, the next fault injection test is carried out. This design integrates the external fault injection test and data recording feedback into a fully automated line, which will greatly improve the overall test efficiency and reduce labor and time costs.
[0040] The ADC signal fault injection circuit includes an analog switch, wherein pin 2 of the analog switch is connected to the power supply end through a variable resistor, pin 3 is grounded, pin 4 is grounded, pin 5 is IN1, pin 6 is IN2, IN1 and IN2 are respectively connected to the GPIO port of the MCU, pin 7 is connected to the ADC signal fault injection end, pin 8 is connected to the power supply end, and pin 8 is grounded through capacitor C334. The ADC signal fault injection circuit mainly realizes three types of fault injection through single-pole three-throw switching of the analog switch, namely short circuit to ground, short circuit to power supply and variable voltage injection. The analog switch is powered by an internal power supply, and the power supply voltage is selected to be 5.5V. IN1 and IN2 are respectively connected to the GPIO port of the MCU, and the high and low levels are controlled by the GPIO port output to realize the switching of the three states of the analog switch. IN1,2 is low level to indicate that the switch is turned off, IN1 is high level, IN2 is low level, and the COM port is switched to the NO1 switch, that is, the COM port is connected to the NO1 switch, so as to realize the variable voltage injection of the ADC port. IN1 is low level, IN2 is high level, COM port is switched to switch No.2, that is, COM port is connected to No.2, to achieve short circuit injection to power supply. IN1 is high level, IN2 is high level, COM port is switched to switch No.3, that is, COM port is connected to No.3, to achieve short circuit injection to ground.
[0041] The variable resistor includes a MOS tube and a multi-channel series resistor switch driven by the MOS tube. The variable voltage is selected by the MOS tube driving the multi-channel series resistor switch to achieve different resistance value voltage division to obtain variable voltage injection. The resistance value of the series resistor can be selected according to actual needs, and different resistance values and the number of resistors can be selected, such as 7 1K_1% resistors to achieve 0-7K resistance selection, and the resistance value and range can be adjusted according to actual conditions. At the same time, the corresponding digital adjustable chip can also be selected according to needs to achieve different resistance selections.
[0042] The power supply fault injection circuit includes a power supply switch circuit, and the power supply switch circuit includes a high-side and low-side switch chip. The high-side switch in the high-side and low-side switch chips controls the high voltage short circuit, and the low-side switch controls the ground short circuit. The power supply fault injection circuit mainly includes a power supply switch circuit, a high voltage short circuit control, a ground short circuit control, and an internal current detection input. The circuit design is implemented using high-side and low-side switch chips, in which the high-side switch is responsible for the circuit's high voltage short circuit control, and the low-side switch is responsible for the ground short circuit control.
[0043] The power supply fault injection circuit also includes a power supply fault design circuit, wherein the power supply fault design circuit connects the power supply input VIN to the DRAIN of the high-side switch Q1, and the output VOUT to the SOURCE; connects the DRAIN of the high-side switch Q2 to the high voltage 12V, and the SOURCE to the power supply input VIN; connects the DRAIN of the low-side switch Q3 to the power supply input VIN, and the SOURCE to the ground. The design circuit connects the power supply input VIN to the DRAIN of the high-side switch Q1, and the output VOUT to the SOURCE, and controls the on and off of the power supply input VIN and the output VOUT by controlling the INPUT of the high-side switch to achieve the disconnection of the power supply fault injection, and at the same time, by connecting the DRAIN of the high-side switch Q2 to the high voltage (12V), and the SOURCE to the power supply input VIN, when the INPUT of the high-side switch Q2 inputs a high level, the high-voltage short-circuit fault injection of the VIN power supply is achieved. The DRAIN of the low-side switch Q3 is connected to the power supply input VIN, and the SOURCE is connected to the ground, and when the INPUT of the low-side switch Q3 inputs a high level, the short-circuit fault injection of the VIN power supply to the ground is achieved.
[0044] PWM wave fault injection circuit, the PWM wave fault injection circuit includes an isolation chip, the IN signal is connected to the MCU pin to output the PWM signal, OUT is an external plug-in, and the corresponding PWM signal of the isolated back end is output, VIO is the level voltage of the MCU output end, and VISOIN is the PWM level voltage output by the isolation end, so as to realize double isolation of signal and power supply.
[0045] It also includes a large current MOS control output fault injection circuit, including a large current relay to control the on and off function of the D and S terminals of the MOS tube. After U1 amplifies the current passing through the R1 terminal and converts it into a voltage sample, the 1st pin of U1 outputs the current amplified voltage value. The MCU collects the current output voltage of the 1st pin and converts it into a real-time detection current of the current across R1. The negative feedback resistor inside U1 adjusts the amplification factor of U1.
[0046] High-current MOS fault injection is mainly injected through short-circuit and open-circuit faults at the MOS end. The design scheme controls the on-off function of the D and S ends of the MOS tube through the internal high-current relay. The relay is selected with a current carrying capacity of more than 120A and a normally open type. When there is no current in the coil between 1 and 2 of the relay, that is, Q1A is not open, the relay RL1 is in an open state, and the relay between 4 and 5 is in a disconnected state, then the power input +Power_IN and +Power_OUT of the MOS or high-current control circuit are in a disconnected state. When there is an overcurrent between 1 and 2 of the relay, that is, Q1A is in saturation conduction, the relay RL1 is in a closed state, and the 4 and 5 pins of the relay are connected. The high current can be connected through the relay power input +Power_IN and +Power_OUT. The function of U1 is to sample and amplify the voltage converted by the current passing through the R1 end, and then output the current amplified voltage value through the 1 pin of U1. The MCU collects the current output voltage of the 1 pin and converts it into the current current at both ends of R1 to detect the current in real time, detect the current circuit to prevent overcurrent, and play a role in protecting the MOS and relay. The gain of U1 can be adjusted through the negative feedback resistor inside U1 to meet the amplification requirements of the voltage across R1.
[0047] Example The technical problem to be solved by the present invention is to provide a fast and efficient fault injection test and test value input test for a single board functional circuit. Figure 1 As shown, it consists of a test fixture including a test circuit, a test fixture signal harness, a docking CAN harness, a test fixture USB harness and a power supply adapter.
[0048] The fault injection test circuit in the test tooling includes ADC circuit fault injection, power supply fault injection, PWM wave fault injection, high current MOS control output fault injection and GPIO control type fault input circuit.
[0049] The power adapter is mainly used to provide power to the test equipment, and the normal output is 12V-2A load capacity.
[0050] The test fixture signal harness is used to connect the test signal between the test fixture and the device under test.
[0051] The docking CAN harness is used for communication connection between the device under test and the host computer.
[0052] The test tool USB harness is used for the communication connection between the test tool and the host computer.
[0053] The test fixture mainly includes MCU control circuit, power output circuit, fault injection circuit and external communication circuit. The host computer and the test fixture exchange data with the MCU through the USB bus. The host computer sends the current fault injection test project. After receiving the corresponding instructions, the MCU controls the corresponding circuits to implement fault injection to the input circuit to the ground, the power supply and the corresponding set value. After each fault injection, the internal program of the device under test collects the current fault injection, returns the corresponding fault to the host computer through the CAN bus, and compares the data with the test items sent by the host computer to the test fixture to confirm that the injected fault is consistent with the measured fault. After recording and saving the test results, the next fault injection test is carried out. This design integrates the external fault injection test and data recording feedback into a fully automated line, which will greatly improve the overall test efficiency and reduce labor and time costs.
[0054] like Figure 1 As shown in the figure, the overall framework of the test principle mainly includes the host computer, the test fixture, and the device under test. The corresponding fault injection items are configured by the host computer and sent to the test fixture. The test fixture outputs the corresponding fault input to the device under test according to the sent requirements.
[0055] like Figure 2 As shown in the figure, the test fixture contains a power supply circuit, a fault injection circuit, an MCU control circuit, and an external communication circuit. The power supply circuit mainly provides power for other circuits, and the MCU control circuit mainly realizes internal control and acquisition. The external communication circuit mainly exchanges data and communicates with the host computer through the USB bus. The fault injection circuit mainly realizes fault control and acquisition of the corresponding signals of the device under test.
[0056] ADC signal fault injection circuit Figure 3 As shown, three types of fault injection are mainly achieved through single-pole three-throw switching of analog switches, namely short circuit to ground, short circuit to power supply and variable voltage injection. The analog switch is powered by an internal power supply, and the power supply voltage is selected as 5.5V. IN1 and IN2 are respectively connected to the GPIO port of the MCU, and the high and low levels are controlled by the GPIO port output to achieve the switching of the three states of the analog switch. IN1,2 is low level to turn off the switch, IN1 is high level, IN2 is low level, and the COM port is switched to the NO1 switch, that is, the COM port is connected to the NO1 road, to achieve variable voltage injection at the ADC port. IN1 is low level, IN2 is high level, the COM port is switched to the NO2 switch, that is, the COM port is connected to the NO2 road, to achieve short circuit injection to the power supply. IN1 is high level, IN2 is high level, the COM port is switched to the NO3 switch, that is, the COM port is connected to the NO3 road, to achieve short circuit injection to the ground.
[0057] Variable voltage such as Figure 4As shown, by driving multiple series-connected resistor switches through MOS tubes, different resistance value voltage division is achieved to obtain variable voltage injection.
[0058] The resistance value of the series resistor can be selected according to actual needs, and different resistance values and numbers of resistors can be selected. As shown in the figure, there are 7 1K_1% resistors to achieve the resistance selection of 0-7K (the resistance value and range can be adjusted according to actual conditions). At the same time, you can also choose the corresponding digital adjustable chip according to your needs to achieve the selection of different resistance values.
[0059] The power fault injection circuit mainly includes the power switch circuit, high voltage short circuit control, ground short circuit control and internal current detection input. The circuit design adopts high and low side switch chips, where the high side switch is Figure 5 The circuit shown in the figure is responsible for controlling the high voltage short circuit. The low side switch is as follows Figure 6 As shown in the figure, it is responsible for short-circuit control to ground. Design the circuit as follows Figure 7 As shown, the power input VIN is connected to the DRAIN of the high-side switch Q1, and the output VOUT is connected to the SOURCE. The on and off of the power input VIN and the output VOUT are controlled by controlling the INPUT of the high-side switch to achieve power failure injection. At the same time, by connecting the DRAIN of the high-side switch Q2 to the high voltage (12V), and the SOURCE to the power input VIN, when the INPUT input of the high-side switch Q2 is high, the high-voltage short-circuit fault injection of the VIN power supply is achieved. The DRAIN of the low-side switch Q3 is connected to the power input VIN, and the SOURCE is connected to the ground. When the INPUT input of the low-side switch Q3 is high, the short-circuit fault injection of the VIN power supply to the ground is achieved. Q1, Q2, and Q3 are simplified internal symbols in the schematic diagram. The actual high and low-side MOS chip circuits are as follows Figure 7 shown.
[0060] Signal PWM fault injection circuit, where PWM fault injection mainly includes PWM frequency and duty cycle changes. Through the timer output function inside the MCU, the corresponding PWM frequency or period duty cycle information is output to achieve offset fault injection for the PWM signal. After the PWM signal fault is output, the protection and isolation of the external signal is achieved through the isolation chip in the middle. Figure 8 The figure shows the internal block diagram of the isolation chip, where the IN signal is connected to the MCU pin to output the PWM signal, and OUT is connected to the external plug-in to output the corresponding PWM signal of the isolation backend. VIO is the level voltage of the MCU output end, and VISOIN is the PWM level voltage output by the isolation end, which can achieve dual isolation of signals and power supply. Through this isolation chip, the PWM signal and external signal are isolated, and the corresponding PWM fault injection signal is transmitted at the same time.
[0061] GPIO fault control circuit such as Fig. 9 As shown in the figure, GPIO fault injection is divided into three state inputs, short circuit to ground fault, short circuit to power supply fault and open circuit fault. The analog switch realizes three fault injections through single-pole three-throw switching, namely short circuit to ground, short circuit to power supply and open circuit injection. The analog switch is powered by an internal power supply, and the power supply voltage is selected as 5.5V. IN1 and IN2 are respectively connected to the GPIO port of the MCU, and the three-state switch switching of the analog switch is realized by controlling the high and low levels of the GPIO port output. IN1,2 is low level to close the switch, realizing the open circuit fault; IN1 is low level, IN2 is high level, the COM port is switched to the NO2 switch, that is, the COM port and NO2 are connected, realizing the short circuit injection to the power supply. IN1 is high level, IN2 is high level, the COM port is switched to the NO3 switch, that is, the COM port and NO3 are connected, realizing the short circuit to ground fault.
[0062] High current MOS fault injection such as Fig.10 As shown, the design scheme mainly controls the on-off function of the D and S terminals of the MOS tube through the internal high-current relay through the short-circuit and open-circuit fault injection at the MOS end. The relay is selected as a model with a current carrying capacity of more than 120A, a normally open type. When there is no current in the coil between 1 and 2 of the relay, that is, Q1A is not open, the relay RL1 is in an open state, and the relay between 4 and 5 is in a disconnected state, then the power input +Power_IN and +Power_OUT of the MOS or high-current control circuit are in a disconnected state. When there is an overcurrent between 1 and 2 of the relay, that is, Q1A is in saturation conduction, the relay RL1 is in a closed state, the 4 and 5 pins of the relay are connected, and the high current can be connected through the relay power input +Power_IN and +Power_OUT. The function of U1 is to sample and amplify the voltage converted by the current passing through the R1 end, and then output the current amplified voltage value through the 1 pin of U1. The MCU collects the current output voltage of the 1 pin and converts it into the current current at both ends of R1 to detect the current in real time, detect the current circuit to prevent overcurrent, and play a role in protecting the MOS and relay. The gain of U1 can be adjusted through the negative feedback resistor inside U1 to meet the amplification requirements of the voltage across R1.
[0063] The relevant design circuits inside the test tooling can be modularly designed according to actual needs, and modules can be added or reduced according to actual test needs to meet different test requirements.
[0064] The specific embodiments described herein are merely examples of the spirit of the present invention. The above embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that technicians in the technical field to which the present invention belongs can make various modifications or supplements to the described specific embodiments or replace them in a similar manner, but will not deviate from the spirit of the present invention or exceed the scope defined in the attached claims. For ordinary technicians in this field, multiple deformations and improvements can also be made without departing from the concept of the present invention. Therefore, the scope of protection of the patent of the present invention shall be based on the attached claims.
Claims
1. An automatic fault injection and detection test tool, characterized in that: The invention comprises a test tool, wherein the test tool is connected to the device to be tested through a test tool signal harness, the test tool is connected to a computer host computer through a test tool USB harness, and the computer host computer is connected to the test tool through a docking CAN harness. The test tool comprises a fault injection test circuit, and the fault injection test circuit comprises an ADC circuit fault injection circuit, a power supply fault injection circuit and a PWM wave fault injection circuit.
2. An automatic fault injection and detection test tool according to claim 1, characterized in that: The test fixture also includes an MCU control circuit, which is respectively connected to a power output circuit, a fault injection circuit and an external communication circuit, and the fault injection test circuit is connected to a power circuit.
3. The automatic fault injection and detection test tool according to claim 1, characterized in that: The ADC signal fault injection circuit includes an analog switch, wherein pin 2 of the analog switch is connected to the power supply end through a variable resistor, pin 3 is grounded, pin 4 is grounded, pin 5 is IN1, pin 6 is IN2, IN1 and IN2 are respectively connected to the GPIO port of the MCU, pin 7 is connected to the ADC signal fault injection end, pin 8 is connected to the power supply end, and pin 8 is grounded through capacitor C334.
4. The automatic fault injection and detection test tool according to claim 3, characterized in that: The variable resistor includes a MOS tube and a multi-channel series resistance switch driven by the MOS tube.
5. An automatic fault injection and detection test tool according to claim 1 or 3, characterized in that: The power fault injection circuit comprises a power switch circuit, wherein the power switch circuit comprises a high-side and a low-side switch chip, wherein the high-side switch in the high-side and low-side switch chips is short-circuited to high voltage, and the low-side switch is short-circuited to ground.
6. The automatic fault injection and detection test tool according to claim 5, characterized in that: The power fault injection circuit also includes a power fault design circuit, which connects the power input VIN to the DRAIN of the high-side switch Q1, and the output VOUT to the SOURCE; connects the DRAIN of the high-side switch Q2 to the high voltage 12V, and the SOURCE to the power input VIN; and connects the DRAIN of the low-side switch Q3 to the power input VIN, and the SOURCE to the ground.
7. The automatic fault injection and detection test tool according to claim 1, characterized in that: The PWM wave fault injection circuit includes an isolation chip, the IN signal is connected to the MCU pin to output the PWM signal, OUT is an external plug-in, and the corresponding PWM signal of the isolated back end is output, VIO is the level voltage of the MCU output end, and VISOIN is the PWM level voltage outputted by the isolation end, so as to realize double isolation of the signal and the power supply.
8. An automatic fault injection and detection test tool according to claim 1 or 2, characterized in that: It also includes a large current MOS control output fault injection circuit, including a large current relay to control the on and off function of the D and S terminals of the MOS tube. After U1 amplifies the current passing through the R1 terminal and converts it into a voltage sample, the 1st pin of U1 outputs the current amplified voltage value. The MCU collects the current output voltage of the 1st pin and converts it into a real-time detection current of the current across R1. The negative feedback resistor inside U1 adjusts the amplification factor of U1.
9. The automatic fault injection and detection test tool according to claim 1, characterized in that: The computer host computer is connected to the test tooling through a docking CAN harness.
10. The automatic fault injection and detection test tool according to claim 1, characterized in that: The testing tool is connected to the power supply terminal via a power adapter.
Citation Information
Patent Citations
Automatic continuous fault injection testing device and method
CN112631248A