LED multi colour wall washing phasin' changin' funkyness
Paul C
Posts: 2
Rewind to January.. I bought 200 LEDs.. 50 each of red, green, blue, and white. I also bought a BS kit and had a bit of a dabble playing with the WAM book/kit. So far so good. My intention from day one has been to build some kind of colour changing wall washing light.. a bit like those LightTro's from Color Kinetics? The idea is to light up a wall with LED colour that gradually changes over time - maybe quickly/perceptibly or maybe over many minutes so you can't see the change as it's happening but do see it over time.
Now back in my days of attending highschool in the UK (aha! that's why he spelt color wrong!) I took GCSE electronics (like a high school electronics course?) but it's fair to say I'm pretty rusty. I've done some basic sums and worked out voltages, resistors etc to suss out the best set up for the LEDs, giving me the brightest output without frying the LEDs.
Here we are in May and I've not played with this stuff in ages. I'm keen to get cracking and make a start on my stalled project but could do with some advice from the collective gurus here.. Allow me to think out loud a bit then maybe you can offer some advice and/or point me in the right direction.
The basics: You can vary the brightness of an LED using PWM. The BS2 can do PWM but only on one channel at a time and you need to keep calling the PWM function in a loop (plus have some external buffering - a capacitor?). There's that piggy back module that'll give me 4 channels of PWM, offloading the BS2, requiring just a serial line to control it. Due to current limitations, I'm going to need some kind of transistor setup to run all my LEDs.
The advanced stuff: I'm cool with programming my BS2 and aim to start off simple, just cycling through varying levels of different colours. In the future I might add some kind of control or program selection to vary the colours, speeds etc. I was browsing online the other night and came across a guy who'd done something similar with a small number of LEDs using a shift register and a 555 timer (for external clocking of the shift register). I guess that's an option too?
I guess my main areas of confusion right now are sussing out how to do PWM on 3 or 4 channels easily/programmatically, then working out what kind of transistors I need to drive all these LEDs. All help/advice/pointers gratefully received.
Now back in my days of attending highschool in the UK (aha! that's why he spelt color wrong!) I took GCSE electronics (like a high school electronics course?) but it's fair to say I'm pretty rusty. I've done some basic sums and worked out voltages, resistors etc to suss out the best set up for the LEDs, giving me the brightest output without frying the LEDs.
Here we are in May and I've not played with this stuff in ages. I'm keen to get cracking and make a start on my stalled project but could do with some advice from the collective gurus here.. Allow me to think out loud a bit then maybe you can offer some advice and/or point me in the right direction.
The basics: You can vary the brightness of an LED using PWM. The BS2 can do PWM but only on one channel at a time and you need to keep calling the PWM function in a loop (plus have some external buffering - a capacitor?). There's that piggy back module that'll give me 4 channels of PWM, offloading the BS2, requiring just a serial line to control it. Due to current limitations, I'm going to need some kind of transistor setup to run all my LEDs.
The advanced stuff: I'm cool with programming my BS2 and aim to start off simple, just cycling through varying levels of different colours. In the future I might add some kind of control or program selection to vary the colours, speeds etc. I was browsing online the other night and came across a guy who'd done something similar with a small number of LEDs using a shift register and a 555 timer (for external clocking of the shift register). I guess that's an option too?
I guess my main areas of confusion right now are sussing out how to do PWM on 3 or 4 channels easily/programmatically, then working out what kind of transistors I need to drive all these LEDs. All help/advice/pointers gratefully received.
Comments
You will probably need a PWM generator. Parallax sells one, so does Al Williams
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Shawn Lowe
Remember - No matter where you go
There you are.
Or just get a PWM controller to do it for you as Shawn suggests.
*Both work well*
I used them both for servo control (together with BS2)- it makes writing the BS2 code kind of 'set it and forget it' like. Pretty easy.
Ryan
Let's see, interrupt every 10uS gives us 500 intrstructions per interrupt. With a PWM period of 10*256uSec = 2.56mSec or 390Hz.
If there is any interest I will attempt to "code-it-up".
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video Display Module" Available Now.
www.sxvm.com
"Great people talk about great things, average people talk about average things, small people talk about other people."
·
Hey Bean, I would like to see it if you have time. I always learn from looking at the code you guys post. That's how I started with the SX, and how I continue to learn...
Ryan
I started a thread in the Sandbox a while back concerning control of Luxeon brightness.· I got some very interesting responses there.· Unfortunately, I won't have the bandwidth to work on that project for a while.
Chris Isaacson
I coded up the 16 channel PWM controller and posted it in the "Project" forum.
Check it out.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video Display Module" Available Now.
www.sxvm.com
"Great people talk about great things, average people talk about average things, small people talk about other people."
·
Ryan
So.. I could take my BS2 kit and do serial comms to an appropriately programmed SX and have 16 channels of PWM? Gives me all sorts of thoughts/ideas of colour washing that changes in bands, not just a solid wall of colour
I could still do with some advice/pointers on how to actually drive lots of LEDs - should I be using transistors (multiple? once I've done my maths on current draw etc?) or some kind of LED driver IC (that commonly referenced one that's used for driving 4 or 8 digits of 8 segments?).
My current thinking is that I can probably do what I want to with a BS2 and either the Parallax PWM buddy module, or be adventurous and go with an SX for PWM and a BS2 for control, or just jump right in over my head and go with an SX type device and do the whole shebang? Probably a bit of a steep learning curve though... thoughts?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Are you using a BS2 or SX?
Chris I.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Glad to hear that you are using the PWM code.
So you just modified the PWM program to do the control also (no serial comm) ?
Or are you using one SX for control and another for the PWM ?
Just curious.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95 http://www.parallax.com/detail.asp?product_id=30012
Product web site: www.sxvm.com
"It's not getting what you want, it's wanting what you've got."
·
The intent is to create a glove with an RGB LED on each fingertip and the ability to write custom programs for it, the idea came from watching a group of raver kids play with thier LED toys.
Post Edited (Paul Baker) : 5/27/2005 12:36:11 PM GMT
Maybe you could add an EEPROM and use serial from a PC to get the token's into the SX and have the SX store them in the EEPROM, then you wouldn't have to reprogram it every time ?
Or how about an accelerometer in the glove to change the patterns. That would look cool.
Just a thought.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95 http://www.parallax.com/detail.asp?product_id=30012
Product web site: www.sxvm.com
"It's not getting what you want, it's wanting what you've got."
·
Post Edited (Paul Baker) : 5/27/2005 2:37:26 PM GMT
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95 http://www.parallax.com/detail.asp?product_id=30012
Product web site: www.sxvm.com
"It's not getting what you want, it's wanting what you've got."
·
http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&category=26207&item=7518355287
Just a couple years ago four lead·RGB LEDs were selling for $15.00 each.· Amazing.
Chris I.
You could (in theory) use PWM on the different colors to 'mix' and 'fade' colors, correct?
Ryan
I like the idea of diffusing the lens by filing it~ it seems like the color separation would only be a problem if you are viewing the LEDs directly-
The idea of the accelerometer is really neat also....I'm thinking about a device that changes color based on temp. - kind of like an ambient orb device for passing info based on color shifts...I also have an idea to mix colors based on outputs of a theremin...
Ryan
Thanks guys.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95 http://www.parallax.com/detail.asp?product_id=30012
Product web site: www.sxvm.com
"It's not getting what you want, it's wanting what you've got."
·
A quick check shows that the red is much less bright than the blue and the blue is somewhat less bright than the green.
No data sheets came in the package.· I will do some further evaluation and report back.
BTW I recently purchased a BS2SX kit from the Parallax ebay auction.· A real bargain.· Will I be able to use this for multiple channels of PWM.
Chris I.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ryan
And.... I'm going to have a little contest a la Sid (Newzed).· At approximately 9:30 AM (6/23/05) I'll pose a question.· The first correct answer wins 10 RGB LEDs.· Post your answers in the forum.· I'll announce the winner as soon as I can.
After that I'll ask another question.· Winner gets 5 RGB LEDs.
The questions may be technical or trivial.· They won't have anything to do with electronics or programming.· I couldn't get away with that around here.· I'll pay for postage in North America.
Chris I.
Post Edited (Paul Baker) : 6/23/2005 4:38:07 PM GMT
Question time will be 6:00 PM PST today (6/23/05)
Thanks for your patience.
Chris I.