1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Electronics Building an RGB LED Clock

Discussion in 'Modding' started by geogecko, 1 Jun 2007.

  1. geogecko

    geogecko What's a Dremel?

    Joined:
    23 May 2007
    Posts:
    56
    Likes Received:
    0
    This is kind of a deviation from the 7-segment clock thread I had posted in earlier, so I thought I'd start my own thread for this discussion.

    Ever since I got a Oceanus (Casio) solar powered, atomic wrist watch, I have been wanting to make a similar clock for our living room, to replace the clock that used to be on the VCR, which we do not use anymore, due to having a HTPC (it has a VFD on it, but my wife complains that it does not always show the time, and she has to wait for it to cycle through the OTHER stuff I want on there).

    I originally thought of making one that was both atomic and solar powered, but then decided that I wanted the display to be all discrete LEDs, which would probably use way too much power to have the clock continue to be solar powered, with a reasonable sized solar panel. So now, it will probably be plugged in, or possibly run off of a USB port, if the power is low enough.

    Anyway, I haven't quite decided yet on how the display will be constructed. Originally, I thought of using 3 dots per segment to make a 7 segment, similar to how SteveyG has done with his LED clocks. My only issue, is I want it to be RGB, so that I can change the color of the clock.

    RGB LEDs are fairly expensive, and then I ran across a post that someone posted in the forums here, of the RGB 8x8 dot matrix display from LEDtronics. These are expensive as well, but not bad for the number of LEDs that are contained in them. To make a standard 4 digit clock display, I'm looking at about the same cost in discrete LEDs, versus 3 of the 8x8 panels.

    Anyway, the problem with the 8x8 panels, and only using 3 of them, is how to make the clock. If I limit myself to only a 12 hour clock, then I could possibly make the first digit shorter to allow everything to fit, including the seconds colon, but if using a 24 hour clock, there just doesn't seem to be enough columns (looks like just one short)...

    Here is a rendition of what I was thinking. I was originally using 5x7 characters, which I think look better, but using 4x5 characters, I can fit the clock in really nice, and even have some room for graphics. I figured I could use the bottom row for some other type of indicators, like an atomic receiving indicator, or even a night light feature or something...what do you guys think?

    [​IMG]

    The other issue with using the 8x8 panels, is that the circuit and coding complexity increase quite a bit. Instead of sending out the BCD numbers (and let BCD-to-7-segment decoders do their magic), I will need to send out patterns, or use some type of video map (not sure how this will work just yet). I posted originally in another thread, what I/O I thought I'd need, but I think it was wrong. If I made the circuit using serial to parallel shift registers, then I'd need the following:

    (1) SCLK
    (1) SDATA
    (12 or 4) SEL (need 12 select lines 3x[columns] 3x[red rows] 3x[green rows] 3x[blue rows], so maybe a 4 of 16 mux?)

    That doesn't sound like a lot, but I also wanted to do PWM control for each pixel...to have more than just 3 colors...

    The way the panel is wired prevents me from deciding to just have the entire panel the same color, because if I connect all the reds, greens, and blues together (red, red, red and green, green, green, etc.), then I lose row control, and all pixels in one column will always be on together...

    I originally thought the dot matrix panels would be cool, because I could scroll text across them, but am starting to think that it may not be worth it. Discrete LEDs would be easier in almost every possible application...just not as flexible.

    What do you all think? What would you do?
     
  2. SteveyG

    SteveyG Electromodder

    Joined:
    23 Nov 2002
    Posts:
    3,049
    Likes Received:
    8
    RGB panels are a lot more involved if you want individual pixel brightness control. If you decide to go this route, you'll have more chance of achieving the results you want if you use a microcontroller per 8x8 block, and interface them on an SPI or I2C bus. The likelihood is you'll still have to limit yourself to 16 different brightness levels per pixel at best with any microcontroller running below 10 MIPS.

    In addition to the data lines you've identified for your shift registers, you want 1 more for output registers which you should really have otherwise you get serious ghosting while shifting bits out.
     
  3. geogecko

    geogecko What's a Dremel?

    Joined:
    23 May 2007
    Posts:
    56
    Likes Received:
    0
    Good points SteveyG. I was thinking about the bit rate as well, and with that many lines to control, thinking the PIC may not be fast enough.

    It sounds like this 8x8 project is going to have to wait for another time. I don't want to get that complicated on this first "real" project, so I think I'll go with RGB LEDs instead. That ebay seller you mentioned seems to have good deals on LEDs from Hong Kong. I had thought that using frosted epoxy cases for the LEDs would be better than using water clear ones, but what is your opinion on that?

    I need to look over his listing again, but his datasheet is pretty sorry. It lists Vf as 3.4V, which is probably the forward voltage of the blue LED, but generally, I thought red and green were around 2.2V and 1.8V for ballpark figures. I guess I could just use a test circuit, and measure it myself, which would probably be the best approach.

    Most likely, using the discrete LED approach, I plan on just tying all of the reds together, blues together, and greens together, and PWM'ing them all together, so I only need 3 PWM lines.

    Hopefully, I'll get a schematic here in a few days. We'll see how it's going then. Didn't get the programmer and other equipment yesterday, but it should be here today, hopefully...
     
  4. geogecko

    geogecko What's a Dremel?

    Joined:
    23 May 2007
    Posts:
    56
    Likes Received:
    0
    So, slanted 7 segments, or straight? I noticed you used slanted in your designs.

    It appears there are two "schools" of thought on this.

    1. The slanted digits were only used because one digit could be flipped over, and have the decimal point line up (slightly) with the one next to it, forming the familiar colon seen in digital clocks.

    2. The slanted digits were more for readability than anything else.
     
  5. SteveyG

    SteveyG Electromodder

    Joined:
    23 Nov 2002
    Posts:
    3,049
    Likes Received:
    8
    The green LEDs are 'pure' green, so will be GaInN or similar. Therefore they will have similar/same forward voltage as the blue LEDs. The reds will have a forward voltage of 2.2V.

    The problem with RGB leds is you cannot connect LEDs in series since there is only one common per package.

    I prefer the look of slanted digits.
     
  6. geogecko

    geogecko What's a Dremel?

    Joined:
    23 May 2007
    Posts:
    56
    Likes Received:
    0
    Ah, I never thought of that, but since you are using 3 dots per segment, you probably put those 3 in series, thus saving current, and only having to use one bias resistor per string...

    So I guess that is a disadvantage.
     
  7. elctroJunky

    elctroJunky What's a Dremel?

    Joined:
    9 Jan 2006
    Posts:
    110
    Likes Received:
    0
    err... discrete RGB LEDs should be the same as the matrix segment version.
    Your problems won't disappear when using discrete LEDs.
    You still need to interconnect all green, blue and red lines, but that doesn't mean that a whole column will be one color. I think you don't know how to drive a matrix display...
    Anyway, how about you first try to solve that problem with a single color LED matrix?
    This would teach you the basics and it would be much cheaper.
    Maybe this can help you on your way:
    http://hackedgadgets.com/2006/06/20/the-giant-mp3-player-led-display-panel/
     
  8. geogecko

    geogecko What's a Dremel?

    Joined:
    23 May 2007
    Posts:
    56
    Likes Received:
    0
    Well, not really. The discrete RGB LEDs would only be used to form 4 7-segment displays, thus not forming a matrix at all.

    If you look at how they have connected the LEDs within the 8x8 matrix, if you connected all the reds together, blues together, etc, when you tried to light the red LEDs, an entire column would light up, in that case.

    I think you may have misinterpreted what I wanted to do. If I don't use the 8x8 matrix, then my plan was to just use discrete LEDs to form a 7 segment display instead. This reduces the amount of outputs needed, and also makes the design considerably simpler.
     
  9. elctroJunky

    elctroJunky What's a Dremel?

    Joined:
    9 Jan 2006
    Posts:
    110
    Likes Received:
    0
    That can't be true, unless someone really messed up the design of this led matrix.
    But for a matrix it is normal to connect all cathodes in a row together and all anodes in a column together. That doesn't mean every LED in a row will be lighted. You can still light up a single LED using the standard matrix scan method.
    And for an RGB LED matrix the only difference should be that there are 3x the cathodes in one column...
    Whenever you connect a single cathode line and a single anode line to the power only a single LED will be lighted(that's why you have to scan the matrix for every single LED that should be displayed).
     
  10. shotgunefx

    shotgunefx What's a Dremel?

    Joined:
    4 Feb 2004
    Posts:
    449
    Likes Received:
    0
    Well you could use ones that have have six-leads, something like these
     
  11. geogecko

    geogecko What's a Dremel?

    Joined:
    23 May 2007
    Posts:
    56
    Likes Received:
    0
    I know that, and that is how the matrix is designed. All columns are common cathode, and all rows are each individual anode for each color, for each row (all reds in a row are connected).

    What I was wanting to do, to simplify the design, was connect all reds together, all blues together, and all greens together, so that it would require less outputs, this basically means the panel will all contain the same color, but because of the way the panel is wired, you cannot connect them in this way, because you will get an entire column to light up, for instance, if you connected all reds together. They are meant to be driven individually, so I guess I wasn't thinking, when I thought I could do that...glad I didn't buy them yet.
     
  12. geogecko

    geogecko What's a Dremel?

    Joined:
    23 May 2007
    Posts:
    56
    Likes Received:
    0
    Those are cool, but they are $1.91 each! That would be $165 for 4 7-segment digits with 3 dots per digit, and 2 seconds dots...

    I can get 50 RGB LEDs on eBay for about $20 or so...

    I do like those though, they would be cool to use. Although I would be saving the cost of 2 resistors, but that's only about $0.08 or so...of course, if I wanted to run everything off of 5V, then series driving the LEDs is out, unless I drop a pretty hefty switcher down on the board.
     
    Last edited: 1 Jun 2007
  13. geogecko

    geogecko What's a Dremel?

    Joined:
    23 May 2007
    Posts:
    56
    Likes Received:
    0
  14. elctroJunky

    elctroJunky What's a Dremel?

    Joined:
    9 Jan 2006
    Posts:
    110
    Likes Received:
    0
    If you're only worried about the usage of port pins, you can control a 8x8 RGB LED matrix with as few as 4 port pins.
    How? Use serial to parallel decoder chips!
     
  15. geogecko

    geogecko What's a Dremel?

    Joined:
    23 May 2007
    Posts:
    56
    Likes Received:
    0
    I think the complexity of this project, using the 8x8 matrix is getting too much. I think for this project, I want to keep things a little simpler, so I will go with, at a maximum, the discrete RGB LEDs arranged in 7 segment displays...sad to say, but I may even end up just going with one color...who knows. At this point, I'm just going to get started on the clock code, then I'll come up with a board layout, and decide on the LEDs, once I see how complicated the code will be.

    FedEx delivered the PICkit2, and I have to say, I'm impressed with it. It's smaller than I imagined it being. I am currently playing around with the development board that came with it. It's pretty basic, but something to mess with.

    Thanks for all the comments so far.
     
  16. SteveyG

    SteveyG Electromodder

    Joined:
    23 Nov 2002
    Posts:
    3,049
    Likes Received:
    8
    Sure, there's loads of 6 pin RGB LEDs about, but you have to consider availability of parts and price of parts.

    There's a solution to just about everything out there, but without being able to obtain them easily for a price you're willing to pay they may as well not be there. :sigh:
     
  17. geogecko

    geogecko What's a Dremel?

    Joined:
    23 May 2007
    Posts:
    56
    Likes Received:
    0
    What software do you guys use to do your PCB's? I was going to use Eagle, but noticed the board size is limited to 4" x 3.2" or so. I figure this display will probably be slightly larger than that...
     
  18. SteveyG

    SteveyG Electromodder

    Joined:
    23 Nov 2002
    Posts:
    3,049
    Likes Received:
    8
    I use Labcenter Electronics' Proteus and Ares. It's not free though.
     
  19. unclebulgaria

    unclebulgaria What's a Dremel?

    Joined:
    21 May 2007
    Posts:
    14
    Likes Received:
    0
    EasyPC from Labview had a trial version up to 2k pins last time I looked (July 06).
     
  20. unclebulgaria

    unclebulgaria What's a Dremel?

    Joined:
    21 May 2007
    Posts:
    14
    Likes Received:
    0

Share This Page