AC relay control circuit
By combining dual zero-crossing detection and a time-delay control unit, the problem of contact deviation from the zero-crossing point caused by relay action delay is solved, achieving precise control of the relay and reducing arcing, thereby improving the reliability and lifespan of the system.
Patent Information
- Application Number
- CN202511250573.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-03
- Publication Date
- 2025-11-18
AI Technical Summary
In existing technologies, the operating delay of relays causes the contact opening and closing time to deviate from the zero-crossing point, resulting in electric arcing, which affects the lifespan of relays and the stability of the power grid. There is a lack of effective dynamic compensation mechanisms.
It adopts dual zero-crossing point detection at the front end and back end, combined with a delay control unit. The main control unit calculates and adjusts the set delay to ensure that the relay is accurately switched on and off at the zero-crossing point, and dynamically compensates for delay fluctuations caused by individual differences of relays and environmental factors.
It achieves precise switching of relay contacts at zero crossing points, reduces arc generation, extends relay life, reduces power grid interference, and improves system reliability.
Smart Images

Figure CN120977816A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of relay control, and in particular to an alternating current relay control circuit. BACKGROUND
[0002] In the current relay control field, the control logic of traditional zero-crossing relays is usually simple, that is, after obtaining an alternating current zero-crossing point signal through a front-end zero-crossing detection circuit, the relay is directly triggered to act, thereby realizing the attraction or disconnection of the contact. However, in actual application, the relay has an inherent action delay that cannot be ignored. This delay mainly includes the magnetization time of the electromagnetic coil, that is, the time required for the coil to be powered on to generate sufficient magnetic force, and the bounce and movement time of the mechanical contact, which needs a certain time for the contact to move from the initial position to the contact or disconnection position.
[0003] Due to the existence of these inherent action delays, the actual on-off time of the relay contact often deviates from the zero-crossing point. Especially in the case of inductive or capacitive loads, this deviation can cause serious arcing. The generation of arc not only greatly shortens the service life of the relay, because the high temperature of the arc can burn the surface of the contact and affect its conductivity and contact reliability, but also can interfere with the power grid and affect the normal operation of other electrical equipment.
[0004] In actual engineering applications, this defect has brought many problems. For example, in motor control, arc can interfere with the normal operation of the motor, causing the motor speed to be unstable, and even causing the motor to stop running, affecting production progress. In terms of lamp control, frequent arcing can damage the internal circuit components of the lamp, reducing the service life of the lamp and increasing the cost of maintenance and replacement.
[0005] In the prior art, there is no effective solution to the deviation problem between "detecting the zero-crossing point" and "the actual on-off time". The lack of a dynamic compensation mechanism for the relay action delay makes it difficult for the relay to meet the application requirements of high precision and high reliability in terms of zero-crossing control, and needs to be improved. SUMMARY
[0006] The purpose of the present application is to provide an alternating current relay control circuit to solve the problems raised in the background.
[0007] To achieve the above purpose, the present application provides the following technical solutions:
[0008] An alternating current relay control circuit, comprising:
[0009] A front-end zero-crossing detection unit is configured to detect a front-end zero-crossing point signal between an AC input end and a relay-controlled switch (the relay is a component of a relay unit), and output the signal to a main control unit;
[0010] A back-end zero-crossing detection unit is configured to detect a back-end zero-crossing point signal of AC between the relay-controlled switch and a load, and output the signal to the main control unit;
[0011] The main control unit is configured to trigger the relay unit to drive after receiving the front-end zero-crossing point signal, and control the relay-controlled switch to complete contact switching after a set delay time, which is adjustable and is adjusted based on the back-end zero-crossing point signal.
[0012] The relay unit is configured to receive a control signal from the main control unit, and work to control the relay-controlled switch to complete contact switching.
[0013] The AC input end, the relay-controlled switch, and the load form a loop, the output end of the front-end zero-crossing detection unit is connected to the first input end of the main control unit, the output end of the back-end zero-crossing detection unit is connected to the second input end of the main control unit, and the output end of the main control unit is connected to the input end of the relay unit.
[0014] As a further scheme of the application, the main control unit is internally integrated with a delay control unit, which is configured to accurately measure time by using a timer, calculate the time difference between the front-end zero-crossing point signal and the actual contact switching of the relay, and adjust the set delay time through the back-end zero-crossing point signal, so that the relay-controlled switch actually completes contact switching after the main control unit receives the front-end zero-crossing point signal and the set delay time, and the actual contact switching is at the back-end zero-crossing point.
[0015] As a further scheme of the application, the front-end zero-crossing detection unit includes a capacitor C1, a resistor R2, a resistor R4, a clamping structure D1, a resistor R15, and a capacitor C2, one end of the resistor R2 is connected to one end of the capacitor C1, one end of the resistor R4, and the front-end AC signal (the front-end zero-crossing point signal is the zero-crossing point of the front-end AC signal), the other end of the resistor R2 is connected to the other end of the capacitor C1, the other end of the resistor R4, the third end of the clamping structure D1, one end of the resistor R15, the first end of the clamping structure D1 is grounded, the second end of the clamping structure D1 is connected to a supply voltage VCC, the other end of the resistor R15 is connected to one end of the capacitor C2, the first input end of the main control unit, and the other end of the capacitor C2 is grounded.
[0016] As a further scheme of the present application: the back-end zero-crossing detection unit comprises a capacitor C7, a resistor R13, a resistor R15, a clamping structure D4, a resistor R17, a capacitor C22, one end of the resistor R13 is connected to one end of the capacitor C7, the back-end alternating current signal (the back-end zero-crossing point signal is the zero-crossing point of the back-end alternating current signal), the other end of the resistor R13 is connected to the other end of the capacitor C7, one end of the resistor R15, the other end of the resistor R15 is connected to the third end of the clamping structure D4, one end of the resistor R17, the first end of the clamping structure D4 is grounded, the second end of the clamping structure D4 is connected to the supply voltage VCC, the other end of the resistor R17 is connected to one end of the capacitor C22, the second input end of the main control unit, and the other end of the capacitor C22 is grounded.
[0017] As a further scheme of the present application: the relay unit comprises:
[0018] The signal processing subunit is configured to process the control signal input by the main control unit, and drive the relay working subunit to work or not work.
[0019] The relay working subunit is configured to control whether the load forms a loop by controlling whether the switch is turned on or off, based on whether the relay is powered.
[0020] The input end of the signal processing subunit is connected to the output end of the main control unit, and the output end of the signal processing subunit is connected to the input end of the relay working subunit.
[0021] As a further scheme of the present application: the signal processing subunit comprises a capacitor C19, a resistor R37, a diode D3, a diode D6, a capacitor C18, a resistor R39, and a resistor R35, one end of the capacitor C19 is connected to the output end of the main control unit, the other end of the capacitor C19 is connected to one end of the resistor R37, the other end of the resistor R37 is connected to the positive electrode of the diode D3 and the negative electrode of the diode D6, the negative electrode of the diode D3 is connected to one end of the capacitor C18, one end of the resistor R35, and one end of the resistor R39, the positive electrode of the diode D6 is grounded, the other end of the capacitor C18 is grounded, the other end of the resistor R39 is grounded, and the other end of the resistor R35 is connected to the input end of the relay working subunit.
[0022] As a further scheme of the present application: the relay working subunit comprises a transistor Q1, a diode D7, a relay RY1, and a capacitor C14, the emitter of the transistor Q1 is grounded, the base of the transistor Q1 is connected to the output end of the signal processing subunit, the collector of the transistor Q1 is connected to one end of the relay RY1 and the positive electrode of the diode D7, the other end of the relay RY1 is connected to the negative electrode of the diode D7, a 5V voltage, and one end of the capacitor C14, and the other end of the capacitor C14 is grounded.
[0023] Compared with the prior art, the application has the beneficial effects that: the application adopts front-end and rear-end double zero-crossing detection, constructs a closed-loop control, takes the actual zero-crossing point of the load side as the final reference of the action of the relay, realizes accurate feedback and control of the action of the relay, dynamically compensates the action delay of the relay through the delay control unit, effectively solves the delay fluctuation problem caused by individual differences of the relay, environmental factors (such as temperature and humidity), improves the accuracy of the zero-crossing break of the relay, realizes accurate on-off of the relay contact at the zero-crossing point, fundamentally reduces the generation of arc, prolongs the service life of the relay, reduces the interference to the power grid, and improves the reliability of the entire circuit system. BRIEF DESCRIPTION OF DRAWINGS
[0024] Figure 1 It is a circuit diagram of an alternating current relay control circuit. DETAILED DESCRIPTION
[0025] The technical solutions in the embodiments of the application will be clearly and completely described below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, rather than all the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the application.
[0026] Please refer to Figure 1 An alternating current relay control circuit comprises:
[0027] A front-end zero-crossing detection unit is configured to detect a front-end zero-crossing point signal between an alternating current input end and a relay-controlled switch (the relay is a component in a relay unit) and output to a main control unit.
[0028] A rear-end zero-crossing detection unit is configured to detect a rear-end zero-crossing point signal of the alternating current between the relay-controlled switch and a load and output to the main control unit.
[0029] The main control unit is configured to trigger the relay unit to drive after the front-end zero-crossing point signal is input, control the relay-controlled switch to complete contact on-off after a set delay time which can be adjusted, and adjust the set delay time based on the received rear-end zero-crossing point signal. The main control unit is an MCU, and the specific model can be STM32F103.
[0030] The relay unit is configured to receive the control signal of the main control unit, work, and then control the relay-controlled switch to complete contact on-off.
[0031] The circuit is composed of an AC input, a relay controlled switch and a load. The output of the front-end zero-crossing detection unit is connected to the first input of the main control unit, and the output of the rear-end zero-crossing detection unit is connected to the second input of the main control unit. The output of the main control unit is connected to the input of the relay unit.
[0032] In this embodiment, as shown in Figure 1 , the main control unit is internally integrated with a delay control unit. The delay control unit is used to accurately measure time by means of a timer, calculate the time difference between the front-end zero-crossing signal and the actual time when the relay controlled switch completes the contact break and make, and adjust the set delay time through the rear-end zero-crossing signal, so that when the main control unit receives the front-end zero-crossing signal, the relay controlled switch actually completes the contact break and make after the set delay time, and the rear-end zero-crossing signal is the time when the relay controlled switch actually completes the contact break and make.
[0033] Here, the front-end zero-crossing signal and the rear-end zero-crossing signal are not limited. For example, the relay controlled switch can start to be controlled after the main control unit receives the first front-end zero-crossing signal, and the relay controlled switch can complete the break and make when the main control unit receives the third rear-end zero-crossing signal.
[0034] In this embodiment, as shown in Figure 1 , the front-end zero-crossing detection unit includes a capacitor C1, a resistor R2, a resistor R4, a clamping structure D1, a resistor R15 and a capacitor C2. One end of the resistor R2 is connected to one end of the capacitor C1, and the front-end AC signal (the front-end zero-crossing signal is the zero-crossing point of the front-end AC signal). The other end of the resistor R2 is connected to the other end of the capacitor C1 and one end of the resistor R4. The other end of the resistor R4 is connected to the third end of the clamping structure D1 and one end of the resistor R15. The first end of the clamping structure D1 is grounded, the second end of the clamping structure D1 is connected to the supply voltage VCC, the other end of the resistor R15 is connected to one end of the capacitor C2 and the first input of the main control unit, and the other end of the capacitor C2 is grounded.
[0035] The front-end AC signal is input, and is divided by the resistor R2, the capacitor C1 and the resistor R4. The voltage output to the main control unit through the resistor R15 and the capacitor C2 is clamped by the clamping structure D1, so as not to be too large to damage the main control unit. When the AC signal crosses zero, the front-end AC signal has no voltage, and at this time, the main control unit has no voltage input.
[0036] In this embodiment, as shown in Figure 1The back-end zero-crossing detection unit comprises a capacitor C7, a resistor R13, a resistor R15, a clamping structure D4, a resistor R17, a capacitor C22, one end of the resistor R13 is connected to one end of the capacitor C7, an AC signal (the back-end zero-crossing point signal is the zero-crossing point of the back-end AC signal), the other end of the resistor R13 is connected to the other end of the capacitor C7, one end of the resistor R15, the other end of the resistor R15 is connected to the third end of the clamping structure D4, one end of the resistor R17, the first end of the clamping structure D4 is grounded, the second end of the clamping structure D4 is connected to a supply voltage VCC, the other end of the resistor R17 is connected to one end of the capacitor C22, the second input end of the main control unit, and the other end of the capacitor C22 is grounded.
[0037] The working principle of the back-end zero-crossing detection unit is similar to that of the front-end zero-crossing detection unit, and thus will not be described again; the clamping structures D1 and D4 are the same structure, which is composed of two diodes, as can be seen from the drawings, when the voltage output to the third end is too large, the left diode will be turned on and grounded, so that the voltage on the clamping structure is the voltage on the left diode, completing the voltage clamping and avoiding damage to the main control unit caused by the voltage output to the main control unit being too large.
[0038] In the embodiment, please refer to Figure 1 The relay unit comprises:
[0039] The signal processing subunit is configured to process the control signal input by the main control unit, and drive the relay working subunit to work or not work.
[0040] The relay working subunit is configured to control whether the AC input end, the switch controlled by the relay, and the load form a loop by controlling whether the switch is turned on or off based on whether the relay is powered.
[0041] The input end of the signal processing subunit is connected to the output end of the main control unit, and the output end of the signal processing subunit is connected to the input end of the relay working subunit.
[0042] In the embodiment, please refer to Figure 1 The signal processing subunit comprises a capacitor C19, a resistor R37, a diode D3, a diode D6, a capacitor C18, a resistor R39, and a resistor R35, one end of the capacitor C19 is connected to the output end of the main control unit, the other end of the capacitor C19 is connected to one end of the resistor R37, the other end of the resistor R37 is connected to the positive electrode of the diode D3 and the negative electrode of the diode D6, the negative electrode of the diode D3 is connected to one end of the capacitor C18, one end of the resistor R35, and one end of the resistor R39, the positive electrode of the diode D6 is grounded, the other end of the capacitor C18 is grounded, the other end of the resistor R39 is grounded, and the other end of the resistor R35 is connected to the input end of the relay working subunit.
[0043] The 2KHz square wave generated by the main control unit is isolated from the direct current component by capacitor C19, and the obtained level is rectified by diode D3 and filtered by capacitor C18, and then a stable high level is output to the relay working subunit through resistor R35 to drive the relay working subunit to work.
[0044] In the embodiment, please refer to Figure 1 The relay working subunit comprises a triode Q1, a diode D7, a relay RY1 and a capacitor C14, the emitter of the triode Q1 is connected to the ground, the base of the triode Q1 is connected to the output end of the signal processing subunit, the collector of the triode Q1 is connected to one end of the relay RY1 and the positive electrode of the diode D7, the other end of the relay RY1 is connected to the negative electrode of the diode D7, 5V voltage and one end of the capacitor C14, and the other end of the capacitor C14 is connected to the ground.
[0045] The stable high level is input to the base of the triode Q1, the triode Q1 is turned on, so that the 5V voltage, the relay RY1, the triode Q1 and the ground form a loop, the relay RY1 is powered on to work and control the on-off of the corresponding switch.
[0046] When the main control unit outputs a low level, the relay RY1 is turned off to release the reverse electromotive force of the coil, the coil is discharged through the freewheeling diode D6, so that the triode Q1 does not enter saturation, which constitutes an anti-misfire structure. If the main control unit does not normally output a square wave, the obtained signal is isolated by the capacitor C19, the triode Q1 is turned off, and the relay cannot be turned on.
[0047] The working principle of the application is that: the front-end zero-crossing detection unit detects the zero-crossing point of the alternating current (denoted as time t0), and outputs a front-end zero-crossing point signal to the main control unit; after receiving the t0 signal, the main control unit starts the relay coil excitation (pre-drive), at this time, the coil is in a standby state; at the same time, the delay control unit calculates the delay time Δt (Δt is a compensation value of the relay action delay) according to the preset initial delay (the initial delay range can be set to 10-50 ms, which is adjusted according to different relay models). When the rear-end zero-crossing detection unit detects the zero-crossing point of the load side (denoted as time t1, t1 is the next zero-crossing point after t0), and outputs a rear-end zero-crossing point signal to the main control unit, the main control unit controls the relay coil to complete the excitation, and the contact completes the on-off at t1 (at this time, Δt=t1-t0, which just compensates for the relay action delay). The rear-end zero-crossing detection unit feeds back t1 to the delay control unit, and the delay control unit compares the actual Δt with the preset Δt, and updates the compensation parameter (for example, when the action delay changes due to temperature / aging, the Δt is dynamically adjusted).
[0048] Device selection, front-end / rear-end zero-crossing detection unit, in addition to the attached Figure 1In addition to the 130kΩ resistor marked, 270KΩ corresponding to higher voltage can also be selected, suitable for higher security requirements of the scene;
[0049] In addition to the relay unit Figure 1 In addition to the relay unit marked YSF model, G5LA-14-12VDC model relay can also be selected, the relay action time is shorter, suitable for occasions with higher response speed requirements, but the price is relatively high.
[0050] The delay control unit is integrated in the chip STM32F103MCU, which has multiple timers that can meet the needs of time measurement and delay control, and has fast processing speed and can realize complex control algorithms.
[0051] In addition to the relay unit Figure 1 The triode driving circuit (triode Q1 and surrounding components) can also use ULN2003 chip to drive the relay RT1, and ULN2003 is a high-voltage, high-current composite transistor array that can provide sufficient driving current to avoid the problem of unstable operation caused by insufficient current when the main control unit directly drives the relay RY1 coil.
[0052] The software logic core code is as follows:
[0053]
[0054]
[0055]
[0056] It is apparent to those skilled in the art that the present application is not limited to the details of the above exemplary embodiments, and can be implemented in other specific forms without departing from the spirit or essential characteristics of the present application. Therefore, the embodiments should be considered as exemplary and non-limiting in any respect.
[0057] In addition, it should be understood that although the present specification is described in terms of embodiments, not every embodiment contains only one independent technical solution, and the description of the specification is only for the sake of clarity, and those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can be appropriately combined to form other embodiments that those skilled in the art can understand.
Claims
1. An AC relay control circuit, characterized in that, The AC relay control circuit includes: The front-end zero-crossing detection unit is used to detect the front-end zero-crossing signal between the AC input terminal and the relay-controlled switch, and outputs it to the main control unit; The back-end zero-crossing detection unit is used to detect the back-end zero-crossing signal of AC power between the relay-controlled switch and the load, and outputs it to the main control unit; The main control unit is used to trigger the relay unit drive after the front-end zero-crossing signal is input. After an adjustable set delay time, it controls the switch controlled by the relay to complete the contact opening and closing. The adjustable set delay time is adjusted based on the received back-end zero-crossing signal. The relay unit is used to receive control signals from the main control unit. When the relay is activated, it controls the switch controlled by the relay to open and close the contacts. The AC input terminal, the relay-controlled switch, and the load form a circuit. The output terminal of the front-end zero-crossing detection unit is connected to the first input terminal of the main control unit, the output terminal of the rear-end zero-crossing detection unit is connected to the second input terminal of the main control unit, and the output terminal of the main control unit is connected to the input terminal of the relay unit.
2. The AC relay control circuit according to claim 1, characterized in that, The main control unit integrates a delay control unit, which is used to accurately measure time through a timer, calculate the time difference between the front zero-crossing signal and the actual opening and closing of the relay contacts, and adjust the set delay time through the back zero-crossing signal, so that when the main control unit receives the front zero-crossing signal and the relay-controlled switch actually completes the opening and closing of the contacts after the set delay time, it is the back zero-crossing moment.
3. The AC relay control circuit according to claim 1, characterized in that, The front-end zero-crossing detection unit includes capacitor C1, resistor R2, resistor R4, clamping structure D1, resistor R15, and capacitor C2. One end of resistor R2 is connected to one end of capacitor C1 and the front-end AC signal. The other end of resistor R2 is connected to the other end of capacitor C1 and one end of resistor R4. The other end of resistor R4 is connected to the third end of clamping structure D1 and one end of resistor R15. The first end of clamping structure D1 is grounded, and the second end of clamping structure D1 is connected to the power supply voltage VCC. The other end of resistor R15 is connected to one end of capacitor C2 and the first input terminal of the main control unit. The other end of capacitor C2 is grounded.
4. The AC relay control circuit according to claim 1, characterized in that, The back-end zero-crossing detection unit includes capacitor C7, resistor R13, resistor R15, clamping structure D4, resistor R17, and capacitor C22. One end of resistor R13 is connected to one end of capacitor C7 and the back-end AC signal. The other end of resistor R13 is connected to the other end of capacitor C7 and one end of resistor R15. The other end of resistor R15 is connected to the third end of clamping structure D4 and one end of resistor R17. The first end of clamping structure D4 is grounded, and the second end of clamping structure D4 is connected to the supply voltage VCC. The other end of resistor R17 is connected to one end of capacitor C22 and the second input terminal of the main control unit. The other end of capacitor C22 is grounded.
5. The AC relay control circuit according to claim 1, characterized in that, The relay unit includes: The signal processing subunit is used to process the control signals input from the main control unit, thereby driving the relay operation subunit to operate. The relay operating subunit is used to control whether the AC input terminal, the relay-controlled switch, and the load form a circuit based on whether the relay is energized and whether the relay is on or off. The input terminal of the signal processing subunit is connected to the output terminal of the main control unit, and the output terminal of the signal processing subunit is connected to the input terminal of the relay operation subunit.
6. The AC relay control circuit according to claim 5, characterized in that, The signal processing subunit includes capacitor C19, resistor R37, diode D3, diode D6, capacitor C18, resistor R39, and resistor R35. One end of capacitor C19 is connected to the output terminal of the main control unit, and the other end of capacitor C19 is connected to one end of resistor R37. The other end of resistor R37 is connected to the anode of diode D3 and the cathode of diode D6. The cathode of diode D3 is connected to one end of capacitor C18, one end of resistor R35, and one end of resistor R39. The anode of diode D6 is grounded, the other end of capacitor C18 is grounded, the other end of resistor R39 is grounded, and the other end of resistor R35 is connected to the input terminal of the relay operating subunit.
7. The AC relay control circuit according to claim 5 or 6, characterized in that, The relay operating subunit includes transistor Q1, diode D7, relay RY1, and capacitor C14. The emitter of transistor Q1 is grounded, the base of transistor Q1 is connected to the output terminal of the signal processing subunit, the collector of transistor Q1 is connected to one end of relay RY1 and the positive terminal of diode D7, the other end of relay RY1 is connected to the negative terminal of diode D7, 5V voltage, and one end of capacitor C14, and the other end of capacitor C14 is grounded.