[time-nuts] Simple AC mains zero-cross detector

Charles Steinmetz csteinmetz at yandex.com
Sun Dec 21 18:35:32 EST 2014

Chuck wrote:

>Transformers, such as are in wall warts, etc..., are wound
>in a way that is pretty good for 50Hz/60Hz operation, but have
>had nothing intentionally done to normalize operation at any
>other frequency.  Nor have they had anything done to improve
>the fidelity of the signal they pass.

I frequently recommend small 120:12v or 120:6.3v power transformers 
as 600 ohm line to voice coil transformers for audio applications.  I 
have tested scores of them, and have yet to find one that is not flat 
from at least 20Hz to 15kHz -- often significantly better -- if 
operated at no more than 1/2 its rated 60Hz power.  The distortion is 
typically < 1% at that power level.  [I have not measured 
transformers from wall warts, but I expect that many if not most of 
them conform to the same general specs.]

>Typically, they are running very near the edge where the
>core is entering saturation,

That depends on the current you are drawing.  The ZCD circuit doesn't 
draw anywhere close to the transformer's rated current, so core 
saturation is no worry at all.

>Because of the nature of transformers, a transformer isolated ZCD
>will propagate every of the various frequencies it passes, with
>a different delay.

The transformer's group delay is not an issue at the 1uS 
level.  However, the input filter I specified has non-constant group 
delay, which varies about 40uS from 10Hz to 600Hz (the range of 
frequencies where I observed significant components of grid 
transients).  So, there is a tradeoff.  If accurate timing of 
transients is more important than some spurious noise responses, the 
ZCD should be built without the filter capacitors (C1 and C5 on the 
schematic), as noted in the description.  In that case, the group 
delay is within 1uS for all frequencies above ~10Hz.

Note that this also applies to any other detector, including those 
using optoisolators -- any input filtering will create non-constant 
group delay.

Best regards,


More information about the time-nuts mailing list