Alkex Posted December 24, 2006 Report Share Posted December 24, 2006 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_W0QQcmdZViewItemQQcategoryZ33713QQihZ011QQitemZ320063476198QQrdZ1QQsspagenameZWDVWI 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 :PI'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 Quote Link to comment Share on other sites More sharing options...
Wilba Posted December 26, 2006 Report Share Posted December 26, 2006 You might want to check out the Hypnocube, an interesting project using RGB LEDs:http://www.hypnocube.comBut 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. Quote Link to comment Share on other sites More sharing options...
MTE Posted December 26, 2006 Report Share Posted December 26, 2006 http://www.hypnocube.comwhat a great toy :D :D Ill rebuild it via MIOS :P Quote Link to comment Share on other sites More sharing options...
Alkex Posted December 26, 2006 Author Report Share Posted December 26, 2006 Hi Wilba, MteThe 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 Quote Link to comment Share on other sites More sharing options...
Sasha Posted December 27, 2006 Report Share Posted December 27, 2006 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 ;) Quote Link to comment Share on other sites More sharing options...
mess Posted December 28, 2006 Report Share Posted December 28, 2006 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 registersthis would allow a ledmatrix and shade resolution... Quote Link to comment Share on other sites More sharing options...
TK. Posted January 2, 2007 Report Share Posted January 2, 2007 And with a higher update rate, you can try the "bit angle modulation" concept which is described here:http://www.artisticlicence.com/app%20notes/appnote011.pdfIt improves the resolution, and it distance to "normal PWM", the brightness can be controlled in a linear manner.Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.