Pages: [1]   Go Down
Author Topic: Shift Registers and PWM  (Read 581 times)
0 Members and 1 Guest are viewing this topic.
London, England
Offline Offline
Newbie
*
Karma: 1
Posts: 46
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all.

I'm trying to find a viable IC for a project, but all my searches are being bogged down in clutter.

I want to drive a couple of RGB LED strips via a serial type link. The annoyance is I need PWM on them and quite a few strips.

Effectively I need a shift register type IC with either (about) 3 or 6 outputs with PWM. I'm not worried current wise, since I am driving it through a darlington array IC.

The best I have found so far is the TLC5940 (http://www.mouser.com/ds/2/405/slvs515c-197949.pdf) at £2.29 ea this is massively overkill output wise though at 16.

I am considering ATtiny ICs with some custom firmware, but I am sure there is a prebuilt solution out there.

Does anyone know anything more cost effective?
Logged

Valencia, Spain
Online Online
Faraday Member
**
Karma: 121
Posts: 4598
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

this is massively overkill output wise though at 16.

You don't really need the TLC5940 for current regulation (it's built into the strips) so why not use the Arduino PWM? It has six channels.
Logged

No, I don't answer questions sent in private messages...

London, England
Offline Offline
Newbie
*
Karma: 1
Posts: 46
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
why not use the Arduino PWM? It has six channels

I'm not just using 1 chip. I need to control 17 RGB strips with full PWM. I'm planning my initial breadboarding to use a arduino mega to drive it, I suspect I might be pushing it's limit with it though, and I want it to do more than just talk to the lights (it will be talking to an ethernet chip and an SD card as well).

There is also very little space to hide cables, so running 68 cables around will look very ugly.

What I want to do is have a small sub-board for each strip (or 2), with just a 4 wire link to all of them, that way I can use a piece of CAT5 to make it look neat. This requires 3 or 6 PWM channels on each sub-board, 16 is overkill and racks up the price quite a bit (particularly if I scale up the numbers later)
Logged

Valencia, Spain
Online Online
Faraday Member
**
Karma: 121
Posts: 4598
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
why not use the Arduino PWM? It has six channels

I'm not just using 1 chip. I need to control 17 RGB strips with full PWM. I'm planning my initial breadboarding to use a arduino mega to drive it, I suspect I might be pushing it's limit with it though, and I want it to do more than just talk to the lights (it will be talking to an ethernet chip and an SD card as well).

There are chips with less outputs but they tend to be three outputs, not six. They're also surface mount so difficult to use at home (the DIP package is a big reason why the TLC5940 is so popular with hobbyists).


There is also very little space to hide cables, so running 68 cables around will look very ugly.

What I want to do is have a small sub-board for each strip (or 2), with just a 4 wire link to all of them, that way I can use a piece of CAT5 to make it look neat. This requires 3 or 6 PWM channels on each sub-board, 16 is overkill and racks up the price quite a bit (particularly if I scale up the numbers later)

Ah, now the full specification starts to appear...

The TLC5940 isn't just a 4 wire link, it needs constant love from the CPU to keep the PWM running, you need at least six wires to the chip to make it work (SCLK, SIN, BLANK, XLAT, GSCLK and GND). Add power and that makes it seven.

If you want to do it with four wires then you'll have to put a microcontroller on your boards to do the communications, in which case you might as well do the PWM in software as well. You can use pre-built mini-Arduinos or put a Mega328 on a piece of perf-board. A Tiny84 would work too but will need much more programming work.
Logged

No, I don't answer questions sent in private messages...

London, England
Offline Offline
Newbie
*
Karma: 1
Posts: 46
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Looks like I am using ATTiny85s then.

I'm quite surprised there is nothing like it on the market already though.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 444
Posts: 23859
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

How about WS2801 per strip, or one for every 3 strips?
http://www.adafruit.com/datasheets/WS2801.pdf
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.

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 58
Posts: 4036
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I try and see prices because to me bit-bang for the buck is a concern.

You can fit 3 Tiny85's on a 24-pin socket but even disabling reset you only have 6 pins free each.

The Tiny44's start with 14 pins. You might double the usable pins for less than 2x the $.


Logged

Examples can be found in your IDE.

London, England
Offline Offline
Newbie
*
Karma: 1
Posts: 46
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How about WS2801 per strip, or one for every 3 strips?
http://www.adafruit.com/datasheets/WS2801.pdf

That is EXACTLY what I was looking for! smiley-grin
Does 3 LEDs, and can drive a transistor, also available for £0.30 ea inc shipping smiley-grin
(http://www.ebay.co.uk/itm/30pcs-WS2801SO-WS2801-ORIGINAL-3-Channel-RGB-Constant-Current-PWM-LED-Driver-/261034394045#vi-content)


Your help is VERY much appreciated.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 444
Posts: 23859
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

Glad to help.
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: