Word clock; project intro

A couple (cough, maybe three) of years ago, I decided I wanted to build a word clock. I like the idea of something slightly vague about knowing the time, when we have per second accuracy on all internet connected things, and our lives ruled by getting to the next meeting at the right time…

For those that don’t know, a word clock is a grid of letters, with lights behind the letters, that spell out the time. So at 10:34 am it would say “half past ten”. And I’m not talking about a simple LCD matrix display. Something like this:

Being a clock, and fairly simple, word clocks are common(ish) projects, so a bit of google searching can find full up instructables. But, as ever, how much do you learn from following an instructable? Some, but it doesn’t give the opportunity for really getting it wrong and having to figure it out yourself. So I did that instead.

Version 0.1

I had the idea of a piece of circuit board, with the letters etched away, and the rest of the copper tinned, and LEDs behind illuminating the required words. And I had access to etching facilities, so I etched some words. The words I laid out using kicad (http://www.kicad-pcb.org/display/KICAD/KiCad+EDA+Software+Suite), having written a piece of Python to arrange the words into different layouts. I also wanted the modifiers to the hours to be first, and then the hours, and then an “o’clock”. The Python code tried a bunch for me, and by hand I picked:

quartertwenty
tenhalf5totst
pastsixtwelve
eighttwoseven
tennineeleven
midnightthree
fouronefive
      o'clock

I used kicad’s inbuilt fixed pitch fonts, and didn’t want any spaces. It turns out that a full matrix would be 8 x 13 LEDs, so I skimped, deciding that “a couple” of LEDs would be okay behind longer words. This all went well.

I then threw together a PIC + shift register based circuit to illuminate some LEDs.

LEDs, driven by a PIC + shift registers.

LEDs, driven by a PIC + shift registers.

This didn’t look terrible, apart from the uglyist LED board wiring. I’d already split the concept into an LED board + PIC board, with the idea that the PIC board could fold behind the LED board for neatness in the case.

test leds + words

And, in a crappy cardboard case, it doesn’t look too bad. Lots of bleed between letters, and uneven illumination. Worse, the PIC internal clock didn’t keep decent time over 24 hours,being wrong by at least 5 minutes per day.

Version 0.2

And then work got busy, not time for other things etc. etc. The parts then languished in a box for a while, and went through a house move. And then three things happened

  1. this blog started,
  2. I played with the LED matrix format, and stopped being scared of it
  3. I found that RS were doing LEDs at 5p (10p delivered) each.

So I put together an LED matrix, and tried to do it neatly. I didn’t draw up a circuit diagram first, and so went through a number of iterations. The sequence was

  1. Solder up matrix. Initally I thought I’d have to add lots of links, but forgot that the leads are generally long enough to use as links. I was able to put the entire matrix together without additional wire links.
Back side of matrix, during construction

Back side of matrix, during construction

  1. Test matrix with battery, be happy with individual wiring and brightness
  2. Test matrix with PICs + shift registers, be unhappy with overall brightness (too faint)
  3. Realise that 3 green LEDs (for the “tst” word) had been put in backwards (ie anode/cathode had been swapped)
  4. Fix
  5. Still too faint. Experiment with different flash rates (as individual brightness seemed better) and multiplexing schemes
  6. Realise that using 74HC595 as current sinks is a bad idea for >1 LED
  7. Try another multiplexing scheme (ie one LED at a time). Realise that human eye can see flicker with this size matrix if each is driven individually, but too faint if driven in sets of rows or columns. 😦
  8. Rebuild circuit so that cathodes are all on columns (rather than rows); this involved unsoldering all links and swapping over 😦
  9. Add ULN2003s as current sinks; still driven by shift registers, but it means that the output of the row driving shift registers sinks into the ULN2003 rather than other shift registers. This allows them to be driven in sets of columns.

Not a trivial amount of debugging. ULN2003 were used because it was what I had to hand.

After all this wailing, and nashing of teeth, the result is:

Some LEDs, yesterday

Some LEDs, yesterday

Doesn’t look as bright as the photos above due to crappy colour balance. But not that there are plenty of LEDs; one per letter! And with the set of words in front:

It's 3:10!

It’s 3:10!

I feel that this is so much better than the version above. No light bleeding (although that’s mainly a brightness issue; I have a feeling that if I check these cheap LEDs are probably not as bright as the previous ones I used), but very consistant illumination. This is partially down to the fact that because there’s an LED per letter, I can get them all to the same height, not having to move them to illuminate multiple letters.

The PIC board has also been rebuilt; there is a “real time clock” chip present now as well which will provide a hours, minutes and seconds, so the PIC doesn’t have to do any counting at all; all it has to do is ask the RTC chip what the time is. More about this in the next post…

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s