Close
0%
0%

PCB word clock

charlie-plexed 11x10 LED matrix, perfect fit for a word clock. Also LEDs soldered on upside down.

Similar projects worth following
Charlieplexing LEDs in a 11 x 10 matrix is a perfect match for a word clock! You don't have that many LEDs to turn on. The hassle with a good case stopped me from building one for the longest time. I couldn't decline this challenge!

GER layout Order from OSH Park
ENG layout Order from OSH Park

General Idea

@Radomir Dopieralski mentioned in #Hacker Channel that one could use LEDs backwards to shine through the PCB and at this point I'm not sure if he mentioned charlie-plexing and word clock as well, but let's just say I was inspired to design a board like this. At this point I already had a board prepared, a 10x11 LED matrix with 5mm charlieplexed LEDs. Charlieplexing can get very confusing, but I found a trick online [research link], that helps a lot to layout a matrix. Instead of controlling it with 10+11 pins this will take only 11 pins.


LED footprint

From there I've edited an LED footprint in EAGLE so that I was able to just change the LEDs without rewiring the schematics. The blue circle is on the layer "42 bRestrict" - this will stop the polygon on the bottom layer from putting copper there. At the same time the copper will frame the letter. Since I'm an expert in soldering LEDs the wrong way by accident, I will use standard 0603 LEDs, instead of special "bottom mount" LEDs. On the top Layer of the LED footprint is a smaller, rectangular shaped Object on "41 tRestrict" that's supposed to let the light through as well. The letters where placed on the bottom layer.


What's Charlieplexing

It's always good to try to explain stuff in your own words, legally speaking as well. Blinking LEDs is always awesome, because it's wysiwyg. Connect the anode to 5V, the cathode to GROUND and it explodes. Add a resistor and everything is great, as long as it's the right value. The other way around they do cool stuff too, but not important for this project. Here it's important that they're not glowing.
The cool thing about ATMEGA chips is, that they can source/drain enough power to make LEDs blink and that they're on Arduino boards. You can even put two opposing LEDs on the data pins and and make them blink depending on the OUTPUT of the pins.

Given this schematic and you only have ground and power, then this would be your truth table. Adding more LEDs would only add more LEDs that shine simultaneously.

A B C LED1 LED2 LED3 LED4 LED5 LED6
0 0 0
0 0 1
ON ON
0 1 0 ON ON
0 1 1 ON ON
1 0 0 ON ON
1 0 1 ON ON
1 1 0 ON ON
1 1 1

Luckily the ATMEGA has a third state, a high impedance state - also called Z state. You can achieve that by turning the pin to an INPUT pin. The following table only shows how to activate the LEDs.

A B C LED1 LED2 LED3 LED4 LED5 LED6
1 0 Z ON
0 1 Z ON

Z 1 0 ON
Z 0 1 ON
1 Z 0 ON
0 Z 1 ON

Pros and cons

So why all this? It saves pins and doesn't take much power! But I will have to worry about brightness and programming it, once the boards are here.

brd - 117.67 kB - 01/12/2017 at 15:18

Download

sch - 164.66 kB - 01/12/2017 at 15:18

See BOM Download

sch - 164.66 kB - 01/12/2017 at 15:18

See BOM Download

brd - 116.40 kB - 01/12/2017 at 15:18

