Sonntag, 8. Mai 2011

Building a Word Clock - Part 2: Electronics

This is part two of my blog posts covering the build of a word clock. I will cover the electronic part of the clock in this post.
See part one for more details about the clock itself.

The letters of the clock are back lit by a 10x10 RGB led matrix. I used 100 4 pin, 5mm common cathode RGB LEDs that I found on ebay.


The anodes of the LEDs in one row and the cathodes of one column are connected all together. The result is a pretty straight forward LED matrix:


A short warning at this point: if you consider building one yourself be aware that there are 100 LEDs, each with 4 pins. That alone means you have to solder 400 pins to each 2 wires. It is fun, but it is also quite a lot of work.

Anyway, the driver board for the clock is also pretty straight forward:



On the bottom left there is an Ardunino Nano that controls the clock (you'll find the source code at the bottom of the post)

Timekeeping is done by a DS1307 breakout board (to the right of the Arduino) with battery backup. It's connected via I2C to the Arduino.

Below the DS1307 are four push buttons for setting the time. They are all connected to one analog input pin of the Arduino. See this forum post for how that is done.

To the right of that you can see the 5V voltage regulator with a screw terminal.

LED Matrix Driver

The top half of the driver board is for driving the LED matrix by scanning the columns of the matrix.
You can find a introduction to LED matrix drivers here (translated).

There are 4 groups of 74HC595 shift registers. For a short introduction and some example code for working with shift registers see the Arduino ShiftOut - Documentation.

You can chain two register with 8 output pins together and basically treat them as if they where one register with 16 output pins.

The Arduino fills the shift registers with the pattern needed for the current time and than uses the "Output-Enabled" pin of the 74HC595 (which is tied to one of the PWM pins of the Arduino) to display the desired color.



You can see the 3 shift register groups for the red, green and blue channel and the one group for the common cathodes of the columns.

The right most connector is for the four LEDs in the corners of the clock that display the current minute difference. E.g. if the clock says 10:20 and 2 LEDs are on it's actually 10:22.


Please note that the flickering of the LEDs is only visible in this video.

You can find the source code for the German version of my word clock here.

Parts of the code where generated by the programs presented in part one of this post.

Kommentare:

  1. Do you have any kind of circuit diagram for your driver board?

    AntwortenLöschen
  2. Sorry, I completely forgot to answer that.
    No, there isn't a diagram for it. But I wouldn't advise to do it that way anyway.

    I would suggest you have a look at the TLC5940 (see [1] for more details). That way you could have each word in a separate color - if you like.
    Do a quick Google for "TLC5940 led matrix" and you'll find enough information.


    [1] http://www.arduino.cc/playground/Learning/TLC5940

    AntwortenLöschen
  3. Whats about the current? Meassured how much it needs complete with Arduino etc.?

    AntwortenLöschen