Correction By Offset Current

When the waveform is varying relative to VSS, then the zero cross is detected too early as the waveform falls and too late as the waveform rises. When the waveform is varying relative to VDD, then the zero cross is detected too late as the waveform rises and too early as the waveform falls. The actual offset time can be determined for sinusoidal waveforms with the corresponding equations shown below.

Figure 1. ZCD Event Offset

When External Voltage source is relative to VSS

Toffset=sin-1(ZCPINVVPEAK)2πf

When External Voltage source is relative to VDD

Toffset=sin-1(VDDZCPINVVPEAK)2πf

This offset time can be compensated for by adding a pull-up or pull-down biasing resistor to the ZCD pin. A pull-up resistor is used when the external voltage source is varying relative to VSS. A pull-down resistor is used when the voltage is varying relative to VDD. The resistor adds a bias to the ZCD pin so that the target external voltage source must go to zero to pull the pin voltage to the ZCPINV switching voltage. The pull-up or pull-down value can be determined with the equations shown below.

Figure 2. ZCD Pull-up/Pull-down Resistor

When External Voltage source is relative to VSS

Rpullup=RSERIES(VpullupZCPINV)ZCPINV

When External Voltage source is relative to VDD

Rpulldown=RSERIES(ZCPINV)(VDDZCPINV)