This time, we’ll expand the LED matrix to run the
182 LEDs that the clock
uses and make a printed
circuit board (PCB) for the
clock. Then, we’ll wrap it
up with a discussion of
how the software works
and put the finishing
touches on our unique
timepiece. Let’s get
I decided a PCB would be best to have for the final
circuit, due to the large number of LEDs and the need to
arrange them and the resistors and diodes in a circular
pattern. I wanted to manually route the traces so that the
only traces visible from the front of the clock are the
Charlieplexed lines, which would be laid out as concentric
traces on the front of the board among the LEDs. I played
around with a number of PCB design programs and
decided to use Dip Trace as I found that it could most
easily do what I wanted.
Dip Trace has a schematic capture module where I
created the schematic for the clock. Then, Dip Trace
transfers the schematic to the PCB layout module.
To arrange the LEDs and other components in a
precise circular pattern, I created a spreadsheet in
Excel to calculate the position and rotation of the
components. I entered these values into the
Properties field of each component. Once all the
components were in place, I manually routed the
traces. Dip Trace has a 3D rendering tool to show
what the completed board will look like (Figure 1).
I used Bay Area Circuits (see Resources) to
make the circuit board as they had a student special
that allowed me to make a single board for a very
reasonable price. Dip Trace generated the necessary
files to send to Bay Area Circuits so they could
make the board. While I was waiting for the board
to be made, I ordered more parts (mostly LEDs) to
build the clock.
Building and Testing
It took me about four hours to solder all the
components onto the PCB (Figure 2). Once I was done, I
adjusted the code that I had written for the test circuit to
work with the additional LEDs and button. It turned out
there were about a dozen or so LEDs that wouldn’t light
up. I took note of which ones were not coming on and
realized their anodes were all connected to the same line.
I checked that line for continuity to the current-limiting resistor and to its I/O pin on the microcontroller.
That all looked good. Then, I thought I had a bad
microcontroller, so I replaced it. I was pretty confused
when that didn’t fix it either. I checked the code, but
couldn’t find any issue there. Finally, I realized what the
May/June 2018 29
Post comments on this article and find any associated files and/or downloads at
■ FIGURE 1. 3D rendered PCB design (front and back).
■ FIGURE 2. Assembled circuit board.