This is a summary of some thoughts I had on connecting the LEDs to the Arduino. When I read about charlieplexing I was amazed how many LEDs I could control with so few pins on the Arduino. Then I realized the downside of this technique: Essentially I can only light a single LED at a given time. Sure, there are a couple that can be lit simultaneously when they don’t share any pins, but setting those up would be a nightmare. So I started to group the words. Which words have to be lit when?
Using the structure I described earlier this means I need 13 pins on the Arduino to control these LEDs. The Arduino Duemilanove has exactly 13 pins, so it would match exactly when I connect the DCF receiver to one of the analog inputs.
I started drawing this schematic to see how I have to wire the LEDs according to these groups. In this process I discovered that my earlier estimate of 11 pins was incorrect, I forgot that I need two pins to connect a single LED and only calculated with 1 pin for groups A and D. Silly me. Good thing I don’t need any digital inputs for the DCF receiver anymore.
I drew this schematic with the help of this post on instructables.com and when I was finished I read in the summary that the wiring is very complex, especially when the resistors for the LEDs come into accounting. The author states that he would rather use Shifting Out on an 74HC595 chip. I found an example for this on the Arduino Wiki and ordered a couple of those chips for about 0,20 € each.
Today I planned the layout for the usage of these chips with Fritzing and it looks quite promising.
This way I can control all 21 LEDs with only 3 pins on the Arduino. I guess I can even integrate a photo resistor in the circuit, to have the clock dim automatically when it is dark in the room. This really would be the icing on the cake. Now I only have to get it ready for christmas … I guess I finally have to continue cutting out the words on the front plate.