time-nuts@lists.febo.com

Discussion of precise time and frequency measurement

View all threads

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

CS
Charles Steinmetz
Sun, Dec 21, 2014 11:35 PM

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,

Charles

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, Charles
N
nuts
Mon, Dec 22, 2014 5:25 AM

On Sat, 20 Dec 2014 18:31:29 -0500
"Mike Garvey" r3m1g4@verizon.net wrote:

From a Time-Nut perspective, isn't phase/frequency of the (nominal)
60 Hz all we'd be interested in?  Phase is best measured at a zero
crossing as this is the (only) phase measurement point which is
independent of amplitude.
Mike

One overkill AFSK demod is to sample the signal and compute the arcsin,
essentially producing a straight line of phase versus time. We had made
a AFSK demod using linear regression on this line to determine
frequency. This isn't overkill when you have a DSP chip there anyway.

Now I don't see a reason why similar analysis couldn't be done with
power line monitoring. Over some moving window of time, you could even
produce the difference signal between the sine wave due to the
regression fitting from the raw signal and thus display the noise on
the line.

On Sat, 20 Dec 2014 18:31:29 -0500 "Mike Garvey" <r3m1g4@verizon.net> wrote: > From a Time-Nut perspective, isn't phase/frequency of the (nominal) > 60 Hz all we'd be interested in? Phase is best measured at a zero > crossing as this is the (only) phase measurement point which is > independent of amplitude. > Mike One overkill AFSK demod is to sample the signal and compute the arcsin, essentially producing a straight line of phase versus time. We had made a AFSK demod using linear regression on this line to determine frequency. This isn't overkill when you have a DSP chip there anyway. Now I don't see a reason why similar analysis couldn't be done with power line monitoring. Over some moving window of time, you could even produce the difference signal between the sine wave due to the regression fitting from the raw signal and thus display the noise on the line.