Silicon ChipA Digital Clock With Battery Back-Up - April 1993 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: Forecasting electronic developments in cars
  4. Feature: The Story of Electrical Energy by Bryan Maher
  5. Project: A Solar-Powered Electric Fence by Branco Justic
  6. Feature: Silicon Chip 5th Birthday Sweepstakes
  7. Project: Build An Audio Power Meter by Darren Yates
  8. Back Issues
  9. Serviceman's Log: The path of TV service never did run smooth by The TV Serviceman
  10. Project: Three-Function Home Weather Station by John Clarke
  11. Feature: Remote Control by Bob Young
  12. Project: 12VDC To 70VDC Step-Up Voltage Converter by Darren Yates
  13. Order Form
  14. Feature: Computer Bits by Joe Elkhorne
  15. Product Showcase
  16. Project: A Digital Clock With Battery Back-Up by Darren Yates
  17. Vintage Radio: Restoring an old radio chassis by John Hill
  18. Market Centre
  19. Advertising Index
  20. Outer Back Cover

This is only a preview of the April 1993 issue of Silicon Chip.

You can view 48 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:
  • The Technology Letters, Pt.2 (January 1989)
  • The Technology Letters, Pt.2 (January 1989)
  • The Story Of Electrical Energy (July 1990)
  • The Story Of Electrical Energy (July 1990)
  • The Story Of Electrical Energy; Pt.2 (August 1990)
  • The Story Of Electrical Energy; Pt.2 (August 1990)
  • The Story Of Electrical Energy; Pt.3 (September 1990)
  • The Story Of Electrical Energy; Pt.3 (September 1990)
  • The Story Of Electrical Energy; Pt.4 (October 1990)
  • The Story Of Electrical Energy; Pt.4 (October 1990)
  • The Story Of Electrical Energy; Pt.5 (November 1990)
  • The Story Of Electrical Energy; Pt.5 (November 1990)
  • The Story Of Electrical Energy; Pt.6 (December 1990)
  • The Story Of Electrical Energy; Pt.6 (December 1990)
  • The Story Of Electrical Energy; Pt.7 (January 1991)
  • The Story Of Electrical Energy; Pt.7 (January 1991)
  • The Story Of Electrical Energy; Pt.8 (February 1991)
  • The Story Of Electrical Energy; Pt.8 (February 1991)
  • The Story Of Electrical Energy; Pt.9 (March 1991)
  • The Story Of Electrical Energy; Pt.9 (March 1991)
  • The Story Of Electrical Energy; Pt.10 (May 1991)
  • The Story Of Electrical Energy; Pt.10 (May 1991)
  • The Story Of Electrical Energy; Pt.11 (July 1991)
  • The Story Of Electrical Energy; Pt.11 (July 1991)
  • The Story Of Electrical Energy; Pt.12 (August 1991)
  • The Story Of Electrical Energy; Pt.12 (August 1991)
  • The Story Of Electrical Energy; Pt.13 (September 1991)
  • The Story Of Electrical Energy; Pt.13 (September 1991)
  • The Story Of Electrical Energy; Pt.14 (October 1991)
  • The Story Of Electrical Energy; Pt.14 (October 1991)
  • The Story Of Electrical Energy; Pt.15 (November 1991)
  • The Story Of Electrical Energy; Pt.15 (November 1991)
  • The Story Of Electrical Energy; Pt.16 (December 1991)
  • The Story Of Electrical Energy; Pt.16 (December 1991)
  • The Story Of Electrical Energy; Pt.17 (January 1992)
  • The Story Of Electrical Energy; Pt.17 (January 1992)
  • The Story Of Electrical Energy; Pt.18 (March 1992)
  • The Story Of Electrical Energy; Pt.18 (March 1992)
  • The Story Of Electrical Energy; Pt.19 (August 1992)
  • The Story Of Electrical Energy; Pt.19 (August 1992)
  • The Story of Electrical Energy; Pt.20 (September 1992)
  • The Story of Electrical Energy; Pt.20 (September 1992)
  • The Story Of Electrical Energy; Pt.21 (November 1992)
  • The Story Of Electrical Energy; Pt.21 (November 1992)
  • The Story Of Electrical Energy; Pt.22 (January 1993)
  • The Story Of Electrical Energy; Pt.22 (January 1993)
  • The Story of Electrical Energy (April 1993)
  • The Story of Electrical Energy (April 1993)
  • The Story Of Electrical Energy; Pt.24 (May 1993)
  • The Story Of Electrical Energy; Pt.24 (May 1993)
  • The Story Of Electrical Energy; Pt.24 (June 1993)
  • The Story Of Electrical Energy; Pt.24 (June 1993)
Items relevant to "Build An Audio Power Meter":
  • Audio Power Meter PCB pattern (PDF download) [01105931] (Free)
Items relevant to "Three-Function Home Weather Station":
  • 3-Function Home Weather Station PCB patterns (PDF download) [04201931/2] (Free)
Articles in this series:
  • Remote Control (October 1989)
  • Remote Control (October 1989)
  • Remote Control (November 1989)
  • Remote Control (November 1989)
  • Remote Control (December 1989)
  • Remote Control (December 1989)
  • Remote Control (January 1990)
  • Remote Control (January 1990)
  • Remote Control (February 1990)
  • Remote Control (February 1990)
  • Remote Control (March 1990)
  • Remote Control (March 1990)
  • Remote Control (April 1990)
  • Remote Control (April 1990)
  • Remote Control (May 1990)
  • Remote Control (May 1990)
  • Remote Control (June 1990)
  • Remote Control (June 1990)
  • Remote Control (August 1990)
  • Remote Control (August 1990)
  • Remote Control (September 1990)
  • Remote Control (September 1990)
  • Remote Control (October 1990)
  • Remote Control (October 1990)
  • Remote Control (November 1990)
  • Remote Control (November 1990)
  • Remote Control (December 1990)
  • Remote Control (December 1990)
  • Remote Control (April 1991)
  • Remote Control (April 1991)
  • Remote Control (July 1991)
  • Remote Control (July 1991)
  • Remote Control (August 1991)
  • Remote Control (August 1991)
  • Remote Control (October 1991)
  • Remote Control (October 1991)
  • Remote Control (April 1992)
  • Remote Control (April 1992)
  • Remote Control (April 1993)
  • Remote Control (April 1993)
  • Remote Control (November 1993)
  • Remote Control (November 1993)
  • Remote Control (December 1993)
  • Remote Control (December 1993)
  • Remote Control (January 1994)
  • Remote Control (January 1994)
  • Remote Control (June 1994)
  • Remote Control (June 1994)
  • Remote Control (January 1995)
  • Remote Control (January 1995)
  • Remote Control (April 1995)
  • Remote Control (April 1995)
  • Remote Control (May 1995)
  • Remote Control (May 1995)
  • Remote Control (July 1995)
  • Remote Control (July 1995)
  • Remote Control (November 1995)
  • Remote Control (November 1995)
  • Remote Control (December 1995)
  • Remote Control (December 1995)
Items relevant to "12VDC To 70VDC Step-Up Voltage Converter":
  • 12V DC to 70V DC Step-Up Converter PCB pattern (PDF download) [11102931] (Free)
Articles in this series:
  • Computer Bits (July 1989)
  • Computer Bits (July 1989)
  • Computer Bits (August 1989)
  • Computer Bits (August 1989)
  • Computer Bits (September 1989)
  • Computer Bits (September 1989)
  • Computer Bits (October 1989)
  • Computer Bits (October 1989)
  • Computer Bits (November 1989)
  • Computer Bits (November 1989)
  • Computer Bits (January 1990)
  • Computer Bits (January 1990)
  • Computer Bits (April 1990)
  • Computer Bits (April 1990)
  • Computer Bits (October 1990)
  • Computer Bits (October 1990)
  • Computer Bits (November 1990)
  • Computer Bits (November 1990)
  • Computer Bits (December 1990)
  • Computer Bits (December 1990)
  • Computer Bits (January 1991)
  • Computer Bits (January 1991)
  • Computer Bits (February 1991)
  • Computer Bits (February 1991)
  • Computer Bits (March 1991)
  • Computer Bits (March 1991)
  • Computer Bits (April 1991)
  • Computer Bits (April 1991)
  • Computer Bits (May 1991)
  • Computer Bits (May 1991)
  • Computer Bits (June 1991)
  • Computer Bits (June 1991)
  • Computer Bits (July 1991)
  • Computer Bits (July 1991)
  • Computer Bits (August 1991)
  • Computer Bits (August 1991)
  • Computer Bits (September 1991)
  • Computer Bits (September 1991)
  • Computer Bits (October 1991)
  • Computer Bits (October 1991)
  • Computer Bits (November 1991)
  • Computer Bits (November 1991)
  • Computer Bits (December 1991)
  • Computer Bits (December 1991)
  • Computer Bits (January 1992)
  • Computer Bits (January 1992)
  • Computer Bits (February 1992)
  • Computer Bits (February 1992)
  • Computer Bits (March 1992)
  • Computer Bits (March 1992)
  • Computer Bits (May 1992)
  • Computer Bits (May 1992)
  • Computer Bits (June 1992)
  • Computer Bits (June 1992)
  • Computer Bits (July 1992)
  • Computer Bits (July 1992)
  • Computer Bits (September 1992)
  • Computer Bits (September 1992)
  • Computer Bits (October 1992)
  • Computer Bits (October 1992)
  • Computer Bits (November 1992)
  • Computer Bits (November 1992)
  • Computer Bits (December 1992)
  • Computer Bits (December 1992)
  • Computer Bits (February 1993)
  • Computer Bits (February 1993)
  • Computer Bits (April 1993)
  • Computer Bits (April 1993)
  • Computer Bits (May 1993)
  • Computer Bits (May 1993)
  • Computer Bits (June 1993)
  • Computer Bits (June 1993)
  • Computer Bits (October 1993)
  • Computer Bits (October 1993)
  • Computer Bits (March 1994)
  • Computer Bits (March 1994)
  • Computer Bits (May 1994)
  • Computer Bits (May 1994)
  • Computer Bits (June 1994)
  • Computer Bits (June 1994)
  • Computer Bits (July 1994)
  • Computer Bits (July 1994)
  • Computer Bits (October 1994)
  • Computer Bits (October 1994)
  • Computer Bits (November 1994)
  • Computer Bits (November 1994)
  • Computer Bits (December 1994)
  • Computer Bits (December 1994)
  • Computer Bits (January 1995)
  • Computer Bits (January 1995)
  • Computer Bits (February 1995)
  • Computer Bits (February 1995)
  • Computer Bits (March 1995)
  • Computer Bits (March 1995)
  • Computer Bits (April 1995)
  • Computer Bits (April 1995)
  • CMOS Memory Settings - What To Do When The Battery Goes Flat (May 1995)
  • CMOS Memory Settings - What To Do When The Battery Goes Flat (May 1995)
  • Computer Bits (July 1995)
  • Computer Bits (July 1995)
  • Computer Bits (September 1995)
  • Computer Bits (September 1995)
  • Computer Bits: Connecting To The Internet With WIndows 95 (October 1995)
  • Computer Bits: Connecting To The Internet With WIndows 95 (October 1995)
  • Computer Bits (December 1995)
  • Computer Bits (December 1995)
  • Computer Bits (January 1996)
  • Computer Bits (January 1996)
  • Computer Bits (February 1996)
  • Computer Bits (February 1996)
  • Computer Bits (March 1996)
  • Computer Bits (March 1996)
  • Computer Bits (May 1996)
  • Computer Bits (May 1996)
  • Computer Bits (June 1996)
  • Computer Bits (June 1996)
  • Computer Bits (July 1996)
  • Computer Bits (July 1996)
  • Computer Bits (August 1996)
  • Computer Bits (August 1996)
  • Computer Bits (January 1997)
  • Computer Bits (January 1997)
  • Computer Bits (April 1997)
  • Computer Bits (April 1997)
  • Windows 95: The Hardware That's Required (May 1997)
  • Windows 95: The Hardware That's Required (May 1997)
  • Turning Up Your Hard Disc Drive (June 1997)
  • Turning Up Your Hard Disc Drive (June 1997)
  • Computer Bits (July 1997)
  • Computer Bits (July 1997)
  • Computer Bits: The Ins & Outs Of Sound Cards (August 1997)
  • Computer Bits: The Ins & Outs Of Sound Cards (August 1997)
  • Computer Bits (September 1997)
  • Computer Bits (September 1997)
  • Computer Bits (October 1997)
  • Computer Bits (October 1997)
  • Computer Bits (November 1997)
  • Computer Bits (November 1997)
  • Computer Bits (April 1998)
  • Computer Bits (April 1998)
  • Computer Bits (June 1998)
  • Computer Bits (June 1998)
  • Computer Bits (July 1998)
  • Computer Bits (July 1998)
  • Computer Bits (November 1998)
  • Computer Bits (November 1998)
  • Computer Bits (December 1998)
  • Computer Bits (December 1998)
  • Control Your World Using Linux (July 2011)
  • Control Your World Using Linux (July 2011)
Items relevant to "A Digital Clock With Battery Back-Up":
  • Digital Clock with Battery Backup PCB patterns (PDF download) [04101931-3] (Free)
Digital clock with battery back-up Ever fancied building a clock? Well, here's your chance to get stuck into some basic digital electronics & build yourself a useful timepiece. It has battery back-up, automatic display dimming at night, AM/PM indication & a 4-digit LED display. By DARREN YATES Digital electroni.cs is a large and diverse field. Apart from the computer industry, it's now used in everything from telephones to washing machines to the humble digital alarm clock next to your bed. However, if you look inside your clock, you won't recognise much in the way of electronic circuitry. What you will find is a PC board on the back of a LED display, with a black "blob" in the centre. Embedded inside this blob is a single large scale 80 SILICON CHIP integration (LSI) chip which contains virtually the entire clock circuit. Of course, conventional LSI clock chips are still made but, with the advent of cheap digital clocks, they are now difficult for the do-it-yourself enthusiast to obtain. These LSI chips also teach you nothing about digital electronics. This design changes that situation by not using a dedicated LSI chip. Instead, it uses nine readily available CMOS ICs, some of which you may already have sitting in your junkbox. The main features of our clock are listed in the specifications panel. Block diagram The main sections of the clock are shown in the block diagram of Fig.1. It uses an accurate frequency reference which is divided down and used to clock a number of BCD counters and a latch. There are three BCD counters in all - two to count the minutes and one to count the hours from 0-9. All three counters directly drive 7-segment LED displays. The latch provides the 10-hour count and drives two segments of a fourth LED display. Let's go through the block diagram step-by-step and explain how it all works. Basically, you can think of a clock as a specialised counter that increments once every minute. Unlike a conventional counter, it is presettable and has a somewhat unusual count sequence; eg, it counts from 59 to 00 and from 12 to 1. Let's begin with the section that generates the pulses. These have to be accurate and that means that we can't use a simple RC-type oscillator to do the job. This type of oscillator drifts with temperature and any frequency variations can translate into quite large errors. What's needed then is a very accurate frequency reference and this has been obtained by using a digital watch crystal. This type of crystal oscillates at 32. 768kHz and this is divided by 16,384 to obtain an accurate 2Hz square-wave signal. To obtain one pulse every minute, we need a frequency of 0.0166Hz and so our 2Hz signal must be further di'rided by 120. This is achieved by first passing it through a divide-by-2 stage and then through a divide-by-60 stage. The resulting 0.0166Hz signal is fed into counter 1, which is the 0-9 minutes counter. Its carry out (CO) output goes high on the 10th count and clocks counter 2 which counts the tens of minutes. Because the maximum count that the minutes counter can display is 59, we have to detect the 60th count and this is done by checking counter 2's display driver outputs. When the 60th count is reached, the first two counters are reset and counter 3 is incremented by one. Finally, the CO output from counter 3 clocks a latch when a count of 10 hours is reached. This latch not only drives the two segments of the fourth LED display but also drives a display latch to give AM/PM indication. It also provides a reset clock pulse to counter 3 for the transition from "12" to "1" (more on this later). Time setting is achieved by feeding the 2Hz clock signal directly into counters 1 and 3 so that the minutes and hours can be incremented separately. This makes time -setting a breeze. Circuit diagram Fig.2 shows the full circuit details of the Digital Clock. Note that all the IC numbers on the block diagram can be related directly to the circuit diagram. IC5 is the 0-9 minutes counter, IC6 the minutes tens counter, IC7 the 0-9 hours counter, and IC8a & IC9a the 10-hour count and latch circuit. I CRYST AL OSCILLATOR +16384 IC1 +60 IC3 +2 IC2a TIME SET MINUTES ...... 12·1 CLOCK PULSE IC9b ..._ I--- TIME SET HOURS CLK IN AM/PM LATCH IC8b '--- TEN-HOUR COUNT AND LATCH IC8a.lC9a '---- BCD COUNTER 3 IC7 L- BCD COUN TER 2 IC6 CINCO 7- • I I BCD COUNTER 1 IC5 ~ ,_,I I ,=,,-, ,_,I I DISPLAY DIMMER IC4d Fig.1: block diagram of the digital clock. It uses a crystal controlled oscillator (ICl) to generate an accurate reference frequency & this frequency is then divided down & used to clock three BCD counters (IC5-IC7) & a latching circuit (IC8a & IC9a). The counters & the latching circuit in turn drive four 7-segment LED displays, while another latch (IC8b) drives the AM/PM indicator. In greater detail, IC1 is a CMOS 4060 14-bit counter and oscillator which has its frequency set by a 32. 768kHz watch crystal. A 33pF trimmer capacitor provides the correct loading for the crystal to ensure that it starts reliably, while VCl allows Specifications • 4-digit LED readout. • 12-hour operation. • separate hours & minutes time setting. • automatic display dimming at night. • AM/PM indication. • crystal-controlled timing. • 12VDC plugpack power supply with back-up battery. the crystal frequency to be trimmed slightly so that the clock keeps accurate time. The output at pin 3 of IC1 is the required 2Hz square-wave signal (ie, the crystal frequency is divided by 214 ). This signal is divided by flipflop IC2a to produce a 1Hz signal on pin 1 which, among other things , is used to flash the two centre decimal points on the display to separate the hours and minutes digits. The 1Hz signal from IC2a is also fed to a divide-by-60 cjrcuit based on IC3 , a 4518 dual BCD counter. Both counters inside this IC are connected in cascade, with AND gate IC4a used to detect a '6' output from the second counter. Pin 4 of IC4a drives an RC network consisting of a lkQ resistor and a .001µF capacitor. Each time IC3 APRIL 1993 81 :a :i:: n :z: n 0 r: Cf.l = N +V1 "7 •• 5 VC1 3 - opF l • J 7 - .!.. 3 47 k 18k _1.8k l: er r- ) Q2 . BC5~ C _t8k 4013 Q L CK 7 .,. 7 L...--'r'J.. _r J! .,. TIM\1SET --r.,. --...E._jB_J9 1k l ... .,. .00 1 I 5 ~ 11 712 .,. 13 "IC4cL 9 1 5 DP +Vl =• )~~~ 7 l 11 9 D : 03 BC548 I 100k • • .f.~ I a -. -. 22k C ~ ~ [!__j +V2 11 0 t +V1 +V1 7 .001I s DP ,-, ...L b DISP3 HDSP5303 •Idle I Ia 78421910 a 10121391187 tak3 7x1.8k '--'-' 15 R .,..-----+--'.._----◄ ,ic::;"\B e"(-1 C 4n R 1 D IC9a Q - 3 4013 --" CK s 17 Ii 5 la I I ·r· I I . 7 001"""' . Q 13 1k .11_ 0_ ____, R IC9b S ~-- n16 _..,_◄_, 14 DISEN 1 R 20UT CLK 1 2 Q IC8a D ICT CLEN ~ 4026 2 _ 4013 3 5 8 CKl-'----+----t1CO s abcdefg _ DISP4 HDSP5303 ,, •/ MIN~:Es .001 \ "" l ...__ fu\ D1 1N914 HOSU2RS l .,. r . 3.3k 3 .,. ICS 4026 \Y .. 1J9~4 6 :V . - OUT 1k 15 R 1 ij 7 .001 I 0 '--Jg" .f ,c◄b I 10 47k 5 DP DISP2 HDSP5303 ,=, ,-, la ~ jE /';; C ~) 7 :..__ +V2 t) D5 1 CLK 0 100k .,. I +V1 .,. 100pF .,_ I E • • C VIEWED FROM BELOW B 7 1 6V T BATTERY I BACKUP.l_ 1N~g - 7 7 DISP1 HDSP5303 ,=, ,-, la 6421910 • 1012139118 +V1 I GC ~ 1-------J.---- . ~16 DISEN 2 CO CLEN ~ 15 IC5 R 4028 8 abcdelg _ 7x1.8k 5 CLASSIC CLOCK E ~05 C:3:.7k 47k 11 6 7 . 47k ~ ~ ~~ +V1 •••• 1N /'. 7812 a.;;.;"-<1.....,_\..1,,.,..a,....a.. '--' + GND ( ~ 100 ('..~ :~ 16VWi 04 D7 \ : 1N4004 ;i;. _ . Bg5~ 8 47k B/?E -a 1976410 : 1012 139 2 . - IN ------------ ♦V2 CLK 2 CLEN 6 abcdefa _ ral3 DISEN , +V1 47k 1.8k$ 7x1.8k .,. 100pFI ,l ...__ "•• J I'::'\ r- '--' + 100 25VWi °":!- 2 3 L_JIC4d 1 -■ 1 001 1J9~4 · • • ORP12, ' • U4 1N4004 i::\, +.., ~ 12VDC 300mA PLUG-PACK - _ L--------------------, L--------'31-----e■i----------------e----, 3 D IC2a Q 1 G 4 , - - - - - - - - - - - - ' ~ ~ . . +.. ,--~IMr--1-'-'ICK +V1 14 4 ,-■ 12 _ _l! ........- IC1 4060 l ------------------"-40 7 110 14 ----~ o D 12 - ICBb 11 .._µ 0 CK S R .,. 33pF'"' I 10 100k HU-- , X1 32.768kHz •• uM 11 -------'-'I 16 14 1 . - - -6..,.._ 6 Q2B 04A 03B 13 0 ENB IC3 4518 1 15 CLKA R +V1---------+----------------. The switch board carries the three timesetting switches & the light dependent resistor (LOR). It is mounted on 9mm spacers on the lid of the case & is connected to the timekeeping PC board via flying leads. reaches a count of 60, pin 4 goes high, the capacitor charges and pin 15 of IC3 is pulled high. Thus, IC3 is reset to 00 a short time after the count of 60 is reached. As a result, each time IC3 counts to 60, pin 4 ofIC4a briefly switches high. IC4a thus delivers a 0.016Hz pulse train (ie, one pulse per minute) and this signal clocks BCD counter IC5 via Dl. IC5's CO output in turn clocks IC6 (the minutes tens counter) at every lath count, as described previously. It's here that we strike the first wrinkle. When IC6 reaches a count of six, two things must happen: (1) IC5 & IC6 must both be reset to zero; and (2) a clock signal must be applied to hours counter IC7. As it turns out, we can easily detect the 6th count by monitoring the "b" and "e" outputs from IC6. When a '6' is to be displayed, the "b" output segment is low and the "e" segment out- ◄ Fig.2 (left): all the IC numbers on the block diagram can be related directly to the circuit diagram. IC5 is the 0-9 minutes counter, IC6 the minutes tens counter, IC7 the 0-9 hours counter, and IC8a & IC9a the 10-hour count and latch circuit. The timing circuit is based on a 14-bit counter/oscillator (ICl) & a 32.768kHz watch crystal. put is high. These two conditions only occur together at the 6th count. Thus, on the 6th count, transistor Ql will be off and pin 8 of IC4b will be high. Pin 9 of IC4b also goes high on the 6th count and thus pin 10 switches high and clocks hour counter IC7 via DZ. IC4b then resets IC6 a short time later via the RC delay circuit connected to its output. Because the time constant of this RC circuit is very small, the observer doesn't see the '6' appear. The output pulse from IC4b is still long enough to clock hours unit counter IC7, however. Hours counter This is where things start to get a little tricky. That's because IC7 must cycle from 1 to 9 to O (as in 1am-10am or 1pm-10pm), then from 1 to 2 (as in 11am-12pmor 11pm-12am), then from 1-0 again and so on. This sequence is impossible for a 4026 UP counter to do on its own but it can be done by adding a small amount 0f extra circuitry based mainly on IC9a. We'll look at this in some detail shortly. IC8 is a 4013 dual D-type flipflop, with IC8a connected as a latch to drive the leading display. Because this display either shows a '1' or is off, segments "e" and "f" are tied together via 1.8kQ resistors and driven by the Qbar output of IC8a via transistor QZ. When Q-bar is low, Q2 turns on and the two segments light to show a "1". Conversely, when Q-bar is high, QZ and the segments are off. IC8a is clocked by the CO output of IC7. When IC7 reaches a count of 10, its CO output goes high and Q-bar of IC8a goes low, thus turning on Q2 and the "e" and "f" segments of the leading hours digit. Now let's see how IC7 cycles through its count sequence. As already discussed, clock pulses are applied to IC7 at regular 1-hour intervals via diode DZ. Assume for the moment that the time is currently 1:59; ie, IC7 is at a count of "1". When the next clock pulse arrives , IC7 goes to a count of 2 (ie, we have 2:00 on the displays) and this causes the "2OUT" pin (pin 14) to go low. This low transition is ignored by the clock input of IC9a, since this flipflop can only change state when its clock input goes from low to high (provided its Reset input is low). When the next clock pulse occurs, IC7 goes to a count of "3" and pin 14 of IC7 goes high again This high is applied to the clock input of IC9a but IC9a ignores the clock pulse on this occasion. That's because its reset input (pin 4) is held high by the Q-bar output from IC8a. However, when the count in IC8a and IC7 reaches 13, Q-bar of IC8a is low. IC9a thus switches its Q output (pin 1) high on receipt of the clock pulse and this resets both IC7 and IC8a. Q-bar of IC8a now goes high again and turns off transistor Q2 and the leading digit (ie, the leading digit is blanked). At the same time, IC7 is reset to "0". But we don't want the hours units display to show "0"; we want it to show a "1 " instead. That's achieved by using the Q-bar output of IC8a to clock IC9b when it switches high to turn off the leading hours digit. When that happens , IC9b 's Q output switches high and feeds a clock pulse to IC7 via D3 to that IC7 immediately advances to a count of 1. IC9b then resets itself almost immediately via the RC time constant on its pin 13 output. In summary then, the hours counters (IC7 & IC8a) count to 12 and are reset to O on the 13th count. IC7 is then immediately clocked to produce a "1" on the display. This all happens very quickly so that, as far as the APRIL 1993 83 - signal derived from pin 4 ofICl. If the ambient light level is high, the resistance of the LDR is low and the output from IC4d is also low. Conversely, if the light level is low, the LDR's resistance is high and IC4d gates through the 512Hz square-wave signal from IC1. IC4d drives PNP transistor Q4 via a 47kQ base current-limiting resistor. When IC4d's output remains low (ie, the light level is high), Q4 turns on and thus Q5 also turns on and the displays are driven at a 100% duty cycle to provide maximum brightness. Conversely, when the light level is low, IC4d switches Q4 and thus Q5 on and off at a frequency of 512Hz. Q5 in turn switches the displays on and off at this frequency to reduce the display brightness . ~ Power supply - craJ , - •F""½ ~l- •---~~ -'--;~~hrJ,rtt-~t=7~ ,. : \ C> 4 :12 ,(l'-, ! ,~ U~i~H!~. .. ~ TER'Y l~ .,.., - ± F• • ./4i' • · 100uF 12VDC 25VW INPUT 0"' Fig.3: install the parts on the main PC board & the display PC board as shown here. Take care with the orientation of polarised parts & note particularly that DISP2 & DISP4 must be installed upside down on the display board (ie, with their decimal points at top left). observer is concerned, the display goes straight from "12:59" to "1:00". Q3, IC4c and ICBb are used to drive the AM/PM indicator. Q3 inverts the 2OUT output from IC7 and drives one input of AND gate IC4c, while the Q output of IC8a drives the other input (pin 12) of the AND gate. Pin 11 of IC4c thus clocks IC8b every 12 hours to toggle the AM/PM indicator. The AM/PM indicator itself is actually the decimal point on the leading digit. A very simple trick is used so that it appears in the top lefthand corner of the display - the display is LOR $2 ~ Display dimming 0 Fig.4: the switch board carries just four components: the three timesetting switches (S1-S3) & the LDR. Make sure that the flat side of each switch is oriented as shown. 84 SILICON CHIP installed on the PC board upside down! Pushbutton switches S1, S2 and S3 perform the time setting function. To set the time, S1 (TIME SET) must be held down and then either S2 pressed to set the hours or S3 pressed to set the minutes. The circuit work like this: when S1 is pressed, 2Hz clock pulses from IC1 are coupled through to S2 and S3. If S2 is now pressed, these 2Hz pulses are differentiated by a .0015µF capacitor and fed to ·pin 1 of IC7 to increment the hours display. Similarly, if S3 is pressed, the minutes 0-9 counter is clocked. IC4d, Q4, Q5 and an ORP12 light dependent resistor (LDR) provide the automatic dimming function for the LED displays. The LDR and its series 3.3kQ resistor form a variable voltage divider, the output of which depends on the ambient light level. This output is fed to one input of AND gate IC4d. The other input of IC4d is driven by a 512Hz square-wave Power for the circuit is derived from a 12V DC plugpack supply. As shown on Fig.2, the incoming DC is fed via reverse polarity protection diode D4 to a 3-terminal 12V regulator. Two separate supply rails are then derived from the output of the regulator via isolating diodes D5 and D7. The +Vl rail powers all the timekeeping circuitry, while the +VZ rails powers the LED displays via the dimming circuit (Q4 & Q5). A 6V backup battery is used to supply the timekeeping circuitry if the mains fails. This battery is isolated from the +Vl rail via D6 which is normally reverse biased. When the mains fails however, D6 becomes forward biased and the battery takes over and supplies power to the +Vl rail. During this time, D5 is reverse biased and so the LED displays are blanked. This was done to conserve the batteries in the event of a long blackout. The LED displays come back on again to show the correct time as soon as the mains power is restored. Construction All the components for the digital clock ·(except for the 3.5mm power socket) fit on three PC boards: a main board (code 04101931) which accommodates all the timekeeping circuitry; a display board (code 04101932) which holds the four LED displays; and a switch board (code 04101933) which holds the timesetting switches and the LDR. Before installing any of the parts, The display board is soldered at right angles to the main board via matching edge-connector pads & must be adjusted so that the LED displays line up with the perspex viewing window (see text). Wrap the battery in foam insulation to prevent it from shorting other components when the lid is attached. check all three boards for etching defects by comparing them with the published artworks. When you're satisfied that everything is correct, the parts can be installed on the main PC board. Fig.3 shows the parts placement details. Begin by installing PC stakes at all external wiring points, then install the wire links, resistors and capacitors. Make sure that the wire links are straight so that they don't short against other parts. You can straighten the link wire if necessary by clamping one end in a vice and then stretching the wire slightly by pulling on the other end with a pair of pliers. The semiconductors can now be installed on the PC board, followed by trimmer capacitor VC1 and the 32.768kHz watch crystal. Be sure to use the correct part at each location and check that all parts are correctly oriented. In particular, check the transistor type numbers carefully and note that all the ICs face in the same direction. The 3-terminal regulator is installed with its metal tab towards the adjacent power diodes (see Fig.2 for the pin connection details). Display board This board will only take a few minutes to assemble since it only carries the four LED displays plus two wire links. There is a catch though: displays 2 and 4 must be installed on the board upside down (ie, their decimal points must be at top left). These two displays are marked with an asterisk on the parts layout diagram (Fig.3). The other two LED displays (1 & 3) are installed in the usual manner (ie, decimal points at bottom right). Push all the displays down onto the board as far as they will go before soldering their pins. Once the display board has been completed, it can be attached at rightangles to the main board by lightly solder tacking two pairs of edge connectors together. Adjust the display board so that its bottom edge sits about RESISTOR COLOUR CODES a a a a No. 1 4 7 a a a a a 1 26 3 Value 4-Band Code (1%) 5-Band Code (1%) 4.?MQ 100kQ 47kQ 22kQ 4.7kQ 3.3kQ 1.8kQ 1kQ yellow violet green brown brown black yellow brown yellow violet orange brown red red orange brown yellow violet red brown orange orange red brown brown grey red brown brown black red brown yellow violet black yellow brown brown black black orange brown yellow violet black red brown red red black red brown yellow violet black brown brown orange orange black brown brown brown grey black brown brown brown black black brown brown APRIL 1993 85 PARTS LIST 1 PC board, code SC04101931, 154 x 88mm 1 PC board, code SC04101932, 102 x 37mm 1 PC board, code SC04101933, 82 x 51mm 1 front panel label 1 switch label 1 2.5mm DC socket 1 battery snap connector 1 ORP12 light dependant resistor 3 pushbutton !'170mentary switches (S1 ,S2,S3) 1 plastic case, 186 x 125 x 50mm (Rod Irving Cat. H-10116) 8 9mm x 3mm tapped spacers 8 25mm x 3mm machine screws 1 32.768kHz watch crystal (Rod Irving Cat.Y-11125) 1 4 x AA square battery holder 4 1.5V AA batteries Semiconductors 1 4060 oscillator/14-bit counter (IC1) 3 4013 dual D flipflops (IC2, IC8,IC9) 1 4518 dual 4-bit BCD counter (IC3) 1 4081 quad 2-input AND gate (IC4) 3 4026 decade counter/display drivers (IC5-IC7) 2 BC548 NPN transistors (01 ,03) 3 BC558 PNP transistors (02,04,06) 1 BC337 NPN transistor (05) 1 7812 3-terminal regulator 4 HDSP-5303 common-cathode ?-segment LED displays 3 1N914 signal diodes (D1 -03) 4 1N4004 silicon diodes (D4-D7) Capacitors 1 100µF 25VW electrolytic 1 100µF 16VW electrolytic 6 .001 µF 63VW MKT polyester 2 100pF ceramic 1 33pF ceramic 1 5-30pF trimmer capacitor (VC1) Resistors (0.25W, 1%) 1 4.7MQ 4 100kQ 7 47kQ 1 22kQ 1 4.7kQ 1 3.3kQ 26 1.8kQ 3 1kQ Miscellaneous • Tinned copper wire, hook-up wire, screws, nuts, washers. 86 SILICON CHTP Fig.5: this fullsize artwork can be used as a drilling template for the switches & the LOR. LDR + Time Set Hours Minutes + + + 5mm below the copper side of the main board before making these two connections and leave the remaining connections until later in case some adjustment is required. Switch board Fig.4 shows the wiring details for the switch board. Note that the three pushbutton switches must be correctly oriented, otherwise they will be behave as though they are permanently closed. In each case, the flat side of the switch body must face towards the top of the board. The only other part on the switch board is the LDR. It can be installed etther way around and should be pushed down so that its top surface is no more than 9mm above the PC board. Final assembly The prototype was built into a black ABS plastic case measuring 186 x 125 x 50mm (see parts list). This case comes with a integral screw supports on both the base and lid and these will have to be removed using an oversize drill bit. The front panel label is then attached to its panel and the cutout made for the LED displays. This cutout is best made by drilling a seri.es of small holes around the inside perimeter of the marked area, then knocking out the centre piece and filing the job to a smooth finish. This done, glue a piece ofred Perspex to the back of the panel to provide the viewing window. The front panel can now be slid into the base and the main board assembly .introduced so that the displays sit directly behind the cutout. Position the board so that the displays are almost touching the Perspex, then mark;out and dr-ill the fpur cor- ner mounting holes in the base. The main board assembly is mounted in the case on 5mm spacers. Secure the board at two diagonally opposite mounting points to begin with, then check that the displays line up correctly with the viewing window. If they don't, adjust the display board as necessary, then solder the remaining edge connector pads. Finally, the switch board can be mounted on the lid of the case, the 3.5mm power socket installed on the rear panel and the wiring completed. The exact location of the switch board is not critical but make sure that it's far enough back to clear the display board. When you have decided on the exact location, attach the label and use it as a template for drilling the holes. A small pilot drill should be used initially for drilling the switch and LDR holes and the holes then enlarged to size using a tapered reamer. This done, conneot eight 150mmlong flying leads to the switch board, then mount the board on the lid using 9mm spacers, machine screws and nuts. The wiring between the two PC boards and to the DC power socket can now be completed and the battery snap connector fitted. Testing Now for the smoke test. Connect the DC plugpack supply and switch on - you should immediately get a readout on the displays, although it might not make much sense at this stage. That's because the 4026 counters can switch on in a random mode and produce incorrect symbols. To correct the displays, all you have to do is press the time setting buttons (ie, Time Set + Hours and Time Set + 0 0 0 If all is well so far, connect the 6V b!lck-up battery (a 9V battery will also do the job), set the time and switch off the mains power. The display should now go out but the clock should continue to function. Leave the mains power off for a few minutes, then switch it back on again. The display should now come back on and show the correct time. Check that diodes D5 and D6 are correctly oriented if you strike problems here. Finally, check that the display dim- ~ flllll!J- u 00 00 ~ : 0 Fig.6: check the PC boards for etching defects against these full-size patterns before installing any of the parts. Minutes) until the counters are clocked and revert to a valid condition. If the clock doesn't work, switch off and check for wiring errors. In particular, check for incorrect parts placement on the PC boards and for shorts between soldered joints on the back of the boards. If the displays don't make much sense, check for shorts between the display segments and that the displays have been correctly oriented (displays 2 & 4 must be installed upside down). 0 04101933 ao-------o~o o0i----a00 0 0 ming feature works by covering the viewing hole for the LDR. The display should dim immediately when the hole is covered. SC I. _____. .I Classic Clock Fig. 7: the front panel cutout is made by drilling a series of small holes & then knocking out the centre piece. APRIL 1993 87