36.3.2.3.2 Correction by AC Coupling

When the external voltage source is sinusoidal, the effects of the ZCPINV offset can be eliminated by isolating the external voltage source from the ZCD input pin with a capacitor in series with the current-limiting resistor, as shown in the figure below.

Figure 36-7. AC Coupling the ZCD

The phase shift resulting from the capacitor will cause the ZCD output to switch in advance of the actual zero-crossing event. The phase shift will be the same for both rising and falling zero-crossings, which can be compensated for by either delaying the CPU response to the ZCD switch by a timer or other means or selecting a capacitor value large enough that the phase shift is negligible.

To determine the series resistor and capacitor values for this configuration, start by computing the impedance, Z, to obtain a peak current of IZCD_MAX/2. Next, select a suitably large non-polarized capacitor and compute its reactance, XC, at the external voltage source frequency. Finally, compute the series resistor (RSERIES), capacitor peak voltage, and phase shift by using the formulas shown below.

When this technique is used, and the input signal is not present, the ZCD may oscillate. Oscillation can be prevented by connecting the ZCD input pin to ground with a high-value resistor such as 200 kΩ, but this resistor will introduce an offset in the detection of the zero-cross event.

Equation 36-4. R-C Equations

VPEAK = External voltage source peak voltage

f = External voltage source frequency

C = Series capacitor

R = Series resistor

VC = Peak capacitor voltage

Φ = Capacitor-induced zero-crossing phase advance in radians

TΦ = Time zero-cross event occurs before actual zero-crossing

Z = V P E A K 3 × 10 4
X C = 1 2 π f C
R = Z 2 X C 2
V C = X C ( 3 × 10 4 )
Φ = tan -1 θ ( X C R )
T Φ = Φ 2 π f
Equation 36-5. R-C Calculation Example
V r m s = 120
V P E A K = V r m s × 2 = 169.7
f = 60 H z
C = 0.1 μ F
Z = V P E A K 3 × 10 4 = 169.7 3 × 10 4 = 565.7 k Ω
X C = 1 2 π f C = 1 2 π × 60 × 10 7 = 26.53 k Ω
R = Z 2 X C 2 = 565.1 k Ω ( c o m p u t e d )
R a = 560 k Ω ( u s e d )
Z R = R a 2 + X C 2 = 560.6 k Ω
I P E A K = V P E A K Z R = 302.7 × 10 6 A
V C = X C × I P E A K = 8.0 V
Φ = tan -1 θ ( X C R ) = 0.047 r a d i a n s
T Φ = Φ 2 π f = 125.6 μ s