Pages: [1]   Go Down
Author Topic: Confused over wiring manyleds with shiftout registers and pwm  (Read 651 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Sr. Member
****
Karma: 5
Posts: 422
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://www.elcojacobs.com/shiftpwm/
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 446
Posts: 23872
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

* WS2803.pdf (436.67 KB - downloaded 4 times.)
* WS2801.pdf (422.56 KB - downloaded 2 times.)
* TLC5940 PWM driver.pdf (1083.54 KB - downloaded 3 times.)
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

Southport UK
Offline Offline
Full Member
***
Karma: 1
Posts: 195
Been at it a long time...still learning every day.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

http://arduino.cc/forum/index.php/topic,122138.0.html
Logged

Sponge.
I'm allowed to have it 'cos it's not sharp.

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 446
Posts: 23872
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

All that, and no link to the actual chip.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: [1]   Go Up
Jump to: