Pages: [1] 2   Go Down
Author Topic: How did this guy daisy chain the tlc5940 over a long wire?  (Read 3175 times)
0 Members and 1 Guest are viewing this topic.
Albany, NY
Offline Offline
Newbie
*
Karma: 0
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've been searching for a way to daisy chain the tlc5940 over medium distances and started to think it was not possible until I saw this guy:


http://josocelprat.blogspot.com/

His web site is short on details and in a language I don't understand. Can anyone tell what he is doing?

I have the 4 tlc5940s that I need for my project working great when they are connected close together. But as soon as I start separating them by the 2.5 feet I need (maximum run 10 feet) they stop working. I want to have TLCs separated and close to the leds they will driving because it will greatly cut down on the number of wires I need to run between the sections. I understand there are distance limitations with the method the TLCs use to communicate. But I see there are allot of add on modules for the arduino that allow it communicate over longer distances (such as with rs-485). Is there anything like this that would work for the TLC5940? Thank you.
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 145
Posts: 5460
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Have you tried shielded wire? He's using a network cable for a reason.

Adding extra pull-up resistors on the end of the chain might help, too, but ten feet isn't really very long.
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Cape Town South Africa
Offline Offline
Edison Member
*
Karma: 19
Posts: 1217
A newbie with loads of posts, and still so much to learn !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I use the 8 LED  version the TPIC6B595  and have strung them all over the place on 2.5 x 3.5 meter boards like this one, with ribbon cable between with no problems .
I use Shiftout which I think is slow, but works fine -  and who needs milliseconds to score a game like cricket !  :-)
Logged

With my mobile phone I can call people and talk to them -  how smart can you get ?

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 145
Posts: 5460
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I use Shiftout which I think is slow, but works fine -  and who needs milliseconds to score a game like cricket !  :-)

Slow clock speeds help, too...

Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Cape Town South Africa
Offline Offline
Edison Member
*
Karma: 19
Posts: 1217
A newbie with loads of posts, and still so much to learn !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, when I say it is slow, its still under half a second to update all the scores
Logged

With my mobile phone I can call people and talk to them -  how smart can you get ?

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8497
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
and who needs milliseconds to score a game like cricket !  :-)
A few hours update period should be OK for cricket I would think. Actually in Aus we use modified versions of those devices they use to measure tectonic plate movement.

______
Rob
« Last Edit: November 12, 2012, 06:18:31 am by Graynomad » Logged

Rob Gray aka the GRAYnomad www.robgray.com

Cape Town South Africa
Offline Offline
Edison Member
*
Karma: 19
Posts: 1217
A newbie with loads of posts, and still so much to learn !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

 devices they use to measure tectonic plate movement.    LOL
Logged

With my mobile phone I can call people and talk to them -  how smart can you get ?

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have done spi over 10ft at 100khz. If you have issues, it is most likely with capacitance on the line, limited drive or too high of a speed. Using shielded cabling helps and you can always slow down your speed.
Logged

nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8497
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You can use RS-485 drivers to get 4000 feet for SPI.

_______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Eugene, Oregon
Offline Offline
Sr. Member
****
Karma: 9
Posts: 388
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I noticed in the shiftpwm site, there is a "push-pull line driver" for running data lines a long distance.

http://www.elcojacobs.com/using-shiftpwm-to-control-rgb-leds-with-arduino/

Somehow I doubt that it has anything to do with shielded ethernet cable, those are a couple twisted pairs of wires with a wrapped shield and drain wire, its not very good shielding. Cable TV type cable has braided shield, that would work good if you really need shielding.
Logged


Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 145
Posts: 5460
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Somehow I doubt that it has anything to do with shielded ethernet cable, those are a couple twisted pairs of wires with a wrapped shield and drain wire, its not very good shielding.

It's good enough for gigabit data transfers...

Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Albany, NY
Offline Offline
Newbie
*
Karma: 0
Posts: 21
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks everyone for taking the time to reply to my questions.

