Zero-crossing detection signal processing method and zero-crossing detection circuit

By timing the pulse waveform and correcting it with software algorithms, the zero-crossing detection error caused by the difference in the optical coupler transmission ratio in the existing technology is solved, achieving accurate zero-crossing detection and low-power design, reducing hardware complexity and the stringent requirements for component selection.

CN118884032APending Publication Date: 2024-11-01DONGGUAN CITY YOHOO ELECTRONIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410965157.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-17
Publication Date
2024-11-01

AI Technical Summary

Technical Problem

Existing zero-crossing detection technologies suffer from errors and delays. In particular, errors caused by differences in the optical coupler transmission ratio cannot be completely eliminated, and hardware compensation schemes increase power consumption and component complexity.

Method used

By timing the pulse width and period of the pulse waveform, the zero-crossing point of the AC power supply is determined. The MCU is used for software algorithm correction, and combined with the Schmitt trigger input circuit design, the center point and zero-crossing point of the pulse waveform are calculated to eliminate the error caused by the difference in the optical coupler transmission ratio.

Benefits of technology

It achieves accurate zero-crossing detection, reduces power consumption of the detection circuit, simplifies hardware design, and improves the versatility of component selection and product cost-effectiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118884032A_ABST
    Figure CN118884032A_ABST
Patent Text Reader

Abstract

The invention provides a zero-crossing detection signal processing method and a zero-crossing detection circuit, the circuit realizes the method, and the method adopts a zero-crossing detection loop to detect an alternating current signal output pulse waveform V < 0 >; the pulse waveform V0 detected and output by the zero-cross detection loop needs to be corrected and compensated; comprising the following steps: performing pulse width and pulse period timing on a pulse waveform V0 to obtain an alternating current power supply frequency or positive and negative pulse widths; a step of determining an alternating current peak value 90-degree phase point as a central point moment of the pulse waveform V0 pulse; calculating the center point time of the pulse waveform V0 pulse; and determining the zero crossing point of the power supply according to the time relationship between the 90-degree phase point and the 180-degree and 360-degree phase. By adopting the method and the circuit, the zero crossing point error can be eliminated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of AC zero-crossing detection circuits, and in particular to a zero-crossing detection signal processing method and a zero-crossing detection circuit for processing a detection signal of a detection circuit that converts a high-voltage AC power supply into a pulse waveform. Background Art

[0002] In the field of electronic control, thyristors are widely used in voltage regulation, speed regulation, power regulation, etc., and zero-crossing detection is the basis for achieving precise control: it provides a reference point for control logic - 0 phase. 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 changes from the positive half cycle to the negative half cycle and passes through the zero position in the AC system. It can be used for switching circuit or frequency detection.

[0004] In the prior art, zero-crossing detection mainly includes isolated and non-isolated zero-crossing detection according to the application form. 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 MCU recognition and detection.

[0005] Due to the transmission characteristics of the conversion circuit, the converted pulse signal must have delays and edges, rather than ideal step signals, which causes offset and delay in zero-point conversion. For the delay caused by the circuit hardware, the edge and delay characteristics of the output pulse are generally improved by reducing the input impedance or increasing the conversion circuit amplification factor. However, this will lead to increased power consumption and an increase in additional components, and it cannot completely eliminate the edges and delays. Another method is to perform time compensation 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 noise resistance, the internal input circuit will be 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 judging 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 a common device for isolated detection and driving, the optocoupler has a simple circuit structure, and its own transmission characteristics (current amplification factor or transmission control ratio) are limited, and the above problems are more prominent.

[0007] China Patent Publication No. CN 111781417A discloses a zero-crossing detection circuit that uses a fixed time compensation scheme. The circuit diagram is shown in Figure 1As shown in FIG. 1 , the scheme improves the waveform edge characteristics by making the optocoupler work in a saturated state, and at the same time compensates for the zero-crossing point by compensating for the fixed hardware circuit delay.

[0008] In this plan:

[0009] 1> The optocoupler is required to work in saturation state, which requires that the current limiting resistor cannot be too large (47K is recommended), which leads to a large power consumption of the detection circuit, about 0.51W at AC 220V. (220*220 / 47K / 2).

[0010] 2> The fixed delay compensation adopted in the scheme assumes that the hardware circuit delay is fixed. However, due to the consistency of component production, this is difficult to guarantee, which increases the rigor and cost of component selection. For example, the current transmission control ratio of the ordinary model of the optocoupler EL817 is 50%-600%; even if the optocoupler selection transmission ratio in the patent scheme is 100-300%, it is obvious that the transmission ratio of 100% and 300%, such as Figure 2 and Figure 3 As shown in the figure: the transmission characteristics in the circuit and the generated waveform delay are definitely different. Other parameters remain unchanged, only the optocoupler transmission ratio changes. When the transmission ratio is 100%, the zero-crossing falling edge generated by the optocoupler is 500 microseconds, and when the transmission ratio is 300%, the falling edge is 150 microseconds, which is about 3 times different. Therefore, fixed compensation can only improve, but cannot completely eliminate the error. Summary of the invention

[0011] The object of the present invention is to provide a zero-crossing detection signal processing method and a zero-crossing detection circuit capable of eliminating errors.

[0012] The technical solution adopted by the present invention to achieve its technical purpose is: a zero-crossing detection signal processing method, using a zero-crossing detection circuit to detect an AC signal output pulse waveform V0; it is also necessary to correct and compensate the pulse waveform V0 output by the zero-crossing detection circuit; comprising the following steps:

[0013] Step 1, timing the pulse width and pulse period of the pulse waveform V0 to obtain the AC power frequency or the positive and negative pulse widths;

[0014] Step 2, determine the AC peak 90 degree phase point as the center point of the pulse waveform V0 pulse;

[0015] Step 3, calculate the center point time of the pulse waveform V0 pulse;

[0016] Step 4: Determine the power supply zero crossing point based on the time relationship between the 90-degree phase point and the 180-degree and 360-degree phases.

[0017] Furthermore, in the above-mentioned zero-crossing detection signal processing method: the step 1 includes:

[0018] Step 101, detecting the time (t001, t002, t003...) corresponding to the low level trigger point of the falling edge of the pulse waveform V0 from high to low; detecting the time (t101, t102, t103...) corresponding to the high level trigger point of the rising edge of the pulse waveform V0 from low to high;

[0019] Step 102, calculating the time between two adjacent falling edge low level trigger points corresponding to the time instants or calculating the time difference T between two adjacent rising edge high level trigger points corresponding to the time instants according to the following formula;

[0020] T = t00n-t00m;

[0021] or

[0022] T = t10n-t10m;

[0023] T is the period of the detection pulse waveform V0, n and m are natural numbers, n=m+1.

[0024] Furthermore, in the above-mentioned zero-crossing detection signal processing method: the step 1 also includes:

[0025] Step 103, calculate the pulse width of the pulse waveform V0 according to the following formula:

[0026] T0=t10n-t00n; T0 is the pulse width of the pulse waveform V0.

[0027] Furthermore, in the above-mentioned zero-crossing detection signal processing method: the step 3 includes:

[0028] Step 301, calculate the center point time of the pulse waveform V0 according to the following formula;

[0029] t_90n=t00n+T0 / 2;

[0030] t_90n is the pulse center point moment in the nth pulse cycle of the pulse waveform V0.

[0031] Furthermore, in the above-mentioned zero-crossing detection signal processing method:

[0032] When the detection pulse waveform V0 changes from high to low, the falling edge trigger point level is determined by the following formula:

[0033] V L =Vcc / 3;

[0034] When the detection pulse waveform V0 changes from low to high, the rising edge trigger point level is determined by the following formula:

[0035] V H =2Vcc / 3;

[0036] Vcc is the pulse level of the pulse waveform V0, V L is the falling edge trigger point level, V H It is the rising edge trigger point level.

