Why do my clocks lose time? Bad electricity?

I’d probably call my electric company (Im sure if the city runs it they have someone you can call) & ask them about this. They’d probably come out & look at things for me for free. They have before.

Ding ding ding!

This post has been rated 10.0 on the handy scale! Congratulations!

The electric company does not guarantee you 120 volts. It may vary a bit by location, but typically they guarantee something like 120 +/- 10%, which is 108 to 132 volts. They used to guarantee the frequency in the long term so that clocks that ran off of synchronous motors (used in schools and other government buildings) were kept accurate. I don’t know if this is still guaranteed or not.

A digital alarm clock is just a microcontroller and a display. The microcontroller gets its time base from the crystal oscillator that runs the microcontroller. For example, if the manufacturer chose to use a 4 MHz pic microcontroller, then all of the timing would be based off of dividing down the 4 MHz oscillator to generate a 1 second time tick. The main power is converted into DC for use by the clock’s circuitry, so variations in both voltage and frequency on the AC side aren’t going to matter. Cheaper crystals (like you’d expect in a cheaper clock) have worse manufacturing tolerances, so while crystals in general are fairly accurate, if you have a cheap clock then the one in yours may not be so great.

One of my early labs way back in college was to create a digital clock that used all TTL chips, and used the AC frequency as its time base (fed into the circuit via a schmidt triggered gate for any curious electronic hobbyists). It’s a fairly typical EE student project, but I don’t know of any commercial clock that uses this method.

Your computer has 2 methods of keeping time. While it’s turned off, a real time clock chip keeps the time. When you turn the computer on, the operating system reads the time out of the clock chip. There is a thing in the computer called a timer tick interrupt. This is a periodic signal generated by a timer chip on the motherboard (a different chip than the real time clock chip). Among other things, the timer tick is used by the operating system to update what the operating system thinks is the correct time. Most operating systems also use the timer tick to run the operating system kernal since that guarantees that the kernal will run frequently. When you shut down the computer, the current time kept by the operating system will be written back into the real time clock chip. Since the real time clock and the timer chip use two different crystals, it’s entirely possible for one or both of them to be inaccurate. You may find that your computer keeps better time when it’s on than when it’s off, or vise-versa. There are computer programs available which will periodically sync your computer clock to an atomic clock via the internet.

Okay. It looks like the mains frequency control requirements haven’t been dropped, just relaxed a bit and altered in form back in 1997.

Frequency Control Concerns In The North American Electric Power System (warning, .PDF, and also incredibly dull reading)

So a clock synchronised to the mains won’t accumulate errors, even though it may be wrong by a few tens of seconds at any point during the day.

Such clocks are still quite common, I just looked at the schematics for my oven and for my microwave - they both operate that way.

Regarding your clocks, a1997xf11, I can’t say what’s going on. It could that they’re all crystal controlled, and just happen to all be slightly slow. Or it could be that they’re mains synchronised, and there’s some problem, say momentary supply interruptions, that are causing them to run slow.

If your clock has a backup battery to keep it going in case of utility power failure then the clock itself runs on dc and uses an oscillator as a time base which can be off from the time standard at the Naval Observatory (or wherever). The frequency of your electric power has nothing to do with it.

If you are off by 2 min. in a month that is a frequency error of about 46 parts per million shich seems to be reasonable for the inexpensive oscillators they put in clocks and watches.

Same thing for your computer clock.

I’m a bit confused by this statement. I was taught that the oscillation was caused by the voltage; higher voltage = higher frequency, lower voltage = lower frequency. Your statement suggests that the frequency of oscillations is unrelated to the voltage (or, at least, as the voltage is DC, deviations from design voltage do not affect the oscillations). By this do you mean, regardless of the supply voltage, the rectification to DC will be unaffected by any deviations on the AC side? I would think the DC output would be dependent on the AC input.

As the original post by a1997xf11 mentioned that all 3 clocks were off by 2 minutes per month, and i am under the (possibly mistaken) impression that frequency of oscillations is voltage dependent, i assumed low system voltage from the particular municipality.

Usually not. A voltage regulator is used to keep the output at a constant level even if the input varies, otherwise the microcontroller might not function properly. The oscillator circuitry is mostly built into the microcontroller (usually the only external part is the crystal) so it’s going to receive a regulated voltage as well.

Even if it didn’t, there are many types of oscillator circuits. What you are describing is basically called a voltage controlled oscillator. As you vary the voltage, the frequency also changes. Other types of oscillators (such as those typically used by crystal oscillators) take advantage of ressonance and feedback. In this case the frequency output of the oscillator is determined by the inductance and capacitance of the filter stage, and isn’t going to be dependent on the operating voltage.

Quartz crystal is a natural bandpass filter, which makes it ideal to use in a resonant feedback circuit to produce oscillations.

You can think of it as similar to blowing air over a bottle. The sound frequency you get is going to depend on the size of the bottle (the dimensions of the bottle will determine the resonant frequency). If you blow harder, you just get a louder sound, but the frequency is going to stay the same.

engineer_comp_geek, well, your explanation makes perfect sense, thanks for clearing that up.

Since it’s been so well answered…somewhat related question:

Is it possible, in theory, for a clock to keep perfect time?

I’m guessing that would violate some law of quantum physics (Uncertainty Principle?) but I don’t quite see how.

Am I the only one who read this as volunteer?

“Hey, Ed, go check the voltage of them mains over there.”
:: BZZT! ::
“Ahhh… two spasms and a twitch means 120 Volts.”

I think you can make arbitrarily accurate clocks. Consider a clock that uses as a reference a massive rotating ball in vacuum under zero gravity. The accuracy is limited by the residual atoms and photons that collide with the ball, but you can reduce the effect by improving the shielding and increasing the mass of the ball. You can’t get literally perfect accuracy, but you can get as close to it as you want.

By the way using a rotating ball isn’t so far-fetched. Currently the most accurate time references are pulsars, which are neutron stars that rotate fast and emit one pulse of radiation per rotation.

In any case, we have atomic clocks now that are more accurate than the Earth is. They can measure time so precisely that they can tell by how much the Earth’s rotation is slowing down. There have been several “leap seconds” added to recent years. That is, the rotation of the Earth has slowed down enough in the past few decades that it has been necessary to add an extra second at the end of some years for “official time” (according to the atomic clocks). Had this not been done, it would have screwed up our astronomic observations. Within a few decades, we would have started to notice that the stars seemed to be reaching their zenith points a few seconds late.

Trick question? Aren’t the atomic clocks that are used to keep Greenwich time and from which time signals are sent out in order to standardize all other clocks, by definition, “perfect time?”

I believe Universal Coordinated Time is kept as an average of a whole whack of atomic clocks around the world.

No. Currently the best atomic clocks are limited to accuracies of about a part in 10^15. Making them better isn’t just a matter of deciding to - there are real physical and engineering obstacles.

Pulsars don’t do this well, IIRC, and they have a problem in that they tend to spontaneously change their frequencies, which means you have to recharacterize them, and that takes time to do.

No such thing as perfect time. Which is why it’s a bit difficult to decide if an atmic clock is running a teensy bit fast or slow, except relative to another clock.

At some level, deciding what “perfect” time is, is arbitrary.

I don’t know about pulsars spontaneously changing frequency. I’ve never heard of such a phenomenon, unless you mean the relatively tiny glitches that can occur on occasion (Chronos?). What does make pulsars somewhat poor timekeepers ina the long term is the fact that in spewing out the great quantities of energy that they do, they slow down their rate of rotation. This happens very slowly, typically, so in the short term, at least, pulsars are very accurate clocks.

Here is some good information on pulsars.

Atomic clocks (I’m somewhat familiar with the Cesium variety) don’t take a Cesium atom and count its oscillations. If they did that, they *would * keep perfect time. Instead, the clocks have oscillators that use the Cesium resonance as feedback to keep them on track. They’re not phase-locked, just tuned, so they are not perfectly accurate.

As I understand it, they “settle” - have a “star quake” - and the frequency changes in an unpredictable way, which is a bad thing for clocks.

No, they wouldn’t. The 9192631770 number defining the second is for a cesium atom that has no perturbations. In a cesium clock there are frequency shifts due to things like magnetic fields, blackbody radiation, collisions, etc., and you can’t measure these effects exactly, so there is always some uncertainty in the frequency.