Q&A
■ WITH RUSSELL KINCAID
In this column, I answer questions about all
aspects of electronics, including computer hardware,
software, circuits, electronic theory, troubleshooting,
and anything else of interest to the hobbyist. Feel
free to participate with your questions, comments,
or suggestions.Send all questions and comments to:
Q&A@nutsvolts.com
WHAT’S UP:
Join us as we delve into the
basics of electronics as applied
to every day problems, like:
High Voltage S ine Wave ✓
● Obscure Battery
Black Body Heat Source
✓
✓
LARGE CLOCK
QI have read with real interest your articles on the large clock using the PIC. I would like to make a clock
that can be programmed with the
Arduino and use non surface-mount
chips. (It is hard to breadboard with
SMC.)
But I want the complete clock ...
meaning LEDs for all the hours, all
the minutes, and all the seconds. The
seconds would consist of a circle of
60 bi-color LEDs (green and red) with
the green on all of the time and the
red coming on each second in
rotation.
The minutes would consist of
a circle of 60 yellow LEDs, each
of which would stay lit for the
minute indicated and go off when
the next minute comes on. Also,
when the minute LED lights up it
needs to trigger a cluster of LEDs
that can be formed into the minute
hand.
The hours would consist of
12 LEDs that stay on for the hour
indicated and also trigger a cluster
that can be formed into the hour
hand.
In addition, there needs to be a
means of setting the time. This would
then be a digitally driven analog
clock with no motors or moving
parts!
Any advice or help would be
greatly appreciated.
24
— Jay Simmons
October 2010
AI am not going to learn a new programming language and use an unfamiliar chip, but I could
design a circuit and PICBASIC
program for a PIC16F57. You can
convert the program to C++ for the
Arduino and I am sure you can find a
version among the 11 now produced
that will be compatible.
Wait a minute! Sixty lines for the
seconds, 60 lines for the minutes, 12
lines for the minute hands, and 12
lines for the hour hands: 144 lines. I
don’t know of a micro with 18 eight-bit ports, so it looks like a hardware
solution is easier.
Four 74HC154 (one of 16
decoders) will give the 60 lines for
the seconds and another four for the
minutes. An hour counter will use
another 74HC154 to move the hour
hand (see Figure 1). I could still use a
PIC16F57 to control the 74HC154s
but the cost in time far outweighs the
cost of a half dozen 30 cent chips.
The seconds are displayed by
bi-color LEDs (red and green). When
the red LED is turned on by Q1, the
green goes off because its voltage drop
is higher. Instead of having the minute
LED go off, I suggest a circle of 60
yellow LEDs, with every fifth one being
red to facilitate reading the time.
These LEDs will be on all the time.
The minute hand will rotate with 60
positions; the hour hand will have 12
positions. You can have up to 20 LEDs
in each hand with the ZVP2106A or,
if you want to use more, the
NDP6020P will handle up to 2,000.
Here is how the circuit works:
The line frequency is divided by 60
to produce one second clocks to IC5
which is a binary counter. This drives
IC1, IC2, IC3, and IC4 which
represent one of 16 decoders. When
the count of IC1 gets to 16, feedback
through IC14A resets IC5 to zero,
which decodes to one. At the same
time, IC15, a synchronous shift
register, is clocked which enables IC2
and disables IC1. This process
continues until we get to the 16th
count in IC4. The output from IC4
through IC17F puts IC15 in parallel
entry mode and the clock from
IC17D does the parallel entry which
enables IC1, and the cycle starts
over. The reason for the two inverters,
IC17D and IC17E, is that the clock
has to happen after the parallel entry
mode is set, so the clock is delayed
by two inverter time delays. The
delay is less than a microsecond so it
won’t be noticed. The minute circuit
is identical to the second’s circuit,
and the hour circuit differs only in
that it simply has to count to 12.
To set the clock, the normal
operation is disabled and the one
second pulses from IC8B are used to
advance the count. Switches A, B, C,
and D are momentary pushbuttons.
Switch A will advance the seconds in
15 second increments and switch B
increments in one second increments;
you can set the seconds in less than
19 seconds and the minutes the
same way. The hours increment one
hour per second so that is fast also.
I have not built or simulated this