[0037] Furthermore, in the above-mentioned zero-crossing detection signal processing method: in the nth cycle, the following formula is calculated:

[0038] t_90n=t00n+(t10n-Δt) / 2

[0039] =t00n+{t10n-[T / 2-t10n]*[V H -V L 】 / 【2VCC-V H -V L 】} / 2;

[0040] t_180n=t_90n+T / 4;

[0041] =t00n+y

[0042] =t00n+

T / 2-t00n

VCC-V L

[0043] Where Δt is the time from t00n” to t10n in the nth pulse cycle; t00n” is the pulse waveform V0, the pulse rises from low to high, the low level V L Values ​​correspond to time points;

[0044] t_180n is the zero-crossing moment in the nth pulse cycle of the pulse waveform V0;

[0045] y is the time from t00n to the zero crossing point t_180.

[0046] The present invention also provides a zero-crossing detection circuit, including a detection circuit for converting a high-voltage AC power supply into a pulse waveform, an MCU for processing the pulse waveform, and the output of the detection circuit is connected to the MCU; the MCU is an intelligent device for implementing the above method.

[0047] Furthermore, in the above-mentioned zero-crossing detection circuit: in the MCU, when the detection loop output is connected to the MCU, the internal input circuit of the MCU is designed as a Schmitt input.

[0048] Furthermore, in the above zero-crossing detection circuit:

[0049] The detection circuit comprises:

[0050] Optocoupler OP1, the 1st pin and the 2nd pin of the two input ends of the optocoupler OP1 are electrically connected to the AC_L phase and the AC_N phase of the AC power supply respectively, the 3rd pin of the output end of the optocoupler OP1 is grounded, the 4th pin is connected in series with a current limiting resistor R3 and connected to the working power supply VCC, and the 4th pin of the output end of the optocoupler OP1 forms an output Vo connected to the MCU.

[0051] Furthermore, in the above zero-crossing detection circuit:

[0052] The AC_L phase of the AC power supply is electrically connected to the first pin of the input end of the optocoupler OP1, and the AC_N phase of the AC power supply is electrically connected to the second pin of the input end of the optocoupler OP1; and further includes a rectifier diode D2, which is arranged on a wire electrically connected between the AC_N phase of the AC power supply and the second pin of the input end of the optocoupler OP1, and the cathode is connected to the AC_N phase of the AC power supply;

[0053] or:

[0054] The AC_N phase of the AC power supply is electrically connected to the first pin of the input end of the optocoupler OP1, and the AC_L phase of the AC power supply is electrically connected to the second pin of the input end of the optocoupler OP1; and further includes a rectifier diode D2, which is arranged on a wire electrically connected between the AC_L phase of the AC power supply and the second pin of the input end of the optocoupler OP1, and the cathode is connected to the AC_N phase of the AC power supply;

[0055] A diode D1 is connected between the first pin and the second pin of the input end of the optocoupler OP1 to prevent the light emitter of the optocoupler OP1 from being damaged in reverse.

[0056] The method and circuit disclosed in the present invention can completely eliminate the error caused by the difference in transmission ratio of optocoupler selection.

[0057] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Attached Figure 1 It is a schematic diagram of a zero-crossing detection circuit in the prior art;

[0059] Attached Figure 2 It is the edge waveform of the optocoupler transmission ratio 100% in the prior art;

[0060] Attached Figure 3 It is an edge waveform with a 300% optical coupler transmission ratio in the prior art;

[0061] Attached Figure 4 This is a schematic diagram of a low-power zero-crossing detection circuit in Embodiment 1 of the present invention;

[0062] Attached Figure 5The input and output waveforms of the optical coupler transmission ratio of 50% of the present invention;

[0063] Attached Figure 6 The input and output waveforms of the optical coupler transmission ratio of the present invention are 100%;

[0064] Attached Figure 7 This is a signal processing flow chart of the present invention;

[0065] Attached Figure 8 Schematic diagram of the optical coupler transmission ratio waveform analysis of the present invention (I);

[0066] Attached Fig. 9 Schematic diagram of the optical coupler transmission ratio waveform analysis of the present invention (II). DETAILED DESCRIPTION

[0067] This embodiment is a circuit for detecting the zero-crossing point of an AC signal, that is, a sine wave signal. In fact, it is mainly used for detecting the zero-crossing point of an industrial frequency power supply such as a mains power supply. Figure 4 As shown in the figure, an optical coupler is also used to collect the frequency information of the industrial frequency power supply, such as Figure 4 As shown, the low-power zero-crossing detection circuit includes a detection circuit for converting a high-voltage AC power supply into a pulse waveform, an MCU for processing the pulse waveform, and an output of the detection circuit connected to the MCU; the detection circuit includes:

[0068] Optocoupler OP1, the 1st and 2nd pins of the two input ends of the optocoupler OP1 are electrically connected to the AC_L phase and AC_N phase of the AC power supply respectively, the 3rd pin of the output end of the optocoupler OP1 is grounded, the 4th pin is connected in series with a current limiting resistor R3 to the working power supply VCC, and the 4th pin of the output end of the optocoupler OP1 forms an output Vo connected to the MCU. In this embodiment, the model used by the optocoupler OP1 is EL817, which is packaged as 3750Vrms isolation voltage (Viso), and the DIP package is 5000Vrms isolation voltage. The package meets the minimum creepage distance, and the DIP package meets the minimum 7mm creepage distance. This optocoupler is mainly used in power supply equipment to isolate high and low voltages. Related terminal product applications include home appliances, temperature control, air conditioning (HVAC), vending machines, lighting control devices, chargers and switching power supplies.

[0069] In this embodiment, there are multiple connection directions between the two-phase AC power and the optocoupler OP1, as long as the light emitter (light emitting diode) of the optocoupler OP1 is not damaged by the reverse voltage. Therefore, there are the following connection modes:

[0070] The AC_L phase of the AC power supply is electrically connected to the first pin of the input end of the optocoupler OP1, and the AC_N phase of the AC power supply is electrically connected to the second pin of the input end of the optocoupler OP1; it also includes a rectifier diode D2, which is arranged on the wire electrically connected between the AC_N phase of the AC power supply and the second pin of the input end of the optocoupler OP1, and the cathode is connected to the AC_N phase of the AC power supply. A voltage-dividing resistor is also arranged in the loop of the AC_L phase of the AC power supply, the first pin of the input end of the optocoupler OP1, the second pin of the input end of the optocoupler OP1, and the AC_N phase of the AC power supply. The specific 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 end of the optocoupler OP1, and a resistor R2 between the second pin of the input end of the optocoupler OP1 and the AC_N phase of the AC power supply.

[0071] The AC_N phase of the AC power supply is electrically connected to the first pin of the input end of the optocoupler OP1, and the AC_L phase of the AC power supply is electrically connected to the second pin of the input end of the optocoupler OP1; it also includes a rectifier diode D2, which is arranged on the wire electrically connected between the AC_L phase of the AC power supply and the second pin of the input end of the optocoupler OP1, and the cathode is connected to the AC_N phase of the AC power supply. This method also requires a voltage divider resistor as shown above. In practice, the resistance values ​​of the voltage divider resistors R1 and R2 are relatively high, so the current is very small and the power consumption is very small.

[0072] 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 end of the optocoupler OP1 to prevent the light emitter of the optocoupler OP1 from being damaged in reverse.

[0073] By 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 wide and need not be steep. Figure 5 and Figure 6 shown.

[0074] In this embodiment, the collected pulse signal is processed in the MCU, and the frequency signal is obtained from the pulse signal processing, and the time point of the falling edge is obtained, which is a well-known method in the art. The processing principle in the MCU of this embodiment is explained below: The processing flow chart is as follows Figure 7 As shown:

[0075] 1. Through the conventional zero-crossing detection circuit, the high-voltage AC power signal is detected and converted to output a low-voltage pulse waveform.

[0076] 2. MCU times the pulse width and pulse period of the pulse wave to obtain the AC power frequency and the positive and negative pulse widths.

[0077] 3. Based on the symmetry of the half-cycle waveform of the AC sine wave about the peak point and the correspondence between the input and output of the conversion circuit, the 90-degree phase point of the AC peak is preliminarily determined to be the center point of the positive and negative pulses.

[0078] 4. The AC half cycle time is obtained based on the power supply frequency. The difference between the half cycle time and the pulse width is used to correct the 90-degree phase point.

[0079] 5. According to the time relationship between the 90-degree phase point and the 180-degree 360-degree phase, determine the power supply zero-crossing point (180-degree 360-degree phase point).

[0080] like Figure 8 As shown, Figure 4 The schematic diagram of the zero-crossing detection circuit comparing and analyzing the output pulse signal and the AC signal (sine wave) is shown. The pulse waveform definition in the figure is:

[0081] t00n: The time point corresponding to the falling edge level trigger point from high to low in the nth cycle; (In the following analysis, any cycle can be taken, and in any cycle, the falling edge level trigger point from high to low is called t0);

[0082] t10n: The time point corresponding to the rising edge level trigger point from low to high in the nth cycle; (In the subsequent analysis, any cycle can be taken, and in any cycle, the rising edge level trigger point from low to high is called t1)

[0083] t_90n: The 90-degree phase point of the sine wave in the nth cycle is the peak time point. (In the following analysis, any cycle can be selected, and in any cycle, the 90-degree phase point of the sine wave is the peak time point and can also be recorded as t_90).

[0084] t_180n: In the nth cycle, the 180-degree phase point of the sine wave is the first zero-crossing time point. (In the subsequent analysis, any cycle can be taken, and in any cycle, the 90-degree phase point of the sine wave, that is, the peak time point, can also be recorded as t_180).

[0085] t_360n: In the nth cycle, the 360-degree phase point of the sine wave is the second zero-crossing time point. (In the following analysis, any cycle can be taken, and in any cycle, the 90-degree phase point of the sine wave, i.e., the peak time point, can also be recorded as t_180).

[0086] T: pulse period.

[0087] The following is the analysis process:

[0088] 1. AC sine wave, which can be AC ​​sine wave of mains power, the positive half cycle passes through resistor R1, resistor R2, optocoupler OP1, diode D1 is turned on, generating current I1, through OP1's electrical-optical-electrical conversion coupling, generating current I2 = B * I1 (B is the transmission control ratio of the optocoupler - CTR), at the low voltage end, a voltage drop is generated through R3. Output VO = VCC-I2*R3.

[0089] In the negative half cycle, due to the existence of diode D2 (cut-off), the circuit is cut off, I1=0===>I2=0, and the optocoupler outputs a high level: V0=VCC.

[0090] In the positive half cycle, when I2>=VCC / R3, the output is low level. Input and output waveforms correspond to Figure 5 and Figure 6 shown.

[0091] Assuming the input sine wave is: Vsin = Asinwt; (A is the AC peak value), then:

[0092] I1=(Asinwt-VD1-VF) / (R1+R2)

[0093] I2=B*I1=B*(Asinwt-VD1-VF) / (R1+R2)

[0094] VD1 is the forward voltage drop of D1, which is about 0.7V; VF is the forward voltage drop of the optocoupler input, which is about 1.4V. The total value of the two is relatively small compared to the AC peak value (220V) and can be approximately ignored.

[0095] Then I1=Asinwt / (R1+R2);

[0096] I2 = B*Asinwt / (R1+R2);

[0097] That is, when I2=B*Asinwt / (R1+R2)>=VCC / R3, the optocoupler can output a pulse waveform.

[0098] Since the maximum value of the sine function sinwt is 1,

[0099] Further we can get:

[0100] BA / (R1+R2)>VCC / R3===>R1+R2<B*A*R3 / VCC (Formula 2-1)

[0101] That is, when R1+R2<B*A*R3 / VCC, the optocoupler can output a pulse waveform

[0102] 2. The MCU software sets the waveform input detection port ZERO_DET to edge trigger mode.

[0103] 3. Analyze the pulse waveform V0 and measure the high and low pulse width timing. The waveform diagram is as follows Figure 7 As shown:

[0104] The timing starts when the first falling edge is at a low level (t0), the first high level (upper edge trigger) is recorded as t1, and the timing continues until the second low level is recorded as t2; due to the periodicity of the sine wave, it is obvious that the period of the sine wave is T=t2-t0=t2 (t0 is the timing 0 point);

[0105] Assuming that the high and low flip trigger levels of the MCU input port are both 1 / 2VCC, then the sine wave half wave has the characteristic of being symmetrical about the peak value (phase 90 degrees t_90), and the corresponding pulse wave t0 to t1 segment will also be symmetrical about the peak value t_90 point.

[0106] Then we have: t_90 = t0 + (t1 - t0) / 2 = t1 / 2;

[0107] 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 one quarter of the period and half of t1) after point t1.

