Controlling 60 RGB LEDs?

Go To Last Post
29 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello all!

I'm thinking about building a clock using 60 RGB LEDs..!
I'm going to use 60 blue (seconds), 60 green (minutes) and 12 red (hours) so that means a total of 132 LEDs I need to control!
Only one LED of each colour needs to be turned on at any time.

I'm not completely sure yet what would be the best way to control them, so far I have been thinking about using an AVR to control something like the CMOS 4514 or a 74LS154 (4bit binary to 16 line decoder), this way I would need 9 IC's (4 for seconds, 4 for minutes and 1 for hours).

This would be okay, but maybe someone out there has a better idea? Charlieplexing is pretty much out of the picture since RGB LEDs are usually common cathode (or common anode)..? And it would probably be very complex with 132 LEDs.

My problem with the 4-to-16 decoders is, looking at the datasheets I see values for the output current in ranges from µA to 8.8mA... µAmps are useless, 8.8mA is probably acceptable (I have not bought any LEDs yet). I'd love a chip that would give me something like 20mA on the outputs! ;)

Any advice is appreciated!
Brian

- Brian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

CPLD could work.

Jim

I would rather attempt something great and fail, than attempt nothing and succeed - Fortune Cookie

 

"The critical shortage here is not stuff, but time." - Johan Ekdahl

 

"If you want a career with a known path - become an undertaker. Dead people don't sue!" - Kartman

"Why is there a "Highway to Hell" and only a "Stairway to Heaven"? A prediction of the expected traffic load?"  - Lee "theusch"

 

Speak sweetly. It makes your words easier to digest when at a later date you have to eat them ;-)  - Source Unknown

Please Read: Code-of-Conduct

Atmel Studio6.2/AS7, DipTrace, Quartus, MPLAB user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MM5450,1 might be of interest. Not sure if they are still available. Try Micrel or National (now TI).

Steve

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Not sure if they are still available. Try Micrel
I use the Micrel part as Allegro has dropped them.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You're calling out RGB LED's but it sounds like you're using single color LED's. If that's the case you could try the MAX7219CNG, which drives 64 LED's.
http://www.sparkfun.com/products...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For the 132 LEDS you could use a 11 X 12 multiplexed matrix direct from the PORT pins of a MCU having at least three PORTS.
Minimal external hardware will be 11 ballast resistors

Yes, I can see a clock face, but I don't see that without an hour & minute hand it will be particularly easy to read. Am I missing something?

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Using the PORT pins would result in very dim LEDs. So you would need external driver chips to cope with larger currents.

OTOH, if you are only going to have a small number of the 132 LEDs lit at any one time, the AVR can possibly cope with the current.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

+1 for the M5450/1. They are easy to use and cut down the component count of a circuit a lot.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
if you are only going to have a small number of the 132 LEDs lit at any one time, the AVR can possibly cope with the current.

From original post.
Quote:
Only one LED of each colour needs to be turned on at any time. &
I'd love a chip that would give me something like 20mA on the outputs!

60 mA max..easy!

Charles Darwin, Lord Kelvin & Murphy are always lurking about!
Lee -.-
Riddle me this...How did the serpent move around before the fall?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This chip can PWM drive 132 leds and you can control it via I2C at up to 1MHz:
http://www.austriamicrosystems.c...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There are plenty of projects you can get inspiration from:

Large diameter LED clock (avrfreaks)

LED pocketwatch

As already said by others, if you are happy to use always the same color for the same 'value' (seconds, minutes, hours) then you do not need RGB LEDs. Single color LEDs are cheaper and easier to drive (single LED instead of three).

Markus

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Brian,

I'm doing a similar project currently and here is another thread about it:

https://www.avrfreaks.net/index.p...

I am using a TLC5940 driver (12 of them!) which I bought off of eBay at a reasonable price. So far the drive seems really nice. It can drive 16 leds and is constant current.

