My first major digital electronics project, aged 14 I embarked on this digital clock project, sponsored by my Dad. It took several years to complete, during which time it evolved into a sidereal clock. The inspiration for this project was an article in the July/August edition of Elektor Electronics, 1984. Every summer Elektor did this bumber edition containing over 100 small projects. I didn't buy Elektor regularly but every summer this bumper edition was a must. 1984 was the first one I bought, I don't know if they did it before then. Anyway, number 17 was an alarm clock for cars. (See right. 08-May-2001: Regrettably Elektor Electronics have requested that I remove this article due to copyright infringement, and have declined me permission to reproduce it here. Read more...). It used a MM5387 chip which is almost a complete clock on a chip, plus 3 CMOS support chips. It looked like a nice project and captured my imagination. I have an MM5387 datasheet on my datasheets page. Alternatively I prepared a pinout and some brief notes. (Note: The LM8360 and LM8361 chips are equivalent to the MM5387). Somewhere along the line, thinking about it, I thought it would be more fun to design my own using individual logic chips. The MM5387 seemed like cheating somehow. And thus was this project born!
Digital electronics is beautiful from a design point of view. Every signal is either a 0 or 1. This makes everything a lot simpler than an analogue electronics circuit. With digital electronics the complexity comes from the logic. I found digital electronics preferable, and stuck to it for most of my major projects.
This Sidereal clock was my first experience of digital devices, and was marred by my choice of CMOS integrated circuits for much of the design. On paper, they looked good. They seemed to contain more functionality per chip than the more conventional TTL designs in the 74LS range. The thing about CMOS chips though is that they're very delicate. Too much static electricity, such as you might generate easily just by walking on a carpet, and they will expire. They still look the same, they just don't work anymore, and therefore neither does your cicuit. When you are designing your own project the problem then becomes one of trying to work out if the thing won't work because you have accidentally blown one or more of the cicuits, or if your design is wrong. Usually the answer turned to be both, but you can see the confusion that it all caused.
To make matters worse, CMOS chips have slightly different input and output voltage levels from their TTL counterparts, which doesn't become a problem unless you mix the two types in the same circuit. Yep you guessed it, that's what I did!
Anyhow, eventually it all worked, then Dad decided that since he was heavily into astronomy, it would be a good thing if the clock would tell siderial time. Firstly, what is sidereal time? Well, the earth spins on its own axis once every 24 hours. It also goes around the sun once every 365 days. The effect of the two motions is that whilst the sun appears to go around our sky once every 24 hours, the stars go round in only 23 hours 56 minutes. Sidereal time is where the length of each second is adjusted so that the stars go round in 24 hours according to the sidereal clock, i.e. gaining time at a rate of 1 in 365. (Actually, 1 in 365.25, because the earth takes 365.25 days to go round the sun, not 365, hence leap years every 4 years).
In 1987 there was an article in the journal of the British Astronomical Association about a modification made by John Watson to an ordinary alarm clock (see below). The strategy was to count 1461 fiftieths of seconds, then add 4 all at once. This causes the clock to gain at the required rate of 1 in 365.25. The way I made the clock, there is a small red wire inside which can be connected diffently to switch to ordinary time (this is shown in the middle of the photo to the right here).
Making a sidereal clock, by John Watson; Journal of the British Astronomical Association, June 1987 Click here to read the article!
In my circuit diagram below you'll notice the logic for adding the 4 extra pulses is pretty similar to the method given in the article. One thing I did differently was that I count 1461 seconds, then add 4. In the article they count 1461 fiftieths of a second (or sixtieths in the US) then add 4 fiftieths. My extra pulse generator comes after the divide-by-50 counter which turns the 50Hz mains frequency into 1 Hz for the clock's seconds counter. I think I did this while trying to get the thing to work so that I could see what was going on better. It would be better though to add the extra pulses before the divide-by-50 because as it is, every 20 minutes or so my clock jumps forwards by 4 extra seconds which means that an extra error of 0 to 4 seconds is present as the 20 minute cycle progresses. A 4 second jump is also noticeable (if you're watching for it!) where as a 4-fiftieths of a second jump is invisible to most of us!
The major problem with this clock was its heat generating ability. CMOS chips take hardly any power at all. The trouble is the 7-segment LED displays. They take a LOT of current, and they run on voltages around 2V. So you have to lower the standard digital supply voltage of 5V down to 2, and all that lost voltage comes out as heat. Nowadays you can use a switch mode power supply which drops the voltage without dissipating heat and is very efficient, but back in '84 they weren't commonplace. At least, not in my miniscule budget. So, I had a switch on the back to switch the display off, and I had a knob so you could vary the brightness. I also incorporated a safety device inside which turned the display off if things got too hot inside the case. In fact, unless you had the display really dim, after half an hour or so, the safety cut off would quite routinely be triggered. That didn't cause the time to be lost, but it did mean that you couldn't see the time on the display again until the power supply had cooled off a bit. So, the usual Modus Operandi was to have the display switched off unless you wanted to look at it.
Photographs
Top left on the back, there are some holes drilled in an attempt to keep the case cool. The three red buttons set the time. The top one resets the seconds count to zero, the middle one increments the minutes at a rate of 1 minute per second, the lower one increments the hours at a rate of 1 hour per second. The display on/off switch and brightness knob are to the right of that.
The back of the 7-Segment displays are at the right of the internal picture. The heat sink of the voltage regulator is at the top, with the transformer top left. In the middle of the picture you can see the second small circuit board which contains the extra counters for the Sidereal Time modification. The wires at the left go to the controls in the back of the case. In the foreground, just to the right of that prominent electrolytic capacitor, you can see the wire can be switched to ordinary time by connecting it to the one on the left instead of the right!
This is shown in BLUE in the diagram to the right. Not shown on the original circuit diagram is the leading zero blanking circuit: when the clock is showing hours less than 10, it blanks the 10 hour digit using the IC15 (74LS47) blanking inputs (pins 4 & 5). The 3 additional components were mounted on the structural 90-degree bracket to the left of the 10 hour digit. In the photo you can just about see the 1K resistor with the two tiny glass diodes underneath it.
Incorrect reset of hours digits
This is shown in RED in the diagram to the right. Pin 9 of the and gate IC20c should go to the "4" output of the 1 hour counter, IC18 pin 5. The reset pulse then occurs when "24" hours appears. (Alternatively if a 12 hour clock is desired, connect IC20c pin 8 to the "10" hour output IC18 pin 11, and IC20c pin 9 to the "2" output IC18 pin 4).
Alterative 24-hour reset circuit
This is shown in PINK in the diagram to the right. The 24 hour resetting circuit is suspect. It accurately reflects how I built mine, which works, but I must have arrived at this solution by experiment rather than theoretical design. Two AND gate outputs should not be directly connected together like this. A better solution is to reconnect IC20a as shown in GREEN, removing the diode and 47uF capacitor at the reset pins of IC18 the 4518. The logically redundant gate IC20a should slow down the reset pulse sufficiently to accurately reset both counters in IC18.
Missing resistor causes incorrect operation of 10 minutes digit
The 3K9 resistor should be added between IC17 pin 9 and +5V, as on IC16 and IC18, see diagram left. Curiously, my own clock does not include this resistor, but works without it. However another clockmaker building this clock has found it to be necessary in his case. The 4 diodes from the outputs of the 1 minute counter constitute an OR gate and strictly speaking the resistor should have gone from the input of the inverters (e.g. IC19b pin 5) to GND rather than from the outputs to +5V. It seems to work as it is.
Modified Page 2 Circuit Diagram
Full circuit diagram including all corrections and modifications.
This digital clock uses 5mm red LED's in place of the 7-segment LED's I used, with 3 such LED's per segment. Anders designed a PCB for the project, and used a quartz-crystal timebase without the sidereal modification, so his clock tells normal time.
The sidereal clock can also be used in countries where the power line frequency is 60Hz. In my country we have 50Hz mains frequency. IC3 is a dual decade counter, whose two halves devide first by 10 then 5, producing a divide-by-50 in total. To decode the "5" we use check for a "1" on the Q1 and Q3 outputs (representing 1 and 4). These are pins 11 and 13 respectively. To instead decode "6", just use pin 12 instead of pin 11, it is this simple. This then decodes Q2 (2) and Q3 (4) outputs, which is a decode of "6". This is illustrated in the revised diagram fragment below:
Note that some datasheets label the four output pins of each decade counter as Q0 to Q3. Others use Q1 to Q4. I am using the latter convention in my circuit diagram.
Sidereal Clock PCB layout by Jose Izaguirre
Jose Izaguirre and I corresponded about the sidereal clock, starting with the modification described above, for operation from 60Hz mains supplies (e.g. in the US). Later in 2010, Jose sent me the PCB layouts shown below, and the following comments:
"I am almost finishing assemble Yours sidereal clock on a double sided PCB 180x159 mm.I made few changes,They are:1) Eliminate the diodes and resistor in IC15, pins 1,4-5 and 7 and connect 4-5 to pin 16; in order to show the decimal units for the hours indication.I also added 3 diodes to IC17, to pins 15 and 7, and 4 diodes to IC18 in the same pin 15 and 7, in order to reset the clock to 00hr 00min 00sec.And a switch to convert the clock in a 12 and 24 hrs clock.I am attaching the artworks for the printed circuit board,and the placement of the different components."
Update 12-Jan-11:"another modification from the original circuit. In order to set sidereal time, to different moments in an observation or for different places, I synchronize the counters 193,from 5b4 to 0 with the seconds reset.To do that I used the pin 14 of the 193 with a 470 ohms resistor, and use the same button and signal from the seconds reset.This way the counters is going along the seconds for the solar time,and You can check that every 1461 secs time interval solar, four pulses are added to maintain the sidereal time accurate.The clock is built and working."
Jose sent the following Adobe PDF files for his PCB layout (Component side, Solder side and Composite updated 12-Jan-11):