[0108] The second zero crossing point: t_360 = t_180 + T / 2; (the next zero crossing point is half a cycle after the previous zero crossing point) In the actual MCU input port design, in order to improve the anti-interference performance, the internal input circuit will be designed as a Schmitt input; that is, when the input voltage changes from low to high and from high to low, the voltage threshold for judging the high and low levels is different; the threshold for judging the high level from low to high is defined as V H , (generally V H =2Vcc / 3) changes from high to low, and the threshold value for judging as low is defined as V L , (V L =Vcc / 3); the difference between the two is called the noise margin.

[0109] The output waveform can be further analyzed. Figure 8 Shown

[0110] Fig. 9 The pulse waveform is defined in Figure 8 Basically consistent: The following is due to simplicity. Taking the first period is the case of n=1. Because each period is symmetrical, taking the first period does not lose generality.

[0111] t0: In the first pulse cycle, the falling edge level trigger point V from high to low L Corresponding time point; timing 0 o'clock.

[0112] t1”: rising edge from low to high, low level V LThe value corresponds to the time point (i.e. the symmetric point of t0 about t_90),

[0113] t1: From low to high rising edge level trigger point V H Corresponding time point;

[0114] t2: From high to low falling edge level trigger point V L Corresponding time point;

[0115] t_90: The 90-degree phase point of the sine wave, i.e. the peak time point.

