There are many circuits publishedshowing zero-crossingdetectors for use with 50- and60-Hz power lines. Though the circuitvariations are plentiful, manyhave shortcomings. This Design Idea shows a circuit that uses onlya few commonly available parts andprovides good performance withlow power consumption.

In the circuit shown in Figure1 , a waveform is produced at V O with rising edges that are synchronizedwith the zero crossings of theline voltage, V AC . The circuit canbe easily modified so that it producesa falling-edge waveform thatis synchronized with V AC .



Figure 1 The zero-crossing detector uses few components and consumes very little power. The V O signal has a rising edge that is coincident with each zero crossing of the line voltage, V AC .

The circuit operates as follows.At the zero crossings of V AC , the current through the capacitorand the LED of the HCPL-4701 optocoupler satisfiesEquation 1 below. Equation 2 shows the standard conversionbetween radians per second and hertz; it also showsthe derivation and explanation for v i (t). Equations 3 and4 show the simplification used in Equation 1 . Because thevoltage across the LED is close to constant, differentiationof that value with respect to time results in a zero value.

The peak value of the current through the LED is a functionof the capacitor, C, so you must choose a value for Cunder the constraint that at the initial time (t=0) and for a given minimum supply-voltage value, the intensity exceedsthe triggering threshold value for the optocoupler. In the caseof the HCPL-4701, it is I F(ON) =40 μA.

Diode D 1 not only allows for the capacitor to dischargebut also prevents the application of a reverse voltage on theLED. The maximum reverse input voltage of the HCPL-4701 is 2.5V.

Resistor R 1 is included in order to discharge the energystored in the capacitor in the latter portion of each cycle ofv i (t) when i c (t)<0 (Figure 1 ). Its maximum value is limitedby the capacitor, by the peak value of the supply voltage(V AC-PEAK ), and by the maximum acceptable time delay ofthe current rising edges through the LED with respect tothe corresponding ac-voltage zero crossing (Figure 2 ). Itsminimum value is limited by the maximum allowable powerdissipation in R 1 ([V AC-RMS ]2 /R 1 ). A practical compromise hasto be reached.



Figure 2 The relationship between v i (t) and I LED (t) is a function of the value of R 1 . The time delay between the zero crossing and the LED current is shown.

Table 1 shows the time delay (t DELAY ) of the current risingedges through the LED and the power dissipation for threedifferent values of R 1 . Notice that the time delay of the risingedges of V O with respect to the zero crossings of V AC must include an additional delay for the optocoupler’s propagationtime delay. The HCPL-4701 has a typical propagationtime delay of 70 μsec.

Based on the previous information, the following practicalvalues for C and R 1 are obtained:

For V AC =230V RMS ±20% ( Figure 3 ): C=0.5 nF/400V(MKT-HQ 370 polyester metallized, MKT series), R 1 =560kΩ/0.25W, t DELAY =114 μsec (the time delay in the risingedges of V O with respect to the zero crossings of V AC ), andP≈100 mW (average power from the ac line).

=230V ±20% ( ): C=0.5 nF/400V(MKT-HQ 370 polyester metallized, MKT series), R =560kΩ/0.25W, t =114 μsec (the time delay in the risingedges of V with respect to the zero crossings of V ), andP≈100 mW (average power from the ac line).

Figure 3 Empirical results are shown for V AC =230V RMS , C=0.5 nF, and R 1 =560 kΩ. For V AC =115V RMS ±20% ( Figure 4 ): C=1 nF/200V,R 1 =220 kΩ/0.25W, t DELAY =130 μsec (time delay in the risingedges of V O with respect to the zero crossings of V AC ), andP≈65 mW (average power from the ac line).

=115V ±20% ( ): C=1 nF/200V,R =220 kΩ/0.25W, t =130 μsec (time delay in the risingedges of V with respect to the zero crossings of V ), andP≈65 mW (average power from the ac line).

Figure 4 Empirical results are shown for V AC =115V RMS , C=1 nF, and R 1 =220 kΩ. For operation from 80 to 280V RMS : C=1 nF/400V andR 1 =330 kΩ/0.25W.

Empirical results are shown for V AC =267V RMS , C1=1 nF,and R 1 =220 kΩ (Figure 5 ). See Figures 6 and 7 for additional empirical results.



Figure 5 Empirical results are shown for V AC =267V RMS , C=1 nF, and R 1 =220 kΩ.



Figure 6 Empirical results are shown for V AC =114V RMS , C=1 nF, and R 1 =560 kΩ.



Figure 7 Empirical results are shown for V AC =228V RMS , C=1 nF, and R 1 =560 kΩ.

Note that as with any device connected directly to themains, exercise extreme caution while bench testing thecircuit. Follow proper guidelines when laying out a printedcircuit board.