Clock circuit using 555 timer

Thread Starter

fine1988

Joined Feb 10, 2017
5
Hi. It's been too long since I've used 555 timer as a clock and now I don't remember how. I want to make a digital clock for my room and usually I'd use a controller but I don't have any laying around so I thought I'd make one using 555. I don't want a seconds display just a minutes and hours. So the input to my BCD counter should be once every 60 seconds. I have totally forgotten how to get that from 555 and the internet is just confusing me more.
 

AlbertHall

Joined Jun 4, 2014
12,623
Your clock will be very inaccurate if you use a '555 for the clock input.
A 32kHz crystal and a '4060 oscllator/divider will give a 0.5 second output, then use a further divider to get one pulse per minute to make an accurate clock.
 

hp1729

Joined Nov 23, 2015
2,304
Design 1106 a 1 PPM LM555.PNG Design 1106 b 1 PPS LM555.PNG Design 1106 c 1 PPS CD4060.PNG
Hi. It's been too long since I've used 555 timer as a clock and now I don't remember how. I want to make a digital clock for my room and usually I'd use a controller but I don't have any laying around so I thought I'd make one using 555. I don't want a seconds display just a minutes and hours. So the input to my BCD counter should be once every 60 seconds. I have totally forgotten how to get that from 555 and the internet is just confusing me more.
A few examples to get you started. LM555 at 1 PPM, very questionable. LM555 at PPS, more stable but not too accurate. CD4060, very accurate and stable. For a clock just displaying minutes and hours you might get away with the LM555 and a reset button to set it back on track at noon or midnight. How much accuracy do you really need? I seldom need the time down to the second. Within 5 minutes is fine for my needs. AM / PM indicator? I can keep track of that myself. Alarm? battery backup in case you lose power? Clock on battery backup? Yes.
Track 60 Hz from the AC line and fall back to the LM555 on power loss?

Word ... The LM555 designs have not been built and tested so expect modifications. The CD4060 design is from Scott Wang (very reliable if I copied it right)..
 
Last edited:

dl324

Joined Mar 30, 2015
18,242
Welcome to AAC!
I want to make a digital clock for my room and usually I'd use a controller but I don't have any laying around so I thought I'd make one using 555.
If the clock will be line powered, you'll have much better long term accuracy if you use line voltage for timing.

If battery powered, use a crystal and counters as already suggested.
 

crutschow

Joined Mar 14, 2008
38,386
Just a thought. :D
It might work to use a high gain op amp circuit and a short piece of wire as an antenna to pick up the mains frequency and amplify it sufficiently to get basically a square-wave output.
That would give an accurate clock signal that could then be divided down to operate the clock.
Any comments on that?
 

crutschow

Joined Mar 14, 2008
38,386
It wouldn't work in a tent on a Cumbrian fell or as a ship's clock though
Obviously.
But it's for the op's room and I assume there's main's electricity in the building.

I did a quick test in my house and I can pick up about 50mVpp of 60Hz on my oscilloscope with about 1½ feet of clip-lead connected.
There is also has a lot of high frequency hash, but that could be low-pass filtered (a common, low frequency op amp, such as an LM324, at a high gain will do much of that filtering all by itself).

My multimeter also picked up about 40mVac with just the leads connected.
The multimeter has a relatively low frequency response on the AC scale, so likely filtered out much of the hash.
 

hp1729

Joined Nov 23, 2015
2,304
Just a thought. :D
It might work to use a high gain op amp circuit and a short piece of wire as an antenna to pick up the mains frequency and amplify it sufficiently to get basically a square-wave output.
That would give an accurate clock signal that could then be divided down to operate the clock.
Any comments on that?
Not a bad idea, I think. Can you suggest a schematic for that?
 

hp1729

Joined Nov 23, 2015
2,304
Design 1107 60 Hz band pass filter.PNG
Obviously.
But it's for the op's room and I assume there's main's electricity in the building.

I did a quick test in my house and I can pick up about 50mVpp of 60Hz on my oscilloscope with about 1½ feet of clip-lead connected.
There is also has a lot of high frequency hash, but that could be low-pass filtered (a common, low frequency op amp, such as an LM324, at a high gain will do much of that filtering all by itself).

My multimeter also picked up about 40mVac with just the leads connected.
The multimeter has a relatively low frequency response on the AC scale, so likely filtered out much of the hash.

Okay, first shot. My designing isn't too hot but how's this for a start? Start with an amplifier. That followed by a high pass filter set at about 50 Hz. Then a low pass filter set at 70 Hz. Then an amplifier to bring it up to a square wave.

As an afterthought, do I need to use a virtual ground?
I couldn't find a design for a band pass filter I understood. Any suggestions?
The tutorial in the forum didn't show one with an op amp and I wasn't sure how to put the two together.
 