[0116] t_180: The 180-degree phase point of the sine wave, i.e. the first zero-crossing time point.

[0117] t_360: The 360-degree phase point of the sine wave, i.e. the second zero-crossing time point.

[0118] x: time from 0 to t0;

[0119] Δt: time from t1” to t1;

[0120] The time from t1 to the zero-crossing point t-180 is y; t0 is the pulse width timing start point, t1 and t2 are the rising edge high level and falling edge low level timing points respectively. (VL and VH can be found in the I / O electrical characteristic parameter table of the MCU specification. Generally, VL is about 1 / 3 VCC and VH is about 2 / 3 VCC.)

[0121] Then we have: T = t2-t0 = t2

[0122] x+y=T / 2-(t1-t0)=T / 2-t1

[0123] t_90=t0+(t1″-t0) / 2=t0+(t1-Δt-t0) / 2=t0+(t1-Δt) / 2; that is, the delay (t1-Δt) / 2 after t0 starts is the peak point and the phase point is 90 degrees.

[0124] Regarding Δt, we assume that the edge of the pulse waveform 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.

[0125] That is: (VCC-V L ) / x=(VCC-V H ) / y=(V H -V L ) / Δt

[0126] (2VCC-V H -V L ) / (x+y)=(VCC-V H ) / y=(V H -VL ) / Δt

[0127] y=(x+y)*(VCC-V H ) / (2VCC-V H -V L )=(T / 2-t1)*(VCC-V L ) / (2VCC-V H -V L )

[0128] Δt=(x+y)*(V H -V L ) / (2VCC-V H -V L )=(T / 2-t1)*(V H -V L ) / (2VCC-V H -V L )

[0129] Then we have: t_90 = t0 + (t1 - Δt) / 2

[0130] =t0+[t1-(T / 2-t1)*(V H -V L ) / (2VCC-V H -V L )] / 2 (Formula 2-2)

[0131] t_180=t_90+T / 4

[0132] =t1+y

[0133] =t1+(T / 2-t1)*(VCC-V L ) / (2VCC-V H -V L ) (Formula 2-3)

[0134] In the above formula, t1 and T are obtained by MCU software timing, VCC, V L , V H The electrical parameters can be obtained from the MCU specification.

[0135] Therefore, through the above calculation and processing, the delay caused by component parameters to zero crossing is completely avoided.

[0136] By using the formula (2-1) R1+R2<B*A*R3 / VCC, the values ​​of R1, R2, and R3 can be optimized to minimize the power consumption of the detection circuit.

[0137] like Figure 4Medium parameters, calculated based on the AC effective value of 220V, the power consumption on the high-voltage side is only 81mW (220*220 / 300k / 2).

