Relay control circuit
Patent Information
- Application Number
- CN202311693249.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-11
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-12-11
AI Technical Summary
在继电器控制时,刚开始一段时间采用高电平(比如,12V 500ms)控制继电器吸合,等继电器吸合之后,再用PWM(比如,27kHz 50%占空比)方式来维持继电器的吸合状态,这样即能够保证继电器正常吸合,也可以减少继电器的驱动线圈发热;但是,在PWM维持状态下,一旦继电器因异常原因导致断开,此时继电器不能够重新吸合,从而,导致事故发生
[0022] The relay control circuit of this invention includes: a power supply, a first resistor, a relay, a first driving circuit, a second driving circuit, and an MCU; the power supply is connected to one end of the first resistor, and the other end of the first resistor is connected to the relay; the relay is connected to one end of the first driving circuit and one end of the second driving circuit; the MCU is connected to the other end of the first driving circuit and the other end of the second driving circuit; wherein, the first driving circuit is used to drive the relay to start, so that the relay works normally; the second driving circuit is used to drive the relay to restart when the relay malfunctions; when the relay malfunctions, the second driving circuit drives the relay to restore the relay to normal working state, improving the fault tolerance of the relay control circuit. Even if the relay fails, the second driving circuit can still enable the relay to work normally, ensuring the stable operation of the relay control circuit and realizing the re-engagement of the relay in abnormal states.
Smart Images

