also included clock.hex which can be used to
program a chip without having to assemble
What if your electric utility runs at 50 Hz
instead of 60 Hz? A small change in the
software will allow the clock to run using a
50 Hz reference instead. In the definitions.inc
file, find the line that reads "#define acPerS
. 60" and change the . 60 to . 50. That's all
there is to it!
I had a friend (who is a retired cabinet
maker) make a wooden frame for the clock
out of Medium-Density Fiberboard (MDF;
Figure 8). I decided to use MDF because it’s
easily cut to shape and paints very nicely. I
thought about using real wood, but the
problem is that the frame would be
extremely fragile where the grain goes across
I painted the frame and applied some
clock numbers to it that I got from Hobby
Lobby. I mounted the PCB to the frame and
now I have a very geeky clock (Figure 9).
I made some changes to the clock after
my class was over. I rerouted the PCB so
the correct I/O lines are used for the
buzzer and LEDs, and I added the
capability to use the clock on a 50 Hz
electrical system to the code. Now, the
clock will automatically detect if the AC line
is 50 or 60 Hz and adjust its timing
If you decide to take the time to make
this clock yourself, when you’re done, you
can proudly display your handiwork on
your wall and enjoy it for years to come.
■ FIGURE 8. Wooden frame.
■ FIGURE 9. Completed analog style LED clock (displaying the time
7:11: 47 PM).
May/June 2018 35
PCB files and a kit are available
from the Nuts & Volts webstore
This kit would be ideal for
someone wanting to practice
their soldering skills. There are
a lot of parts, but they are all
through-hole and easy to solder.