[0138] The MCU zero-crossing detection circuit output signal processing of this embodiment has the following characteristics:

[0139] 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.

[0140] The pulse wave edge slope is used to calculate the time difference from the pulse high level reading point to the actual zero crossing point, and the 90-degree time point is corrected to obtain the precise zero crossing point.

[0141] Based on the above algorithm, the power consumption reduction effect of the high-voltage side resistance value is maximized.

[0142] This embodiment has the following advantages:

[0143] This solution improves the accuracy of zero-crossing point detection through software algorithms in the MCU and reduces the hardware complexity for obtaining accurate zero-crossing points.

[0144] This solution significantly reduces the power consumption of the detection circuit and improves the service life and reliability of components.

[0145] This solution reduces the requirements for related component parameters (such as the power consumption of the current limiting resistor and the transmission ratio of the optocoupler), increases the versatility of component selection and replacement, and is beneficial to reducing product costs.

[0146] This embodiment has the following characteristics:

[0147] 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.

[0148] The pulse wave edge slope is used to calculate the time difference from the pulse high level reading point to the actual zero crossing point, and the 90-degree time point is corrected to obtain the precise zero crossing point.

[0149] Based on the above algorithm, the power consumption reduction effect of the high-voltage side resistance value is maximized.

Claims

1. A zero-crossing detection signal processing method, using a zero-crossing detection circuit to detect an AC signal output pulse waveform V0; Features: It is also necessary to correct and compensate the pulse waveform V0 output by the zero-crossing detection circuit; the following steps are included: Step 1, timing the pulse width and pulse period of the pulse waveform V0 to obtain the AC power frequency or the positive and negative pulse widths; Step 2, determine the AC peak 90 degree phase point as the center point of the pulse waveform V0 pulse; Step 3, calculate the center point time of the pulse waveform V0 pulse; Step 4: Determine the zero crossing point of the AC signal based on the time relationship between the 90-degree phase point and the 180-degree and 360-degree phases.

2. The zero-crossing detection signal processing method according to claim 1, Features: The step 1 includes: Step 101, detecting the time (t001, t002, t003...) corresponding to the low level trigger point of the falling edge of the pulse waveform V0 from high to low; detecting the time (t101, t102, t103...) corresponding to the high level trigger point of the rising edge of the pulse waveform V0 from low to high; Step 102, calculating the time between two adjacent falling edge low level trigger points corresponding to the time instants or calculating the time difference T between two adjacent rising edge high level trigger points corresponding to the time instants according to the following formula; T = t00n-t00m; or T = t10n - t10m; T is the period of the detection pulse waveform V0, n and m are natural numbers, n=m+1.