If you are truly trying to emulate an analog clock think hard about your hours LED's. I began thinking I would do 12 of them, but the concept of "5 minutes until 3pm" convinced me that I also needed 60 hour led's so that the hour led could be located just slightly before the 3pm but not on the 3pm... I'm doing 60 sec + 60 min + 60 hour + 12 hour markers = 192 leds total.

Good luck,

Alan

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you for all of your replies guys.

There is definitely some interesting replies here!
Yes I am planning on using RGB LEDs but my initial plan was to use only 60 for seconds (of one colour in the RGBs) and 60 for minutes (of another colour in the same RGBs) and only 12 for hours (leaving 48 of one colour unused), but I might go with 60 like Alan suggests, I will have to think a bit about that... :)

My problem with using 60 for hours as well is that it might be harder do distinguish where the hour hand is exactly?

I'm planning on using a PCB with numbers drilled as holes routed in the PCB (I have access to a PCB prototyping machine) and possibly some white LEDs for back-light on the backside of the PCB. ICs and PCB will be visible when finished! :)

- Brian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

Geronimo wrote:
My problem with using 60 for hours as well is that it might be harder do distinguish where the hour hand is exactly?

You would definitely need hour markers (numerals, leds, or others) to see where exactly the hour "hand" is, on a number, before a number, after a number...

Good luck,

Alan

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Like Alank2 said, go with the full 60 leds for the hours. You will want some way to mark the hours too, either an extra led, or offset those leds or something. On mine I did it in code, illuminating the hour markers dimly. You can see a few photos here

https://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=114614&postdays=0&postorder=asc&start=40

part of the thread Alank2 mentioned above. The center ring of 12 leds spun once per second, and a small speaker gave off a little "tock" sound at each second. Here's a short video of it in operation - you can barely hear the "tock" :)

http://ifile.it/tn3bx6g

Attachment(s): 

Dean 94TT
"Life is just one damn thing after another" Elbert Hubbard (1856 - 1915)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Davs Geronimo -

How goes the project ? That's a very cool idea - having the numbers drilled as slots in the pcb and backlit. Any pictures or anything to show yet ?

Dean 94TT
"Life is just one damn thing after another" Elbert Hubbard (1856 - 1915)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Chancy99, so far it's all ideas although I have bought a few components already..!

I had an exam to prepare for which I finished yesterday so I hope I will have more time to look into it now! :)

- Brian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Geronimo,

I've got my clock mostly together, it has moved from 12 pcb's to a ring now. 10 of the 12 groups are filled and I am waiting for some more machined pin header to use for led sockets before I finish the last two. I socketed the led's because some of them are flickery and didn't want to deal with replacing them later - this way I can pull one and reseat a new one.

One observation however that I've come up with is that I did 60 led's for the hour "hand", but it will look a bit misleading because each one will be lit at 12 minutes (60/5). This results in a half past the hour looking more like 2/5th's past the hour. Thinking more on it, I wish I had done the hour hands as 48 instead of 60 or 4 per hour that way I could have done one every 15 minutes instead of every 12 minutes. Hope this makes sense.

I may not do a solid lit type of hand anyway and do a one led fades into the next so my 5 per hour may not end up being a big deal, but if you are going to light each one solid, 4 per hour may be a better way to go.

Good luck,

Alan

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Geronimo,

I've updated my original thread with a youtube video. Here is a link to it as well:

http://www.youtube.com/watch?fea...

Thanks,

Alan

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
Only one LED of each colour needs to be turned on at any time.
Charlieplexing is pretty much out of the picture (...) And it would probably be very complex with 132 LEDs.

It depends on what you consider complex. You will not be able to use pure charlieplexing with commons, do not count on IOs=ceil((sqrt(1+4*LEDs)+1)/2) which gives 12IOs for 132 leds. So forget about PIC16F84 :)

But you can make charlieplexing with additional constraints (and increased IO count).
If the three circuits were completely separated, you would need 4 IOs for REDs, 8 IOs for GREENs and 8 IOs for BLUEs. Any uC with 20IOs would be sufficient and you could set one of each colour at once. Use 6-PIN RGB for that (search for 5050 in PLCC-6).