I have already bought a bunch of tlc5940, and I want pwm control, so I am pretty much locked into them for now. After seeing this video I did give a 5 ft long cat5e cable a try. I didn't have any female connectors like the guy in the video, so I had to solder the wires to header pins. Maybe I did a crap job on the soldering, but it didn't work. One thing that occurred to me is he is only connecting two tlc5940s. I am trying to connect a 4th one with a long cable. Maybe that is a significant difference?

I have read in other places that reducing clock speed can increase range. But can I do this for the TLCs? That will not interfere with how they communicate/operate? What are the drawbacks?

It seems like RS-485 would solve my problem. But what I am confused by is do I need an arduino at each node? Of course it would not need to be a full arduino, just basically a processor that can talk to the RS485 chip and then send the correct spi signals to the TLC? That sounds like it might be a whole project in of itself. I did some searching for a ready made spi --> RS485 ---> spi device but did not turn anything up. Does anyone know of the existence of a product like that?

I am basically trying to weigh the effort/cost of investigating a node based solution against the pain of just making a bunch of connectors and using a ton of wiring. Going at it from the other direction, is there an efficient way to churn out wires with connectors? 4 segments each needing to connect to each other. The last segment 1 connector, the one before 3 connectors, then 5, then 7 for the first one in the chain and its connecting 7 for a total of 23 connectors. With 18 wires in each connector that is 414 individual connections I have to make! Its amazing how quickly something like this scales up. 10ft of lights didn't really seem like it would be that big of a deal...until I actually tried to do it smiley

BTW: I really dig that controller for the cricket board.


Logged

Cape Town South Africa
Offline Offline
Edison Member
*
Karma: 19
Posts: 1217
A newbie with loads of posts, and still so much to learn !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I saw on the datasheet for the TLC5940 an equation for clock speed depending on the number of devices daisychained ( which they say can be up to 40 )

Quote
Figure 22 shows a cascading connection of n TLC5940 devices connected to a controller, building a basic
module of an LED display system. The maximum number of cascading TLC5940 devices depends on the
application system and is in the range of 40 devices. Equation 10 calculates the minimum frequency needed:
where:
f(GSCLK): minimum frequency needed for GSCLK
f(SCLK): minimum frequency needed for SCLK and SIN
f(update): update rate of whole cascading system
n: number cascaded of TLC5940 device


Quote
BTW: I really dig that controller for the cricket board.

The first cricket board I made had to be operated by an 80 odd year old scorer, who didn't want any menus or that rubbish :-) , so I used the thumbwheel switches laid out exactly as the board, WYSIWYG,  and its so simple I have stuck to it since.
« Last Edit: November 13, 2012, 10:09:14 pm by Boffin1 » Logged

With my mobile phone I can call people and talk to them -  how smart can you get ?

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 145
Posts: 5460
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I saw on the datasheet for the TLC5940 an equation for clock speed depending on the number of devices daisychained ( which they say can be up to 40 )

Quote
Figure 22 shows a cascading connection of n TLC5940 devices connected to a controller, building a basic
module of an LED display system. The maximum number of cascading TLC5940 devices depends on the
application system and is in the range of 40 devices. Equation 10 calculates the minimum frequency needed:
where:
f(GSCLK): minimum frequency needed for GSCLK
f(SCLK): minimum frequency needed for SCLK and SIN
f(update): update rate of whole cascading system
n: number cascaded of TLC5940 device


That's nothing to do with electrical limits of the wires/chips, it's just about having enough time to send all the data for a given update rate (never a problem for cricket).
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Cape Town South Africa
Offline Offline
Edison Member
*
Karma: 19
Posts: 1217
A newbie with loads of posts, and still so much to learn !
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hmm,  I dont know why you are having trouble then,  I thought of perhaps using those chips myself as they have constant current drive, but after seeing the price, and the troubles you are having, I think I will stick to what I have.

For most of my boards I only need 7 pins on a driver behind each display number anyway.

I cant find the screenshot of it, but I checked the waveforms coming out of the micro and that coming out of the 19th display chip and all looked identical on my scope, and thats after say 20 meters of daisychained shiftregisters via ribbon cable....
Logged

With my mobile phone I can call people and talk to them -  how smart can you get ?

Pages: [1] 2   Go Up
Jump to: