Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Digital Clock

Status
Not open for further replies.

Overclocked

Member
Im looking to build a digital clock that uses power (and line freq) for the circuity. Ive got everything designed up to the counter. The problem Im having is how to make the minutes count. Ive got 1 Hz ( divide by 16 from 60Hz and you get 1Hz) for the seconds. Ive come up with 2 solutions:

1) Use two timers to count to 59 Seconds

2) Use Another Divide by to obtain the frequency of 1 Pulse Per Minute.

I dont want to do 1, since it will raise costs, and the size of the board (plus I have no use for a seconds Counter). The problem with 2 is that I dont know what frequency 1 Pulse per 1 Minute is (since there are 60 seconds in one minute, then 60 Cycles per minute =1 minute)

Does anyone know what the frequncy is? Or is there another option?
 
Ive got 1 Hz ( divide by 16 from 60Hz and you get 1Hz) for the seconds.

I don't quite follow you were. 60/16 = 1? That doesn't seem to make sense.

Im looking to build a digital clock that uses power (and line freq) for the circuity.
I also don't quite understand what you are saying when you say the digital clock that uses power and line frequency for the circuitry.

I dont want to do 1, since it will raise costs, and the size of the board (plus I have no use for a seconds Counter). The problem with 2 is that I dont know what frequency 1 Pulse per 1 Minute is (since there are 60 seconds in one minute, then 60 Cycles per minute =1 minute)
I also don't understand what you are trying to say here. Can you reword it? But if I understand what you are trying to say, then 1 pulse per minute is just found by the formula:

f = 1/T = 1sec/1min = 1sec/60sec = 1/60
So an event that occurs once per minute has a frequency of 1/60 Hz.

It would really help if we had your circuit to look at since we have no idea how you are trying to go about this. If you are referring to using houshold AC line frequency as an oscillator signal for your clock, you do know this will make a horrible clock right? Since the frequency can and does vary a LOT.
 
Last edited:
Overclocked said:
2) Use Another Divide by to obtain the frequency of 1 Pulse Per Minute.

The problem with 2 is that I dont know what frequency 1 Pulse per 1 Minute is (since there are 60 seconds in one minute, then 60 Cycles per minute =1 minute)

Does anyone know what the frequncy is? Or is there another option?

The problem actually is that you do not know what to divide 60Hz by to get 1Hz (second). Answer: Divide by 60, or 10x6. Either way, you will need two counters of some description.

AllVol
 
Last edited:
I think were looking at a canidate for this years Darwin Awards
 
No, I actually relized that last night that I put down the wrong number after I shut my computer down and was in bed. I knew it was 60, but I was thinking of 16..

dknguyen said:
I also don't understand what you are trying to say here. Can you reword it? But if I understand what you are trying to say, then 1 pulse per minute is just found by the formula:

f = 1/T = 1sec/1min = 1sec/60sec = 1/60
So an event that occurs once per minute has a frequency of 1/60 Hz.

It would really help if we had your circuit to look at since we have no idea how you are trying to go about this. If you are referring to using houshold AC line frequency as an oscillator signal for your clock, you do know this will make a horrible clock right? Since the frequency can and does vary a LOT.

Yes, I am using 60Hz for the clock signal. Ive heard that it doesnt vary much (or at all), maybe your thinking of Line Voltage that varies alot. I will be using a small step down transformer for power, and probably using the same one to get my clock from.

I dont have a circuit to show yet, as Im stilling trying to figure out something. The minutes clock will go from 00 to 59. Once those numbers change it will change the 3rd counter (hours) to the correct setting, Say 1:00 (if the clock reads 00:59). The problem is, what happenes after 12:59? The minutes will clear to 00, and the hours counter will increment by 1 (the 2 will now be a 3) and the 1 will be blanked out. It should go to 1:00, but it doesnt. It goes to 3:00. Im guessing an AND gate would fix this, but the Counter Has to decrement by 1..

The chip I plan on using is 74193 or 7490 (or eq or by suggestion)
 
Perhaps I mistakenly carried over the variation of mains line voltage to frequency. now that I think about it...the stability of the AC line frequency has never come up.

16 and 60 are pretty close when you say them aloud. Yeah, when we are sleepy our words get slurred and if you are like me and whisper to yourself as you type that can cause problems.

Perhaps you can build the same counter circuit 2x times - each identical counter circuit increases one count for every 60 oscillations of an input AC signal and outputs an AC waveform 60x slower. You can then cascade the counters so each counter circuit feeds another counter circuit with a progessively lower frequency signal (frequency reduced by 60 each time). This would give you 2 identical circuits to build reducing costs and complexity and give you minutes, hours, 60 hours, 360 hours...etc. depending how many you cascaded..

If you wanted seconds counter you would just feed the main AC signal into a separate counter that just counts the periods of the AC signal...and does not output a waveform. It would basically be separate from all the other 1/60 cascaded counters.
 