Download

  • Version One :)

    davedarko02/17/2017 at 02:06 7 comments

    Update fun fact: analyzing a charlie plexed matrix for bugs is so much easier when the LEDs are upside down - because of the markings :)


    I finally got my LEDs and took the time to hand solder a PCB :) it bleeds a bit in the picture, but in real life it's quite good. The code so far is only a mock up, but there is scanning and matrix stuff involved already.

    #include <avr/pgmspace.h>
    
    const int leds[]  = {2,3,4,5,6,7,8,9,10,11,12,13};
    
    const int matrix[10][11][2]  = {
      {  {1, 0},  {0, 1},  {0, 2},  {0, 3},  {0, 4},  {0, 5},  {0, 6},  {0, 7},  {0, 8},  {0, 9}, {0, 10} }, // 0
      {  {2, 0},  {2, 1},  {1, 2},  {1, 3},  {1, 4},  {1, 5},  {1, 6},  {1, 7},  {1, 8},  {1, 9}, {1, 10} }, // 1
      {  {3, 0},  {3, 1},  {3, 2},  {2, 3},  {2, 4},  {2, 5},  {2, 6},  {2, 7},  {2, 8},  {2, 9}, {2, 10} }, // 2
      {  {4, 0},  {4, 1},  {4, 2},  {4, 3},  {3, 4},  {3, 5},  {3, 6},  {3, 7},  {3, 8},  {3, 9}, {3, 10} }, // 3
      {  {5, 0},  {5, 1},  {5, 2},  {5, 3},  {5, 4},  {4, 5},  {4, 6},  {4, 7},  {4, 8},  {4, 9}, {4, 10} }, // 4
      {  {6, 0},  {6, 1},  {6, 2},  {6, 3},  {6, 4},  {6, 5},  {5, 6},  {5, 7},  {5, 8},  {5, 9}, {5, 10} }, // 5
      {  {7, 0},  {7, 1},  {7, 2},  {7, 3},  {7, 4},  {7, 5},  {7, 6},  {6, 7},  {6, 8},  {6, 9}, {6, 10} }, // 6
      {  {8, 0},  {8, 1},  {8, 2},  {8, 3},  {8, 4},  {8, 5},  {8, 6},  {8, 7},  {7, 8},  {7, 9}, {7, 10} }, // 7
      {  {9, 0},  {9, 1},  {9, 2},  {9, 3},  {9, 4},  {9, 5},  {9, 6},  {9, 7},  {9, 8},  {8, 9}, {8, 10} }, // 8
      { {10, 0}, {10, 1}, {10, 2}, {10, 3}, {10, 4}, {10, 5}, {10, 6}, {10, 7}, {10, 8}, {10, 9}, {9, 10} } // 9
    };
    
    const boolean img [10][11] = {
      { true,  true, false,  true,  true, false,  true,  true,  true,  true, false},
      {false, false, false, false, false, false, false, false, false, false, false},
      {false, false, false, false, false, false, false, false, false, false, false},
      {false, false,  true,  true,  true,  true, false, false, false, false, false},
      {false, false, false, false,  true,  true,  true, false, false, false, false},
      {false, false, false, false, false, false, false, false, false, false, false},
      {false, false, false, false, false, false, false, false, false, false, false},
      {false, false, false, false, false, false, false, false, false, false, false},
      {false, false, false, false, false, false, false, false, false, false, false},
      {false, false, false, false,  true, false,  true,  true,  true,  true,  true},
    };
    
    void setup()  { }
    
    void loop() {
        for (int y=0; y<10; y++) 
        {
          for (int x=0; x<11; x++) 
          {
            if (img[y][x]) charlie_matrix (x, y);
        }
      }
    }
    
    void charlie_matrix (int x, int y)
    {
       int cx = matrix[y][x][0]; 
       int cy = matrix[y][x][1]; 
      
      digitalWrite(leds[cx], LOW);
      pinMode(leds[cx], OUTPUT);
      digitalWrite(leds[cy], HIGH);
      pinMode(leds[cy], OUTPUT);
      delayMicroseconds(65);
    
      pinMode(leds[cx], INPUT);
      digitalWrite(leds[cx], LOW);
      pinMode(leds[cy], INPUT);
      digitalWrite(leds[cy], LOW);
      
      delayMicroseconds(5);
    }

  • some documentation added

    davedarko01/15/2017 at 13:46 0 comments

    Since someone on twitter pointed out that the project documentation is an epicfail, I felt compelled to edit the details and add informations on charlieplexing and the general idea. I first was a bit annoyed, but mostly because the entity was right :) I tend to not document my projects very well, mostly because it's easier to write about it afterwards and laziness. Now it feels more complete though.

  • boards are ordered

    davedarko01/12/2017 at 15:19 2 comments

    So for science I've also added the german layout and ordered this one on 0.8mm boards.

