By David Welburn
BUILD AN LED ANALOG
Staring at an old clock on my living room
wall one evening, I decided it was time
for something new and original to hang
up on the wall.
The clock presented here uses LEDs to
represent the hands of an analog clock.
It’s a great mix of analog and digital all
This clock has 24 hand positions giving a 2-3 minute
resolution on each one; each hand position has seven
LEDs, giving a total of 169 LEDs.
On the outer ring, there are 12 dimly lit LEDs showing
where the hour positions are. Digital mode displays the
number digits. This is shown once a minute for around 15
seconds. Figure 1 shows the ‘10: 20’ position.
The LEDs are wired into a large matrix formation 12
columns x 15 rows (see Figure 2). The rows are
connected via current-limiting resistors directly to the
PIC16F877 I/O ports C and D. The columns are
connected to a 0V rail via ULN2003 transistor arrays, and
are controlled by the PIC16F877. The persistence of vision
technique is used to light each column one by one for a
very brief time, and then repeat the sequence several
times a second to give the illusion that all the required
LEDs are lit at the same time.
Time To Build
First, build up a frame as shown in Figure 3,
measuring 610 mm x 610 mm. The front of the clock
is 3 mm thick hardboard and the frame is made up
with wooden batons 30 mm x 30 mm.
With the aid of a compass and ruler, map out the
LED positions for drilling. Draw out the outer circle
using a compass to a diameter of 532 mm. Now, draw
straight lines from the center pivot point to the outer
edges of the wood plotting the 12, 3, 6, and 9 o’clock
positions. To find the circumference of the outer circle,
you multiply the diameter by pi ( 3.1416). This gives a
circumference of 1,671 mm; divide this by 24 hands
= 69. 5 mm, so the LEDs on the outer ring are
separated by 69. 5 mm.
Starting at the 12 o’clock position, measure 69. 5
mm to the next LED position and so on. By the time
you reach the 3 o’clock position, you should have
seven equally spaced marks; continue around until
you reach the 6 o’clock position. I found this to be a
bit of trial and error as measuring 69. 5 mm on a curve