Go Down

Topic: Confused over wiring manyleds with shiftout registers and pwm (Read 790 times) previous topic - next topic

hypoglycemic

I have been reading up on shift registers becasue I want ot control about 10 RGB LEDs.

If my logic is right, that is 30 pins to control (each colour *10), which is doable with 4 8-bit registers.

I get confused when pwm get introduced to the mix and bit registers are able to do a range of outputs (rather than bits). ie, rather than on and off which I expect with bit registeres it is possible to do a range of hues and mixes whcich (presumibly) requires more than simple bits to do.

I am clearly missing something important in this. Can someone point me in the right direction about what I should be looking into and reading up on.


CrossRoads

Look into WS2803. Only appears to be purchasable from a place in Niagara Falls, NY on e-bay.
I bought a tube of 25, haven't tried them out yet.  Too many other projects going on.

Each WS2803 has 18 IO pins to drive 6 RGB LEDs with full PWM control.
TLC5940 is another option, wiht 16 PWM'able IO.
WS2801, does 1 RGB LED. Designed for daisy chaining.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

hypoglycemic

After reading more and more I think I understand what is actually happening. When using registers and pwm, the registers are only turning in the LEDs for a fraction of a second at full power rather than the serial way of tuening them on at a percentage of power all the time. Add in the PWM to regulate (modulate?) the length and frequency of the se periods of on and you can simulate the percentage values.

In essence you are trading a percentage range for a time range and then simulating the percentage range.

If I turn on red channel for 2 units of time and the blue for 1 unit then off for 1 then you can get orange (rather than yellow for both on for 2 units concurrently). If you make the units short enough then the human eye wont notice any discernable changing and think of it as orange. I guess it is like persistence of vision demos.

Presumably the registers are able to handle the fast switching needed for this kind of thing? Same for the arduinos.

Is this what is going on?

The libraries and parts supplied look like really good options. Thansk for the suggestions I'll see if I can get someting working out of them.


Hexadec

...or have a look at this chip...

http://arduino.cc/forum/index.php/topic,122138.0.html
Sponge.
I'm allowed to have it 'cos it's not sharp.

CrossRoads

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up