Jump to content

108 pwm leds on a matrix, will the core handle it?


Alkex

Recommended Posts

Hi there,

I have bought some nice RGB leds on ebay to play with.

http://cgi.ebay.com/ebaymotors/50-PC-5mm-8Kmcd-Manual-Control-Super-Flux-RGB-LED-F-R_W0QQcmdZViewItemQQcategoryZ33713QQihZ011QQitemZ320063476198QQrdZ1QQsspagenameZWDVW

I made a simple little MIOS "moodybox" mood lamp using pulse width modulation on 3 pins of J5 which works fine.

Now I'm ready to move on to the initial purpose of the RGB led purchase: my 36 cell rainbow coffee table.

It's inspired by the daft punk coffee table

I saw in my local habitat store.

This thing costs 1k euros and only has 25 boring red squares.

I'm going for 36 rgb squares (6x6 under a 1m2 glass panel) which should be a little more exciting to look at and most of all, will cost me under 100euros (tinted glass panel included).

I plan to wire two little hi and low filtered mics through analog ins to have ambient music influence on the colours, but thats another issue.

My main concern so far is how to wire the 108 leds (36x red, green and blue) to the core with maximum performance and speed considering I want each led to be individualy pulse width modulated. Will the core handle a matrix? This would obviously complicate the coding, but I would rather take the software challenge than wire up 108 74hc595 pins  :P

I'm far from being an electricity pro so was hoping someone with a bigger brain out there could point me in the best direction for this project...

Thanks in advance and Best wishes to All!

Alex

Link to comment
Share on other sites

You might want to check out the Hypnocube, an interesting project using RGB LEDs:

http://www.hypnocube.com

But that's a bit off topic...

For maximum speed and performance, use 108 individual DOUT outputs. This is also the maximum number of 74HC595 chips you'll need too, but since it's a coffee table, size isn't a critical factor. Each colour can be pulse width modulated with a minimum pulse width of the shift register update period, i.e. 1ms. It also means that each LED can be fully on and be at maximum brightness.

So if you want to optimize the hardware, then you could use a matrix and multiplex the outputs. Maybe 6 is a good number of "columns" in your matrix, so you'd use 6 DOUT outputs (through a darlington array) to sink the 6 "columns" of 18 LEDs (6xRGBs), and you connect the anodes of each "column" in "rows" to 18 DOUT outputs. The only problem is that by multiplexing, you'll have less "grain" in your duty cycle.

EG. in the first scenario, a 1ms update, with a max of 20ms (to avoid flickering, 1ms on/19ms off, etc.) gives 20 "shades". In the second scenario, the update might still be 1ms, but there's another 5ms gap where the other columns are active, so it's like a 6ms minimum pulse width. Divide that into 20ms and you've only got 3 "shades". You can cut down the number of matrix "columns" to get a smaller minimum pulse width, perhaps using three columns is optimal, I don't really know...

I've probably rambled on enough  ;D  the short answer is: just use 108 DOUT pins, might be a bit more expensive and more to solder, but will be easier to code and work better in the long run.

Link to comment
Share on other sites

Hi Wilba, Mte

The 3d cube does look great, probably to be next on the project list, would look great hanging from the ceiling!

Thanks for youre advice, 108 douts will be the way to go then, must admit I was leaning in that direction the extra control over the shades is well worth the extra soldering, I'll have a dedicated board etched anyway.

Thanks again,

I'll get cracking and post the results!

Alex

Link to comment
Share on other sites

I am very interested in diferent kinds of light works. I could manage by myself just driving LEDs with MIDI, so I am counting on you to make something I could replicate. This hypnocube is cool but bit pricey. I`m sure MIOS could do better for less money ;)

Link to comment
Share on other sites

EG. in the first scenario, a 1ms update, with a max of 20ms (to avoid flickering, 1ms on/19ms off, etc.) gives 20 "shades". In the second scenario, the update might still be 1ms, but there's another 5ms gap where the other columns are active, so it's like a 6ms minimum pulse width. Divide that into 20ms and you've only got 3 "shades". You can cut down the number of matrix "columns" to get a smaller minimum pulse width, perhaps using three columns is optimal, I don't really know...

Another option is to handle the shift registers yourself so you can have higher update rates...

the update routine could be called from user_timer,

you can use the mios source code as an example on how to drive the shift registers

this would allow a ledmatrix and shade resolution...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...