[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-user: Using 60Hz mains frequency for timing?
At 12:33 PM 5/2/2008, you wrote:
>Just a quick non-gEDA design question -- I have the choice between
>using the zero crossings of the 60Hz mains voltage or my MCU clock
>(generated from an 18.432MHz quartz crystal producing a 48MHz CPU
>clock via PLL built into the MCU) for low-resolution timing. The
>crystal is not designed as a watch crystal, so its tolerance is
>probably pretty poor, and furthermore this board will see wide
>temperature swings, which I think has an affect on the crystal
>frequency as well. I have no idea how precise the 60Hz line frequency
>from the power utility is, but it at least is probably not
>temperature-dependant. Either one is easy to use -- I just want to be
>as accurate as possible.
>
>Anybody have suggestions? TIA,
The answer is, "it depends". If you need good short term accuracy,
then the crystal is far and away the better choice. Even a poor
crystal is around 100 ppm accurate (0.01%). This is over temp and time.
The power line, on the other hand, has poor short term accuracy. I
have seen the frequency drift by several tenths of a percent over a
short time. However, the power line frequency is controlled as if it
were a phase locked loop. So the long term frequency average is nearly zero.
So if you need good accuracy at all times, the crystal is the best
choice. If you simply need to know what time it is without having to
worry about long term drift, the power line is the right way to
go. But be careful that your zero crossing detector does not get
glitched. Make sure it only responds to low frequency AC and not
higher frequency noise.
Rick
Arius - A Signal Processing Solutions Company
Specializing in DSP and FPGA design URL http://www.arius.com
4 King Ave 301-682-7772 Voice
Frederick, MD 21701-3110 301-682-7666 FAX
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user