If the three circuits have additional constraints(like commons), more IOs are needed and you cannot set all three at once. First you set selected RED one for T/3, then GREEN one for T/3 and then BLUE one for T/3 and start again a new cycle.

I do not know how many IOs such design needs then, but I suppose about 30-35 will do.

One additional problem with charlieplexing is that it requires similar voltage drops on all LEDs, so either you can use REDs with regular diodes in series (to make the voltage drop on REDs closer to 3.2V, which is typical for GREEN and BLUE) or add additional constraint, and search for a solution (further increases IO count) which never allows two REDs to be in series along a BLUE one.

No RSTDISBL, no fun!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avra wrote:
This chip can PWM drive 132 leds and you can control it via I2C at up to 1MHz:
http://www.austriamicrosystems.c...

Yes the AS1130 is a nice part for this.
We are also considering it for a clock build:
http://groups.google.com/group/q...
(sry it is in german)
It can drive up to 44 RGB LEDs so you need only 2 of them.
A video of a similar part is here:
http://www.youtube.com/watch?v=s...

You can get free samples here:
http://www.austriamicrosystems.c...

There are also plenty of other neat LED drivers for sampling there.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Maybe a little late. You calling out rgb is out because of a common anode, but there are 6pins rgb leds. So charlie P is back in the house.

Hth

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There was mention of LED analog clocks here which interested me.

Why? I would like to recreate this clock.

 

It was a 132 LED clock with a 10 LED pendulum. The article included everything needed, (board art work). I have since lost that issue. Fortunately I created a CAD model of the double sided board required. It had to concentric circles of 60 LED's each and a third circle of 12 LED's for the hour indication. Somewhere over the years I lost the "library" that contained the discrete component listing.

Through "americanradiohistory.com" I have been able to locate references to clocks similar to this one. The June '77 and April '88 issues of Radio-Electronics.

 

One problem is that these are very poor copies of the articles. The second problem, and most important, neither issue is the issue I had originally. The clock in the June '77 issue is no good for it does not have the seconds ring of LED's. The April '88 is the closest, and I believe is the correct clock, but it is not the article I had  for the article examines clocks already in production. Obviously is not a "project" article.

Can anyone lend help help?

 

Thanks

 

Jerry C.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 Why not use the 60 RGB circles you can buy ?

Then, you code H M S into colours and brightness, and everything is in one ring.

Plenty of challenge in the colour / width / fade choices to make it readable at a glance.

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clazman wrote:
Can anyone lend help help?

Not clear what it is, exactly, that you're looking for:

  • A complete kit of parts that you just need to assemble?
  • A complete set of schematics & board design (source parts yourself)?
  • Just schematics (do your own board design & parts sourcing)?
  • Tips on how to design one for yourself?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Tue. Apr 7, 2015 - 08:07 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

These days, I wouldn't have thought it'd be too hard to find a microcontroller with 132 port pins - after all, it's only just over four 32-bit ports...

 

With a simple diplex (2-way multiplex) of the two 60-LED rings (minutes & seconds), you'd only need 73 pins;

 

A simple triplex of the 3 rings (with "gaps" if you only have 12 hour LEDs)  would need only 63 pins...

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:
These days, I wouldn't have thought it'd be too hard to find a microcontroller with 132 port pins

Atmel's product selector shows only Cortex-A class with that many.

 

I just checked one other manufacturer, and they had 44 options in Cortex-M3 or M4 from 138 to 216 GPIOs

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Tue. Apr 7, 2015 - 08:42 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Who-me wrote:
Why not use the 60 RGB circles you can buy ?

Something like this: https://www.adafruit.com/product... - and then you only need one pin to drive it!

 

laugh

 

NeoPixel 1/4 60 Ring - WS2812 5050 RGB LED w/ Integrated Drivers

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

awneil wrote:

Something like this: https://www.adafruit.com/products/1768 - and then you only need one pin to drive it!

 

Yes, I meant exactly that - 4 of those quadrant-arcs and the software to drive it...