Last edited:
**broken link removed** has how to build just the clock you're after, together with a full explanation.
 
dknguyen said:
Perhaps I mistakenly carried over the variation of mains line voltage to frequency. now that I think about it...the stability of the AC line frequency has never come up.

The long term stability of the mains frequency is extremely high, you should never need to adjust it after it's been set accurately - I don't know if it's still true or not?, but they used to adjust it during the night to keep clocks exactly on time.
 
The power companies can change the frequency in times of overload as the transformers will work more efficiently at higher frequencies.
I know it was done during one of the coal miners strikes in the UK in the 1980's? and the local power does it very, very infrequently here.
 
Nigel Goodwin said:
The long term stability of the mains frequency is extremely high.

Nearly all low to mid-priced electric clock-radios depend on mains frequency for accuracy.

AllVol
 
Last edited:
Really? I guess that makes sense. I was staring at my alarm clock a few weeks ago thinking there couldn't possibly be a quartz crystal in every single one.
 
You can get quartz wrist watches for around $ 5 any time.
Have not looked lately at any new ones but my aging alarm clock runs of the power line, for power and timing but it has a rudimentary oscillator and battery to that it is fairly accurate even after a power outage. I guess today most have crystal collators for backup. Of cause all that is obsolete with the atomic clocks; that you newer have to worry about if it was not for changing the battery once a year.


dknguyen said:
Really? I guess that makes sense. I was staring at my alarm clock a few weeks ago thinking there couldn't possibly be a quartz crystal in every single one.
 
Nigel Goodwin said:
The long term stability of the mains frequency is extremely high, you should never need to adjust it after it's been set accurately - I don't know if it's still true or not?, but they used to adjust it during the night to keep clocks exactly on time.
The power line freq is inversely proportional to the load on that grid (read alternator), I think as a demostration u can use the power line freq for clock, but of little use in real world.
 
akg said:
The power line freq is inversely proportional to the load on that grid (read alternator), I think as a demostration u can use the power line freq for clock, but of little use in real world.

"Of little use in the real world"?, there are millions of clocks that use the mains frequency for their timing, it's far more accurate than a quartz crystal - at least in the UK, where it's syncronised with an atomic clock every night.
 
Nigel Goodwin said:
"Of little use in the real world"?, there are millions of clocks that use the mains frequency for their timing, it's far more accurate than a quartz crystal - at least in the UK, where it's syncronised with an atomic clock every night.
:confused: powersupply freq in sync with atomic clock?? .for what purpose?
 
akg said:
:confused: powersupply freq in sync with atomic clock?? .for what purpose?

So you can accurately feed clocks from the mains frequency - it's been like that for many, many decades (although originally they didn't use the atomic clock signals).
 
Hi Folks,

New here - Thanks for a great forum.

Electric companies used to guarantee frequency, but not voltage (hence brown-outs and such).

The frequency from the mains should be extremely accurate - at least that was the case 15 yrs ago - I wouldnt see any reason for them to change that as so much equipment relies on on mains frequencies'.

Neon
 
Accuracy power line frequency

NeonKnight said:
Hi Folks,

New here - Thanks for a great forum.

Electric companies used to guarantee frequency, but not voltage (hence brown-outs and such).

The frequency from the mains should be extremely accurate - at least that was the case 15 yrs ago - I wouldnt see any reason for them to change that as so much equipment relies on on mains frequencies'.

Neon
Absolutely, the only thing that is stable and accurate in the main power is the frequency.

Nigel, please explain me how you will syncronize line frequency to atomic clock? You know that you output 49.95Hz for 1 hour during the day so you will output 50.05Hz for 1 hour during the night so that all clocks can catch up during the night?? Sorry but that's the first verrrrrrry verrrrrrry strange thing I read from you :(.
Maybe your mistaken by the fact that most atomic clocks, atomic wristwatch (I have one for over 13 years now, never had to change time) and other atomic stuff are syncronising during the night (according to the book from my wristwatch 3 AM) to their transmitter. This has nothing to do with power line frequency.

That was also one of my first µP project, DCF77 atomic clock decoder on 2*16 characters LCD. All runs on main power so I don't even have to change a battery like Rolf suggested :).

Please guys, never doubt about it, line frequency is one of the most stable things in modern world.
 
Last edited:
mcs51mc said:
Nigel, please explain me how you will syncronize line frequency to atomic clock? You know that you output 49.95Hz for 1 hour during the day so you will output 50.05Hz for 1 hour during the night so that all clocks can catch up during the night?? Sorry but that's the first verrrrrrry verrrrrrry strange thing I read from you :(.

I've no idea how it's actually done these days?, but in the past they had two large 'clock type' displays, one showing the time from an atomic clock (presumably from Rugby?), the second showing the time from the AC mains.

During the night they would either speed up, or slow down, the generators until the clocks read exactly the same time - bear in mind the difference was only likely to be seconds, the UK electrical system is exceptionally good anyway.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top