View all 3 project logs

Enjoy this project?

Share

Discussions

Stefan-Xp wrote 03/02/2017 at 23:35 point

Another awesome project! Congratulations!

I only wonder why i had to find this on OSHPark and not here...

Have a nice Weekend, Best regards, Stefan

  Are you sure? yes | no

davedarko wrote 03/03/2017 at 00:13 point

Thanks :) I was about to test it first and maybe experiment with it, but now I just shared it. Have I forgotten to add the links?

  Are you sure? yes | no

davedarko wrote 03/03/2017 at 00:22 point

also: there's no time software yet, no RTC integrated.

  Are you sure? yes | no

Ted Yapo wrote 01/12/2017 at 19:09 point

I like the idea of using "normal" LEDs for this!  They used to make larger SMT LEDs specifically for inverse mounting:

https://www.digikey.com/product-detail/en/osram-opto-semiconductors-inc/LS-T776-R1S1-1-Z/475-2699-1-ND/1938866

It looks like they're being discontinued, though.  I used them to backlight a logo on some boards before:

But, they were big and more expensive than standard LEDs.

I found that the fiberglass diffused light very well - possibly enough to cause bleed-though to neighboring symbols in a tight array.  Maybe a ring (or grid) of plated-though vias around each symbol would block some of the light if this becomes an issue.

  Are you sure? yes | no

davedarko wrote 01/12/2017 at 20:13 point

that looks nice! I was wondering what color I will use and green was on the top of my list.

  Are you sure? yes | no

K.C. Lee wrote 01/12/2017 at 21:24 point

There are 7,529 search results (300+ pages) on digikey if you search for 

Mounting Type: Surface Mount Bottom Entry

  Are you sure? yes | no

davedarko wrote 01/12/2017 at 21:51 point

any in 0603, that don't look like normal LEDs?

  Are you sure? yes | no

K.C. Lee wrote 01/12/2017 at 23:56 point

0603 is a small package, so likely are the LED dies are bonded to a substrate with an epoxy lens cover and cut down to the size.  i.e. the all going to look similar may be slightly different lens shape/thickness.

Not sure what exactly you are looking for.  Best bet is to go to a particular vendor's catalog to choose a style.

  Are you sure? yes | no

davedarko wrote 01/13/2017 at 10:42 point

No no, I'm fine with normal 0603 SMD LEDs from eBay, I think. I felt snappy because you've placed your search results so "dry". I'm not really looking for something, I'll just put them the other way around and hope for the best, since searching with your recommended terms for LEDs in the size of my project, I noticed that they all looked like good old LEDs to me :)  

  Are you sure? yes | no

danjovic wrote 02/17/2017 at 20:31 point

Awesome, a glowing logo on the PCB! Never tried that trick!

  Are you sure? yes | no

Sean Hodgins wrote 01/12/2017 at 18:39 point

how will you make the LEDs bridge the small gap to the board(from the lens gap? Or do you know something I don't know? Haha can't wait to see how this works! 

  Are you sure? yes | no

davedarko wrote 01/12/2017 at 18:50 point

a lot of solder :) in the case of 0603 LEDs it can't be much, I hope...

  Are you sure? yes | no

Radomir Dopieralski wrote 01/12/2017 at 16:46 point

Can't wait to see it in action.

  Are you sure? yes | no

al1 wrote 01/12/2017 at 16:43 point

This is really nice looking. 

  Are you sure? yes | no

davedarko wrote 01/12/2017 at 18:18 point

yay, nice words from an LED matrix master :)

  Are you sure? yes | no

oshpark wrote 01/11/2017 at 23:50 point

Very intresting!  We look forward to seeing more

  Are you sure? yes | no

davedarko wrote 01/12/2017 at 09:39 point

Thanks :) @Radomir Dopieralski was talking about stuff like that over on the #Hacker Channel and I just had to try it!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates