C CastroMiguens, M Pérez Suárez, JB CastroMiguens EDN There are many circuits published showing zerocrossing detectors for use with 50 and 60Hz power lines. Though the circuit variations are plentiful, many have shortcomings. This Design Idea shows a circuit that uses only a few commonly available parts and provides good performance with low power consumption.
In the circuit shown in Figure 1, a waveform is produced at with rising edges that are synchronized with the zero crossings of the line voltage, V_{AC}. The circuit can be easily modified so that it produces a fallingedge waveform that is synchronized with V_{AC}.
The circuit operates as follows. At the zero crossings of V_{AC}, the current through the capacitor and the LED of the HCPL4701 optocoupler satisfies Equation 1 below. Equation 2 shows the standard conversion between radians per second and hertz; it also shows the derivation and explanation for V_{I}(t). Equations 3 and 4 show the simplification used in Equation 1. Because the voltage across the LED is close to constant, differentiation of that value with respect to time results in a zero value.
where and
because
(V_{LED} » constant). The peak value of the current through the LED is a function of the capacitor, C, so you must choose a value for C under the constraint that at the initial time (t = 0) and for a given minimum supplyvoltage value, the intensity exceeds the triggering threshold value for the optocoupler. In the case of the HCPL4701, it is I_{F(ON)} = 40 μA. Diode D_{1} not only allows for the capacitor to discharge but also prevents the application of a reverse voltage on the LED. The maximum reverse input voltage of the HCPL4701 is 2.5 V. Resistor R_{1} is included in order to discharge the energy stored in the capacitor in the latter portion of each cycle of V_{I}(t) when I_{C}(t) < 0 (Figure 1). Its maximum value is limited by the capacitor, by the peak value of the supply voltage (V_{ACPEAK}), and by the maximum acceptable time delay of the current rising edges through the LED with respect to the corresponding acvoltage zero crossing (Figure 2). Its minimum value is limited by the maximum allowable power dissipation in R_{1}
A practical compromise has to be reached. Table 1 shows the time delay (t_{DELAY}) of the current rising edges through the LED and the power dissipation for three different values of R_{1}. Notice that the time delay of the rising edges of V_{O} with respect to the zero crossings of V_{AC} must include an additional delay for the optocoupler’s propagation time delay. The HCPL4701 has a typical propagation time delay of 70 μsec.
Based on the previous information, the following practical values for C and R_{1} are obtained:
Empirical results are shown for V_{AC }= 267 V_{RMS}, C_{1} = 1 nF, and R_{1} = 220 kΩ (Figure 5). See Figures 6 and 7 for additional empirical results.
Note that as with any device connected directly to the mains, exercise extreme caution while bench testing the circuit. Follow proper guidelines when laying out a printed circuit board.
Materials on the topic 