3. The zero-crossing detection signal processing method according to claim 2, Features: The step 1 also includes: Step 103, calculate the pulse width of the pulse waveform V0 according to the following formula: T0=t10n-t00n; T0 is the pulse width of the pulse waveform V0.

4. The zero-crossing detection signal processing method according to claim 3, Features: The step 3 includes: Step 301, calculate the center point time of the pulse waveform V0 according to the following formula; t_90n=t00n+T0 / 2; t_90n is the pulse center point moment in the nth pulse cycle of the pulse waveform V0.

5. The zero-crossing detection signal processing method according to claim 4, Features: When the detection pulse waveform V0 changes from high to low, the falling edge trigger point level is determined by the following formula: V L =Vcc / 3; When the detection pulse waveform V0 changes from low to high, the rising edge trigger point level is determined by the following formula: V H =2Vcc / 3; Vcc is the pulse level of the pulse waveform V0, V L is the falling edge trigger point level, V H It is the rising edge trigger point level.

6. The zero-crossing detection signal processing method according to claim 5, Features: In the nth cycle, the following formula is calculated: t_90n=t00n+(t10n-Δt) / 2 =t00n+{t10n-【T / 2-t10n】*【V H -V L 】 / 【2VCC-V H -V L 】} / 2; t_180n=t_90n+T / 4; =t00n+y =t00n+【T / 2-t00n】*【VCC—V L 】 / 【2VCC—V H —V L 】; Where Δt is the time from t00n” to t10n in the nth pulse cycle; t00n” is the pulse waveform V0, the pulse rises from low to high, the low level V L Values ​​correspond to time points; t_180n is the zero-crossing moment in the nth pulse cycle of the pulse waveform V0; y is the time from t00n to the zero crossing point t180.

7. A zero-crossing detection circuit, comprising a detection circuit for converting a high-voltage AC power supply into a pulse waveform, an MCU for processing the pulse waveform, and an output of the detection circuit connected to the MCU; Features: The MCU is an intelligent device for implementing any one of the methods described in claim 1 to claim 6.

8. The zero-crossing detection circuit according to claim 7, Features: In the MCU, when the detection loop output is connected to the MCU, the internal input circuit of the MCU is designed as a Schmitt input.

9. The zero-crossing detection circuit according to claim 7 or 8, Features: The detection circuit comprises: Optocoupler 0P1, the 1st pin and the 2nd pin of the two input ends of the optocoupler 0P1 are electrically connected to the AC_L phase and the AC_N phase of the AC power supply respectively, the 3rd pin of the output end of the optocoupler 0P1 is grounded, the 4th pin is connected in series with a current limiting resistor R3 and connected to the working power supply VCC, and the 4th pin of the output end of the optocoupler 0P1 forms an output Vo connected to the MCU.

10. The zero-crossing detection circuit according to claim 9, Features: The AC_L phase of the AC power supply is electrically connected to the first pin of the input end of the optocoupler 0P1, and the AC_N phase of the AC power supply is electrically connected to the second pin of the input end of the optocoupler 0P1; and further includes a rectifier diode D2, which is arranged on a wire electrically connected between the AC_N phase of the AC power supply and the second pin of the input end of the optocoupler 0P1, and the cathode is connected to the AC_N phase of the AC power supply; or: The AC_N phase of the AC power supply is electrically connected to the first pin of the input end of the optocoupler 0P1, and the AC_L phase of the AC power supply is electrically connected to the second pin of the input end of the optocoupler 0P1; and further includes a rectifier diode D2, which is arranged on the wire electrically connected between the AC_L phase of the AC power supply and the second pin of the input end of the optocoupler 0P1, and the cathode is connected to the AC_N phase of the AC power supply; A diode D1 is connected between the first pin and the second pin of the input end of the optocoupler OP1 to prevent the light emitter of the optocoupler OP1 from being damaged in reverse.