Figure CN117810025B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of control circuit technology, and in particular to a relay control circuit. Background Technology
[0002] Relays are commonly used devices in control systems to control various loads, offering simplicity and reliability. In relay control, a high-level pulse (e.g., 12V 500ms) is initially used to activate the relay. Once activated, PWM (e.g., 27kHz 50% duty cycle) is used to maintain the relay's engagement. This ensures proper relay activation while reducing heat generation in the relay's drive coil. However, if the relay disconnects due to an abnormality while in PWM mode, it cannot re-activate, potentially leading to an accident. Therefore, ensuring the relay can re-activate even under abnormal conditions is a crucial problem to solve. Summary of the Invention
[0003] This invention provides a relay control circuit that enables the relay to re-engage in an abnormal state.
[0004] In a first aspect, embodiments of the present invention provide a relay control circuit, the relay control circuit comprising: a power supply, a first resistor, a relay, a first driving circuit, a second driving circuit, and an MCU;
[0005] The power supply is connected to one end of the first resistor, and the other end of the first resistor is connected to the relay.
[0006] The relays are respectively connected to one end of the first driving circuit and one end of the second driving circuit;
[0007] The MCU is connected to the other end of the first driving circuit and the other end of the second driving circuit, respectively.
[0008] The first driving circuit is used to drive the relay to start so that the relay can work normally;
[0009] The second drive circuit is used to drive the relay to restart when the relay malfunctions.
[0010] Optionally, the first driving circuit includes a second resistor and a first transistor; the second driving circuit includes a first diode, a first capacitor, a second capacitor, a second transistor, and a third resistor.
[0011] In the first driving circuit, one end of the second resistor is connected to the MCU as the other end of the first driving circuit; the other end of the second resistor is connected to the base of the first transistor; the collector of the first transistor is connected to the relay as one end of the first driving circuit; and the emitter of the first transistor is grounded.
[0012] In the second driving circuit, the positive terminal of the first diode is connected to the MCU as the other end of the second driving circuit; the negative terminal of the first diode is connected to one end of the third resistor and one end of the first capacitor respectively; the other end of the third resistor is connected to one end of the second capacitor and the base of the second transistor respectively; the collector of the second transistor is connected to the relay as one end of the second driving circuit; the other end of the first capacitor, the other end of the second capacitor, and the emitter of the second transistor are all grounded.
[0013] Optionally, the relay includes: a drive coil, a main contact, and an auxiliary contact; wherein, the other end of the first resistor is connected to one end of the drive coil; one end of the first drive circuit is connected to the other end of the drive coil and one end of the auxiliary contact; the other end of the auxiliary contact is connected to one end of the second drive circuit; and the main contact is connected to an external load.
[0014] Optionally, when driving the relay to restart, the second driving circuit is specifically used to: receive a PWM driving signal issued by the MCU when the MCU detects that the relay is malfunctioning; and drive the relay to restart, specifically by: driving the auxiliary contact to work normally, and driving the main contact to move together through the auxiliary contact, so that the relay returns to normal.
[0015] Optionally, the relay control circuit further includes: a third transistor, a fourth transistor, a fourth resistor, and a fifth resistor; one end of the fourth resistor is connected to the power supply and the emitter of the fourth transistor, and the other end of the fourth resistor is connected to the base of the fourth transistor and the collector of the second transistor; the collector of the fourth transistor is connected to one end of the auxiliary contact; the emitter of the third transistor is connected to the power supply, the base of the third transistor is connected to the other end of the first resistor, and the collector of the third transistor is connected to one end of the fifth resistor and one end of the auxiliary contact; the other end of the fifth resistor is connected to one end of the drive coil.
[0016] Optionally, the first transistor and the second transistor are both NPN transistors; the third transistor and the fourth transistor are both PNP transistors.
[0017] Optionally, the relay control circuit further includes: a second diode and the fourth resistor; the positive terminal of the second diode is connected to the other end of the auxiliary contact, the MCU, and the collector of the second transistor, respectively, and the negative terminal of the second diode is connected to the other end of the fourth resistor.
[0018] Optionally, the relay control circuit further includes: a sixth resistor; one end of the sixth resistor is connected to the collector of the fourth transistor, and the other end of the sixth resistor is connected to the MCU and one end of the auxiliary contact, respectively.
[0019] Optionally, the relay control circuit further includes: the MCU connected to the other end of the auxiliary contact; the MCU sampling the voltage across the auxiliary contact to obtain a sampling signal; and the sampling signal used to determine whether the relay is working normally or abnormally.
[0020] Optionally, the relay is a normally closed relay or a normally open relay.
[0021] It can be seen that the embodiments of the present invention have the following beneficial effects:
[0022] The relay control circuit of this invention includes: a power supply, a first resistor, a relay, a first driving circuit, a second driving circuit, and an MCU; the power supply is connected to one end of the first resistor, and the other end of the first resistor is connected to the relay; the relay is connected to one end of the first driving circuit and one end of the second driving circuit; the MCU is connected to the other end of the first driving circuit and the other end of the second driving circuit; wherein, the first driving circuit is used to drive the relay to start, so that the relay works normally; the second driving circuit is used to drive the relay to restart when the relay malfunctions; when the relay malfunctions, the second driving circuit drives the relay to restore the relay to normal working state, improving the fault tolerance of the relay control circuit. Even if the relay fails, the second driving circuit can still enable the relay to work normally, ensuring the stable operation of the relay control circuit and realizing the re-engagement of the relay in abnormal states. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the background art, the accompanying drawings used in the embodiments of the present invention or the background art will be described below.
[0024] Figure 1 This is a circuit block diagram of a relay control circuit provided in an embodiment of this application;
[0025] Figure 2This is a schematic diagram of the structure of a relay control circuit provided in an embodiment of this application;
[0026] Figure 3 This is a schematic diagram of another relay control circuit provided in an embodiment of this application;
[0027] Figure 4 This is a schematic diagram of another relay control circuit provided in an embodiment of this application;
[0028] Figure 5 This is a schematic diagram of another relay control circuit provided in an embodiment of this application;
[0029] Figure 6 This is a circuit block diagram of another relay control circuit provided in an embodiment of this application;
[0030] Figure 7 This is a schematic diagram of another relay control circuit provided in an embodiment of this application;
[0031] Figure 8 This is a schematic diagram of another relay control circuit provided in an embodiment of this application;
[0032] Figure 9 This is a schematic diagram of another relay control circuit provided in an embodiment of this application;
[0033] Figure 10 This is a schematic diagram of another relay control circuit provided in an embodiment of this application. Detailed Implementation
[0034] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0035] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0036] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0037] Definitions:
[0038] MCU: Microcontroller Unit, commonly known as a single-chip microcomputer, can be considered a scaled-down version of a CPU. It reduces the CPU's frequency and specifications and integrates RAM, ROM, clock, A / D conversion, timer / counter, UART, DMA and other circuit units, and even USB interface and LCD driver circuits, into a single chip, forming a chip-level computer that provides combined control for various applications.
[0039] Please see Figure 1 , Figure 1 This is a circuit block diagram of a relay control circuit provided in an embodiment of this application. The relay control circuit 100 includes: a power supply 101, a first resistor 102, a relay 103, a first drive circuit 104, a second drive circuit 105, and an MCU 106.
[0040] In this embodiment, the power supply 101 is connected to one end of the first resistor 102, and the other end of the first resistor 102 is connected to the relay 103; the relay 103 is connected to one end of the first driving circuit 104 and one end of the second driving circuit 105; the MCU 106 is connected to the other end of the first driving circuit 104 and the other end of the second driving circuit 105; wherein, the first driving circuit 104 is used to drive the relay 103 to start so that the relay 103 works normally; the second driving circuit 105 is used to drive the relay 103 to restart when the relay 103 malfunctions.
[0041] In specific implementation, when the relay control circuit 100 is first started, the power supply 101 outputs a high level to the drive coil of the relay 103. After receiving the high level, the drive coil of the relay 103 generates a magnetic field, causing the relay 103 to be energized. Once the relay 103 is successfully energized, an electromotive force is generated due to the self-induction of the drive coil, which will hinder the increase of the current in the drive coil, thereby prolonging the energization time. To avoid this situation and reduce the heating of the drive coil, the MCU 106 can output a PWM (Pulse Width Modulation) drive signal to maintain the current of the drive coil of the relay 103. Specifically, the MCU 106 outputs a PWM drive signal to the first drive circuit 104, which transmits the PWM drive signal to the relay 103 to maintain the current of the drive coil of the relay 103. PWM can adjust the average voltage by changing the pulse width, thereby adjusting the current. This not only maintains the energized state of the relay 103, but also effectively reduces the heating of the drive coil of the relay 103.
[0042] Next, after the relay 103 is successfully engaged, as the working time of the relay 103 increases, sometimes due to incorrect control logic, driving voltage fluctuations, circuit vibrations, etc., the relay 103 may malfunction, that is, the relay 103 may fail to engage or disconnect after engaging. At this time, the relay control circuit 100 can drive the relay 103 to restart through the second drive circuit 105, so that the relay 103 can be engaged again.
[0043] Optionally, the relay 103 includes: a drive coil, a main contact, and an auxiliary contact; wherein, the other end of the first resistor 102 is connected to one end of the drive coil; one end of the first drive circuit 104 is connected to the other end of the drive coil and one end of the auxiliary contact respectively; the other end of the auxiliary contact is connected to one end of the second drive circuit 105; and the main contact is connected to an external load.
[0044] It should be explained that the drive coil is the input part of relay 103. It receives external control signals (such as voltage or current). When the control signal reaches a certain value, the drive coil generates a magnetic field, magnetizing the iron core inside relay 103. The drive coil usually needs to be connected to power supply 101 to provide the electrical energy required for relay 103 to operate.
[0045] The main contacts are the output part of relay 103, responsible for controlling the switching of the external load. When the magnetic field generated by the drive coil magnetizes the iron core inside relay 103, the iron core attracts the armature, causing the moving contact to contact the stationary contact, i.e., the main contacts close (open), thus connecting (disconnecting) the circuit containing the external load. When the drive coil loses its magnetic field, the iron core no longer attracts the armature, and the moving contact disconnects (makes contact) with the stationary contact, thus disconnecting (connecting) the circuit containing the external load. The opening and closing of the main contacts enables the switching control of the circuit.
[0046] The auxiliary contact is another output part of the relay 103, which is typically used to implement the logic control of the circuit. The auxiliary contact can operate simultaneously with the main contact or independently; in this embodiment, they operate simultaneously.
[0047] Optionally, the relay 103 is a normally closed relay or a normally open relay.
[0048] When the relay is a normally closed relay, please refer to Figure 2 , Figure 2 This is a schematic diagram of the structure of a relay control circuit 100 provided in an embodiment of this application. Figure 2 The relay control circuit 100 shown is a scheme utilizing a normally closed relay. The following will discuss... Figure 2 Explanation of the circuit shown:
[0049] Optionally, the first driving circuit includes a second resistor R2 and a first transistor Q1; the second driving circuit includes a first diode D1, a first capacitor C1, a second capacitor C2, a second transistor Q2, and a third resistor R3; in the first driving circuit, one end of the second resistor R2 serves as the other end of the first driving circuit and is connected to the MCU; the other end of the second resistor R2 is connected to the base of the first transistor Q1; the collector of the first transistor Q1 serves as one end of the first driving circuit and is connected to the relay; the emitter of the first transistor Q1 is grounded; in the second driving circuit, the anode of the first diode D1 serves as the other end of the second driving circuit and is connected to the MCU; the cathode of the first diode D1 is connected to one end of the third resistor R3 and one end of the first capacitor C1; the other end of the third resistor R3 is connected to one end of the second capacitor C2 and the base of the second transistor Q2; the collector of the second transistor Q2 serves as one end of the second driving circuit and is connected to the relay; the other ends of the first capacitor C1, the other ends of the second capacitor C2, and the emitter of the second transistor Q2 are all grounded.
[0050] Optionally, when driving the relay to restart, the second driving circuit is specifically used to: receive a PWM driving signal issued by the MCU when the MCU detects that the relay is malfunctioning; and drive the relay to restart, specifically by: driving the auxiliary contact to work normally, and driving the main contact to move together through the auxiliary contact, so that the relay returns to normal.
[0051] In a specific embodiment, when the relay is started for the first time, the power supply V0 supplies power to the first drive circuit to start the relay. After the relay is started, the first drive circuit maintains the relay drive coil current through the PWM (pulse width modulation) drive signal issued by the MCU to ensure the normal operation of the relay, that is, the PWM maintenance state.
[0052] When the relay is working normally, the main contacts of the normally closed relay are open. Since the auxiliary contacts are in the same state as the main contacts, they are also open. The opening of the auxiliary contacts causes the collector of the second transistor Q2 in the second drive circuit to be disconnected from the relay, and the second drive circuit is in an open circuit state and does not work. After the relay is working normally, PWM (e.g., 27kHz 50% duty cycle) is used to maintain the relay's working state. This can ensure that the relay works normally and reduce the heating of the relay drive coil. However, the disadvantage of this is that the relay cannot be restarted when it malfunctions, which may lead to accidents.
[0053] When the relay malfunctions, the first drive circuit is in PWM maintenance mode and cannot restart the relay. The main contacts of the normally closed relay are closed, and since the auxiliary contacts are in the same state as the main contacts, they are also closed. This means that the connection between the second drive circuit and the relay is not broken and it can work normally. Then, the MCU sends a PWM drive signal, which is input to the second drive circuit. The PWM drive signal is rectified and filtered by the first diode D1, the first capacitor C1, and the second capacitor C2 to obtain a high-level signal. Furthermore, this high-level signal is transmitted to the relay drive coil through the second transistor Q2. The drive coil generates magnetic force to restart the relay. After the relay is disconnected, the second drive circuit stops working.
[0054] When the relay is a normally open relay, please refer to Figure 3 , Figure 3 This is a schematic diagram of the structure of a relay control circuit 100 provided in an embodiment of this application. Figure 3 The relay control circuit 100 described above is a scheme utilizing a normally open relay. The following will discuss... Figure 3 Explanation of the circuit shown:
[0055] Optionally, the first driving circuit includes a second resistor R2 and a first transistor Q1; the second driving circuit includes a first diode D1, a first capacitor C1, a second capacitor C2, a second transistor Q2, and a third resistor R3; one end of the auxiliary contact of the relay is grounded; in the first driving circuit, one end of the second resistor R2 serves as the other end of the first driving circuit and is connected to the MCU; the other end of the second resistor R2 is connected to the base of the first transistor Q1; the collector of the first transistor Q1 serves as one end of the first driving circuit and is connected to the other end of the driving coil of the relay; the emitter of the first transistor Q1 is grounded; in the second driving circuit, the first diode D1... The positive terminal of diode D1 is connected to the MCU as the other end of the second driving circuit; the negative terminal of the first diode D1 is connected to one end of the third resistor R3 and one end of the first capacitor C1; the other end of the third resistor R3 is connected to one end of the second capacitor C2 and the base of the second transistor Q2, and the other end of the third resistor R3 also serves as one end of the second driving circuit and the other end of the auxiliary contact of the relay; the collector of the second transistor Q2 is connected to the other end of the driving coil of the relay and the collector of the first transistor Q1; the other ends of the first capacitor C1, the other ends of the second capacitor C2, and the emitter of the second transistor Q2 are all grounded. When driving the relay to restart, the second driving circuit is specifically used to: receive a PWM driving signal from the MCU when the MCU detects an abnormal operation of the relay; and drive the relay to restart, specifically by: driving the auxiliary contact to work normally, thereby causing the main contact to move together, so that the relay returns to normal operation.
[0056] In a specific embodiment, when the relay is started for the first time, the power supply V0 supplies power to the first drive circuit to start the relay. After the relay is started, the first drive circuit maintains the relay drive coil current through the PWM (pulse width modulation) drive signal issued by the MCU to ensure the normal operation of the relay, that is, the PWM maintenance state.
[0057] When the relay is working normally, the main contacts of the normally open relay are closed. Since the auxiliary contacts are in the same state as the main contacts, they are also closed. The closure of the auxiliary contacts directly grounds the other end of the third resistor R3 in the second drive circuit. The current through the second drive circuit flows directly to the grounded side, effectively disconnecting the relay's drive coil from the third resistor R3. At this time, the second drive circuit has no effect on the relay. After the relay is working normally, PWM (e.g., 27kHz 50% duty cycle) is used to maintain the relay's operating state. This ensures normal relay operation and reduces heat generation in the relay's drive coil. However, the drawback of this approach is that the relay cannot be restarted in case of malfunction, potentially leading to accidents.
[0058] When the relay malfunctions, the first drive circuit is in PWM maintenance mode and cannot restart the relay. The main contacts of the normally open relay are open, and since the auxiliary contacts are in the same state as the main contacts, they are also open. In other words, the other end of the third resistor R3 in the second drive circuit is not grounded, and the second drive circuit is connected to the relay, which can affect the relay. Specifically, when the relay malfunctions, the MCU sends a PWM drive signal, which is input to the second drive circuit. The PWM drive signal is rectified and filtered by the first diode D1, the first capacitor C1, and the second capacitor C2 to obtain a high-level signal. Furthermore, this high-level signal is transmitted to the relay drive coil through the second transistor Q2. The drive coil generates magnetic force to restart the relay. After the relay closes, the second drive circuit stops working.
[0059] Optional, please see Figure 4 , Figure 4 This is a schematic diagram of another relay control circuit 100 provided in an embodiment of this application. Figure 4 Is Figure 2 Based on this, it is further obtained that the internal connections of the first driving circuit and the second driving circuit remain unchanged, while the connections between the first driving circuit, the second driving circuit, and other components change; in Figure 2 Based on this, the relay control circuit 100 further includes: a third transistor Q3, a fourth transistor Q4, a fourth resistor R4, and a fifth resistor R5;
[0060] One end of the fourth resistor R4 is connected to the power supply V0, the emitter of the fourth transistor Q4, and one end of the first resistor R1, respectively. The other end of the fourth resistor R4 is connected to the base of the fourth transistor Q4 and the collector of the second transistor Q2, respectively. The collector of the fourth transistor Q4 is connected to one end of the auxiliary contact.
[0061] The emitter of the third transistor Q3 is connected to the power supply V0, the base of the third transistor Q3 is connected to the other end of the first resistor R1, and the collector of the third transistor Q3 is connected to one end of the fifth resistor R5 and the other end of the auxiliary contact; the other end of the fifth resistor R5 is connected to one end of the drive coil.
[0062] The emitter of the first transistor Q1 is connected to the other end of the relay drive coil as one end of the first drive circuit, and one end of the second resistor R2 is connected to the MCU as the other end of the first drive circuit.
[0063] The collector of the second transistor Q2 is connected as one end of the second driving circuit to the other end of the fourth resistor R4 and the base of the fourth transistor Q4.
[0064] Optionally, the first transistor Q1 and the second transistor Q2 are both NPN transistors; the third transistor Q3 and the fourth transistor Q4 are both PNP transistors.
[0065] In a specific embodiment, when the relay is started for the first time, the power supply V0 supplies power to the first drive circuit to start the relay. After the relay is started, the first drive circuit maintains the relay drive coil current through the PWM (pulse width modulation) drive signal issued by the MCU to ensure the normal operation of the relay, that is, the PWM maintenance state.
[0066] When the relay is working normally, power supply V0 supplies power to the relay control circuit 100. The current passes through the third transistor Q3 and the fifth resistor R5, and is finally transmitted to the relay's drive coil. The drive coil generates magnetic force to start the relay and enable normal operation. The main contacts of the normally closed relay are open, and since the auxiliary contacts are in the same state as the main contacts, they are also open. The opening of the auxiliary contacts causes the circuit between the collector of the fourth transistor Q4 and the drive coil to be broken. The current in the second drive circuit cannot be input to the drive coil, and the second drive circuit is in an open circuit state and does not work. After the relay is working normally, PWM (e.g., 27kHz 50% duty cycle) is used to maintain the relay's working state. This ensures that the relay works normally and reduces the heat generated by the relay's drive coil. However, the disadvantage of this approach is that the relay cannot be restarted when it malfunctions, which could lead to accidents.
[0067] When the relay malfunctions, the first drive circuit is in PWM maintenance mode and cannot restart the relay. The main contacts of the normally closed relay are closed, and since the auxiliary contacts are in the same state as the main contacts, they are also closed. This means that the connection between the second drive circuit and the relay is not broken and it can work normally. Then, the MCU sends a PWM drive signal, which is input to the second drive circuit. The PWM drive signal is rectified and filtered by the first diode D1, the first capacitor C1, and the second capacitor C2 to obtain a high-level signal. Further, this high-level signal passes through the second transistor Q2, the fourth transistor Q4, the auxiliary contacts, and the fifth resistor R5 in sequence, and is finally transmitted to the drive coil of the relay. The drive coil generates magnetic force to restart the relay. After the relay is disconnected, the second drive circuit stops working.
[0068] Optional, please see Figure 5 , Figure 5 This is a schematic diagram of another relay control circuit 100 provided in an embodiment of this application. Figure 5 Is Figure 3 Based on this, it is further obtained that the internal connections of the first driving circuit and the second driving circuit remain unchanged, while the connections between the first driving circuit, the second driving circuit, and other components change; in Figure 3 Based on this, the relay control circuit 100 further includes: a third transistor Q3 and a fifth resistor R5;
[0069] The emitter of the third transistor Q3 is connected to the power supply V0, and the base of the third transistor Q3 is connected to the other end of the first resistor R1 and the collector of the first transistor Q1. The collector of the third transistor Q3 is connected to one end of the fifth resistor R5, and the other end of the fifth resistor R5 is connected to one end of the drive coil of the relay. The other end of the drive coil of the relay is grounded.
[0070] The collector of the first transistor Q1 is connected as one end of the first driving circuit to the base of the third transistor Q3 and the other end of the first resistor R1; the collector of the second transistor Q2 is connected to the collector of the first transistor Q1, the base of the third transistor Q3, and the other end of the first resistor R1; the other end of the third resistor R3 is connected as one end of the second driving circuit to the other end of the auxiliary contact.
[0071] In a specific embodiment, when the relay is started for the first time, the power supply V0 supplies power to the first drive circuit to start the relay. After the relay is started, the first drive circuit maintains the relay drive coil current through the PWM (pulse width modulation) drive signal issued by the MCU to ensure the normal operation of the relay, that is, the PWM maintenance state.
[0072] When the relay is working normally, the main contacts of the normally open relay are closed. Since the auxiliary contacts are in the same state as the main contacts, they are also closed. The closure of the auxiliary contacts directly grounds the other end of the third resistor R3 in the second drive circuit. The current through the second drive circuit flows directly to the grounded side, effectively disconnecting the relay's drive coil from the third resistor R3. At this time, the second drive circuit has no effect on the relay. After the relay is working normally, PWM (e.g., 27kHz 50% duty cycle) is used to maintain the relay's operating state. This ensures normal relay operation and reduces heat generation in the relay's drive coil. However, the drawback of this approach is that the relay cannot be restarted in case of malfunction, potentially leading to accidents.
[0073] When the relay malfunctions, the first drive circuit is in PWM maintenance mode and cannot restart the relay. The main contacts of the normally open relay are open, and since the auxiliary contacts are in the same state as the main contacts, they are also open. In other words, the other end of the third resistor R3 in the second drive circuit is not grounded, and the second drive circuit is connected to the relay, which can affect the relay. Specifically, when the relay malfunctions, the MCU sends a PWM drive signal, which is input to the second drive circuit. The PWM drive signal is rectified and filtered by the first diode D1, the first capacitor C1, and the second capacitor C2 to obtain a high-level signal. Further, this high-level signal passes through the second transistor Q2, the third transistor Q3, and the fifth resistor R5 in sequence, and is finally transmitted to the drive coil of the relay. The drive coil generates magnetic force to restart the relay. After the relay closes, the second drive circuit stops working.
[0074] Optional, please see Figure 6 , Figure 6 This is a schematic diagram of another relay control circuit 100 provided in an embodiment of this application. Figure 6The relay control circuit 100 shown includes: a power supply 101, a first resistor 102, a relay 103, a first drive circuit 104, a second drive circuit 105, and an MCU 106. The power supply 101 is connected to one end of the first resistor 102, and the other end of the first resistor 102 is connected to the relay 103. The relay 103 is connected to one end of the first drive circuit 104 and three ports of the second drive circuit 105. The MCU 106 is connected to the other end of the first drive circuit 104 and one end of the second drive circuit 105. The first drive circuit 104 is used to drive the relay 103 to start, so that the relay 103 can work normally. The second drive circuit 105 is used to drive the relay 103 to restart when the relay 103 malfunctions.
[0075] In a specific embodiment, the relay 103 includes a drive coil, a main contact, and an auxiliary contact; wherein, the other end of the first resistor 102 is connected to one end of the drive coil; one end of the first drive circuit 104 is connected to one end of the drive coil and one end of the second drive circuit 105 respectively; the second drive circuit 105 is connected to both ends of the auxiliary contact respectively; the MCU 106 is connected to one end of the first drive circuit 104 and one end of the second drive circuit 105 respectively; the main contact is connected to an external load; and the MCU 106 is also connected to the auxiliary contact. Specifically, when the relay control circuit 100 is first started, the power supply 101 outputs a high level to the drive coil of the relay 103. After receiving the high level, the drive coil of the relay 103 generates a magnetic field, causing the relay 103 to be energized. Once the relay 103 is successfully energized, an electromotive force is generated due to the self-induction of the drive coil, which will hinder the increase of current in the drive coil, thereby prolonging the energization time. In order to avoid this situation and reduce the heat generation of the drive coil, the MCU 106 can output a PWM (pulse width modulation) drive signal to maintain the current of the drive coil of the relay 103. This not only maintains the energized state of the relay 103, but also effectively reduces the heat generation of the drive coil of the relay 103.
[0076] Next, after the relay 103 is successfully engaged, as the working time of the relay 103 increases, sometimes due to incorrect control logic, driving voltage fluctuations, circuit vibrations, etc., the relay 103 may malfunction, that is, the relay 103 may fail to engage or disconnect after engaging. At this time, the relay control circuit 100 can drive the relay 103 to restart through the second drive circuit 105, so that the relay 103 can be engaged again.
[0077] Optional, please see Figure 7 , Figure 7 This is a schematic diagram of another relay control circuit 100 provided in an embodiment of this application. Figure 7 Is Figure 2 Based on this, it is further obtained that the internal connections of the first driving circuit and the second driving circuit remain unchanged, while the connections between the first driving circuit, the second driving circuit, and other components change; in Figure 2 Based on this, the relay control circuit 100 further includes: a fourth resistor R4 and a second diode D2; one end of the fourth resistor R4 is connected to the power supply V0, the other end of the fourth resistor R4 is connected to the negative terminal of the second diode D2, and the positive terminal of the second diode D2 is connected to the other end of the auxiliary contact; the MCU is connected to the other end of the auxiliary contact; the voltage across the auxiliary contact is sampled by the MCU to obtain a sampling signal; the sampling signal is used to determine whether the relay is working normally or abnormally.
[0078] The collector of the first transistor Q1 is connected to the other end of the driving coil and one end of the auxiliary contact, respectively, as one end of the first driving circuit; the collector of the second transistor Q2 is connected to the other end of the auxiliary contact and the positive terminal of the second diode D2, respectively, as one end of the second driving circuit.
[0079] In a specific embodiment, the second diode D2 can be a Zener diode. When the relay is about to be energized, the MCU can determine the actual situation of the relay or the relay control circuit 100 by sampling the signal.
[0080] If the sampling is a PWM drive signal (high or low level), it means there is no action. At the same time, the second transistor Q2 is not turned on, and one or more of the first diode D1, the third resistor R3, the first capacitor C1, the second capacitor C2, and the second transistor Q2 are damaged.
[0081] If the sampling signal is low, it indicates that the relay is functioning normally and the circuit is normal.
[0082] If the relay does not operate when the sampled signal is at a 12V level, the relay is malfunctioning.
[0083] If the relay operates when the sampling signal is at a 6V level, the second drive circuit malfunctions, and one or more of the following components—first diode D1, third resistor R3, first capacitor C1, second capacitor C2, and second transistor Q2—are damaged.
[0084] If the sampling signal is a PWM drive signal (i.e., high or low level), the relay does not operate, and the second transistor Q2 is not turned on, then one or more of the first diode D1, the third resistor R3, the first capacitor C1, the second capacitor C2, and the second transistor Q2 will be damaged.
[0085] When the relay is determined to be faulty and the second drive circuit is normal, the relay control circuit 100 can restart the relay according to the circuit operation principle described in the above embodiment.
[0086] Please see Figure 8 , Figure 8 This is a schematic diagram of another relay control circuit 100 provided in an embodiment of this application. Figure 8 Is Figure 3 This was further derived from [the previous work]. Figure 3 On this basis, Figure 8 The relay control circuit 100 shown further includes: the MCU connected to one end of the auxiliary contact; the MCU sampling the voltage across the auxiliary contact to obtain a sampling signal; and the sampling signal used to determine whether the relay is working normally or abnormally.
[0087] In a specific embodiment, when the relay is about to engage, the MCU can determine the status of the relay or the relay control circuit 100 by sampling the signal:
[0088] If the sampled signal is 0V, it means that the relay has been activated and is working normally.
[0089] If the sampled signal is the transistor's drive voltage (i.e., 0.3V), it indicates that the relay is not operating and is malfunctioning. When a relay malfunction is detected, the relay control circuit 100 can restart the relay according to the circuit operation principle described in the above embodiment.
[0090] Please see Figure 9 , Figure 9 This is a schematic diagram of another relay control circuit 100 provided in an embodiment of this application. Figure 9 Is Figure 4 Based on this, it is further obtained that the internal connections of the first driving circuit and the second driving circuit remain unchanged, while the connections between the first driving circuit, the second driving circuit, and other components change. Figure 9 The relay control circuit shown is 100 times... Figure 4 The relay control circuit shown has an additional sixth resistor R6. Figure 9 The relay control circuit 100 shown is connected as follows:
[0091] One end of the first resistor R1 is connected to the power supply V0, the emitter of the third transistor Q3, the emitter of the fourth transistor Q4, and one end of the fourth resistor R4. The other end of the first resistor R1 is connected to the base of the third transistor Q3. The collector of the third transistor Q3 is connected to one end of the fifth resistor R5. The other end of the fifth resistor R5 is connected to one end of the relay's drive coil. The base of the fourth transistor Q4 is connected to the other end of the fourth resistor R4, and the collector of the fourth transistor Q4 is connected to one end of the sixth resistor R6. The other end of the sixth resistor R6 is connected to the MCU and one end of the relay's auxiliary contact. The collector of the first transistor Q1 serves as one end of the first drive circuit, connected to the other end of the first resistor R1 and the base of the third transistor Q3. The collector of the second transistor Q2 serves as one end of the second drive circuit, connected to the other end of the fourth resistor R4 and the base of the fourth transistor Q4. The MCU is connected to one end of the auxiliary contact. The MCU samples the voltage across the auxiliary contact to obtain a sampling signal. The sampling signal is used to determine whether the relay is working normally or abnormally.
[0092] Among them, the sixth resistor R6 is used to limit current and protect the circuit.
[0093] In a specific embodiment, when the relay is about to engage, the MCU can determine the actual situation of the relay or the relay control circuit 100 by sampling the signal:
[0094] If the sampling signal level is a high level lower than 12V (e.g., 11V) and there is PWM fluctuation, it indicates that the relay has activated and is working normally.
[0095] If the sampling signal is a PWM drive signal (i.e., high or low level), it indicates that there is no action. At the same time, the second transistor Q2 is not conducting, which may be due to damage to one or more of the first diode D1, the third resistor R3, the first capacitor C1, the second capacitor C2, or the second transistor Q2.
[0096] If the sampling signal is at a 12V level, the relay does not activate, indicating a malfunction.
[0097] When the relay is determined to be faulty and the second drive circuit is normal, the relay control circuit 100 can restart the relay according to the circuit operation principle described in the above embodiment.
[0098] Please see Figure 10 , Figure 10 This is a schematic diagram of another relay control circuit 100 provided in an embodiment of this application. Figure 10 Is Figure 5Based on this, it is further obtained that the internal connections of the first driving circuit and the second driving circuit remain unchanged, while the connections between the first driving circuit, the second driving circuit and other components change. Figure 10 The relay control circuit 100 shown further includes: the MCU connected to one end of the auxiliary contact; the MCU sampling the voltage across the auxiliary contact to obtain a sampling signal; and the sampling signal used to determine whether the relay is working normally or abnormally.
[0099] In a specific embodiment, the MCU can determine the status of the relay or relay control circuit 100 by sampling the signal:
[0100] If the sampled voltage is 0V, it means the relay has activated and is working normally.
[0101] If the transistor drive voltage is 0.3V, it indicates that the relay is not operating and is malfunctioning. If the relay is determined to be malfunctioning and the second drive circuit is functioning normally, the relay control circuit 100 can restart the relay according to the circuit operation principle described in the above embodiment.
[0102] It can be seen that the embodiments of the present invention have the following beneficial effects:
[0103] The relay control circuit 100 of an embodiment of the present invention includes: a power supply V0, a first resistor R1, a relay, a first driving circuit, a second driving circuit, and an MCU; the power supply V0 is connected to one end of the first resistor R1, and the other end of the first resistor R1 is connected to the relay; the relay is connected to one end of the first driving circuit and one end of the second driving circuit; the MCU is connected to the other end of the first driving circuit and the other end of the second driving circuit; wherein, the first driving circuit is used to drive the relay to start so that the relay works normally; the second driving circuit is used to drive the relay to restart when the relay is malfunctioning; when the relay is malfunctioning, the second driving circuit drives the relay to restore the relay to normal working state, which improves the fault tolerance of the relay control circuit 100. Even if the relay fails, the second driving circuit can still enable the relay to work normally, ensuring the stable operation of the relay control circuit 100 and realizing the re-engagement of the relay in abnormal state.
[0104] The embodiments of this application have been described in detail above. Specific examples have been used to illustrate the principles of this application. The description of the embodiments above is only for the purpose of helping to understand the core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A relay control circuit, characterized in that, The relay control circuit includes: a power supply, a first resistor, a relay, a first drive circuit, a second drive circuit, and an MCU; The power supply is connected to one end of the first resistor, and the other end of the first resistor is connected to the relay. The relays are respectively connected to one end of the first driving circuit and one end of the second driving circuit; The MCU is connected to the other end of the first driving circuit and the other end of the second driving circuit, respectively. The first driving circuit is used to drive the relay to start so that the relay can work normally; The second drive circuit is used to drive the relay to restart when the relay malfunctions; The relay includes: a drive coil, main contacts, and auxiliary contacts; wherein: The other end of the first resistor is connected to one end of the drive coil; One end of the first driving circuit is connected to the other end of the driving coil and one end of the auxiliary contact, respectively; The other end of the auxiliary contact is connected to one end of the second driving circuit; The main contact is connected to an external load; Specifically, in the process of restarting the relay, the second driving circuit is used for: When the MCU detects that the relay is malfunctioning, it receives the PWM drive signal issued by the MCU. To restart the relay, specifically, the auxiliary contact is driven to operate normally, thereby causing the main contact to move together and restore the relay to normal operation.
2. The relay control circuit as described in claim 1, characterized in that, The first driving circuit includes a second resistor and a first transistor; the second driving circuit includes a first diode, a first capacitor, a second capacitor, a second transistor, and a third resistor. In the first driving circuit, one end of the second resistor is connected to the MCU as the other end of the first driving circuit; the other end of the second resistor is connected to the base of the first transistor. The collector of the first transistor is connected to the relay as one end of the first driving circuit; the emitter of the first transistor is grounded. In the second driving circuit, the positive terminal of the first diode is connected to the MCU as the other end of the second driving circuit; the negative terminal of the first diode is connected to one end of the third resistor and one end of the first capacitor; the other end of the third resistor is connected to one end of the second capacitor and the base of the second transistor. The collector of the second transistor is connected to the relay as one end of the second driving circuit; the other end of the first capacitor, the other end of the second capacitor, and the emitter of the second transistor are all grounded.
3. The relay control circuit as described in claim 1, characterized in that, The first driving circuit includes a second resistor and a first transistor; the second driving circuit includes a first diode, a first capacitor, a second capacitor, a second transistor, and a third resistor. In the first driving circuit, one end of the second resistor is connected to the MCU as the other end of the first driving circuit; the other end of the second resistor is connected to the base of the first transistor. The collector of the first transistor is connected to the relay as one end of the first driving circuit; the emitter of the first transistor is grounded. In the second driving circuit, the positive terminal of the first diode is connected to the MCU as the other end of the second driving circuit; the negative terminal of the first diode is connected to one end of the third resistor and one end of the first capacitor; the other end of the third resistor is connected to one end of the second capacitor and the base of the second transistor. The other end of the first capacitor, the other end of the second capacitor, and the emitter of the second transistor are all grounded; The relay control circuit also includes: a third transistor, a fourth transistor, a fourth resistor, and a fifth resistor; One end of the fourth resistor is connected to the power supply and the emitter of the fourth transistor, respectively; the other end of the fourth resistor is connected to the base of the fourth transistor and the collector of the second transistor, respectively; the collector of the fourth transistor is connected to one end of the auxiliary contact. The emitter of the third transistor is connected to the power supply, the base of the third transistor is connected to the other end of the first resistor, and the collector of the third transistor is connected to one end of the fifth resistor and one end of the auxiliary contact, respectively; the other end of the fifth resistor is connected to one end of the drive coil.
4. The relay control circuit as described in claim 3, characterized in that, The first transistor and the second transistor are both NPN transistors; the third transistor and the fourth transistor are both PNP transistors.
5. The relay control circuit as described in claim 1, characterized in that, The first driving circuit includes a second resistor and a first transistor; the second driving circuit includes a first diode, a first capacitor, a second capacitor, a second transistor, and a third resistor. In the first driving circuit, one end of the second resistor is connected to the MCU as the other end of the first driving circuit; the other end of the second resistor is connected to the base of the first transistor. The collector of the first transistor is connected to the relay as one end of the first driving circuit; the emitter of the first transistor is grounded. In the second driving circuit, the positive terminal of the first diode is connected to the MCU as the other end of the second driving circuit; the negative terminal of the first diode is connected to one end of the third resistor and one end of the first capacitor; the other end of the third resistor is connected to one end of the second capacitor and the base of the second transistor. The other end of the first capacitor, the other end of the second capacitor, and the emitter of the second transistor are all grounded; The relay control circuit also includes: a second diode and a fourth resistor; The positive terminal of the second diode is connected to the other end of the auxiliary contact, the MCU, and the collector of the second transistor, respectively; the negative terminal of the second diode is connected to the other end of the fourth resistor; one end of the fourth resistor is connected to the power supply.
6. The relay control circuit as described in claim 3, characterized in that, The relay control circuit further includes: a sixth resistor; One end of the sixth resistor is connected to the collector of the fourth transistor, and the other end of the sixth resistor is connected to the MCU and one end of the auxiliary contact, respectively.
7. The relay control circuit as described in any one of claims 3-6, characterized in that, The relay control circuit further includes: one end of the MCU connected to the auxiliary contact; The MCU samples the voltage across the auxiliary contact to obtain a sampling signal; The sampling signal is used to determine whether the relay is working normally or abnormally.
8. The relay control circuit according to any one of claims 1-6, characterized in that, The relay is either a normally closed relay or a normally open relay.
Citation Information
Patent Citations
Power supply circuit of lamp
CN201266850Y