hi everyone,
I need a programmable LED driver(or an IC with lots of pwm pins) for a project,in which i have to control 3600 LEds,all of which I want to be pwm.Any suggestions?
Or WS2803, 18 PWM outputs
3600/18 = 200 chips tho.
Ebay, there is a seller in Niagara Falls.
How are you using the LEDs?
Also, MAX7219, 64 LEDs, 15 levels of brightness control for all 64 together.
3600/64 = 57 chips.
$3 at taydaelectronics.com (used to be $1.25)
WS2803-preliminary-En.pdf (437 KB)
i am using the leds to pimp out my table,and i m looking for single color leds
not really bothered about the no of chips.
got lots of free time
Get some of these: http://www.ebay.com/itm/111126383189
You can connect 3 LEDs per PCB. That might not sound like much but they're really easy to wire up and require no other components. They save work in the long run. Just connect them in a long string (three wires from each PCB to the next PCB).
It's still a lot of LEDs though. ![]()
nb. There's slight variations in shape/size, eg: http://www.ebay.com/itm/261307385958 or http://www.ebay.com/itm/111126360488
Does each LED need individual control? You can save a lot of work if they don't.
I want to be able to dim and fade every led individually but im still open for suggestions.
i liked the RGB chips,but coding them individually would be exhausting coz even though i can program 200 chips,1200 might be too much ![]()
Pls let me join this discussion here.
I'm thinking about, getting some LEDs in my project. I don't need RGB, so one color is fine. I was thinking about the WS2803. It has 18 outputs, which I can directly connect to my LEDs. To setup the output current it's just one resistor. Easy as can be.
As far as I understand, it is possible to access every single LED. In my case in the first run the LEDs should represent the status of a potentiometer. The connection between the arduino, WS2803 and the LEDs seems simple. But how about the code? Does anybody know, how to set the LEDs on or off?
I didn't do the shift-register tutorial though... I will do this in the meantime ![]()
suvratroxx:
I want to be able to dim and fade every led individually but im still open for suggestions.
i liked the RGB chips,but coding them individually would be exhausting coz even though i can program 200 chips,1200 might be too much
1200 chips is no more difficult than 200 from a coding point of view. That's what loops/arrays are for.
OTOH, if you want 256 levels of brightness then fitting 3600 bytes into the 2K RAM of an Arduino Uno might be tricky.
I figured it out(finally).I am using ws2803 with a piece of code from thomasolson.com(just google "ws2803 arduino Thomas Olson ")
and just for the record,you can not access all leds with loops.you might be able to blink or trail or do some other effects but you cannot access every led individually(i am getting the feeling that we have different definitions of individual control).as for your project Christian,i think that the code from the aforementioned site will be helpful for you too
p.s. the hexadecimal thingies in the code confused me,but i figured them out to be the brightness of the leds in hexadecimal instead of decimal.to glow your leds convert the decimal no. Into hexadecimal and type that no. In the square brackets.i suggest you research into how ws2803 works,it helped me greatly
Hey,
I didn't have time to take a look at the code, but what do you mean with "you cannot access every LED individually"?
I thought it doesn't matter if I take two 74HC595 or one WS2803... I thought, it's the "same" (well... more or less..."
suvratroxx:
(i am getting the feeling that we have different definitions of individual control).
Clearing that up before we continue will save a lot of time...
by individual control i mean that i want to control an led at x*y coordinates while keeping all other leds the same.I am thinking about writing some functions,but i dont think that you can do that with loops.the code i am using is as follows
// WS2803_test
// By Thomas Olson
// teo20130202.01
// WS2803 18 channel LED driver
// Arduino 5V 16Mhz
// WS2803 pin4 CKI - > ws2803_clockPin
// WS2803 pin5 SDI - > ws2803_dataPin
// WS2803 pin2 IREF = Rext to GND.
// WS2803 pin6-23 = OUT0-17
// According to the documentation...
// WS2803 will receive 144 bits(18 bytes), latching it to itself
// and then relay further bits to the next WS2803.
//
// But in fact, if you send more than 18 bytes say 36, then the
// first 18 bytes are passed on to the second WS2803. And the next 18 bytes
// are displayed in the first WS2803. And this is the behavior that is indicated
// in timing chart (Fig 4.) of the documentation.
//
// This test code assumes two WS2803 in the chained together.
// We will see that the second WS2803 displays the 1st-18th bytes sent and
// the first WS2803 will display the 19th-36th bytes.
// So...
// The byte order is 0-17. The bit order is MSB-LSB. The chip order is Last to First.
const int ws2803_clockPin = 7;
const int ws2803_dataPin = 8;
#define nLEDs 36
uint8_t ledBar[nLEDs]; // Array representing LED PWM levels (byte size)
void setup() {
pinMode(ws2803_clockPin, OUTPUT);
pinMode(ws2803_dataPin, OUTPUT);
// Initialize WS2803 - Clock needs to be low at least 600us to prepare itself.
digitalWrite(ws2803_clockPin, LOW);
delayMicroseconds(600);
// Initialize the ledBar array - all LEDs OFF.
for(int wsOut = 0; wsOut < nLEDs; wsOut++){
ledBar[wsOut] = 0x00;
}
loadWS2803();
}
void loop() {
// Simple test - Flash All LEDs ON/OFF
for(int wsOut = 0;wsOut < nLEDs; wsOut++){
ledBar[wsOut] = 0xFF; // Full ON
}
loadWS2803();
// Then turn them ALL off
for(int wsOut = 0; wsOut < nLEDs; wsOut++){
ledBar[wsOut] = 0x00; // Full OFF
}
loadWS2803();
delay(1000);
// Simple test - LED Chaser
for(int wsOut = 0; wsOut < nLEDs; wsOut++){
ledBar[wsOut] = 0x3C; // 23% brightness
loadWS2803();
delay(100); // ON time for each LED during chase.
ledBar[wsOut] = 0x00; // Full OFF
loadWS2803();
}
delay(1000);
/*
// Simple test - increase brightness to max and then dim to min each LED
for(int wsOut = 0; wsOut < nLEDs; wsOut++){
for(int iOut = 0; iOut < 256; iOut++){ // brighten one LED
ledBar[wsOut] = iOut;
loadWS2803();
}
for(int iOut = 0; iOut < 256; iOut++){ // now dim that one LED
ledBar[wsOut] = (uint8_t)0xFF & 255-iOut;
loadWS2803();
}
}
delay(1000);
*/
} //loop
void loadWS2803(){
for (int wsOut = 0; wsOut < nLEDs; wsOut++){
shiftOut(ws2803_dataPin, ws2803_clockPin, MSBFIRST, ledBar[wsOut]);
}
delayMicroseconds(600); // 600us needed to reset WS2803s
}
I have another query,Can i use binary instead of hexadecimal?i.e. 11111111 instead of 0*FF
Okay, I see what you meant by "no individual access". The code controls all LEDs at the same time.
Maybe it's not possible with WS2803?!
Well ive been thinking about it,and as you have only 18 leds,you can write commands for them individually into the code .As mentioned before,i'll have to write functions.