A relay protection circuit based on high-precision zero-crossing detection
By designing a high-precision zero-cross detection relay protection circuit including rectifier circuit, signal generation circuit, filter circuit, shaping circuit and processor, the problem of errors in detecting alternating current zero point is solved, and the problem of the existing technology relay protection circuit has been solved, so as to achieve The relay is accurately on and off at the AC zero point and the service life is extended.
Patent Information
- Application Number
- CN202111544006.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-16
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2041-12-16
AI Technical Summary
There are errors in the existing relay protection circuits when detecting the AC zero point, resulting in damage to the relay contacts, affecting the reliability and service life of the product.
A relay protection circuit based on high-precision zero-cross detection is designed, including rectifier circuit, signal generation circuit, filter circuit, shaping circuit and processor. By detecting the AC zero point in real time and determining the operating time according to the number of times of the relay, the relay is realized. Accurate on and off at AC zero point.
This circuit can realize the accurate on and off of the relay at the AC zero point, reduce the arcing of the contacts when they are attracted and disconnected, extend the service life of the relay, and improve detection accuracy and reliability.
Smart Images

Figure CN114551155B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of relay protection, and in particular relates to a relay protection circuit based on high-precision zero-crossing detection. Background Art
[0002] With the continuous improvement of industrialization, the number of intelligent household appliances is increasing, and they are increasingly inseparable from the control of relays. For example, for a long time, relays have been used to control heating components in the heating system of kitchen appliances. However, because kitchen appliances are powered by the mains, the relay contacts are often damaged by sparks and arcs, making the relays ineffective and the products unusable, which seriously affects the reliability and service life of kitchen appliances.
[0003] At present, most relays are protected by adding a zero-crossing detection circuit. By detecting the zero-crossing point, the relay is turned on at the zero-crossing point to prevent the relay contacts from being damaged by a large current shock. However, the existing zero-crossing detection circuit has the following defects: First, the product circuit structure is simple, such as directly connecting a resistor and an optocoupler in series on the mains. Because the current transfer ratio (CTR) range of the optocoupler is large, the rate of the optocoupler turning on during the voltage rise and the rate of the optocoupler turning off during the voltage drop will be different, so that the signal received by the processor has a large error range, resulting in inaccurate detection; second, the output end of the optocoupler is usually directly connected to the processor through a resistor, and the tilt angle of the change signal (such as the falling edge) received by the processor will be relatively large, which is easy to cause the processor to misjudge. Therefore, a relay protection circuit based on high-precision zero-crossing detection is proposed. Summary of the invention
[0004] The purpose of the present invention is to address the above problems and propose a relay protection circuit based on high-precision zero-crossing detection, which can detect the zero point of AC power in real time and determine the action time according to the number of relay actions, so as to achieve accurate switching of the relay at the zero point of AC power, have a long service life, and can control the actions of multiple relays at the same time, and has the characteristics of high precision, small size, low cost, stability and reliability.
[0005] To achieve the above object, the technical solution adopted by the present invention is:
[0006] The present invention proposes a relay protection circuit based on high-precision zero-crossing detection, which is used to realize the on-off of the relay at the zero point of the alternating current. The relay protection circuit based on high-precision zero-crossing detection includes a rectifier circuit, a signal generating circuit, a filter circuit, a shaping circuit and a processor which are electrically connected in sequence, wherein:
[0007] Rectifier circuit, used to convert alternating current into positive waveform voltage;
[0008] A signal generating circuit, comprising a first diode D1, a first capacitor C1, a ninth resistor R9, a first transistor Q1 and an optical coupler U1, wherein a rectifier circuit is connected to both ends of the ninth resistor R9, an anode of the first diode D1 and a first electrode of the first transistor Q1 are respectively connected to one end of the ninth resistor R9, one end of the first capacitor C1 and a cathode of the optical coupler U1 are respectively connected to the other end of the ninth resistor R9, the other end of the first capacitor C1 is respectively connected to a cathode of the first diode D1 and a second electrode of the first transistor Q1, an anode of the optical coupler U1 is connected to a third electrode of the first transistor Q1, and the on-off of the optical coupler U1 is realized by controlling the switch of the first transistor Q1;
[0009] The processor is connected to at least one relay, and is used to receive the output signal processed by the filtering circuit and the shaping circuit, and record the number of actions of each relay. When the first transistor Q1 is disconnected, the optocoupler U1 is turned off, and the signal generating circuit sends the first output signal to the processor. When the first transistor Q1 is turned on, the optocoupler U1 is turned on, and the signal generating circuit sends the second output signal to the processor. When the processor detects that the second output signal changes to the first output signal, it determines it as the zero point of the alternating current, and determines its action time according to the number of actions of each relay, so as to realize the switching of the relay at the zero point of the alternating current.
[0010] Preferably, the rectifier circuit includes a second diode D2, the anode of the second diode D2 is connected to the power live wire ACL1, the cathode is respectively connected to the anode of the first diode D1, the first electrode of the first transistor Q1 and one end of the ninth resistor R9, and the cathode of the optocoupler U1 is also connected to the power neutral wire ACN1.
[0011] Preferably, the rectifier circuit further includes an eighth resistor R8 and a tenth resistor R10, the anode of the second diode D2 is connected to the power live line ACL1 through the eighth resistor R8, and the cathode of the optocoupler U1 is connected to the power neutral line ACN1 through the tenth resistor R10.
[0012] Preferably, the rectifier circuit includes a rectifier bridge DB1, a first input terminal AC1 of the rectifier bridge DB1 is connected to the power live wire ACL1, a second input terminal AC2 is connected to the power neutral wire ACN1, a first output terminal V+ is connected to the anode of the first diode D1, and a second output terminal V- is connected to the cathode of the optocoupler U1.
[0013] Preferably, the rectifier circuit further includes an eighth resistor R8 and a tenth resistor R10, the first input terminal AC1 of the rectifier bridge DB1 is connected to the power live line ACL1 through the eighth resistor R8, and the second input terminal AC2 of the rectifier bridge DB1 is connected to the power neutral line ACN1 through the tenth resistor R10.
[0014] Preferably, the signal generating circuit also includes a first resistor R1, a second resistor R2 and a third resistor R3, the first resistor R1 and the second resistor R2 are connected in parallel to each other and both ends are connected to the negative electrode of the first diode D1 and the second electrode of the first transistor Q1, respectively, and the two ends of the third resistor R3 are connected to the first electrode of the first transistor Q1 and the second electrode of the first transistor Q1, respectively.
[0015] Preferably, the filtering circuit includes a fifth resistor R5 and a second capacitor C2, one end of the fifth resistor R5 is respectively connected to one end of the second capacitor C2 and the collector of the optocoupler U1, the other end of the fifth resistor R5 is connected to the positive electrode of the power supply, and the other end of the second capacitor C2 and the emitter of the optocoupler U1 are grounded.
[0016] Preferably, the shaping circuit includes a fourth resistor R4, a sixth resistor R6, a seventh resistor R7 and a second transistor Q2, one end of the seventh resistor R7 is connected to the first electrode of the second transistor Q2, and the other end is connected to the collector of the optocoupler U1, the second electrode of the second transistor Q2 is grounded, one end of the fourth resistor R4 and one end of the sixth resistor R6 are both connected to the third electrode of the second transistor Q2, the other end of the fourth resistor R4 is connected to the positive electrode of the power supply, and the other end of the sixth resistor R6 is connected to the processor.
[0017] Preferably, the first transistor Q1 is a PNP transistor, whose first electrode is the base, the second electrode is the emitter, and the third electrode is the collector; the second transistor Q2 is an NPN transistor, whose first electrode is the base, the second electrode is the emitter, and the third electrode is the collector.
[0018] Preferably, the first transistor Q1 is a P-type MOS transistor, whose first electrode is a gate, the second electrode is a source, and the third electrode is a drain; the second transistor Q2 is an N-type MOS transistor, whose first electrode is a gate, the second electrode is a source, and the third electrode is a drain.
[0019] Compared with the prior art, the present invention has the following beneficial effects:
[0020] 1) The relay protection circuit can detect the zero point of AC power in real time and record the number of relay actions. The relay action time is determined according to the number of relay actions, which effectively avoids the control error caused by the action time offset, realizes the accurate switching of the relay at the zero point of AC power, reduces the arcing of the relay contacts when they are closed and disconnected, greatly prolongs the service life of the relay, and is stable and reliable;
[0021] 2) The output signal is processed through the filtering circuit and the shaping circuit, so that the processor can accurately receive the change signal, avoid misjudgment, and further improve the accuracy of AC zero point detection;
[0022] 3) Multiple relays can be detected and controlled simultaneously according to needs, which is conducive to miniaturization of circuit boards and achieves low cost and low power consumption. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 The schematic diagram of the circuit of the relay protection circuit of the first embodiment of the present invention;
[0024] Figure 2 This is a schematic diagram of a 220V mains input waveform and an output waveform of an embodiment of the present invention;
[0025] Figure 3 It is the relay control principle block diagram of the present invention;
[0026] Figure 4 This is a circuit schematic diagram of a relay protection circuit according to a second embodiment of the present invention;
[0027] Figure 5 This is a schematic diagram of the 220V mains input waveform and output waveform of the second embodiment of the present invention. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0029] It should be noted that when a component is referred to as being "connected" to another component, it may be directly connected to the other component or there may be an intermediate component. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.
[0030] Embodiment 1:
[0031] like Figure 1-3 As shown, a relay protection circuit based on high-precision zero-crossing detection is used to realize the on-off of the relay at the zero point of the alternating current. The relay protection circuit based on high-precision zero-crossing detection includes a rectifier circuit, a signal generating circuit, a filter circuit, a shaping circuit and a processor which are electrically connected in sequence, wherein:
[0032] Rectifier circuit, used to convert alternating current into positive waveform voltage;
[0033] A signal generating circuit, comprising a first diode D1, a first capacitor C1, a ninth resistor R9, a first transistor Q1 and an optical coupler U1, wherein a rectifier circuit is connected to both ends of the ninth resistor R9, an anode of the first diode D1 and a first electrode of the first transistor Q1 are respectively connected to one end of the ninth resistor R9, one end of the first capacitor C1 and a cathode of the optical coupler U1 are respectively connected to the other end of the ninth resistor R9, the other end of the first capacitor C1 is respectively connected to a cathode of the first diode D1 and a second electrode of the first transistor Q1, an anode of the optical coupler U1 is connected to a third electrode of the first transistor Q1, and the on-off of the optical coupler U1 is realized by controlling the switch of the first transistor Q1;
[0034] The processor is connected to at least one relay, and is used to receive the output signal processed by the filtering circuit and the shaping circuit, and record the number of actions of each relay. When the first transistor Q1 is disconnected, the optocoupler U1 is turned off, and the signal generating circuit sends the first output signal to the processor. When the first transistor Q1 is turned on, the optocoupler U1 is turned on, and the signal generating circuit sends the second output signal to the processor. When the processor detects that the second output signal changes to the first output signal, it determines it as the zero point of the alternating current, and determines its action time according to the number of actions of each relay, so as to realize the switching of the relay at the zero point of the alternating current.
[0035] Among them, Figure 1 As shown, the processor can be a single-chip microcomputer. The alternating current (such as 220V mains) is rectified by the rectifier circuit and divided into three paths. One path is connected to the first pole of the first transistor Q1, the other path limits the voltage drop across the optocoupler U1 through the ninth resistor R9 to determine the signal strength when the optocoupler U1 is turned on, and the last path is connected to the first diode D1 and then connected to the first capacitor C1. The first diode D1 can cut off the current when the first capacitor C1 is discharged, so that it is connected to the second pole of the first transistor Q1. The third pole of the first transistor Q1 is connected to the anode of the optocoupler U1, and the cathode of the optocoupler U1 is connected to the common end of the first capacitor C1 and the ninth resistor R9. The output end of the optocoupler U1, that is, the output end of the signal generating circuit, is connected to the filter circuit, and the output signal of the signal generating circuit is sent to the single-chip microcomputer after passing through the filter circuit and the shaping circuit in sequence.
[0036] The first capacitor C1 can continuously supply power to the second pole of the first transistor Q1 in the discharge state, and when the voltage difference between the first pole and the second pole of the first transistor Q1 is greater than the tube voltage drop, the first transistor Q1 is turned on, thereby turning on the optocoupler U1. The first transistor Q1 is turned off at other times, thereby turning off the optocoupler U1. When the first transistor Q1 is disconnected, the optocoupler U1 is turned off, and the signal generating circuit sends the first output signal to the processor. When the first transistor Q1 is turned on, the optocoupler U1 is turned on, and the signal generating circuit sends the second output signal to the processor. When the processor detects that the second output signal changes to the first output signal, it is judged as the zero point of the alternating current, and determines its action time according to the number of actions of each relay, so as to realize the on-off of the relay at the zero point of the alternating current. That is, when the alternating current reaches the zero point, a signal change (such as a falling edge) is generated, and the moment of the signal change coincides with the time when the alternating current reaches the zero point, and it is considered that the alternating current reaches the zero point. It helps to improve the detection accuracy, thereby ensuring that the relay is attracted or disconnected near the zero point of the alternating current voltage, and can reduce the arcing of the contacts of the relay when attracted and disconnected, thereby achieving the purpose of extending the service life of the relay.
[0037] The relay protection circuit can control the relay action through MCU, and the number of relays can be determined according to actual needs. Figure 3 As shown, the relay protection circuit controls multiple relay actions simultaneously through the MCU. The MCU can be integrated with the single-chip microcomputer of the relay protection circuit as a whole or in a split design, and the relay can be driven by the relay driving circuit in the prior art. The processor can adjust the action time according to the recorded number of actions of the relay. Specifically, during the life cycle of the relay, as the number of actions increases, the contact gap will become larger, which will cause the action time to become longer and the relay to age. The action time of the relay and the change law of its contact gap can be statistically calculated through a large number of experimental data collection, or the existing experimental data can be directly used. The single-chip microcomputer determines the aging degree of the relay according to the number of actions and adjusts the control relay's pull-in or disconnection time accordingly, such as appropriately increasing the relay start-up time according to the change law to adapt to the relay change, effectively avoiding the control error caused by the action time offset, ensuring that the relay is pulled in or disconnected at the zero point of the AC voltage, and extending the service life of the relay.
[0038] Through experimental testing, it is found that by using this relay protection circuit to control the on and off of the relay, the durability of the relay can be increased from 100,000 times to more than 1 million times, and the life span is increased by 10 times, which greatly extends the service life of the relay.
[0039] The relay protection circuit can detect the zero point of AC power in real time, record the number of times the relay operates, determine the operation time of the relay according to the number of times the relay operates, effectively avoid the control error caused by the operation time offset, realize the accurate switching of the relay at the zero point of AC power, reduce the arcing of the relay contacts when they are attracted and disconnected, greatly extend the service life of the relay, and be stable and reliable; the output signal is processed by the filtering circuit and the shaping circuit, so that the processor accurately receives the change signal, avoids misjudgment, and further improves the accuracy of AC zero point detection; and multiple relays can be detected and controlled at the same time according to needs, which is conducive to the miniaturization of circuit boards and achieves low cost and low power consumption.
[0040] In one embodiment, the rectifier circuit includes a second diode D2, the anode of the second diode D2 is connected to the power live line ACL1, the cathode is respectively connected to the anode of the first diode D1, the first electrode of the first transistor Q1 and one end of the ninth resistor R9, and the cathode of the optocoupler U1 is also connected to the power neutral line ACN1. By utilizing the unidirectional conductive property of the second diode D2, the relay protection circuit only detects the waveform of the positive half-wave of the alternating current, thereby realizing the detection of the zero point of the falling edge of the alternating current.
[0041] In one embodiment, the rectifier circuit further includes an eighth resistor R8 and a tenth resistor R10, the anode of the second diode D2 is connected to the power live line ACL1 through the eighth resistor R8, and the cathode of the optocoupler U1 is connected to the power neutral line ACN1 through the tenth resistor R10. The circuit determines the signal strength when the optocoupler U1 is turned on by current limiting through the eighth resistor R8 and the ninth resistor R9. The tenth resistor R10 is a protection resistor.
[0042] In one embodiment, the signal generating circuit further includes a first resistor R1, a second resistor R2 and a third resistor R3, wherein the first resistor R1 and the second resistor R2 are connected in parallel with each other and both ends are connected to the cathode of the first diode D1 and the second electrode of the first transistor Q1, respectively, and both ends of the third resistor R3 are connected to the first electrode of the first transistor Q1 and the second electrode of the first transistor Q1, respectively. The first resistor R1 and the second resistor R2 are used to limit the current when the first capacitor C1 is discharged, and the third resistor R3 is connected to the first electrode and the second electrode of the first transistor Q1, which can enhance the stability of the first transistor Q1.
[0043] In one embodiment, the filter circuit includes a fifth resistor R5 and a second capacitor C2, one end of the fifth resistor R5 is respectively connected to one end of the second capacitor C2 and the collector of the optocoupler U1, the other end of the fifth resistor R5 is connected to the positive electrode of the power supply, and the other end of the second capacitor C2 and the emitter of the optocoupler U1 are grounded. It should be noted that other filter circuits in the prior art can also be used as a replacement, which is well known to those skilled in the art and will not be described in detail here.
[0044] In one embodiment, the shaping circuit includes a fourth resistor R4, a sixth resistor R6, a seventh resistor R7 and a second transistor Q2, one end of the seventh resistor R7 is connected to the first electrode of the second transistor Q2, and the other end is connected to the collector of the optocoupler U1, the second electrode of the second transistor Q2 is grounded, one end of the fourth resistor R4 and one end of the sixth resistor R6 are both connected to the third electrode of the second transistor Q2, the other end of the fourth resistor R4 is connected to the positive electrode of the power supply, and the other end of the sixth resistor R6 is connected to the processor. It should be noted that other shaping circuits in the prior art can also be used as a substitute, which is well known to those skilled in the art and will not be described in detail here.
[0045] In one embodiment, the first transistor Q1 is a PNP transistor, whose first electrode is the base, the second electrode is the emitter, and the third electrode is the collector; the second transistor Q2 is an NPN transistor, whose first electrode is the base, the second electrode is the emitter, and the third electrode is the collector.
[0046] In one embodiment, the first transistor Q1 is a P-type MOS transistor, whose first electrode is a gate, the second electrode is a source, and the third electrode is a drain; the second transistor Q2 is an N-type MOS transistor, whose first electrode is a gate, the second electrode is a source, and the third electrode is a drain.
[0047] The switching function of the transistor is used to realize the on-off of the relevant circuit. It should be noted that the use of a triode or a MOS transistor as the transistor is a commonly used replacement method by those skilled in the art, which will not be described in detail here.
[0048] Working principle:
[0049] During the voltage rise of the positive half cycle of the alternating current, the output voltage of the rectifier circuit is in a rising state, and the first capacitor C1 is charged. At the same time, the current is connected to the emitter of the first transistor Q1 through the first resistor R1 and the second resistor R2 connected in parallel. The third resistor R3 is connected to the emitter and base of the first transistor Q1 to enhance the stability of the first transistor Q1. At this time, the base and emitter voltages of the first transistor Q1 are substantially the same, and the voltage difference between the emitter and the base is less than the tube voltage drop of the first transistor Q1. The first transistor Q1 is cut off, and the optocoupler connected to the collector of the first transistor Q1 is turned off. U1 is also cut off, the emitter of the optocoupler U1 is grounded, and the collector of the optocoupler U1 is connected to the fifth resistor R5 (pull-up resistor, such as +5V) and the second capacitor C2, so the collector of the optocoupler U1 is at a high level, and the high level is connected to the base of the second transistor Q2 through the seventh resistor R7, and the emitter of the second transistor Q2 is grounded. At this time, the second transistor Q2 is turned on, the fourth resistor R4 (pull-up resistor, such as +5V) is grounded through the second transistor Q2, and the collector of the second transistor Q2 is at a low level (i.e., the first output signal), and finally the low level is sent to the single-chip microcomputer through the sixth resistor R6.
[0050] In the process of the voltage of the positive half cycle of the alternating current decreasing from the peak value, because the output voltage of the rectifier circuit is in a decreasing state, the first capacitor C1 starts to discharge, and the current is connected to the emitter of the first transistor Q1 through the first resistor R1 and the second resistor R2 connected in parallel. At this time, the emitter voltage of the first transistor Q1 will be greater than the base voltage, and the voltage difference between the two points will increase as the voltage decreases. Before the voltage difference between the two points is less than the tube voltage drop of the first transistor Q1, the first transistor Q1 is still turned off, and the optocoupler U1 is also turned off, so the collector of the optocoupler U1 is at a high level, and the high level is connected to the base of the second transistor Q2 through the seventh resistor R7. The emitter of the second transistor Q2 is grounded. At this time, the second transistor Q2 is turned on, and the fourth resistor R4 (pull-up resistor) is connected to the base of the second transistor Q2 through the seventh resistor R7. 2 is grounded, the collector of the second transistor Q2 is low level (i.e., the first output signal), and finally the low level is sent to the single-chip microcomputer through the sixth resistor R6, and the single-chip microcomputer still receives the low level; when the voltage difference between the two points is greater than the tube voltage drop of the first transistor Q1, the first transistor Q1 is turned on, the optocoupler U1 is also turned on, the fifth resistor R5 (pull-up resistor) is grounded after being turned on by the optocoupler U1, the collector of the optocoupler U1 is low level, and the low level is connected to the base of the second transistor Q2 through the seventh resistor R7, and the emitter of the second transistor Q2 is grounded. At this time, the second transistor Q2 is turned off, and the collector of the second transistor Q2 is connected to the fourth resistor R4 (pull-up resistor), and a high level (i.e., the second output signal) is output, and finally the high level is sent to the single-chip microcomputer through the sixth resistor R6.
[0051] When the voltage of the positive half cycle of the alternating current reaches the zero point, the output voltage of the rectifier circuit is zero and the first capacitor C1 completes the discharge (due to the existence of floating, the first capacitor C1 may be delayed in completing the discharge, which can be ignored in engineering applications), so that the voltage difference between the emitter voltage of the first transistor Q1 and its base voltage is less than the tube voltage drop of the first transistor Q1, the first transistor Q1 is turned off, the optocoupler U1 is also turned off, the emitter of the optocoupler U1 is grounded, and the collector of the optocoupler U1 is connected to the fifth resistor R5 (pull-up resistor) and the second capacitor C2, so the output is high level, and the high level is connected to the seventh resistor R7. To the base of the second transistor Q2, the emitter of the second transistor Q2 is grounded, at this time the second transistor Q2 is turned on, the fourth resistor R4 (pull-up resistor) is grounded through the second transistor Q2, the collector of the second transistor Q2 is a low level (i.e., the first output signal), and finally the low level is sent to the single-chip microcomputer through the sixth resistor R6, so when the voltage drop in the positive half cycle of the alternating current reaches zero, the single-chip microcomputer will detect the change from a high level to a low level, that is, when the falling edge is detected, it is judged as the zero crossing of the alternating current voltage, thereby greatly improving the accuracy and consistency of zero crossing detection.
[0052] In the negative half cycle of the alternating current, the second diode D2 cuts off the negative voltage, the output voltage of the rectifier circuit is zero, the first transistor Q1 is cut off, the optocoupler U1 is also cut off, the emitter of the optocoupler U1 is grounded, the collector of the optocoupler U1 is connected to the fifth resistor R5 (pull-up resistor) and the second capacitor C2, and a high level is output. The high level is connected to the base of the second transistor Q2 through the seventh resistor R7, and the emitter of the second transistor Q2 is grounded. At this time, the second transistor Q2 is turned on, the fourth resistor R4 (pull-up resistor) is grounded through the second transistor Q2, and the collector of the second transistor Q2 is a low level (i.e., the first output signal). Finally, the low level is transmitted to the single-chip microcomputer through the sixth resistor R6.
[0053] The above only explains the working principle of one cycle of AC power, and the output result is as follows: Figure 2 As shown, curve S1 represents the input waveform of AC power (220V mains), with the horizontal axis being time (20ms / grid) and the vertical axis being voltage (200V / grid); curve S2 represents the output waveform of the relay protection circuit, with the horizontal axis being time (20ms / grid) and the vertical axis being voltage (5V / grid). As can be seen from the figure, the falling edge of the output waveform of the relay protection circuit basically coincides with the zero-crossing point of the 220V mains, and a higher zero-crossing detection accuracy and consistency can be obtained.
[0054] Embodiment 2:
[0055] like Figure 4-5 As shown, a relay protection circuit based on high-precision zero-crossing detection is based on Example 1, with the difference that: in this embodiment, the rectifier circuit includes a rectifier bridge DB1, the first input terminal AC1 of the rectifier bridge DB1 is connected to the power live wire ACL1, the second input terminal AC2 is connected to the power neutral wire ACN1, the first output terminal V+ is connected to the anode of the first diode D1, and the second output terminal V- is connected to the cathode of the optocoupler U1.
[0056] Among them, the alternating current (such as the mains 220V) is rectified by the rectifier bridge DB1, and the negative half-cycle waveform is also rectified into a positive half-wave, and connected from the first output terminal V+ (positive output terminal) of the rectifier DB1 to the first pole of the first transistor Q1, and another way is through the ninth resistor R9 to limit the voltage drop across the optocoupler U1, and through the second output terminal V- (negative output terminal) of the rectifier DB1 to return to the power supply zero line ACN1, and finally connected to the first diode D1 and then connected to the first capacitor C1. The first diode D1 can cut off the current when the first capacitor C1 is discharged, so that it is connected to the second pole of the first transistor Q1, and the third pole of the first transistor Q1 is connected to the anode of the optocoupler U1, and the cathode of the optocoupler U1 is connected to the common end of the first capacitor C1 and the ninth resistor R9. The output end of the optocoupler U1 is the output end of the signal generating circuit, which is connected to the input end of the filter circuit. The output signal of the signal generating circuit is sent to the single-chip microcomputer after passing through the filter circuit and the shaping circuit in sequence. By implementing full-wave rectification through the rectifier bridge DB1, the rising edge zero point and the falling edge zero point of the AC power can be accurately detected, making it easy to control the relay to be on and off at the zero point, which helps to increase the service life of the relay.
[0057] In one embodiment, the rectifier circuit further includes an eighth resistor R8 and a tenth resistor R10, the first input terminal AC1 of the rectifier bridge DB1 is connected to the power live line ACL1 through the eighth resistor R8, and the second input terminal AC2 of the rectifier bridge DB1 is connected to the power neutral line ACN1 through the tenth resistor R10. The eighth resistor R8 and the ninth resistor R9 are used to limit the current to determine the signal strength when the optocoupler U1 is turned on. The tenth resistor R10 is a protection resistor.
[0058] Working principle:
[0059] During the voltage rise of the positive half cycle of the alternating current, the output voltage of the rectifier circuit is in a rising state, and the first capacitor C1 is charged. At the same time, the current is connected to the emitter of the first transistor Q1 through the first resistor R1 and the second resistor R2 connected in parallel. The third resistor R3 is connected to the emitter and base of the first transistor Q1 to enhance the stability of the first transistor Q1. At this time, the base and emitter voltages of the first transistor Q1 are substantially the same, and the voltage difference between the emitter and the base is less than the tube voltage drop of the first transistor Q1. The first transistor Q1 is cut off, and the optocoupler connected to the collector of the first transistor Q1 is turned off. U1 is also cut off, the emitter of the optocoupler U1 is grounded, and the collector of the optocoupler U1 is connected to the fifth resistor R5 (pull-up resistor, such as +5V) and the second capacitor C2, so the collector of the optocoupler U1 is at a high level, and the high level is connected to the base of the second transistor Q2 through the seventh resistor R7, and the emitter of the second transistor Q2 is grounded. At this time, the second transistor Q2 is turned on, the fourth resistor R4 (pull-up resistor, such as +5V) is grounded through the second transistor Q2, and the collector of the second transistor Q2 is at a low level (i.e., the first output signal), and finally the low level is sent to the single-chip microcomputer through the sixth resistor R6.
[0060] In the process of the voltage of the positive half cycle of the alternating current decreasing from the peak value, because the output voltage of the rectifier circuit is in a decreasing state, the first capacitor C1 starts to discharge, and the current is connected to the emitter of the first transistor Q1 through the first resistor R1 and the second resistor R2 connected in parallel. At this time, the emitter voltage of the first transistor Q1 will be greater than the base voltage, and the voltage difference between the two points will increase as the voltage decreases. Before the voltage difference between the two points is less than the tube voltage drop of the first transistor Q1, the first transistor Q1 is still turned off, and the optocoupler U1 is also turned off, so the collector of the optocoupler U1 is at a high level, and the high level is connected to the base of the second transistor Q2 through the seventh resistor R7. The emitter of the second transistor Q2 is grounded. At this time, the second transistor Q2 is turned on, and the fourth resistor R4 (pull-up resistor) is connected to the base of the second transistor Q2 through the seventh resistor R7. 2 is grounded, the collector of the second transistor Q2 is low level (i.e., the first output signal), and finally the low level is sent to the single-chip microcomputer through the sixth resistor R6, and the single-chip microcomputer still receives the low level; when the voltage difference between the two points is greater than the tube voltage drop of the first transistor Q1, the first transistor Q1 is turned on, the optocoupler U1 is also turned on, the fifth resistor R5 (pull-up resistor) is grounded after being turned on by the optocoupler U1, the collector of the optocoupler U1 is low level, and the low level is connected to the base of the second transistor Q2 through the seventh resistor R7, and the emitter of the second transistor Q2 is grounded. At this time, the second transistor Q2 is turned off, and the collector of the second transistor Q2 is connected to the fourth resistor R4 (pull-up resistor), and a high level (i.e., the second output signal) is output, and finally the high level is sent to the single-chip microcomputer through the sixth resistor R6.
[0061] When the voltage of the positive half cycle of the alternating current reaches the zero point, the output voltage of the rectifier circuit is zero and the first capacitor C1 completes the discharge (due to the existence of floating, the first capacitor C1 may be delayed in completing the discharge, which can be ignored in engineering applications), so that the voltage difference between the emitter voltage of the first transistor Q1 and its base voltage is less than the tube voltage drop of the first transistor Q1, the first transistor Q1 is turned off, the optocoupler U1 is also turned off, the emitter of the optocoupler U1 is grounded, and the collector of the optocoupler U1 is connected to the fifth resistor R5 (pull-up resistor) and the second capacitor C2, so the output is high level, and the high level is connected to the seventh resistor R7. To the base of the second transistor Q2, the emitter of the second transistor Q2 is grounded, at this time the second transistor Q2 is turned on, the fourth resistor R4 (pull-up resistor) is grounded through the second transistor Q2, the collector of the second transistor Q2 is a low level (i.e., the first output signal), and finally the low level is sent to the single-chip microcomputer through the sixth resistor R6, so when the voltage drop in the positive half cycle of the alternating current reaches zero, the single-chip microcomputer will detect the change from a high level to a low level, that is, when the falling edge is detected, it is judged as the zero crossing of the alternating current voltage, thereby greatly improving the accuracy and consistency of zero crossing detection.
[0062] During the voltage drop of the negative half cycle of the alternating current, the output voltage of the rectifier circuit is in an increasing state, and the first capacitor C1 is charged. At the same time, the current is connected to the emitter of the first transistor Q1 through the first resistor R1 and the second resistor R2 connected in parallel. The third resistor R3 is connected to the emitter and base of the first transistor Q1 to enhance the stability of the first transistor Q1. At this time, the base and emitter voltages of the first transistor Q1 are basically the same, there is no driving voltage, the first transistor Q1 is turned off, and the optical coupler U1 connected to the emitter of the first transistor Q1 is also turned off. 1 is grounded, and the collector of the optocoupler U1 is connected to the fifth resistor R5 (pull-up resistor, such as +5V) and the second capacitor C2, so the collector of the optocoupler U1 is at a high level, and the high level is connected to the base of the second transistor Q2 through the seventh resistor R7, and the emitter of the second transistor Q2 is grounded. At this time, the second transistor Q2 is turned on, and the fourth resistor R4 (pull-up resistor, such as +5V) is grounded through the second transistor Q2. The collector of the second transistor Q2 is at a low level (i.e., the first output signal), and finally the low level is sent to the single-chip microcomputer through the sixth resistor R6.
[0063] During the voltage rise of the negative half cycle of the alternating current, because the output voltage of the rectifier circuit is in a decreasing state, the first capacitor C1 starts to discharge, and the current is connected to the emitter of the first transistor Q1 through the first resistor R1 and the second resistor R2 connected in parallel. At this time, the emitter voltage of the first transistor Q1 will be greater than the base voltage, and the voltage difference between the two points will increase as the voltage drops. Before the voltage difference between the two points is less than the tube voltage drop of the first transistor Q1, the first transistor Q1 is still cut off, and the optocoupler U1 is also cut off, so the collector of the optocoupler U1 is at a high level, and the high level is connected to the base of the second transistor Q2 through the seventh resistor R7. The emitter of the second transistor Q2 is grounded. At this time, the second transistor Q2 is turned on, and the fourth resistor R4 (pull-up resistor) is connected to the second transistor Q2 through the second transistor Q2. The collector of the second transistor Q2 is at a low level (i.e., the first output signal), and finally the low level is sent to the single-chip microcomputer through the sixth resistor R6, and the single-chip microcomputer still receives the low level; when the voltage difference between the two points is greater than the tube voltage drop of the first transistor Q1, the first transistor Q1 is turned on, the optocoupler U1 is also turned on, and the fifth resistor R5 (pull-up resistor) is grounded after being turned on by the optocoupler U1, and the collector of the optocoupler U1 is at a low level, and the low level is connected to the base of the second transistor Q2 through the seventh resistor R7, and the emitter of the second transistor Q2 is grounded. At this time, the second transistor Q2 is turned off, and the collector of the second transistor Q2 is connected to the fourth resistor R4 (pull-up resistor), and a high level (i.e., the second output signal) is output, and finally the high level is sent to the single-chip microcomputer through the sixth resistor R6.
[0064] When the negative half cycle voltage of the alternating current reaches the zero point, the output voltage of the rectifier circuit is zero and the first capacitor C1 completes the discharge (due to the existence of floating, the first capacitor C1 may be delayed in completing the discharge, which can be ignored in engineering applications), so that the voltage difference between the emitter voltage of the first transistor Q1 and its base voltage is less than the tube voltage drop of the first transistor Q1, the first transistor Q1 is turned off, the optocoupler U1 is also turned off, the emitter of the optocoupler U1 is grounded, and the collector of the optocoupler U1 is connected to the fifth resistor R5 (pull-up resistor) and the second capacitor C2, so the output is high level, and the high level is connected to the seventh resistor R7. To the base of the second transistor Q2, the emitter of the second transistor Q2 is grounded, at this time the second transistor Q2 is turned on, the fourth resistor R4 (pull-up resistor) is grounded through the second transistor Q2, the collector of the second transistor Q2 is a low level (i.e., the first output signal), and finally the low level is sent to the single-chip microcomputer through the sixth resistor R6, so when the voltage of the negative half cycle of the alternating current rises to zero, the single-chip microcomputer will detect the change from a high level to a low level, that is, when the falling edge is detected, it is judged that the alternating current voltage crosses the zero point, so that the accuracy and consistency of zero-crossing detection are greatly improved.
[0065] The above only explains the working principle of one cycle of AC power, and the output result is as follows: Figure 5 As shown, curve S1 represents the input waveform of AC power (220V mains), with the horizontal axis being time (20ms / grid) and the vertical axis being voltage (200V / grid); curve S2 represents the output waveform of the relay protection circuit, with the horizontal axis being time (20ms / grid) and the vertical axis being voltage (5V / grid). As can be seen from the figure, the falling edge of the output waveform of the relay protection circuit basically coincides with the zero-crossing point of the 220V mains, and a higher zero-crossing detection accuracy and consistency can be obtained.
[0066] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described 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] The above-described embodiments only express the more specific and detailed embodiments described in this application, but they cannot be understood as limiting the scope of the patent application. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of this application, which all belong to the protection scope of this application. Therefore, the protection scope of the patent application shall be based on the attached claims.
Claims
1. A relay protection circuit based on high-precision zero-crossing detection, used to realize the on-off of the relay at the zero point of the alternating current, characterized in that: The relay protection circuit based on high-precision zero-crossing detection comprises a rectifier circuit, a signal generating circuit, a filter circuit, a shaping circuit and a processor which are electrically connected in sequence, wherein: The rectifier circuit is used to convert the alternating current into a positive waveform voltage; The signal generating circuit comprises a first diode D1, a first capacitor C1, a ninth resistor R9, a first transistor Q1 and an optical coupler U1, wherein the rectifier circuit is connected to both ends of the ninth resistor R9, an anode of the first diode D1 and a first electrode of the first transistor Q1 are respectively connected to one end of the ninth resistor R9, one end of the first capacitor C1 and a cathode of the optical coupler U1 are respectively connected to the other end of the ninth resistor R9, the other end of the first capacitor C1 is respectively connected to a cathode of the first diode D1 and a second electrode of the first transistor Q1, an anode of the optical coupler U1 is connected to a third electrode of the first transistor Q1, and the on-off of the optical coupler U1 is realized by controlling the switch of the first transistor Q1; The processor is connected to at least one relay for receiving the output signal processed by the filtering circuit and the shaping circuit, and recording the number of actions of each relay. When the first transistor Q1 is disconnected, the optocoupler U1 is turned off, and the signal generating circuit sends the first output signal to the processor. When the first transistor Q1 is turned on, the optocoupler U1 is turned on, and the signal generating circuit sends the second output signal to the processor. When the processor detects that the second output signal changes to the first output signal, it determines that it is the zero point of the alternating current, and determines the action time of each relay according to the number of actions of each relay, so as to realize the switching of the relay at the zero point of the alternating current.
2. The relay protection circuit based on high-precision zero-crossing detection as claimed in claim 1, characterized in that: The rectifier circuit includes a second diode D2, the anode of the second diode D2 is connected to the power live wire ACL1, the cathode is respectively connected to the anode of the first diode D1, the first electrode of the first transistor Q1 and one end of the ninth resistor R9, and the cathode of the optocoupler U1 is also connected to the power neutral wire ACN1.
3. The relay protection circuit based on high-precision zero-crossing detection as claimed in claim 2, characterized in that: The rectifier circuit further includes an eighth resistor R8 and a tenth resistor R10, the anode of the second diode D2 is connected to the power live line ACL1 through the eighth resistor R8, and the cathode of the optocoupler U1 is connected to the power neutral line ACN1 through the tenth resistor R10.
4. The relay protection circuit based on high-precision zero-crossing detection according to claim 1, characterized in that: The rectifier circuit includes a rectifier bridge DB1, a first input terminal AC1 of the rectifier bridge DB1 is connected to the power live wire ACL1, a second input terminal AC2 is connected to the power neutral wire ACN1, a first output terminal V+ is connected to the anode of the first diode D1, and a second output terminal V- is connected to the cathode of the optocoupler U1.
5. The relay protection circuit based on high-precision zero-crossing detection as claimed in claim 4, characterized in that: The rectifier circuit further includes an eighth resistor R8 and a tenth resistor R10. The first input terminal AC1 of the rectifier bridge DB1 is connected to the power live line ACL1 through the eighth resistor R8. The second input terminal AC2 of the rectifier bridge DB1 is connected to the power neutral line ACN1 through the tenth resistor R10.
6. The relay protection circuit based on high-precision zero-crossing detection according to claim 1, characterized in that: The signal generating circuit also includes a first resistor R1, a second resistor R2 and a third resistor R3. The first resistor R1 and the second resistor R2 are connected in parallel with each other and both ends are connected to the negative electrode of the first diode D1 and the second electrode of the first transistor Q1 respectively. The two ends of the third resistor R3 are connected to the first electrode of the first transistor Q1 and the second electrode of the first transistor Q1 respectively.
7. The relay protection circuit based on high-precision zero-crossing detection according to claim 1, characterized in that: The filtering circuit includes a fifth resistor R5 and a second capacitor C2, one end of the fifth resistor R5 is respectively connected to one end of the second capacitor C2 and the collector of the optocoupler U1, the other end of the fifth resistor R5 is connected to the positive electrode of the power supply, and the other end of the second capacitor C2 and the emitter of the optocoupler U1 are grounded.
8. The relay protection circuit based on high-precision zero-crossing detection according to claim 1, characterized in that: The shaping circuit includes a fourth resistor R4, a sixth resistor R6, a seventh resistor R7 and a second transistor Q2, one end of the seventh resistor R7 is connected to the first electrode of the second transistor Q2, and the other end is connected to the collector of the optocoupler U1, the second electrode of the second transistor Q2 is grounded, one end of the fourth resistor R4 and one end of the sixth resistor R6 are both connected to the third electrode of the second transistor Q2, the other end of the fourth resistor R4 is connected to the positive electrode of the power supply, and the other end of the sixth resistor R6 is connected to the processor.
9. The relay protection circuit based on high-precision zero-crossing detection as claimed in claim 8, characterized in that: The first transistor Q1 is a PNP transistor, whose first electrode is the base, the second electrode is the emitter, and the third electrode is the collector; the second transistor Q2 is an NPN transistor, whose first electrode is the base, the second electrode is the emitter, and the third electrode is the collector.
10. The relay protection circuit based on high-precision zero-crossing detection according to claim 8, characterized in that: The first transistor Q1 is a P-type MOS tube, whose first electrode is a gate, the second electrode is a source, and the third electrode is a drain; the second transistor Q2 is an N-type MOS tube, whose first electrode is a gate, the second electrode is a source, and the third electrode is a drain.
Citation Information
Patent Citations
Alternating current relay zero-cross motion control circuit
CN106653483A
Relay driver
CN204242953U