Low-power-consumption zero-cross detection circuit
Through the detection circuit composed of an optocoupler and rectifier diode, combined with the voltage divider resistor, an accurate pulse waveform is generated and calculated using MCU software, the high power consumption and delay offset of the zero-crossing detection circuit is solved, and the zero-crossing detection with low power consumption and high accuracy is achieved.
Patent Information
- Application Number
- CN202421762323.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2034-07-23
AI Technical Summary
The existing zero-crossing detection circuits have problems with high power consumption and delay offset, especially when the MCU recognizes pulse signals, the hysteresis time difference is obvious, which affects the control accuracy.
The detection loop composed of the optocoupler OP1 and rectifier diodes D1 and D2 is used to combine the voltage-dividing resistors R1 and R2 to generate an accurate pulse waveform through the transmission ratio of the optocoupler and the action of the rectifier diode, and the pulse waveform is processed by the MCU software to calculate the zero crossing point.
Low-power and accurate zero-crossing detection are achieved, reducing component count and power consumption, while avoiding delays and edge offsets, and improving control accuracy.
Smart Images

Figure CN223180287U_ABST
Abstract
Description
Technical Field
[0001] The utility model relates to the field of alternating current zero-crossing detection circuits, in particular to a low-power zero-crossing detection circuit. Background Art
[0002] In the field of electronic control, thyristors are widely used in voltage regulation, speed regulation, power regulation, etc. Zero-crossing detection is the basis for its precise control: it provides a reference point - the 0 phase for the control logic. Therefore, the accuracy of zero-crossing detection (0, 180 / 360 phase) directly affects the accuracy of control (voltage regulation, speed regulation, power regulation, etc.).
[0003] Zero-crossing detection refers to the detection made by the system when the (power frequency signal) waveform in an AC system passes through the zero position when it changes from the positive half-cycle to the negative half-cycle. It can be used for switch circuits or frequency detection.
[0004] In the prior art, zero-crossing detection mainly has isolated and non-isolated zero-crossing detections according to application forms. Whether it is isolated or non-isolated detection, the analog signal of the AC (generally sinusoidal AC) power supply is converted into a digital pulse signal (ideally expected to jump at the AC zero-crossing point) for the MCU to identify and detect.
[0005] Due to the transmission characteristics of the conversion circuit, the converted pulse signal must have a delay and an edge, rather than an ideal step signal, resulting in an offset and delay of the zero-crossing conversion. For the delay generated by the circuit hardware, generally, the edge and delay characteristics of the output pulse are improved by reducing the input impedance or increasing the amplification factor of the conversion circuit. However, this will lead to an increase in power consumption and an increase in additional components, and at the same time, the edge and delay cannot be completely eliminated. Another method is to perform time compensation and correction on the detection signal.
[0006] When the MCU identifies the high and low levels of the pulse signal, there will be a hysteresis time difference. The reason is that in the internal design of the MCU, in order to improve the anti-noise performance, the internal input circuit is designed as a Schmitt input; that is, when the input voltage changes from low to high and from high to low, the voltage values for determining the high and low levels are different. This time difference is related to the waveform of the pulse wave. The steeper the edge, the smaller the time difference. As an often-used device for isolated detection and driving, the optocoupler has a simple circuit structure, but due to its own transmission characteristics (current amplification factor or transmission control ratio), the above problems are more prominent. Content of the Utility Model
[0007] The purpose of the utility model is to provide a simple, low-power and accurate zero-crossing detection circuit, which uses the fewest conventional parts to accurately locate the zero-crossing point.
[0008] The technical solution adopted by the present utility model to achieve its technical purpose is as follows: A low-power zero-crossing detection circuit includes a detection circuit that converts a high-voltage AC power supply into a pulse waveform, and an MCU that processes the pulse waveform. The output of the detection circuit is connected to the MCU. The detection circuit includes:
[0009] Optocoupler OP1. The first pin and the second pin of the two input terminals of the optocoupler OP1 are respectively electrically connected to the AC_L phase and the AC_N phase of the AC power supply. The third pin of the output terminal of the optocoupler OP1 is grounded, and the fourth pin is connected in series with a current-limiting resistor R3 to the working power supply VCC. The fourth pin of the output terminal of the optocoupler OP1 forms an output Vo and is connected to the MCU.
[0010] Further, in the above low-power zero-crossing detection circuit: The AC_L phase of the AC power supply is electrically connected to the first pin of the input terminal of the optocoupler OP1, and the AC_N phase of the AC power supply is electrically connected to the second pin of the input terminal of the optocoupler OP1. It also includes a rectifier diode D2, and the rectifier diode D2 is arranged on the wire where the AC_N phase of the AC power supply is electrically connected to the second pin of the input terminal of the optocoupler OP1, and the cathode is connected to the AC_N phase of the AC power supply.
[0011] Further, in the above low-power zero-crossing detection circuit: The AC_N phase of the AC power supply is electrically connected to the first pin of the input terminal of the optocoupler OP1, and the AC_L phase of the AC power supply is electrically connected to the second pin of the input terminal of the optocoupler OP1. It also includes a rectifier diode D2, and the rectifier diode D2 is arranged on the wire where the AC_L phase of the AC power supply is electrically connected to the second pin of the input terminal of the optocoupler OP1, and the cathode is connected to the AC_N phase of the AC power supply.
[0012] Further, in the above low-power zero-crossing detection circuit: A diode D1 is connected between the first pin and the second pin of the input terminal of the optocoupler OP1 to prevent reverse damage to the light emitter of the optocoupler OP1.
[0013] Further, in the above low-power zero-crossing detection circuit: A voltage-dividing resistor is also arranged on the loop of the AC_L phase of the AC power supply, the first pin of the input terminal of the optocoupler OP1, the second pin of the input terminal of the optocoupler OP1, and the AC_N phase of the AC power supply.
[0014] Further, in the above low-power zero-crossing detection circuit: The voltage-dividing resistor includes a resistor R1 arranged between the AC_L phase of the AC power supply and the first pin of the input terminal of the optocoupler OP1, and a resistor R2 between the second pin of the input terminal of the optocoupler OP1 and the AC_N phase of the AC power supply.
[0015] The present utility model discloses a simple, low-power and accurate zero-crossing detection circuit.
[0016] The present utility model will be further described below in conjunction with the accompanying drawings and specific embodiments. Description of the Drawings
[0017] Attached Figure 1 is the schematic diagram of the low-power zero-crossing detection circuit in Embodiment 1 of the present utility model;
[0018] Attached Figure 2 is the input and output waveform of the optocoupler transmission ratio of 50% of the present utility model;
[0019] Attached Figure 3 is the input and output waveform of the optocoupler transmission ratio of 100% of the present utility model;
[0020] Attached Figure 4 is the schematic diagram (1) of the optocoupler transmission ratio waveform analysis of the present utility model;
[0021] Attached Figure 5 is the schematic diagram (2) of the optocoupler transmission ratio waveform analysis of the present utility model. Specific Embodiments
[0022] This embodiment is a low-power zero-crossing detection circuit for detecting the zero-crossing point of power frequency power supplies such as commercial power. As Figure 1 shown, it also uses an optocoupler to collect the frequency information of the power frequency power supply. As Figure 1 shown, the low-power zero-crossing detection circuit includes a detection circuit that converts a high-voltage AC power supply into a pulse waveform, and an MCU that processes the pulse waveform. The output of the detection circuit is connected to the MCU. The detection circuit includes:
[0023] Optocoupler OP1. The first pin and the second pin of the two input ends of the optocoupler OP1 are respectively electrically connected to the AC_L phase and the AC_N phase of the AC power supply. The 3rd pin of the output end of the optocoupler OP1 is grounded, and the 4th pin is connected to the working power supply VCC in series with a current-limiting resistor R3. The 4th pin of the output end of the optocoupler OP1 forms an output Vo and is connected to the said MCU. In this embodiment, the model of the optocoupler OP1 is EL817. It is packaged with an isolation voltage (Viso) of 3750Vrms, and the DIP package has an isolation voltage of 5000Vrms. This package meets the minimum creepage distance, and the DIP package meets the minimum creepage distance of 7mm. This optocoupler is mainly used in power supply equipment to isolate high and low voltages. Related end-product applications include home appliances, temperature control, air-conditioning (HVAC), vending machines, lighting control devices, chargers, and switched-mode power supplies.
[0024] In this embodiment, there are various connection directions between the two-phase alternating current and the optocoupler OP1, as long as it is ensured that the light emitter (light-emitting diode) of the optocoupler OP1 is not damaged by the reverse voltage. Therefore, there are the following connection methods:
[0025] The AC_L phase of the AC power supply is electrically connected to the first pin of the input terminal of the optocoupler OP1, and the AC_N phase of the AC power supply is electrically connected to the second pin of the input terminal of the optocoupler OP1; further included is a rectifier diode D2, and the rectifier diode D2 is arranged on the wire where the AC_N phase of the AC power supply is electrically connected to the second pin of the input terminal of the optocoupler OP1, with the cathode connected to the AC_N phase of the AC power supply. A voltage-dividing resistor is also arranged on the loop of the AC_L phase of the AC power supply, the first pin of the input terminal of the optocoupler OP1, the second pin of the input terminal of the optocoupler OP1, and the AC_N phase of the AC power supply. Specifically, the voltage-dividing resistors include a resistor R1 arranged between the AC_L phase of the AC power supply and the first pin of the input terminal of the optocoupler OP1, and a resistor R2 between the second pin of the input terminal of the optocoupler OP1 and the AC_N phase of the AC power supply.
[0026] The AC_N phase of the AC power supply is electrically connected to the first pin of the input terminal of the optocoupler OP1, and the AC_L phase of the AC power supply is electrically connected to the second pin of the input terminal of the optocoupler OP1; further included is a rectifier diode D2, and the rectifier diode D2 is arranged on the wire where the AC_L phase of the AC power supply is electrically connected to the second pin of the input terminal of the optocoupler OP1, with the cathode connected to the AC_N phase of the AC power supply. This method also requires voltage-dividing resistors as shown above. In practice, the resistance values of the voltage-dividing resistors R1 and R2 are relatively high. Therefore, the current is very small and the power consumption is very small.
[0027] In addition, in order to further protect the optocoupler OP1, a diode D1 is connected between the first pin and the second pin of the input terminal of the optocoupler OP1 to prevent the light emitter of the optocoupler OP1 from being damaged reversely.
[0028] Using the zero-crossing detection circuit of this embodiment, the edges (rising edge and falling edge) of the pulse signal input to the MCU can be very wide and do not need to be very steep, as Figure 2 and Figure 3 shown.
[0029] In this embodiment, the pulse signal collected in the MCU is processed. Obtaining the frequency signal from the pulse signal processing and obtaining the time point of the falling edge are well-known methods in the art. The following explains the processing principle in the MCU of this embodiment:
[0030] 1. Through a conventional zero-crossing detection circuit, the high-voltage AC power supply signal is detected and converted to output a low-voltage pulse waveform.
[0031] 2. The MCU measures the pulse width and pulse period of the pulse wave to obtain the AC power supply frequency and the positive and negative pulse widths.
[0032] 3. Through the symmetry characteristic of the half-cycle waveform of the AC sine wave about the peak point and the correspondence of the input and output of the conversion circuit. The 90-degree phase point of the AC peak value is preliminarily determined as the center point of the positive and negative pulses.
[0033] 4. Obtained based on the power supply frequency, the time of a half cycle of alternating current. And use the difference between the half cycle time and the pulse width to correct the 90-degree phase point.
[0034] 5. Determine the power supply zero crossing point (180-degree and 360-degree phase points) according to the time relationship between the 90-degree phase point and the 180-degree and 360-degree phases.
[0035] As Figure 4 shown, it is Figure 1 a schematic diagram of the zero crossing detection circuit comparing and analyzing the output pulse signal and the alternating current signal (sinusoidal wave). The pulse waveform definitions in the figure are:
[0036] t0: The time point corresponding to the trigger point of the falling edge from high to low level (VL);
[0037] t1: The time point corresponding to the trigger point of the rising edge from low to high level VH;
[0038] t_90: The 90-degree phase point of the sine wave, that is, the peak time point.
[0039] t_180: The 180-degree phase point of the sine wave, that is, the first zero crossing time point.
[0040] t_360: The 360-degree phase point of the sine wave, that is, the second zero crossing time point.
[0041] T: Pulse period.
[0042] The following is the analysis process:
[0043] 1. For the alternating current sine wave, during the positive half cycle, it passes through R1, R2, the optocoupler OP1, and D1 conducts, generating a current I1. Through the electro-optical-electrical conversion coupling of OP1, a current I2 = B * I1 (B is the transfer control ratio - CTR of the optocoupler) is generated. At the low voltage end, a voltage drop is generated through R3. The output VO = VCC - I2 * R3.
[0044] During the negative half cycle, due to the presence of D2, the circuit is cut off, I1 = 0 ===> I2 = 0, and the optocoupler outputs a high level: VO = VCC.
[0045] When I2 >= VCC / R3 during the positive half cycle, the output is low level. The input and output waveforms correspond Figure 4-5
[0046] Assume the input sine wave is: Vsin = Asinwt; (A is the alternating current peak value), then there is:
[0047] I1 = (Asinwt - VD1 - VF) / (R1 + R2)
[0048] I2 = B * I1 = B * (A sin wt - VD1 - VF) / (R1 + R2)
[0049] Where VD1 is the forward conduction voltage drop of D1, approximately 0.7V; VF is the forward conduction voltage drop of the optocoupler input, approximately 1.4V. The total value of the two is relatively small compared to the AC peak value and can be approximately ignored.
[0050] Then I1 = A sin wt / (R1 + R2);
[0051] I2 = B * A sin wt / (R1 + R2)
[0052] That is, when I2 = B * A sin wt / (R1 + R2) >= VCC / R3, the optocoupler can output a pulse waveform.
[0053] Since the maximum value of the sine function sin wt is 1,
[0054] Furthermore, we can obtain BA / (R1 + R2) > VCC / R3 ===> R1 + R2 < B * A * R3 / VCC (Formula 2-1)
[0055] That is, when R1 + R2 < B * A * R3 / VCC, the optocoupler can output a pulse waveform
[0056] 2. The MCU software sets the waveform input detection port ZERO_DET to the edge trigger mode.
[0057] 3. Analyze the pulse waveform VO and measure the high and low pulse widths. The waveform schematic diagram is as follows Figure 5
[0058] Start timing (t0) when the first falling edge is at a low level, record the first high level (rising edge trigger) as t1, and continue timing until the second low level as t2; Due to the periodicity of the sine wave, it is obvious that the period of the sine wave T = t2 - t0 = t2 (t0 is the timing zero point);
[0059] Assume that the high and low flip trigger levels of the MCU input port are both 1 / 2 VCC. Then, due to the symmetry of the half - wave of the sine wave about the peak value (phase 90 degrees t_90), the t0 - t1 section of the corresponding pulse wave will also be symmetric about the peak value t_90 point.
[0060] Then we have: t_90 = t0 + (t1 - t0) / 2 = t1 / 2;
[0061] Then the first zero - crossing point: t_180 = t_90 + T / 4 = t1 + (T / 4 - t1 / 2); That is, the first zero - crossing point is delayed by T / 4 - t1 / 2 (the difference between a quarter of the period and half of t1) after the t1 point.
[0062] Second zero crossing: t_360 = t_180 + T / 2; (the next zero crossing is half a period after the previous one) In the actual MCU input port design, to improve anti-interference, the internal input circuit is designed as a Schmitt input; that is, when the input voltage changes from low to high and from high to low, the voltage thresholds for determining high and low levels are different; the threshold for determining high when changing from low to high is defined as VH, (generally VH = 2Vcc / 3), and when changing from high to low, the threshold for determining low is defined as VL, (VL = Vcc / 3); the difference between the two is called the noise margin.
[0063] Further analysis of the output waveform is thus carried out. As Figure 5 shown
[0064] Figure 5 the pulse waveform is defined in
[0065] t0: The time point corresponding to the VL of the low-level trigger point from high to low; the timing zero point
[0066] t1”: The time point corresponding to the VL value of the rising edge from low to high (i.e., the symmetric point of the t0 point with respect to t_90),
[0067] t1: The time point corresponding to the VH of the high-level trigger point of the rising edge from low to high;
[0068] t2: The time point corresponding to the VL of the falling edge from high to low
[0069] t_90: The 90-degree phase point of the sine wave, i.e., the peak time point.
[0070] t_180: The 180-degree phase point of the sine wave, i.e., the first zero crossing time point.
[0071] t_360: The 360-degree phase point of the sine wave, i.e., the second zero crossing time point.
[0072] x: The time from the zero point to t0;
[0073] △t: The time from t1” to t1;
[0074] The time from t1 to the zero crossing t - 180 is y; t0 is the starting point for pulse width timing, and t1 and t2 are the timing points for the high level of the rising edge and the low level of the falling edge respectively. (VL and VH can be found in the I / O electrical characteristic parameter table of the MCU specification. Generally, VL is about 1 / 3VCC and VH is about 2 / 3VCC.)
[0075] Then: T = t2 - t0 = t2
[0076] x + y = T / 2 - (t1 - t0) = T / 2 - t1
[0077] t_90 = t0 + (t1” - t0) / 2 = t0 + (t1 - Δt - t0) / 2 = t0 + (t1 - Δt) / 2; That is, after starting timing from t0, the delay of (t1 - Δt) / 2 is the 90-degree phase point of the peak point.
[0078] Regarding Δt, we assume that the pulse waveform edge is linear. Due to the symmetry of the waveform, the absolute values of the slopes of the falling edge (0 - t0) and the rising edge (t1” - t_180) are equal.
[0079] That is: (VCC - VL) / x = (VCC - VH) / y = (VH - VL) / Δt
[0080] (2VCC - VH - VL) / (x + y) = (VCC - VH) / y = (VH - VL) / Δt
[0081] y = (x + y)*(VCC - VH) / (2VCC - VH - VL) = (T / 2 - t1)*(VCC - VL) / (2VCC - VH - VL)
[0082] Δt = (x + y)*(VH - VL) / (2VCC - VH - VL) = (T / 2 - t1)*(VH - VL) / (2VCC - VH - VL)
[0083] Then: t_90 = t0 + (t1 - Δt) / 2
[0084] = t0 + [t1 - (T / 2 - t1)*(VH - VL) / (2VCC - VH - VL)] / 2 (Formula 2-2)
[0085] t_180 = t_90 + T / 4
[0086] = t1 + y
[0087] = t1 + (T / 2 - t1)*(VCC - VL) / (2VCC - VH - VL) (Formula 2-3) [[ID=J34]]
[0088] In the above formula, t1 and T are obtained by MCU software timing, and VCC, VL, and VH can be obtained from the electrical parameters in the MCU specification.
[0089] Thus, through the above calculation and processing, the delay caused by component parameters to the zero crossing is completely avoided.
[0090] The values of R1, R2, and R3 can be optimized using the formula (2-1) R1+R2<B*A*R3 / VCC to minimize the power consumption of the detection circuit.
[0091] As Figure 1 For the parameters in [reference], calculated according to the AC effective value of 220V, the power consumption on the high-voltage side is only 81mW (220*220 / 300k / 2).
[0092] The output signal processing of the MCU zero-crossing detection circuit in this embodiment has the following characteristics:
[0093] By calculating the pulse waveform, the 90-degree time point of the input waveform is determined, and the zero-crossing point is determined based on the 90-degree time point.
[0094] Using the edge slope of the pulse wave, calculate the time difference between the high-level reading point of the pulse and the true zero-crossing point, and correct the 90-degree time point. Thus, an accurate zero-crossing point is obtained.
[0095] Based on the above algorithm, maximize the reduction of power consumption by increasing the resistance value on the high-voltage side.
Claims
1. A low-power zero-crossing detection circuit, comprising a detection circuit that converts a high-voltage AC power supply into a pulse waveform, and an MCU that processes the pulse waveform, wherein the output of the detection circuit is connected to the MCU; characterized in that: The detection circuit described above includes: Optocoupler OP1. The first pin and the second pin of the two input terminals of the optocoupler OP1 are respectively electrically connected to the AC_L phase and the AC_N phase of the AC power supply. The 3-pin of the output terminal of the optocoupler OP1 is grounded, and the 4-pin is connected to the working power supply VCC in series with a current-limiting resistor R3. The 4-pin of the output terminal of the optocoupler OP1 forms an output Vo and is connected to the MCU.
2. The low-power zero-crossing detection circuit according to claim 1, wherein: The AC_L phase of the AC power supply is electrically connected to the first pin of the input terminal of the optocoupler OP1, and the AC_N phase of the AC power supply is electrically connected to the second pin of the input terminal of the optocoupler OP1; it further includes a rectifier diode D2, and the rectifier diode D2 is arranged on the wire where the AC_N phase of the AC power supply is electrically connected to the second pin of the input terminal of the optocoupler OP1, and the cathode is connected to the AC_N phase of the AC power supply.
3. The low-power zero-crossing detection circuit according to claim 1, wherein: The AC_N phase of the AC power supply is electrically connected to the first pin of the input terminal of the optocoupler OP1, and the AC_L phase of the AC power supply is electrically connected to the second pin of the input terminal of the optocoupler OP1; it further includes a rectifier diode D2, and the rectifier diode D2 is arranged on the wire where the AC_L phase of the AC power supply is electrically connected to the second pin of the input terminal of the optocoupler OP1, and the cathode is connected to the AC_N phase of the AC power supply.
4. The low-power zero-crossing detection circuit according to claim 2 or 3, characterized in that: A diode D1 is connected between the first pin and the second pin of the input terminal of the optocoupler OP1 to prevent reverse damage to the light emitter of the optocoupler OP1.
5. The low-power zero-crossing detection circuit according to claim 2, wherein: Voltage-dividing resistors are also arranged on the loop of the AC_L phase of the AC power supply, the first pin of the input terminal of the optocoupler OP1, the second pin of the input terminal of the optocoupler OP1, and the AC_N phase of the AC power supply.
6. The low-power zero-crossing detection circuit according to claim 5, wherein: The voltage-dividing resistors include a resistor R1 arranged between the AC_L phase of the AC power supply and the first pin of the input terminal of the optocoupler OP1, and a resistor R2 between the second pin of the input terminal of the optocoupler OP1 and the AC_N phase of the AC power supply.