This is only a preview of the August 1993 issue of Silicon Chip. You can view 27 of the 96 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Articles in this series:
Items relevant to "Low-Cost Colour Video Fader":
Articles in this series:
Articles in this series:
|
A microprocessor
based sidereal clock
Are you an amateur astronomer who needs to
know the position of the stars in the sky? If so,
you need a sidereal clock. This microprocessor
controlled clock has two 6-digit displays which
show sidereal time & local or universal time.
By JOHN WESTERN
A sidereal clock measures time
relative to the stars as opposed to a
normal clock which measures time
relative to the Sun. A star’s position
relative to the Earth is measured in
sidereal days. A sidereal day is the
time taken for the Earth to spin once
on its axis relative to the stars. This
is about four minutes shorter than a
solar day. The ratio, as listed in “The
Astronomical Almanac” is a factor
of 1.00273790934, accurate to 12
decimal places.
This clock has two displays: the
left-hand display indi
cates sidereal
time while the right-hand display can
display universal or local time. Each
mode is referenced to a common temperature controlled crystal oscillator.
30 Silicon Chip
Five keys on the front panel give
universal/local time selection, display
brightness, time setting and regulation
(ie, setting the long-term accuracy of
the clock). The clock can be set to
provide a tone on the minute for either
universal or sidereal time.
Circuit description
The circuit is based on a Z80C
microprocessor running at 4MHz,
together with a 6116 RAM, a 27C32
EPROM, an 82C55 PIO chip, two 7447
display drivers and 12 7-segment LED
displays as the other major components – see Fig.1 & Fig.2. The circuit
is divided among three PC boards,
one for the CPU, one for the 12-digit
display and one for the temperature
controlled oscillator – see Fig.3.
The CPU board (Fig.1) provides the
functions of a frequency divider, a
power-off detector, a reset circuit, an
address decoder and the power supply.
A 4020 14-stage binary counter, U6,
divides the 4MHz clock by 29 (512)
to give a frequency of 7812.5Hz. This
is then used to interrupt the Z80C on
its NMI input (pin 17, U1). The correct universal time is determined by
counting to a figure close to 7813 for
each second that passes.
Reference divider numbers
In fact, the division process is a little
more complex because if the clock is
to keep accurate time for a long period,
the precise division factor can only
be determined by trial and error over
a period which may span weeks or
months. This design allows the user
to actually program in the division
numbers.
There are four division numbers
for universal time and these are designated as U1, U2, U3 and U4. U1 is
the division number used at the end
of each second; U2 is used at the last
second of each minute; U3 is used at
the last second of each hour; and U4
is used for the last second of each 24hour day. In this fashion, a change in
the value of U4 will allow the accuracy
of the clock to be altered by one part
in 675 million.
The sidereal division factors are
designated as S1, S2, S3 and S4 and
these are used in the same way as the
division factors for universal time. To
keep track of sidereal time, the clock
simply subtracts the value S1 from U1,
S2 from U2 and so on. The numbers are
calculated from the measured timing
error using the Basic program accompanying this article. The measured
timing error is calculated by reference
to a precise clock such as Telecom’s
time service or Radio VNG.
Ultimately, the reference numbers
are stored in RAM when they are fed
via the keypad buttons on the front
panel. The stored program in the
EPROM then uses these numbers for
correct time keeping.
Supply monitoring
U7E, a Schmitt inverter, is used to
monitor the +12V supply and whenever this is present, its output at pin
10 is low. When the +12V supply is
removed, such as when the clock is in
transit or not being used, pin 10 of U7E
pulls PC3 of the 82C55 high (pin 17,
U2). The Z80C then sets all the ports of
the 82C55 to the input condition and
this prevents current being sourced to
the display board from the stand-by
battery BT1.
Thus, the oscillator and CPU boards
keep functioning but the display board
is effectively disabled. Even so, the
time for which the stand-by battery
can keep the clock going is limited to
a few hours at most. This is because
the current drawn by the oscillator
heater is fairly substantial at around
250 milliamps.
U5 is a 74HC138 3-to-8 line decoder. It monitors the A12, A13 & A14
address lines which are used to select
memory blocks of 4096 bytes. The
EPROM is located at address 0000H,
the RAM at address 1000H, the 82C55
at address 2000H and the keyboard
beeper at address 3000H.
The power-on reset circuit is based
on Schmitt inverter stages U7a and
U7b. When power is first applied, C1
charges to +5V via R1. Schmitt trigger
inverter U7a detects the transition
from low to high on pin 1. Its output
at pin 2 then goes low and resets the
This view inside the completed prototype shows how the CPU board, display
board & the oscillator (inside small box) fit together inside the case. Note that
the piezo buzzer is mounted on the solder side of the display board, while 5V
regulator U8 is heatsinked to the rear panel.
The display board accommodates two groups of LED displays plus the five
pushbutton switches. One group of displays show sidereal time, while the other
group shows either local or UTC time.
82C55 (U2) and the 4020 (U6). At the
same time, U7b inverts this signal to
reset the Z80C (U1).
Clock signal
The 4MHz clock signal for the CPU
board is generated on the oscillator
board and appears on pin 5 of JP3.
Inverter U7d buffers and squares up
the signal which is then applied to the
Z80C and the 4020.
Power for the clock can be supplied from a 12V battery or a 12V 1A
DC plugpack. Diode D1 protects the
circuitry from reverse polarity while
zener diode D5 prevents voltage spikes
from interfering with or damaging the
circuit. The 12VDC is then applied
to +5V regulators U8 and U9. They
provide separate +5V supplies to the
display and CPU boards. If the +12V
supply is not present, diodes D2
and D3 allow the CPU and oscillator
boards to continue functioning from
the battery.
Ports PA0-PA5 and PB0-PB7 on the
82C55 peripheral interface are config
ured as outputs and they drive the
7447 7-segment decoder drivers (U1
& U2) on the display board.
Ports PC0-PC3 are configured as
inputs to monitor the power-off detector (PC3) and the keyboard matrix
(PC0-PC2) on the front panel. Ports
PC4-PC7 are configured as outputs;
PC4 and PC5 drive the keyboard matrix
August 1993 31
PARTS LIST
CPU board
1 L-shaped double-sided PC
board
1 9V battery & snap connector
(BT1)
1 14-pin IC socket
2 16-pin IC sockets
1 24-pin IC socket
1 28-pin IC socket
2 40-pin IC sockets (see text)
Semiconductors
1 Z80C microprocessor (U1)
1 82C55 programmable interface
(U2)
1 6116 static RAM (U3)
1 27C32 or 27C64 programmed
EPROM (U4)
1 74HC138 decoder (U5)
1 4020 14-stage binary counter
(U6)
1 74HC14 hex Schmitt trigger (U7)
2 7805 3-terminal regulator (U8,
U9)
1 1N5404 rectifier diode (D1)
2 1N4001 rectifier diodes (D2,D3)
1 1N4733 5V zener diode (D4)
1 1N4746 18V zener diode (D5)
Capacitors
1 220µF 25VW electrolytic
1 100µF 25VW electrolytic
2 1µF 25VW electrolytic
6 0.1µF 63VW monolithic ceramic
Resistors (1%, 0.25W)
1 22kΩ
1 5.1kΩ
8 10kΩ
1 330Ω
Oscillator PC board
1 PC board,
1 4MHz crystal
1 1mH inductor
1 brass block (see Fig.7)
Semiconductors
1 LM358 dual op amp (U1)
1 LM334 current source (U2)
1 78L05 3-terminal regulator (U3)
and PC7 indicates whether the righthand display is showing universal or
local time.
Display board
The display board accommodates
the 12 7-segment displays, the key32 Silicon Chip
2 2N5485 N-channel FETs (Q1,Q2)
1 TIP31 NPN transistor (Q3)
Capacitors
2 0.1µF 63VW monolithic ceramic
1 68pF ceramic
2 27pF ceramic
Resistors (1%, 0.25W)
1 10MΩ
3 10kΩ
1 1MΩ
1 8.2kΩ
2 100kΩ
1 1kΩ
1 18kΩ
1 220Ω
Display board
1 double-sided PC board
1 piezo beeper (Tandy Cat. 273065)
5 panel switches (E.S.Ruben Cat
RF19 3.14001.006)
Semiconductors
12 TIL312 common anode LED
displays (DIS1 to DIS12)
2 7447 decoder/drivers (U1,U2)
1 555 timer (U3)
10 BC548 NPN transistors
(Q1,Q3,Q5,Q7,Q9,Q11,
Q13-Q16)
6 BC337 NPN transistors
(Q2,Q4,Q6,Q8,Q10,Q12)
2 1N4148 signal diodes (D1,D2)
Capacitors
1 10µF 35VW tantalum
2 0.47µF 16VW electrolytic
3 0.1µF 63VW monolithic
Resistors
6 10kΩ
6 4.7kΩ
1 3.9kΩ
16 27Ω
Miscellaneous
1 3AG 1A slow blow fuse
1 in-line 3AG fuseholder
1 can Electrolube nickel screening
paint (DSE N-11138)
2 RF suppression beads (DSE
R-5425)
board switch matrix, a beeper, a pulse
detector and driv
ers for the heater
on indicator and the universal/local
indicator – see Fig.2.
The displays are multiplexed two at
a time. The Z80 feeds a BCD number
via the 82C55 to the two 7447 decoder
Fig.1 (right): the CPU board is based
on a Z80C microprocessor (U1)
running at 4MHz, together with a
6116 RAM (U3), a 27C32 EPROM
(U4) & an 82C55 PIO chip (U2). It acts
as a frequency divider, a power-off
detector, a reset circuit & an address
decoder.
drivers, U1 & U2. The appropriate digits (say DIS1 & DIS7) are then enabled
by turning on one of the six Darlington
pairs (Q1 & Q2). The process is then
repeated for the other five pairs of
digits. The brightness of the display
is changed by reducing the on time
for each digit, via the Z80C.
The keyboard matrix is scanned by
taking ports PC4 or PC5 low and then
reading the condition of ports PC0PC2. If one of the switches has been
pressed, then one of ports PC0-PC2
will be low. Switch debouncing is
achieved via the software. Each time
a key is pressed, the beeper sounds.
A CPU write or read to any address in
the range 3000h-3FFFh causes pin 12
of U5 (74C138) to go low momentarily
and trigger 555 timer U3, which drives
the piezoelectric beeper.
The decimal points of displays DIS7
and DIS12 are used as indicators.
The decimal point of DIS7 indicates
when the oscillator heater is on. This
decimal point is driven by transistor
Q13 which is turned on by the “heater
output” (HO) line from the oscillator
board.
The decimal point of DIS12 indicates whether universal or local time
is being displayed on the right-hand
6-digit display. This same decimal
point also has the function of indicating that the power has been off. If
the power goes off, the decimal point
begins flashing. It is driven by transistor Q14 which is turned on by the PC7
line from the 82C55.
Diodes D13 and D14, together with
transistors Q15 and Q16, form a missing pulse detector. This is used to disable the displays if the microprocessor
stops running normally. This prevents
a particular display from being provided with a continuous high current.
The pulse detector monitors the 5V
pulses on the O1 line from the CPU
board. With pulses normally present,
Q15 will be on and Q16 will be off so
that pin 4 on each of the 7447 decoder/
drivers will be high. If the pulses on
+5V FROM U8
JP2
VCC
R5
330
9
R3
10k
R4
10k
16
8
16
10
CLK
U6
4020
25
U7c
74HC14
12
Q9
14
5
8
R1
22k
NMI
11
U7a
U7b
2
1
4
3
26
RESET
30
C1
100
A2
33
C8
0.1
C9
0.1
39
HO 4
40
GND 3
1
+9V 2
2
+12V 1
32
D3
31
D4
30
D5
29
D6
28
D7
27
A12
A11
RD
A13
WR
D3
PC4
D4
PC2
D5
PC1
D6
PC0
D7
A0
PA5
A1
8
D3
PB7
7
D4
PB6
9
D5
PB5
10 D6
PA2
13 D7
PA1
PA0
21
5
22
36
17
A14
PB1
RD
PB0
WR
PB2
PC3
RST CS
29
35
PB3
6
R9
10k
13 VCC
R10
10k
12 VCC
11 TO
10
10 LO
9 HO
12
8 S5
13
7 S4
16
6 S3
15
5 S2
14
4 S1
3 GND
U2
82C55
PB4
D7
A10
PC5
12 D2
D6
A9
D2
PA3
D5
A8
4
D2
D1
15 D1
D4
A7
3
33
PC7
PA4
D3
A6
37
38
D1
D0
14 D0
D2
A5
36
JP3
TO OSCILLATOR
4MHz 5
D1
A4
35
C10
0.1
D0
A3
34
VCC
34
A1 8
U1
Z80C
A1
32
D0
A0 9
AO
31
C7
0.1
WAIT
BUSRQ
17
R8
10k
26
11
7
RST
VCC
6
24
INT
CLK
6
U7d
R2
10k
2 GND
39
1 O6
JP1
40
1
13 O5
12 04
22
11 1C
25
10 8C
24
9 4C
23
8 2C
2
7 O3
3
6 O2
4
5 O1
19
4 2D
18
3 1D
20
2 4D
21
1 8D
TO
DISPLAY
7
C2
0.1
VCC
+5V
D3
1N4001
IN
BT1
9V
U9
7805
GND
OUT
C5
1
D2
1N4001
JP4
+5V
TO JP2
D1
1N5404
IN
+12V 1
0V 2
R11
10k
D5
1N4733
C6
220
U8
7805
GND
OUT
C4
1
U7e
11
R12
4.7k
VCC
VCC
24
24
A0
8
A1
7
A2
6
A3
5
A4
4
A5
3
A6
2
A7
1
A8
23
A9
22
A10
19
WE
A0
A1
D0
A2
D1
A3
D2
A4
D3
U3
6116
A5
D4
A6
D5
A7
D6
A8
D7
A9
OE
A10
CE
10
21
D0
9
10 D1
D1
10
11 D2
D2
11
13 D3
D3
13
14 D4
D4
14
15 D5
D5
15
16 D6
D6
16
17 D7
D7
17
9
D4
1N4733
D0
A1
D0
A2
D1
A3
D2
D3
U4
27C32
D4
A4
A5
A6
D5
A7
D6
A8
D7
20
A9
18
A10
OE/
VPP
12
C11
0.1
A0
20
A11
8
A0
7
A1
6
A2
5
A3
4
A4
3
A5
2
A6
1
A7
23
A8
22
A9
19
A10
21
A11
CE
18
12
VCC
R6
10k
6
I GO
A12
1
A13
2
A14
3
16
G1
Y1
A
B
C
U5
74HC138
G2A G2B
SIDEREAL CLOCK - CPU
4
5
Y2
Y0
Y3
14
13
15
12
8
August 1993 33
34 Silicon Chip
C2
0.1
1
2
6
2D
4D
8D
6
8C
O6 1
8D 1
4D 2
1D 3
2D 4
O1 5
O2 6
O3 7
2C 8
4C 9
8C 10
1C 11
O4 12
O1
2
4C
GND 2
FROM CPU
BOARD
JP1
O5 13
1
2C
GND 3
D1
1N4148
C5
0.5
4
7
1C
S1 4
5
4
7
1D
5
3
S2 5
C4
0.1
3
VCC
C3
0.1
S3 6
S4 7
S5 8
HO 9
LO 10
TO 11
VCC 12
FROM CPU
BOARD
JP2
VCC 13
VCC
C
1
R21
10k
HO
C6
0.5
D2
1N4148
G
BI/RBO
E
D
F
8
U2
7447
C
B
A
8
4
2
1
RBI
LT
16
8
F
G
8
BI/RBO
E
4
E
C
R7-13
7x 27
E
C
7
8
10
13
1
6
R28
10k
E
E
C
VIEWED FROM
BELOW
B
E
Q16
BC548 C
B
DIS7
TIL312
HEATER ON
LED DRIVER
R22
27W
11
2
7
8
10
13
1
SW1
11
2
7
8
10
13
1
S1
Q4
BC337
B
11
E
C
11
R29
10k
O2
Q3
BC548
B
2
14
DIS1
TIL312
14
E
C
R2
4.7k
2
7
8
10
13
1
B
Q2
BC337
Q15
R27 BC548 C
10k B
VCC
B
Q13
BC548
14
15
9
10
11
12
R14-20
13 7x 27
VCC
14
15
9
10
11
12
13
VCC
Q1
BC548
B
D
B
RBI
2
A
LT
U1
7447
16
O1
R1
4.7k
O3
SW3
1
14
E
C
DIS3
TIL312
Q6
BC337
B
11
2
7
8
10
13
1
DIS9
TIL312
14
SIDEREAL DISPLAY
11
2
7
8
10
13
E
C
S3
S4
SW4
UNIVERSAL/LOCAL DISPLAY
B
Q5
BC548
SW5
O4
R4
4.7k
S5
Q7
BC548
B
SIDEREAL CLOCK - DISPLAY
SW2
S2
DIS8
TIL312
14
DIS2
TIL312
14
E
C
R3
4.7k
11
2
7
8
10
13
1
11
2
7
8
10
13
1
E
C
TO
14
E
C
R25
10k
DIS10
TIL312
14
DIS4
TIL312
Q8
BC337
B
O5
R5
4.7k
C1
10
R26
3.9k
LO
6
7
11
2
7
8
10
13
1
11
2
7
8
10
13
1
E
Q9
BC548 C
B
KEYBOARD
BEEPER
2
U3
LM555
4
DIS11
TIL312
DIS5
TIL312
Q10
BC337
B
1
8
14
14
E
C
3
VCC
VCC
R23
10k
O6
R6
4.7k
1
E
C
PIEZO
BEEPER
R24
27
Q14
BC548
B
11
2
7
8
10
13
1
11
2
7
8
10
13
Q11
BC548
B
E
C
6
14
14
E
C
UNIVERSAL/
LOCAL LED
DRIVER
DIS12
TIL312
DIS6
TIL312
Q12
BC337
B
JP1
TO CPU
BOARD
1 +9V
OUT
R7
10M
R3
8.2k
R6
10k
R
U2
LM334
R1
220
2
1
U1a
LM358N
5
8
6
R4
18k
R8
390
7
U1b
3 +12V
4 HEAT ON IND
5 4MHz OUTPUT
3
R5
10k
R2
10k
C4
0.1
2 GND
IN
U3
78L05
GND
Q3
TIP31
B
SEE
TEXT
4
C
E
U2, Q3 AND Y1 ATTACHED TO BRASS BLOCK
OUT
L1
C1 1mH
27pF
Y1
4MHz
Q1
2N5485
G
R9
1M
R12
100k
C3
27pF
D
S
C2
68pF
R10
100k
C5
0.1
Q2
2N5485
G
U4
78L05
GND
Fig.3: the crystal
oscillator circuit. Crystal
Y1 & transistor Q1 form
a Pierce oscillator which
operates at 4MHz, while
FET Q2 buffers the
4MHz signal to the CPU
board. U2 is an LM334
adjustable current source
& functions here as a
temperature sensor. It is
monitored by U1a & U1b
& these in turn control
Q3. When Q3 is on, it
dissipates several watts
to heat the interior of a
small plastic utility box
which houses the oscilla
tor board.
IN
D
TIP31
S
R11
1k
78L05
LM334
I G O
R
VIEWED FROM BELOW
2N5485
G S D
B CE
SIDEREAL CLOCK - OSCILLATOR
O1 are missing, Q15 will turn off, Q16
will turn on and the displays will be
disabled.
Oscillator board
The oscillator PC board features a
4MHz crystal oscillator and a temperature controller – see Fig.3. Crystal
Y1 and transistor Q1 form a Pierce
oscillator. FET Q2 buffers the 4MHz
signal to the CPU board.
U2 is an LM334 adjustable current
source connected as a temperature
sensor. It causes a voltage drop,
proportional to the Absolute temperature, to be developed across
R2. This resistor is connected to the
inverting input of op amp U1a which
is connected as a comparator. Pin 3
of U1a is connected to a reference
voltage divider across the 5V supply
and this effectively sets the operating
temperature of the circuit.
Fig.2 (left): the display circuit is
controlled by the CPU board & uses
two 7447 display drivers (U1 & U2)
plus 12 7-segment LED readouts. U3
drives a piezo beeper to provide the
keypad beep function.
When pin 3 is more positive than
pin 2, the output (pin 1) of U1a goes
high. This output is buffered by U1b
and is used to drive transistor Q3.
This transistor is connected across
the +12V supply and functions as
the heater in the circuit. When the
transistor is on, it dissipates several
watts to heat the interior of a small
plastic utility box which houses the
oscillator board.
As the temperature inside the box
rises, the voltage at pin 2 of U1a increases to the point where it is more
positive than pin 3. This causes pin 1
(and thus pin 7 of U1b) to go low and
therefore transistor Q3 is turned off.
The circuit then cools down to the
point where the transistor is switched
on again.
Q3, Y1 and U2 are all attached to a
brass block which is maintained at a
constant temperature of 70°C. Pin 7 of
U1b is also routed to the display board
to light up a “heater on” indicator, as
mentioned above.
Construction
The three PC boards should be
assembled and then linked together
–see Figs.4-6. The CPU and display
boards are double-sided but without
plated through holes. This means that
any holes in the board not associated
with components should have pinthroughs installed and these should
be soldered on both sides of the board.
You can use tinned copper wire for all
pin-throughs.
Once the pin-throughs have been
installed, the IC sockets can be
inserted. They provide additional
pin-throughs for the board so their
pins must be soldered on both the
component and solder sides. The
use of machined pin or wire wrap IC
sockets is recommended because the
pins on these are longer than normal,
allowing soldering on both sides of
the board. Sockets which are too close
to each other to allow soldering on
the component side will need to be
split into two halves and installed
separately. There are no sockets used
on the display board.
Once the IC sockets have been installed, the other components should
be added. All components must be
soldered on both sides of the board
except the displays which are only
soldered on the copper side. The
piezoelectric buzzer is mounted on
the solder side of the display board
(see photo).
August 1993 35
U9 7805
D2
D1
R5
C11
JP3
C5
R4
+12V
R2
+9V
R11
GND
R12
D4
HO
U1
Z80C
CLK
R3
1
C8
U5 74HC138
1
U3
6116
C9
R6
1
U6 4020
1
U4
27C32/27C64
C7
U7 74HC14
R9
R8
1
1
R1
C10
R10
U2
82C55
C1
1
JP1
JP2
Fig.4: this diagram shows how the parts are installed on the CPU board. Note
that pin throughs must be installed at all vacant hole positions, while all
components & IC sockets must be soldered on both sides of the board.
R15
R19
R20
R16
R17
R18
D2
U1 7447
R29
1
Q9
R5
1
1
Q10
The correct operation of all functions should be established by using
them as described below.
In normal mode, the SELECT key
Q11
R6
1
1
Operation
Q12
Q14
1
R27
R28
SW1
SW2
SW3
SW4
SW5
R23
R26
C3
C1
JP1
36 Silicon Chip
Q13
R21
R24
C6
D1
Q16 Q15
C4
1
D11 TIL312
R14
Q8
D10 TIL312
1
Q7
D9 TIL312
1
R4
D8 TIL312
1
Q6
D7 TIL312
1
D6 TIL312
D2 TIL312
D1 TIL312
1
Q5
R3
C5
1
C2
1
Q4
D5 TIL312
1
R8
R12
R13
R9
R11
R10
Q3
R2
D3 TIL312
R7
Q2
D4 TIL312
Q1
R1
functioning. The oscillator board can
now be placed in a standard plastic
box measuring 28 x 54 x 83mm (DSE
H-2855 or equivalent). The board is insulated by surrounding it with pieces
of 10mm thick polystyrene.
The three boards can now be linked
together. The connec
tions between
the CPU and display boards can be of
tinned copper wire, with every second
link insulated.
The connections between the CPU
and oscillator boards should be made
with about 80mm of insulated wire.
Note that the pin numbers for each
wire differ on each board. The boards
are installed in a standard plastic instrument case measuring 200 x 65 x
U2 7447
The brass block (see Fig.7) on the
oscillator board should be installed
at the same time as the components.
Transistor Q3 is screwed to the block
while the crystal and temperature
sensor are held in place using strips of
metal as clamps. Heatsink compound
should be used to ensure a good thermal bond to the brass block.
The heater current must be set before the three boards are connected
together. Apply +12V to the oscillator
board and measure the current drain.
Choose a value of R8 which gives
a supply current of about 250mA.
Monitor this current until it drops
to a low value. This indicates that
the temperature control circuitry is
160mm (DSE H-2505 or equivalent).
You will need to make several cutouts
in the front panel for the two 6-digit
displays and the five pushbutton
switches. You will also need two small
pieces of red transparent plastic and
these are glued behind the dis
play
cutouts.
A 1A slow-blow fuse should be installed in series with the +12V supply
line. The fuseholder can be an in-line
type or mounted on the rear panel.
The whole assembly can now be
fitted in the case. Voltage regulator U8
should be heatsinked to the rear panel
using a piece of aluminium plate bent
into an L shape. The display board
can be fixed to the front panel using
the holes either side of the switches.
The spacing between the board and
the front panel is determined by the
height of the switches and displays.
Appropriate spacers need to be used
to provide this clearance. The CPU
board can be fixed in place using the
mounting holes provided in each corner of the board.
Once the three boards have been
installed, power can be applied. If
all is working correctly, the beeper
should sound and the display should
show all eights (lamp test mode). The
SELECT switch can now be pressed to
acknowledge that a reset condition has
occurred. The right and left displays
should now indicate time in hours,
minutes and seconds. The battery
should not be installed until the operation of all functions is verified, as the
CPU can not be reset with the battery
in circuit. To reset the CPU, turn the
power off for 10 seconds.
R22
D5
D3
D12 TIL312
JP4
BT1
9V
C4
U8
7805
U3 555
C2
GND
+12V
C6
JP2
R25
BEEPER
Fig.5: the parts
layout on the display
board. As with the
CPU board, the parts
must be soldered
on both sides of the
board & pin-throughs
installed at vacant
hole locations.
switches between universal and local
time for the right-hand display. The
decimal point on digit six of the righthand display lights up to indicate that
universal time is selected.
The BRIGHT key changes the display
brightness through five levels. The
DISPLAY key switches the right and
left-hand displays on or off. The SET
TIME key starts and stops the set time
mode of operation. The SET REF key
starts and stops the set reference mode
of operation.
In “Set Time” mode, the SELECT
key selects the digits which are to be
set. The + key will then increment
the hours or minutes that are flashing.
When the seconds are flashing, the +
key will zero them. The seconds on
universal/local time can only be set
in universal mode.
The TONE key enables the buzzer to
sound and indicate the occurrence of
each minute that passes. To indicate
sidereal minutes, the tone key must
be pressed when any sidereal digit is
flashing and vice versa for universal/
local. To stop the tone function, press
the TONE key again.
The BATTERY key causes the display to indicate the length of time that
the battery has been used. If the power
has been off and the decimal point is
flashing, pressing the battery key will
terminate flash mode. When a new
battery is installed, the “-” key can be
used to zero this display.
In “Set Reference” mode, the SELECT key selects the reference number
to be changed. The left-hand display
will cycle through an indication of
U1-U4 or S1-S4 when the SELECT key
is operated. The + and - keys are then
used to adjust the particular reference
number chosen.
This close up view shows the oscillator board in its case, with the cover &
insulation removed. The power transistor (Q3), constant current source (U2) &
crystal are attached to a brass block near the centre of the board.
its accuracy against an accurate time
signal such as Telecom’s time service or radio station VNG on one of
the following frequencies: 2.5MHz,
5MHz, 8.638MHz, 12.984MHz and
16MHz. The error obtained after 24
hours needs to be recorded and entered into a PC running the program
STARTIME.BAS. The program will
calculate and display new values for
U1-U4 and S1-S4.
These updated reference values
should be entered into the clock using
the set reference mode. This process of
adjustment may have to be performed
a number of times, with the accuracy
being checked over longer periods.
The sidereal time is referenced to
Where to buy the kit
Readers can buy a short form kit
of this project from the author. The
kit comprises the three PC boards,
a programmed EPROM and the
five keypad switches for the display board. The kit is priced at $95
plus $5 for postage and packing,
anywhere in Australia. The author
can also provide a repair service
on completed sidereal clock kits
for $60 plus the cost of any parts
replaced.
Payment can be made via
cheque or money order to John
Western, 81 Giles Ave, Padbury
WA 6025. Phone (09) 401 2733.
6
14
Time setting
5
2.6
Set the universal time and check
R3
C2
R12
Q2
R10
R11
+9V
C4
GND
R7
R4
R6
R5
R2
R1
B
+12V
1
U2
L1
C3
BRASS BLOCK
C1
Q1
R8
15
U3
R9
B
HO
U1
LM358
U4
Y1
C5
Q3
A
A
+12V HARD WIRED TO Q3
JP1
CLK
Fig.6: the parts layout for the oscillator
PC board. Keep all component leads
short & note that R8 must be chosen to
give a supply current of about 250mA
– see text.
3.5
20
27
2.5
5
HOLES A = COMPONENT MOUNTING TAPPED M2.5
B = BLOCK MOUNTING TAPPED M2
MATERIAL: BRASS
DIMENSIONS IN MILLIMETRES
Fig.7: this diagram shows the dimensions of the brass block.
August 1993 37
10 ‘*********************************************************
20 ‘* STARTIME.BAS by JOHN WESTERN 12/06/91 This program
*
30 ‘* calculates new values for the sidereal clock reference
*
40 ‘* numbers. The error in seconds/day and the values of U1-U4
*
50 ‘* are entered by the user.
*
60 ‘*********************************************************
70 DEFDBL A-Z
80 CLS:PRINT “
SIDEREAL CLOCK CALCULATION PROGRAM”
90 ‘
100 ‘ GET CURRENT VALUES OF U1-U4
110 INPUT “Enter current value of U1”; U1 ‘get current values
120 INPUT “Enter current value of U2”; U2
130 INPUT “Enter current value of U3”; U3
140 INPUT “Enter current value of U4”; U4
150 ‘
160 ‘CALCULATE TOTAL NUMBER OF PULSES PER DAY
170 PCD = (U1 * 59 * 60 * 24) + (U2 * 59 * 24) + (U3 * 23) + U4
180 ‘
190 ‘GET ERROR FROM USER
200 INPUT “enter number of seconds per day error”;TIMERR
210 WHILE ANSWER$ <> “f” AND ANSWER$ <> “F” AND ANSWER$ <>
“s” AND ANSWER$ <> “S”
220 INPUT “Is clock fast or slow? (F/S)”; ANSWER$
230 WEND
240 ‘
250 ‘CALCULATE PULSE DIFFERENCE FOR EACH REFERENCE VALUE
260 PD = (TIMERR / 86400!) * PCD
270 IF PD >= 84960! THEN PPS= INT(PD/84960!):PD = PD - (PPS * 84960!)
280 IF PD >= 1416 THEN PPM = INT(PD/1416):PD = PD - (PPM * 1416)
290 IF PD >= 23 THEN PPH = INT(PD/23): PD = PD - (PPH * 23)
300 IF PD >= 1 THEN PPD = INT (PD)
310 ‘
320 ‘CALCULATE AND DISPLAY NEW VALUES OF U1-U4
330 IF ANSWER$ = “f” OR ANSWER$ = “F” THEN GOSUB 2010
ELSE GOSUB 1010
340 PRINT
350 PRINT “New U1 =”; U1
360 PRINT “New U2 =”; U2
370 PRINT “New U3 =”; U3
380 PRINT “New U4 =”; U4
390 ‘
400 ‘ CALCULATE AND DISPLAY NEW VALUES OF S1-S4
410 PCD = (U1 * 59 * 60 * 24) + (U2 * 59 * 24) + (U3 * 23) + U4
420 SIDCNT = PCD / 1.00273791#:PULSDIF = PCD - SIDCNT
430 S1 = INT(PULSDIF / 84960!): PULSDIF = PULSDIF - (S1 * 84960!)
440 S2 = INT(PULSDIF / 1416): PULSDIF = PULSDIF - (S2 * 1416)
450 S3 = INT(PULSDIF / 23): PULSDIF = PULSDIF - (S3 * 23)
460 S4 = INT(PULSDIF)
470 PRINT “S1 =”; S1
480 PRINT “S2 =”; S2
490 PRINT “S3 =”; S3
500 PRINT “S4 =”; S4
510 END
1000 ‘ ROUTINE TO CALCULATE NEW VALUE OF U1-U4 FOR CLOCK SLOW
1010 U1 = U1 - INT(PPS)
1020 U2 = U2 - INT(PPM)
1030 U3 = U3 - INT(PPH)
1040 U4 = U4 - INT(PPD)
1050 RETURN
2000 ‘ ROUTINE TO CALCULATE NEW VALUES OF U1-U4 FOR CLOCK FAST
2010 U1 = U1 + INT(PPS)
2020 U2 = U2 + INT(PPM)
2030 U3 = U3 + INT(PPH)
2040 U4 = U4 + INT(PPD)
2050 RETURN
38 Silicon Chip
Fig.8: this full-size artwork can be used as a marking
template for the front panel.
universal time and should be correct once universal
time is adjusted. In the event that the sidereal time is
not accurate, the values S1-S4 allow it to be adjusted.
The sidereal time should now be set following normal
astronomical procedures.
The prototype clock has been operating for two years
with universal time giving an error of less than one
SC
second per month.
|