Relay detection circuit, method and electric vehicle
By introducing an isolation detection circuit and a detection controller into the relay detection circuit, and using an isolation transformer and rectifier diodes to achieve low-voltage side detection, the problem of insufficient safety in relay detection in high-voltage power distribution circuits is solved, and efficient and safe relay condition diagnosis is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WEICHAI POWER CO LTD
- Filing Date
- 2026-02-11
- Publication Date
- 2026-06-12
AI Technical Summary
In the existing technology, relay detection circuits have insufficient safety in high-voltage power distribution circuits, especially when diagnosing the status of relay contacts. The use of high-voltage sampling switches increases the complexity of the system and the risk of insulation problems.
An isolation detection circuit, including an isolation transformer and rectifier diodes, is used to detect the relay status on the low-voltage side, avoiding direct connection to the high-voltage circuit. The detection controller is used to determine the open and closed state of the relay, ensuring electrical isolation.
It achieves low-cost and efficient relay contact status diagnosis while ensuring safety and reliability, avoiding high-voltage impact and insulation risks, and improving the safety and stability of the system.
Smart Images

Figure CN122193897A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of relay testing, specifically to a relay testing circuit, method, and electric vehicle. Background Technology
[0002] In scenarios involving electrical control, such as new energy vehicles, relays are often used as switching elements in power distribution circuits. When controlling the closing or opening of relay contacts, it is necessary to accurately diagnose their actual state to confirm whether the relay has acted correctly as instructed, ensuring the safe and reliable operation of the system.
[0003] Current technologies typically rely on the principle of resistive voltage division for diagnosis. This involves placing switches and voltage-dividing resistors on the high-voltage side and comparing the voltages before and after the relay contacts. However, this approach directly involves high-voltage circuits, creating an electrical connection between the high-voltage system and the low-voltage reference ground during diagnosis, which risks reducing the system's insulation resistance.
[0004] Therefore, how to achieve reliable diagnosis of relay contact status in a simpler and easier way while ensuring safety is an urgent technical problem to be solved. Summary of the Invention
[0005] In view of this, the embodiments of this application aim to provide a relay detection circuit, method and electric vehicle to solve the problem of insufficient safety in the detection of relay contacts in high-voltage power distribution circuits of electric vehicles in the prior art.
[0006] In a first aspect, this application provides a relay detection circuit, which includes an isolation detection circuit, a detection signal triggering circuit, and a detection controller. The isolation detection circuit is connected to the relay under test and the detection signal triggering circuit, and the detection signal triggering circuit is connected to the detection controller. The isolation detection circuit feeds back a corresponding circuit signal to the detection signal triggering circuit based on the open / closed state of the relay under test. The detection controller outputs a detection signal to the detection signal triggering circuit, receives the circuit signal through the detection signal triggering circuit, and determines the open / closed state of the relay under test based on the circuit signal.
[0007] In one embodiment, the isolation detection circuit includes an isolation transformer, the primary side of which is connected to the detection signal triggering circuit, and the secondary side of which is connected to the relay under test.
[0008] In one embodiment, the isolation detection circuit further includes a rectifier diode connected to the secondary side of the isolation transformer and the relay under test.
[0009] In one embodiment, the detection signal triggering circuit includes a trigger switch and a detection resistor. The input terminal of the trigger switch is connected to the isolation detection circuit, the control terminal of the trigger switch is connected to the detection controller, the output terminal of the trigger switch is connected to the first terminal of the detection resistor and the detection controller, and the second terminal of the detection resistor is grounded.
[0010] In one embodiment, the detection signal triggering circuit further includes a filtering circuit, which is connected to the first end of the detection resistor, the output end of the trigger switch, and the detection controller.
[0011] In one embodiment, the filtering circuit includes a filtering resistor and a filtering capacitor. The filtering resistor is connected to the first terminal of the detection resistor, the output terminal of the trigger switch, the detection controller, and the first terminal of the filtering capacitor. The second terminal of the filtering capacitor is grounded.
[0012] In one embodiment, the relay detection circuit further includes a safety power supply connected to the isolation detection circuit.
[0013] Secondly, this application also provides a relay detection method applied to the aforementioned relay detection circuit, the method comprising: A detection signal is sent to a detection signal triggering circuit; the detection signal triggering circuit is connected to the relay under test through an isolation detection circuit, and the detection signal is used to detect the open and closed state of the relay under test. Acquire circuit signals; the circuit signals are obtained based on feedback of the open / closed state of the relay under test; The circuit signal is compared with a preset circuit parameter threshold, and the open / closed state of the relay under test is determined based on the comparison result.
[0014] In one embodiment, comparing the circuit signal with a preset circuit parameter threshold and determining the open / closed state of the relay under test based on the comparison result includes: If the voltage of the circuit signal is greater than or equal to the preset circuit parameter threshold, the relay under test is determined to be closed. If the voltage of the circuit signal is less than the preset circuit parameter threshold, the relay under test is determined to be disconnected.
[0015] Thirdly, this application also provides an electric vehicle, which includes a power circuit and a relay detection circuit as described in the above embodiments. The relay detection circuit is connected to a relay under test in the power circuit, and the open / closed state of the relay under test is detected based on the relay detection method described in the above embodiments.
[0016] The aforementioned relay testing circuit, method, and electric vehicle include a relay testing circuit comprising an isolation testing circuit, a detection signal triggering circuit, and a testing controller. The isolation testing circuit connects the relay under test and the detection signal triggering circuit, which in turn connects to the testing controller. The isolation testing circuit feeds back a corresponding circuit signal to the detection signal triggering circuit based on the open / closed state of the relay under test. The testing controller outputs a detection signal to the detection signal triggering circuit, which receives the circuit signal. The testing controller then determines the open / closed state of the relay under test based on the circuit signal. By setting the isolation testing circuit to perform relay diagnosis independently of the circuit containing the relay under test, high-voltage surges from the circuit containing the relay under test to the testing element can be avoided, ensuring the safety of electrical isolation during the relay testing process. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0018] Figure 1 This is a block diagram of a relay detection circuit in one embodiment.
[0019] Figure 2 This is a schematic diagram of the circuit structure of a relay detection circuit in one embodiment.
[0020] Figure 3 This is a flowchart illustrating a relay detection method in one embodiment.
[0021] Figure 4 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application.
[0023] It is understood that the terms "first," "second," etc., used herein may be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of this application, a first resistor may be referred to as a second resistor, and similarly, a second resistor may be referred to as a first resistor. Both the first resistor and the second resistor are resistors, but they are not the same resistor.
[0024] It is understood that the term "connection" in the following embodiments should be understood as "electrical connection," "communication connection," etc., if the connected circuits, modules, units, etc., have electrical signal or data transmission with each other.
[0025] When used herein, the singular forms of “a,” “an,” and “the” may also include the plural forms unless the context clearly indicates otherwise. It should also be understood that the terms “comprising,” “including,” or “having,” etc., specify the presence of the stated feature, whole, step, operation, component, part, or combination thereof, but do not preclude the possibility of the presence or addition of one or more other features, wholes, steps, operations, components, parts, or combinations thereof.
[0026] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.
[0027] With the rapid development of the electric vehicle industry and the widespread adoption of new energy vehicles, the safety of their high-voltage electrical systems has become an increasingly important concern. Electric vehicles typically utilize high-voltage battery systems of several hundred volts to power high-power components such as drive motors and air conditioning compressors. Their electrical circuits usually include relays, which, as critical electronic control switching elements, play a vital role in connecting, disconnecting, or switching the main circuit. The reliability of their contacts directly affects the safe and stable operation of the entire system. In the high-voltage power distribution systems of new energy vehicles, relay malfunctions (failure to close when required, or failure to open when required) can lead to serious functional failures or safety accidents. Therefore, real-time and accurate online diagnostics of relay contact status has become a crucial technical requirement in this field.
[0028] Currently, most common relay contact status diagnostic solutions employ the principle of resistive voltage division combined with voltage sampling. Specifically, high-voltage electronic switches (such as high-voltage MOSFETs) are connected to a voltage-dividing resistor network to a reference ground (such as vehicle ground) on both sides of the relay contact under test. By controlling the closing of these high-voltage switches, the processor can acquire the voltage values across the relay contact, and then determine whether the contact is reliably closed or open by comparing whether these two voltages are consistent.
[0029] However, to achieve voltage sampling on the high-voltage side, the circuit must use switching devices capable of withstanding system high voltages (up to hundreds or even thousands of volts). These high-voltage switches are expensive, and their drive control circuits often require additional isolation or level-shifting designs, further increasing system complexity and overall cost. A more critical issue is that this type of solution, when performing relay diagnostics, connects one end of the voltage divider resistor to a high potential such as the power battery via a high-voltage switch, while the other end is directly connected to ground (GND). This connection method essentially creates an artificial electrical path with relatively low impedance between the high-voltage and low-voltage parts of the system. When the diagnostic switch is closed, this path significantly reduces the insulation resistance of the entire vehicle or equipment, posing a potential risk of insulation failure and threatening the safety of personnel and equipment.
[0030] Therefore, this application provides a more complete, electrically isolated, and safer relay detection circuit to solve the problem of insufficient vehicle safety caused by inadequate insulation of the detection circuit in existing relay detection circuits and electric vehicles. It enables low-cost, highly reliable relay contact status diagnosis while ensuring safe and reliable isolation between high- and low-voltage electrical systems, thereby overcoming the high cost and insulation risks introduced by high-voltage sampling switches in currently used technologies. The following embodiments are provided for illustration.
[0031] In one exemplary embodiment, this application provides a relay detection circuit, such as... Figure 1 As shown, the relay detection circuit 100 includes an isolation detection circuit 110, a detection signal triggering circuit 130, and a detection controller 150. The isolation detection circuit 110 is connected to the relay under test and the detection signal triggering circuit 130, and the detection signal triggering circuit 130 is connected to the detection controller 150.
[0032] During the testing of the relay under test, the isolation detection circuit feeds back the corresponding circuit signal to the detection signal trigger circuit based on the open and closed state of the relay under test. The detection controller outputs the detection signal to the detection signal trigger circuit, and the detection signal trigger circuit receives the circuit signal. The detection controller determines the open and closed state of the relay under test based on the circuit signal.
[0033] Specifically, the isolation detection circuit connects to the relay under test. This isolation circuit can connect to both ends of the relay under test, and the electrical circuit connected to the relay under test and the electrical circuit connected to the detection signal trigger circuit are electrically isolated from each other. For example, they can be separate windings, or electrical isolation can be achieved through optocouplers, thermistors, or other methods. In this way, the high-voltage circuit of the relay under test can be electrically isolated from the circuit of the relay detection circuit. Especially when the relay under test is located in the high-voltage power distribution circuit of an electric vehicle, the relay detection circuit does not need to be connected to the high-voltage side system, fundamentally eliminating insulation risks.
[0034] Furthermore, in one embodiment, please refer to Figure 1 and Figure 2 As shown, the isolation detection circuit includes an isolation transformer T1, the primary side of which is connected to a detection signal trigger circuit 130, and the secondary side of which is connected to the relay under test, Relay.
[0035] Specifically, the primary side of the isolation transformer is the primary winding, also known as the primary winding. One end of the primary winding is connected to a low-voltage power supply, and the other end is connected to the detection signal trigger circuit. The secondary side of the isolation transformer is the secondary winding, also known as the secondary winding. One end of the secondary winding is directly connected to the first terminal of the relay under test, and the other end of the secondary winding is connected to the second terminal of the relay under test. That is, the secondary side of the isolation transformer is connected in parallel with the relay under test.
[0036] Optionally, the low-voltage power supply can be the low-voltage circuit of the electric vehicle, an independent power supply, or a low-voltage power supply conditioned from the relay under test. It is not limited here, as long as it can provide a low-voltage power supply to the relay detection circuit. Exemplarily, in one embodiment, the relay detection circuit also includes a safety power supply connected to the isolated detection circuit. This safety power supply is a battery, which independently powers the relay detection circuit to improve its reliability and stability.
[0037] Furthermore, the safety power supply can also be connected to a detection controller, which controls whether to supply low-voltage power to the isolation detection circuit, so that the relay detection circuit reduces power consumption when there is no need to diagnose the relay, the power supply can be used for a longer time, and the detection efficiency is improved.
[0038] In this embodiment, through the isolation effect of the isolation transformer, the relay detection circuit on the low-voltage side is completely electrically isolated from the relay under test connected to the high-voltage circuit. During the relay detection process, high voltage will not be introduced into the relay detection circuit, thus avoiding insulation risks.
[0039] Alternatively, in one embodiment, such as Figure 2As shown, the isolation detection circuit also includes a rectifier diode D1, which is connected to the secondary winding of the isolation transformer T1 and the relay under test. The rectifier diode D1 is used for rectification and also prevents high voltage from directly passing through the secondary winding of the isolation transformer T1 to the rear end of the relay under test, thus protecting the safety of the detection process.
[0040] In this application, the detection controller can be a microcontroller unit (MCU), such as the Infineon TC275 or NXP S32K automotive-grade chips. The detection controller has at least one input pin and at least one output pin. In this application, the detection controller can perform relay detection with just one input pin and one output pin. The specific model of the detection controller is not limited; it can be referred to as MCU in this application. (See also...) Figure 2 .
[0041] In one embodiment, such as Figure 2 As shown, the detection signal trigger circuit 130 includes a trigger switch Q1 and a detection resistor R1. The input terminal of the trigger switch Q1 is connected to the isolation detection circuit 110, the control terminal of the trigger switch Q1 is connected to the detection controller 150, the output terminal of the trigger switch Q1 is connected to the first terminal of the detection resistor R1 and the detection controller 150, and the second terminal of the detection resistor R1 is grounded.
[0042] Specifically, the detection controller controls the on / off state of the trigger switch, which in turn controls the on / off state of the low-voltage circuit in the relay detection circuit. When the trigger switch is on, the low-voltage circuit is on, the primary side of the isolation transformer is energized, and a voltage is generated across the detection resistor; when the trigger switch is off, the low-voltage circuit is off, and there is no voltage across the detection resistor. By obtaining the voltage across the detection resistor, the detection controller can determine the current on the primary side of the isolation transformer, i.e., obtain the circuit signal. Based on the circuit signal, the open / closed state of the relay under test can be determined.
[0043] Furthermore, the sensing resistor can also limit the current in the primary winding of the isolation transformer, thus protecting the relay detection circuit. Figure 2 Let's take an example to illustrate. The relay under test has two states: closed and open. When closed, the two ends of the relay under test are short-circuited; when open, the two ends of the relay under test are open-circuited. When closed, the electrical energy of the primary winding of the isolation transformer T1 is transferred to the secondary winding, and then returns to the secondary winding of the isolation transformer T1 through the rectifier diode D1 and the relay under test, forming a loop. The transferred electrical energy is consumed by the rectifier diode D1 and the secondary winding of the isolation transformer T1. Due to the presence of the sensing resistor R1, the current in the primary winding of the isolation transformer T1 is limited, and the energy transferred to the secondary winding will not be too high, so there is no need to worry about damaging the circuit. When open, there is no loop on the secondary side of the isolation transformer T1, so energy cannot be transferred from the primary winding to the secondary winding.
[0044] The specific process is as follows: The MCU's output pin, also known as the PWM pin, emits a square wave with a specific frequency and duty cycle (e.g., 50%), which serves as the detection signal. This signal is transmitted to the control terminal of the trigger switch Q1 to control the MOSFET (switch Q1) to turn on and off. When on, a low voltage is generated in the primary winding of the isolation transformer T1, and a current flows through it. When off, no voltage or current acts on the isolation transformer T1. This changing voltage and current generate a changing magnetic field in the isolation transformer T1, inducing an electromotive force in the secondary winding, thus transferring electrical energy to the secondary winding of the isolation transformer T1.
[0045] Based on the aforementioned description of the relay state under test, different circuit signals and voltage values can be detected on the detection resistor R1 according to the different open and closed states of the relay under test. The MCU can then determine the open and closed state of the relay under test based on the circuit signals received by the ADC pin, thereby realizing relay detection.
[0046] In the above embodiments, the relay detection circuit includes an isolation detection circuit, a detection signal triggering circuit, and a detection controller. The isolation detection circuit connects the relay under test and the detection signal triggering circuit, which in turn connects to the detection controller. The detection controller outputs a detection signal to the detection signal triggering circuit, which receives circuit signals. The isolation detection circuit feeds back the corresponding circuit signal based on the open / closed state of the relay under test to the detection signal triggering circuit. The detection controller determines the open / closed state of the relay under test based on the circuit signal. By setting the isolation detection circuit to perform relay diagnosis independently of the circuit containing the relay under test, high-voltage surges from the circuit containing the relay under test to the detection element can be avoided, ensuring the safety of electrical isolation during the relay testing process.
[0047] Based on the same technical concept, this application also provides a relay detection method, which can be applied to the relay detection circuits described in the various embodiments of this application. Figure 1 Taking the detection controller 150 in the middle as an example, the explanation is as follows: Figure 3 As shown, the process includes steps 202 to 206.
[0048] Step 202: Send a detection signal to the detection signal trigger circuit.
[0049] The detection signal trigger circuit is connected to the relay under test through an isolation detection circuit, and the detection signal is used to detect the open / closed state of the relay under test. For example... Figure 2As shown, the detection signal is the PWM signal output by the detection controller, specifically a square wave signal with a certain frequency and a duty cycle of 50%.
[0050] Specifically, the detection controller outputs a square wave signal as a detection signal via a PWM pin. This detection signal is transmitted to the detection signal trigger circuit, which is the control terminal of the trigger switch Q1, used to control the periodic on and off of the trigger switch Q1. When the trigger switch Q1 is on, a path is formed between the low-voltage safety power supply, the primary winding of the isolation transformer T1, the trigger switch Q1, and the detection resistor R1, allowing current to flow through the primary winding of the isolation transformer T1. When the trigger switch Q1 is off, this path is broken. This generates an alternating current excitation in the primary winding of the isolation transformer T1. The frequency and duty cycle of this excitation signal can be adjusted according to actual needs to ensure sufficient energy transfer and detection sensitivity.
[0051] Step 204: Obtain circuit signals.
[0052] The circuit signal is obtained based on the feedback of the open / closed state of the relay under test. In this embodiment, it refers to... Figure 2 The voltage signal generated across the detection resistor R1 is proportional to the current flowing through the primary winding of the isolation transformer T1.
[0053] Specifically, such as Figure 2 As shown, when the relay under test is closed, the electrical energy in the primary winding of the isolation transformer T1 is transferred to the secondary winding, passes through the rectifier diode D1 and the relay under test, and returns to the secondary winding of the isolation transformer T1, forming a loop. This is equivalent to the secondary winding of the isolation transformer T1 being short-circuited (ignoring the forward voltage drop of the rectifier diode D1). The equivalent impedance reflected to the primary winding is extremely low, resulting in a large primary current and a high voltage across the sensing resistor R1. When the relay under test is open, the secondary winding of the isolation transformer T1 is open-circuited, and the equivalent impedance reflected to the primary winding is high, resulting in a very small primary current. In summary, the primary current can provide feedback on the open / closed state of the relay under test, and the voltage signal across the sensing resistor R1 is related to the primary current. Therefore, the detection controller can obtain the circuit signal to determine the primary current of the isolation transformer T1, thereby facilitating the determination of the open / closed state of the relay under test.
[0054] Step 206: Compare the circuit signal with the preset circuit parameter threshold, and determine the open / closed state of the relay under test based on the comparison result.
[0055] Specifically, based on the parameters of the relay under test and the electronic components in the relay detection circuit, the detection controller stores a preset threshold as the basis for determining the open and closed state of the relay under test. This threshold is a preset circuit parameter threshold, which can be calibrated through actual experimental data, calculated through simulation operation, or determined by other methods, and is used to distinguish between the closed and open states of the relay under test. By comparing the circuit signal with the preset circuit parameter threshold, the open and closed state of the relay under test can be determined.
[0056] Furthermore, in one embodiment, step 206 includes steps 302 and 304.
[0057] Step 302: If the voltage of the circuit signal is greater than or equal to the preset circuit parameter threshold, determine that the relay under test is closed.
[0058] by Figure 2 For example, when the relay under test is closed, the electrical energy in the primary winding of the isolation transformer T1 is transferred to the secondary winding, passes through the rectifier diode D1 and the relay under test, and returns to the secondary winding of the isolation transformer T1, forming a loop. This is equivalent to the secondary winding of the isolation transformer T1 being short-circuited, resulting in extremely low equivalent impedance reflected to the primary winding. Therefore, the primary current is large, and the voltage across the sensing resistor R1 is high. At this time, the voltage of the circuit signal is greater than or equal to the preset circuit parameter threshold. Based on this, it can be determined that the relay under test is in a closed state.
[0059] Step 304: If the voltage of the circuit signal is less than the preset circuit parameter threshold, determine that the relay under test is disconnected.
[0060] by Figure 2 For example, when the relay under test is disconnected, the secondary side of the isolation transformer T1 is open-circuited, and the equivalent impedance reflected to the primary side is high. Therefore, the primary current is very small, and the voltage across the sensing resistor R1 is low. At this time, the voltage of the circuit signal is less than the preset circuit parameter threshold, based on which it can be determined that the relay under test is in an open state.
[0061] In this embodiment, the relay state is determined by detecting the primary current of the isolation transformer (equivalent to the voltage of the detection resistor) as a circuit signal, based on the significant changes in the circuit signal under different states of the relay under test. The logic is simple and reliable, the method is easy to implement, the control logic is simple, and the circuit structure is simple. This helps to reduce costs and miniaturize the relay detection circuit, and also ensures the electrical insulation of the relay detection circuit, thereby improving the safety of the detection process.
[0062] In one embodiment, such as Figure 2As shown, the detection signal trigger circuit 130 also includes a filter circuit 131, which is connected to the first end of the detection resistor R1, the output end of the trigger switch Q1, and the detection controller 150.
[0063] Specifically, the filtering circuit is used to filter the circuit signal acquired by the detection controller, removing interference signals and making the obtained circuit signal more accurate. Optionally, the filtering circuit can be an L-type filtering circuit, an LC-type filtering circuit, an RC-type filtering circuit, or an LCL-type filtering circuit, or other types of filtering circuits. This application does not limit the scope of the application and will not list them further.
[0064] For example, in one embodiment, the filter circuit is a low-pass filter, including a resistor and a capacitor, forming an RC filter circuit. Specifically, as shown... Figure 2 As shown, the filter circuit 131 includes a filter resistor R2 and a filter capacitor C1. The filter resistor R2 is connected to the first end of the detection resistor R1, the output end of the trigger switch Q1, the detection controller 150, and the first end of the filter capacitor C1. The second end of the filter capacitor C1 is grounded.
[0065] Based on the foregoing description and the same technical concept, this application also provides an electric vehicle, which includes a power circuit and a relay detection circuit as described in the above embodiments. The relay detection circuit is connected to the relay under test in the power circuit, and the open / closed state of the relay under test is detected based on the relay detection method described in the above embodiments. The relay detection circuit and relay detection method have been described in detail in the above embodiments and will not be repeated here.
[0066] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0067] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0068] Based on the same inventive concept, this application also provides a relay detection device for implementing the relay detection method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more relay detection device embodiments provided below can be found in the limitations of the relay detection method described above, and will not be repeated here.
[0069] In one embodiment, a relay detection device is provided, comprising: an output module, an input module, and a processing module, wherein: The output module is used to send a detection signal to the detection signal triggering circuit. The detection signal triggering circuit is connected to the relay under test through an isolation detection circuit, and the detection signal is used to detect the open and closed state of the relay under test.
[0070] The input module is used to acquire circuit signals; the circuit signals are obtained based on the feedback of the open and closed state of the relay under test.
[0071] The arithmetic module is used to compare the circuit signal with the preset circuit parameter threshold and determine the opening and closing state of the relay under test based on the comparison result.
[0072] Each module in the aforementioned relay detection device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0073] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 4As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a relay detection method. The display unit is used to form a visually visible image and can be a display screen, projection device, or virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0074] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0075] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0076] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0077] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0078] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0079] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0080] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A relay detection circuit, characterized in that, The relay detection circuit includes an isolation detection circuit, a detection signal triggering circuit, and a detection controller. The isolation detection circuit is connected to the relay under test and the detection signal triggering circuit, and the detection signal triggering circuit is connected to the detection controller. The isolation detection circuit feeds back a corresponding circuit signal to the detection signal triggering circuit based on the open / closed state of the relay under test. The detection controller outputs a detection signal to the detection signal triggering circuit, receives the circuit signal through the detection signal triggering circuit, and determines the open / closed state of the relay under test based on the circuit signal.
2. The relay detection circuit according to claim 1, characterized in that, The isolation detection circuit includes an isolation transformer, the primary side of which is connected to the detection signal trigger circuit, and the secondary side of which is connected to the relay under test.
3. The relay detection circuit according to claim 2, characterized in that, The isolation detection circuit also includes a rectifier diode, which is connected to the secondary side of the isolation transformer and the relay under test.
4. The relay detection circuit according to claim 1, characterized in that, The detection signal triggering circuit includes a trigger switch and a detection resistor. The input terminal of the trigger switch is connected to the isolation detection circuit, the control terminal of the trigger switch is connected to the detection controller, the output terminal of the trigger switch is connected to the first terminal of the detection resistor and the detection controller, and the second terminal of the detection resistor is grounded.
5. The relay detection circuit according to claim 4, characterized in that, The detection signal triggering circuit further includes a filtering circuit, which is connected to the first end of the detection resistor, the output end of the trigger switch, and the detection controller.
6. The relay detection circuit according to claim 5, characterized in that, The filtering circuit includes a filtering resistor and a filtering capacitor. The filtering resistor is connected to the first end of the detection resistor, the output end of the trigger switch, the detection controller, and the first end of the filtering capacitor. The second end of the filtering capacitor is grounded.
7. The relay detection circuit according to any one of claims 1-6, characterized in that, The relay detection circuit also includes a safety power supply, which is connected to the isolation detection circuit.
8. A relay detection method, applied to the relay detection circuit according to any one of claims 1-7, characterized in that, The method includes: A detection signal is sent to a detection signal triggering circuit; the detection signal triggering circuit is connected to the relay under test through an isolation detection circuit, and the detection signal is used to detect the open and closed state of the relay under test. Acquire circuit signals; the circuit signals are obtained based on feedback of the open / closed state of the relay under test; The circuit signal is compared with a preset circuit parameter threshold, and the open / closed state of the relay under test is determined based on the comparison result.
9. The relay detection method according to claim 8, characterized in that, The step of comparing the circuit signal with a preset circuit parameter threshold and determining the open / closed state of the relay under test based on the comparison result includes: If the voltage of the circuit signal is greater than or equal to the preset circuit parameter threshold, the relay under test is determined to be closed. If the voltage of the circuit signal is less than the preset circuit parameter threshold, the relay under test is determined to be disconnected.
10. An electric vehicle, characterized in that, The electric vehicle includes a power circuit and a relay detection circuit as described in any one of claims 1-7. The relay detection circuit is connected to the relay under test in the power circuit and detects the open / closed state of the relay under test based on the relay detection method described in claim 8 or 9.