Last edited:

RichardO

Joined May 4, 2013
2,270
Just a thought. :D
It might work to use a high gain op amp circuit and a short piece of wire as an antenna to pick up the mains frequency and amplify it sufficiently to get basically a square-wave output.
That would give an accurate clock signal that could then be divided down to operate the clock.
Any comments on that?
I like the idea. Maybe after the amplifying and filtering the signal should be applied to a 555 timer to synchronize it to the line voltage. If the line voltage signal is lost then the 555 free-runs at sort of the right frequency until the line frequency comes back.
 

crutschow

Joined Mar 14, 2008
38,386
I like the idea of synchronizing a 555 astable, that can free run if there's no sync.
I working on it but won't have it ready until after some shut-eye.
 

Sensacell

Joined Jun 19, 2012
3,773
Just a thought. :D
It might work to use a high gain op amp circuit and a short piece of wire as an antenna to pick up the mains frequency and amplify it sufficiently to get basically a square-wave output.
That would give an accurate clock signal that could then be divided down to operate the clock.
Any comments on that?
Fiendishly clever idea.

It will require that the circuit in general has sufficient capacitance to earth ground.
If you float this circuit on a tiny breadboard, running from a battery, it would not pick up much of anything.
There is no return path for the input current, however small it may be.

Add a big sheet of metal connected to the ground of the circuit and it will work again.
 

AlbertHall

Joined Jun 4, 2014
12,623
I like the idea of synchronizing a 555 astable, that can free run if there's no sync.
I working on it but won't have it ready until after some shut-eye.
I think a '567 might be the chip for this job. The phase lock loop will do a lot of the filtering job and it will freerun at its centre frequency when unlocked.
 

crutschow

Joined Mar 14, 2008
38,386
I found a model for a CD4046 CMOS PLL so here's the LTspice simulation of a circuit to synchronize the ambient mains signal with the PLL

upload_2017-2-12_11-25-33.png

The simulated antenna (Ant) AC signal (60Hz) is 20mVpp with about 25mVpk random noise added to simulate a typical noisy environment.
This is amplified and filtered by U1, configured as a high-gain non-inverting amp to give a high impedance antenna input.
C3 provides low frequency rolloff and gives a DC gain of 1 to prevent op amp offset from saturating the output.
The output is a square-wave with noise riding on it [V(1)].

U5 further amplifies and filters U1's signal to give a square-wave output with a small mount of noise [V(2)].

This is squared by U2 configured as a comparator with hysteresis before it goes to the CD4046 PLL input [V(3)], giving a clean square-wave.

Pot U4 is used to adjust the free-run frequency of the PLL to the local main's frequency (50 or 60Hz) with no input.

As can be seen, the VCOin control voltage stabilizes after about 200ms, indicating that the Clk PLL output is locked to the 60Hz Sigin signal from U2.

A foot or two of loosely coiled wire as an antenna should give a sufficient AC signal in typical building with AC wiring.
In my house my cheap Radio Shack multimeter, set on a non-metallic counter, registered up to 100mVac with just one lead connected.
Since the multimeter has a limited high frequency response (I suspect no more than a few kHz), I think the signal is mostly due to the 60Hz.

All in all though, this is rather complicated as compared to just using a cheap 32.768kHz clock crystal to build a reasonably accurate clock. :rolleyes:
 

Attachments

Last edited:

djsfantasi

Joined Apr 11, 2010
9,237
:D

The poor TS wants a 1/60Hz 555 circuit and the posts go crazy with PLLs, crystals, frequency dividers, antennas, synchronized astable multivibrators, tone decoder ICs, earth capacitance and god knows what else!

A circuit with a zener diode and a handful of four 4018 counters is what he asked for. I'm on my iPhone, otherwise I'd draw one up.
 

crutschow

Joined Mar 14, 2008
38,386
:D

The poor TS wants a 1/60Hz 555 circuit and the posts go crazy with PLLs, crystals, frequency dividers, antennas, synchronized astable multivibrators, tone decoder ICs, earth capacitance and god knows what else!

A circuit with a zener diode and a handful of four 4018 counters is what he asked for. I'm on my iPhone, otherwise I'd draw one up.
the "poor TS" got his answer in post #3.
If he's not interest in the rest then he/she or anyone else can just ignore it. :rolleyes:

tone decoder ICs?? :confused:
And isn't the 4018 a frequency divider?
 
Last edited:

djsfantasi

Joined Apr 11, 2010
9,237
the "poor TS" got his answer in post #3.
If he's not interest in the rest then he/she or anyone else can just ignore it. :rolleyes:

tone decoder ICs?? :confused:
And isn't the 4018 a frequency divider?
You are right of course. By the way, the 4018 is a frequency divider, but the 567, as suggested by AlbertHall, is a tone decoder.
 
Top