Rugby MSF Controlled Alarm Clock: Generalinterest

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

GENERALINTEREST

Rugby MSF Controlled


Alarm Clock
By David Fletcher, BSc [email protected]

A digital alarm clock which decodes and synchronises itself to the time
signal picked up from the Rugby ‘MSF’ transmitter on 60 kHz.

that it is very easy to make the alarm


operate early during the week, and
later (or not at all) during the week-
end.

The display uses seven segment


LEDs. These have the advantage
over LCDs of readability in the dark
without having to provide extra
lighting, and in my design the
brightness of the display automati-
cally adjusts to the ambient lighting.
No battery is used in this design.
I don’t like batteries. They need to be
monitored and replaced when
exhausted, a flat battery can result
in data loss when a memory device
depends on having constant power,
and they create a filthy mess inside
equipment when they get forgotten
about for too long and leak. All of the
alarm settings in this clock are
stored in a serial EEPROM, which is
This is a project I have had in mind ever since jects. See www.vutrax.co.uk for said to safely store data for many
I did my final year project at University. At information and downloads. decades.
that time, the 8080 and other microprocessors Power cuts in the UK are rare, but
such as the 6502 were around, and would The Metalink assembler, which is when they do occur this clock does
have been capable of doing the job. However, available free from of course lose all record of the cur-
the necessary design tools were not available http://www.metaice.com/ rent time. However when power
at reasonable cost for the home user, and nei- returns the clock receives the MSF
ther was the modern PC. So the project went 8052 simulator. Shareware program, signal and automatically sets itself
on hold for a good few years. available for download from to the correct time again.
The design tools I have used along with www.8052.com Occasionally, the MSF transmitter
my PC are: is switched off for maintenance. Dur-
The clock has an alarm facility which ing these periods, the clock contin-
Vutrax, which is a very capable printed cir- I have not seen on any other unit, ues to keep time using its internal
cuit CAD program. So far as I know, Vutrax is that enables any number of alarms quartz crystal which, without any
unique in offering unlimited free use of the to be set throughout the day. In addi- trimming, has an adequate accuracy
software for designs of up to 256 pins. This tion, the days of the week on which over short periods.
should be sufficient for most small home pro- each alarm operates are specified, so The clock requires an external

30 Elektor Electronics 10/2002


GENERALINTEREST
MSF receiver. I have used the an MSF receiver via connector P1, The output pin drivers of 8052 type micro-
Galleon module to build a receiver, and the push button controls, con- controllers are primarily pull down, with a
but any receiver which provides an nected to ports P3.0-P3.3. P1.3 con- very weak pull up, resulting in an output with
open collector output which pulls trols the alarm sounder. P0 controls characteristics similar to TTL. Hence the pro-
low with the carrier ON and the segments, and P2 controls the vision of RN1 and RN2. I have found it neces-
switches OFF with no carrier should digits, of the multiplexed display. sary to only fit RN2 with the AT89S53, but the
suffice. P1 also provides power to the PCB has a location for fitting them both
external MSF receiver, and the con- should they be needed for different micro-
structor can choose to supply either controllers.
Procesor Board +5 V or the raw DC power. R1 is a The AT89S53 has the In System Program-
The circuit diagram of the processor fusible resistor for safety. If the exter- ming (ISP) facility. This is the function of P3,
board is shown in Figure 1. The nal power is shorted to ground the connected to port P1, which accepts the pro-
heart of the clock is an Atmel current will be limited, and if the gramming cable of the Equinox Technologies
AT89S53 microcontroller. This takes voltage is high enough, R1 will blow MicroISP series IV programmer. See
as inputs the serial data stream from open circuit. www.equinox-tech.com for information on

+5V
RAW DC RAW DC
U5 = CD4016
P2 U1 4 C11 20 C6 16 C7 16 C10 U6 = CD4016
1 LM317 +5V U7 U3 U5 U6 U7 = 324N
100n 100n 100n 100n
RB1 11 10 8 8
2
240Ω

R3
1%

DF025M
680Ω

R5
C1 1% C2
6
27Ω

100µ R4 1µ 7
1% U7b
5

U6a
RAW DC +5V RAW DC J1 +5V
9 1 2
8
U7c +5V
PS1 R1 R2 10 13
U6b
10k
47Ω

TR2 4 3 S2
R6
0W33 1% 16
47k P1
2 5 15
TR1 1% 1
R7 1 U6c 14
2N3906 2 U7a
10k 3 8 9 13
R8 3
1% 12
39k

2N3904

Vertical Card Connector


6 11
U6d 10
1%
13 11 10 9
+5V 14 8
U7d
12 12 7
U5a 6
P3 +5V
C8 +5V 1 2 5
1 4
1µ RN2 1 8x 100k
2 13 3
3 U5b 2
40
4 4 3 1
5 31 29
EA/VP PSEN
6 U2 2 3 4 5 6 7 8 9 5
7 1 39 U5c
P1.0 P0.0(AD0)
8 2 38 8 9
P1.1 P0.1(AD1)
9 3 37
R9 P1.2 P0.2(AD2)
10 4 36 6
120Ω P1.3 P0.3(AD3)
5 35 U5d +5V
1% P1.4 P0.4(AD4)
6 34 11 10
P1.5 P0.5(AD5) S1
+5V 7 33
P1.6 P0.6(AD6) 16
8 32 12
P1.7 P0.7(AD7) 15
AT89S53 U3 14
9 -24PC ALE/P 30
8 RESET 1 13
12
5 17 28 2 2 18
Vertical Card Connector

U4 SI P3.7(RD) P2.7(A15) 11
3 6 16 27 3 17
WP SCK P3.6(WR) P2.6(A14) 10
7 2 15 26 4 16
HLD SO P3.5(T1) P2.5(A13) 9
CS 1 14
P3.4(T0) P2.4(A12)
25 5 15
8
X25320P
13 P3.3(INT1) 24 6 14
P2.3(A11) 7
12 P3.2(INT0) 23 7 13
4 P2.2(A10) 6
11 22 8 12
+5V P3.1(TXD) P2.1(A9) 5
10 21 9 11
P3.0(RXD) P2.0(A8) 4
C5 X1 X2 +5V 3
2 3 4 5 6 7 8 9 1
20 19 18 3EN1 2
100n X1
3EN2 1
19
SW2 SW3 SW4 SW1 G3

C4 C3 74HCT245
RN1 1 8x 100k

EXT EXT EXT FLAT 33p 33p

12.0MHz +5V 020204 - 12

Figure 1. Circuit diagram of control board.

10/2002 Elektor Electronics 31


GENERALINTEREST
R5 R1 R24 R26 R25 R27 R20 R21 R17 R18 R14 R15 R11 R12 R8 R9 R4 R6
C8 C9 C7 C6 C5 C4 C3 C2

1k8

1k8

1k8

1k8

1k8

1k8

1k8

1k8
150Ω

150Ω

150Ω

150Ω

150Ω

150Ω

150Ω

50Ω
10k

4n7 4n7 4n7 4n7 4n7 4n7 4n7 4n7


ORP12 1% 1% 1% 1% 1% 1% 1% 1% 1% 1% 1% 1% 1% 1% 1% 1% 1%
R2 TR14 TR16 TR11 TR9 TR7 TR5 TR3 TR1
C1
3k6

10µ TR13 TR15 TR12 TR10 TR8 TR6 TR4 TR2


1% 2N 2N 2N 2N 2N 2N 2N 2N
3906 3906 3906 3906 3906 3906 3906 3906

2N 2N 2N 2N 2N 2N 2N 2N
P1 3904 R22 3904 R23 3904 R19 3904 R16 3904 R13 3904 R10 3904 R7 3904 R3
1k5

1k5

1k5

1k5

1k5

1k5

1k5

1k5
1
2
3 1% 1% 1% 1% 1% 1% 1% 1%
4
5
Vertical Card Connector

6
7
8
9
10
11
12
13
14
15
16

b c d e f b c d e f b c d e f b c d e f b c d e f b c d e f
a g a g a g a g a g a g
P2
1
2 dp dp dp dp dp dp

3
10
4
1 +VS 18
I1 O1 CC CC CC CC CC CC
5
Vertical Card Connector

2 17
6 I2 O2 DISP1 HDSP-5503 DISP2 HDSP-5503 DISP3 HDSP-5503 DISP4 HDSP-5503 DISP5 HDSP-5503 DISP6 HDSP-5503
3 16
7 I3 O3
4 15
8 I4 O4
5 U1 14
9 I5 O5
6 2803 13
10 I6 O6
7 12
11 I7 O7
8 11
12 I8 O8
VEE
13
9
14
15
16
020204 - 11

Figure 2. Circuit diagram of display board.

this product. response of the voltage divider, to Capacitor C8 limits the rate of
Very little RAM is available on board the make certain it cannot react to fluo- change of voltage across R24, and
microcontroller. There is enough for the vari- rescent lights etc. Back on the therefore the rate of change of cur-
ables and stack required by the software, but processor board, the output of the rent in the display segment as it
not for the alarm facilities I decided to imple- voltage divider is buffered by U7 and switches on and off, reducing RFI
ment. In any case, a non volatile memory was selectively switched to the display emissions.
required, hence the choice of the X25320P segment drivers by U5 and U6,
serial EEPROM for U4. under the control of the microcon-
The 5 volt power supply is provided by lin- troller. Each of the segment drivers Software Description
ear voltage regulator U1. Demand is low, as it is a voltage controlled current Note: This section should be read in
only supplies the microcontroller, op-amp, the source. Taking the first driver, when conjunction with the National Phys-
CMOS parts and the ambient light level sen- switched on, the voltage across R22 ical Laboratory MSF 60kHz Time and
sor, so no heat sink is required. The current is the output voltage of the ambient Date Code specification, and the
required by the displays is taken from the light level sensor minus the 0.7 volts software listing (which is available
input side of the regulator. This unregulated Vbe dropped by TR13. For example, if as a free download from the Elektor
supply is referred to as Raw DC. we present 2.2 V at the base of Electronics website under number
TR13, 1.5 V will appear across R22, 020204-11.zip). An extract of the
resulting in a current of 1 mA. This generously commented source code
Display Board same current also flows through R24, is shown in Listing 1.
Figure 2 shows the circuit diagram. On the producing a voltage at the base of The software operates by contin-
display board, the ambient light level is TR14 of the Raw DC voltage minus ually executing a main program loop,
sensed by the voltage divider formed by R2 1.8 V. Again dropping 0.7 V, this which updates the display data
and R5. R1 prevents the minimum voltage of time across the base-emitter junction according to data and flags which
the divider from falling below approximately of TR14, 1.1 V appears across R26, are set up by the interrupt routines.
1.3 volts, which keeps the display dimly lit in resulting in a display segment cur- The hardware timer 2 is set up in
a completely dark room. C1 slows down the rent flow of 7.3 mA. free running mode to run the T2

32 Elektor Electronics 10/2002


GENERALINTEREST
COMPONENTS LIST
Receiver board (Figure 3)

S1 = 3-way mini DIN socket


Galleon 60 kHz receiver module,
Maplin # MK68Y
MSF antenna, Maplin # MK72P
Receiver PCB (available from
author)

interrupt routine 100 times per sec-


ond. In the absence of the MSF sig-
nal, it counts interrupts, and sets the
new second flag at every 100th call.
The main program loop increments
its second, minutes, hours etc. coun- Figure 3. PCB artwork for receiver board (single-sided).
ters every time the flag is set.
When the MSF signal is present,
the T2 routine uses the MSFONCNT The clock display operates on setting mode, and edit the alarm settings.
byte to synchronise itself to the start three modes, normal time display, The alarm settings are stored in the serial
of the next second using the 700 ms date display and alarm setting dis- EEPROM. Every minute of the day has a byte
second markers. It then counts the play, controlled by the Display Mode allocated in the serial EEPROM, and seven
number of edges which occur during byte DM. The display is set up from bits of every byte each represent a day of the
the second, and the time of the last the clock data as the last action of week. Alarms are set by the BUTTONS rou-
edge, and uses these two pieces of the main loop. Time and date dis- tine, by turning ON the bits which represent
information to decide which of the plays are simple to set up, using a the days on which an alarm is required, for a
three bit pattern scenarios occurred call to a subroutine for each of the particular minute of the day.
during that second, to determine the three data items, hours minutes and Each time the main program loop incre-
contents of the bit A and bit B data seconds, or day month and year. The ments the time to the next minute, it uses the
streams during that second. alarm setting display mode is much time of day to calculate the corresponding
Two buffers are implemented in more complicated, interfacing via alarm memory location in the serial EEPROM.
RAM for the bit A and bit B data control flags with the push buttons This byte is read back into location
streams. At the end of each second, routine. ALARM_DAYS. The value of the DAYOFWK
the A and B data bits from the MSF Presses of the four push buttons counter is used to generate a one bit mask
signal are shifted into these buffers. are detected by the DEBOUNCE rou- which is ANDed with ALARM_DAYS, then if
A few additional lines of code at the tine, which is called during every the result of this is not zero, the alarm is trig-
end of the T2 routine perform the execution of the main loop. When gered and the alarm timeout counter started.
alarm cadence, when the alarm is any push button or any other The timeout is set at five minutes, after which
been activated. mechanical switch is operated, the the alarm automatically stops, unless the
Each time the main program loop contacts do not close cleanly — they alarm stop button has already been pressed.
executes from the top, it checks the bounce many times over several mil-
bit A buffer for the 01111110 end of liseconds. Whenever the status of
minute marker from the MSF signal. the push buttons has changed, Construction
This triggers the extraction of all of which includes contact bounces, the The printed circuit board layouts designed by
the time and date information from DEBOUNCE routine restarts a the author are reproduced in the following
the bit A buffer, and the parity infor- counter. Only when the counter illustrations:
mation from the bit B buffer. All data expires does the DEBOUNCE routine
from the bit A stream are then indicate a button state change and Figure 3 receiver board, single-sided
checked for correct parity, converted return the new state. Once that hap- Figure 4 processor board, double-sided
to binary, and checked that they pens, the new button state is passed Figure 5 display board, double-sided
have sensible values, as double par- to the BUTTONS routine.
ity errors can sometimes result in a BUTTONS (Listing 1) performs Ready-made PCBs are available from the
false parity check pass. When all various tasks, depending upon the author only — see information at the end of
checks have been passed, the current mode of the display and the article. Please note that this project has
GOOD_DATA flag is set, then the which button was pressed. It can not been tested by the Elektor Electronics
clock is updated from the MSF data stop the alarm sounding, toggle the design laboratory.
when the MIN_MARK flag is set by time display to show 12 or 24 hour
the T2 routine as it detects the format, make the display show the Construction of the clock should be simple
500mS end of minute marker. date, put the clock into the alarm and straightforward, using the assembly

10/2002 Elektor Electronics 33


GENERALINTEREST

Figure 4. PCB artwork for control board (double-sided, through-plated).

34 Elektor Electronics 10/2002


GENERALINTEREST
COMPONENTS LIST
Processor board (Figure 4)

Resistors:
R1 = 47Ω fusible resistor
R2,R7 = 10kΩ
R3 = 240Ω
R4 = 27Ω
R5 = 680Ω
R6 = 47kΩ
R8 = 39kΩ
R9 = 120Ω
RN1,RN2 = 100kΩ

Capacitors:
C1 = 100µF 50V radial
C2,C8 = 1µF 63V radial
C3,C4 = 33pF ceramic
C5,C6,C10,C11 = 100nF

Semiconductors:
Tr1 = 2N3904
Tr2 = 2N3906
U1 = LM317 (TO220, vertical
mounting)
U2 = AT89S53-24PC
(programmed)
U3 = 74HCT245
U4 = X25320P (Xicor)
U5,U6 = CD4016
U7 = LM324N
RB1 = bridge rectifier
DF005M (IR) (20V, 1A)

Miscellaneous:
S1,S2 = connector, Berg
76342-308
P3 = 10-way IDC header
J1 = 3-way SIL pinheader with
jumper, 0.1 in. pitch
P2 = connector, Molex 22-27-
2021
P1 = connector, Molex 22-27-
2031
SW1 = pushbutton, Omron
B3F-3100
SW2,SW3,SW4 = pushbutton,
Omron B3F-3150
PS1 = piezo sounder
X1 = 12MHz quartz crystal
Lock/eject socket for
microcontroller, Aries 40-
C182-10 (Farnell # 177821)
Enclosure, type BM22W,
Farnell #531870
Display filter, Farnell # 177145
Mains adaptor to suit (see text)
Processor PCB (available from
author)
Figure 5. PCB artwork for display board (double-sided, through-plated).

10/2002 Elektor Electronics 35


GENERALINTEREST
parts list and the silk screen on the PCBs.
A few points need to be made, however. COMPONENTS LIST
Display board (Figure 5)
1. Keep the profile of the display board (Figure
5) as low as possible. If you have obtained Resistors: Semiconductors:
the plated through printed circuits from the R1 = 10kΩ TR1,TR3,TR5,TR7,TR9,TR11,TR14,T
author, solder the 7-segment modules and U1 R2 = 3kΩ6 R16 = 2N3906
directly into the board and try not to let the R3,R7,R10,R13,R16,R19,R22,R23 = TR2,TR4,TR6,TR8,TR10,TR12,TR13,
tops of the transistors stand higher than the 1kΩ5 TR15 = 2N3904
modules. The author’s final prototype was R4,R8,R11,R14,R17,R20,R24,R25 = DISP1,DISP2,DISP3,DISP4,DISP5,DIS
constructed from home made PCBs which 1kΩ8 P6 = HDSP-5503
R5 = ORP12 U1 = ULN2803A
were not through plated. SIL turned pin
R6,R9,R12,R15,R18,R21,R26,R27 =
socket strip was used for the display mod- Miscellaneous:
150Ω
ules, enabling the shoulders of the pins to be P1,P2 = connector, Harwin M20-
soldered to the pads on the top side of the Capacitors; 9970806
board. This raised the profile of the board, C1 = 10µF 25V Display PCB (available from author)
which required the plastic moulding to be C2,C3,C4,C5,C6,C7,C8,C9 = 4nF7
removed from the pins of P1 and P2 in order
to get the two boards close enough together
to fit the clock into the case.
the chosen power supply. 3-pin mini Release the button and if all is work-
2) All components are fitted to the boards in DIN connectors were used for the ing correctly the display will initially
normal fashion, except P1 and P2 on the dis- MSF receiver. Make these sockets up show HELLO after a short delay.
play board, and S1 and S2 on the processor with stranded wire to housings The decimal point of the last digit
board, which must be fitted from the reverse matching P1 and P2 on the processor displays the raw serial signal from
side of the board. board. the MSF receiver. It should flash as
the data bits are transmitted one
3) RN1 on the processor board will probably Prototypes of the boards built by the pair per second. The clock requires
not be needed so long as a 74HCT part is author are shown in Figure 6 most of a complete minute to receive
used for U7, but can be fitted if required. (receiver board), Figure 7 (controller the current time and date. When
board) and Figure 8 (display board). received without any detected
4). It may be best to fit the microcontroller errors, the display will change from
into a Lock/Eject socket, especially if the In HELLO to the correct time, and the
System Programming facility is not used. Practical use decimal points will stop flashing.
The clock uses for power a plug-in Holding down the right button dis-
5) Before fitting the coloured tops to the push ‘brick’ mains power supply. A 12-V plays the date, in DDMMYY format.
buttons, apply some water based felt pen ink supply should be fine, but the volt- Pressing the middle button tog-
to the ends of the buttons and slide the board age and polarity are not critical, and gles the display between 12 and 24
into location in the case. Some of the ink will the supply can be either AC or DC, hour time formats.
transfer to the case, marking the hole posi- because the clock has its own bridge To put the clock into alarm setting
tions. Drill through from the inside and finish rectifier in the power input. mode, again press the secret button
the holes to fit the button tops with a fine Plug in the MSF receiver, and con- in the bottom of the case. Now, the
square file. Mark the edge of the case at the nect the power supply whilst hold- display changes, and the left button
centre line of the secret button in the bottom ing the secret button in the bottom will now advance the hour setting,
of the case, and carry the mark to the location of the case depressed with a bent the middle button the minute set-
of the centre of the button. Drill a small hole open paper clip or similar. Holding ting. Advance the display to the
here, 1 mm diameter should be fine. the secret button whilst switching required alarm setting time. To set
on initialises the serial EEPROM. the days of the week on which the
6) Remember to make the display window in
the case long enough to expose the LDR.

7) The Atmel AT89S53 microcontroller is rec-


ommended, because the In System Program-
ming socket works with this device. How-
ever, other devices from the 8052 family may
work perfectly well, so long as they can oper-
ate with the 12 MHz crystal and can be pro-
grammed by other means.

8). Sockets need to be fitted in the back of the


case for the power inlet and receiver connec- Figure 6. Completed receiver board with mini DIN socket fitted for connection to
tion. The power connector will need to match the control board.

36 Elektor Electronics 10/2002


GENERALINTEREST

Listing 1. Button scan routine (extract).


=1 1550 $INCLUDE(buttons.asm)
=1 1551 ;Subroutine to process button presses
=1 1552
=1 1553 ;David Fletcher, April 1999
=1 1554
=1 1555 ;Example of how to use:-
=1 1556 ; PUSH ACC ;Dummy byte to reserve space on the stack
=1 1557 ; LCALL DEBOUNCE
=1 1558 ; POP ACC ;Debounce return value
=1 1559 ; MOV R0, A
=1 1560 ; XRL A, #BUTTON_SAME ;Defined value, used by the debounce routine
=1 1561 ;to tell calling code that the button state
=1 1562 ;has not changed.
=1 1563 ; JZ MN_KEYS_DONE
=1 1564 ; MOV A, R0
=1 1565 ; PUSH ACC
=1 1566 ; LCALL BUTTONS
=1 1567 ; POP ACC
=1 1568
—— =1 1569 DSEG
=1 1570
=1 1571
=1 1572
—— =1 1573 CSEG
04C8 =1 1574 BUTTONS:
04C8 C0E0 =1 1575 PUSH ACC ;Save all registers used by the routine
04CA E8 =1 1576 MOV A, R0
04CB C0E0 =1 1577 PUSH ACC
04CD C0F0 =1 1578 PUSH B
04CF A881 =1 1579 MOV R0, SP ;Set up a pointer to the return parameter on the
stack
04D1 18 =1 1580 DEC R0 ;which after the register saves now start six
04D2 18 =1 1581 DEC R0 ;levels down
04D3 18 =1 1582 DEC R0
04D4 18 =1 1583 DEC R0
04D5 18 =1 1584 DEC R0 ;R0 now points to the return parameter
=1 1585
04D6 E54B =1 1586 MOV A, DM
04D8 B4012D =1 1587 CJNE A, #DM_TIME, PB_DM_NOT_TIME
=1 1588
=1 1589 ;
=1 1590 ;Display Mode is TIME
=1 1591 ;
04DB E6 =1 1592 MOV A, @R0 ;Retrieve the new button state from the
stack
=1 1593
04DC B40806 =1 1594 CJNE A, #DATE_BUTT_MASK, PB_DMTIME_NOT_DATE
=1 1595
=1 1596 ;Deal with the date display button, only used when the display
=1 1597 ;is in the normal time display mode. Makes the clock display the
=1 1598 ;date whilst the button is held, then go back to time display
=1 1599 ;when it is released.
=1 1600 ; MOV C, MSF_ENABLE ;Toggle signal ON/OFF each button push
=1 1601 ; CPL C
=1 1602 ; MOV MSF_ENABLE, C
=1 1603
04DF 754B02 =1 1604 MOV DM, #DM_DATE
04E2 020583 =1 1605 LJMP PB_DONE
=1 1606
04E5 =1 1607 PB_DMTIME_NOT_DATE:
=1 1608
04E5 B40208 =1 1609 CJNE A, #ALARM_BUTT_MASK, PB_DMTIME_NOT_ALARM
=1 1610
=1 1611 ;Clear the ALARM_ENABLE bit, to stop the noise!
04E8 C20B =1 1612 CLR ALARM_ENABLE
=1 1613 ;Might as well zero the timeout counter, too
04EA 755200 =1 1614 MOV ALARM_TOUT_CNT, #0
04ED 020583 =1 1615 LJMP PB_DONE
=1 1616
04F0 =1 1617 PB_DMTIME_NOT_ALARM:

10/2002 Elektor Electronics 37


GENERALINTEREST
=1 1618
04F0 B40113 =1 1619 CJNE A, #SEC_BUTT_MASK, PB_DMTIME_NOT_SECRET
=1 1620
=1 1621
=1 1622 ;The secret button has been pressed, so set up the clock
=1 1623 ;to adjust the alarm settings
04F3 754C00 =1 1624 MOV ALARM_HOURS, #0
04F6 754D00 =1 1625 MOV ALARM_MINS, #0
04F9 1207D5 =1 1626 LCALL SEEP_RD_ALARM_DAYS_ED

0 = alarm off;
1 = alarm on.

When the alarm has been set for the


required selection of days, release
the right button. Another time can
now be selected, or pressing the
secret button writes the updated
alarm settings into the EEPROM and
returns the clock to normal time dis-
play mode.
When the alarm operates, it can
be stopped by pressing the left but-
ton, or it will automatically stop after
five minutes.

Figure 7. Control bard, ready for fitting into the enclosure. Note that the final version of the
Hints & Conclusion
board supplied by the author may have slight improvements over the one shown here. The MSF receiver is constructed, like
an AM radio, using a ferrite rod
antenna. This is directional, and the
receiver will need to be rotated to
achieve best reception.
This clock may be regarded as
imperfect, due to the fact that in the
circumstances of a power failure dur-
ing an MSF signal break, the clock
and its alarm settings will not oper-
ate until the signal returns. The
design goal, however, was to pro-
duce a unit without any battery, and
in the two years since it was con-
structed it has never once missed an
alarm. So in all fairness it can be con-
cluded that the design is a success.
If the mains supply in the UK was
not as reliable as it is, the design
might have had to include a battery
operated real time clock module as a
backup.
Figure 8. Finished display board mounted on top of the control board. (020204-1)

Note:
alarm will operate, hold down the right but- day 3 = Tuesday; The author can supply a set of factory
ton. With the right button held down, the left etc. made printed circuit boards. Price is
button advances the fifth display digit expected to be £35.00 including VAT
through the days of the week, with At the required day, still holding and postage. Please enquire by email
down the right button, the middle only to [email protected]. The
day 1 = Sunday; button toggles the alarm on and off author’s website is at
day 2 = Monday; for that day. www.bigfoot.com/~dave_fletcher.

38 Elektor Electronics 10/2002

You might also like