Shop OBEX P1 Docs P2 Docs Learn Events
Serial comms and the TLC5940 — Parallax Forums

Serial comms and the TLC5940

big_markbig_mark Posts: 49
edited 2008-08-22 15:02 in General Discussion
Hi

I'm using the Texas TLC5940 LED driver to make some LED 'tiles' for the entertainment industry. More details at the bottom of this page. Each tile consists of the LEDs and a small circuit board with the TLC5940, a decoupling capacitor, and a resistor to set the current limit as set out on page 14 of the spec sheet

The idea is to have one Prop as a 'hub' for several 'tiles'. So far I have completed one tile and the code to drive it. When I connected the tile to my Prop using a short length of cable it worked perfectly, but when I tried using a 2 meter cable it all went wrong sad.gif The LEDs flicker slightly as if they were getting interference somehow. The cable I am using is a simple 9-pin serial extension cable. I'm using those because I can buy ready-made cables for less than the cost of the components to make them myself, and because I need at least 7-core cable for the data and power.

Is there anyway I can easily improve the communcation between my Prop and my tiles? Would separating power and data make a difference, or should I be looking at implementing a different method of communcation such as LVDS, for example?

Thanks


Mark

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2007-10-07 14:48
    Try making your own cable, for experimentation; my suggestion would be DATA and GND as a twisted-pair (2-3 turns per inch.)
  • big_markbig_mark Posts: 49
    edited 2007-10-07 16:19
    Hi

    Its worth trying, but there are 5 data lines going from the prop to the chip. Unfortunately it doesn't use a conventional serial setup to receive data. I do have some Cat5 network cables I would be willing to chop up in the name of experimentation though! If I used one twisted pair for power and the other three pairs for data do you think that would make much difference? I would really prefer to be able to use serial extensions cables as they are more flexible than Cat 5.

    Also, the chip does allow for separate power supplies for logic and the LEDs. At the moment I have a 2.5A 5 volt SMPS with a 3.3 volt linear regulator for powering my Propellor. I am just using a single 5 volt supply for both logic and LED power on my LED tiles. Would it be worth running the TLC chip on 3.3 volts and keeping the 5 volt supply for the LEDs?

    Thanks


    Mark
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2007-10-07 16:44
    · So far as trying things as you've mentioned goes -- Run it up the flagpole and see if anyone salutes.
    · You didn't mention the "SMPS" (switching-mode PS), originally.· How stable is its output vs. load?· I guess it worked out OK with your short-cable version.· Perhaps there's a switching-noise issue (6m cable = antenna.)· Do you have a linear that you could use in its place to find out?
  • LilDiLilDi Posts: 229
    edited 2007-10-07 19:05
    Mark,
    The TLC5940 uses:
    1] serial in
    2] serial out
    3] signal ground (be sure to use a seperate signal ground)
    4] power ground (be sure to use a seperate power ground)
    5] +voltage power

    What are the other two line used for?
    You metioned a coupling capacitor. Does that mean the capacitor is in line with the serial in line? If so, I would remove the capacitor in line with the serial in line. That capacitor is probably the root of the problem here. Its not needed as far as I can see. That is to say if when you say PROP you mean the Propeller chip, or do you mean the PROP-1 driver board.
  • metron9metron9 Posts: 1,100
    edited 2007-10-07 19:49
    Convert the serial port signal at the PC to Rs485 with a tranceiver chip then you can run·4000 feet at 250kbs Google DMX protocol

    I am working on a design now for my dmx lighting, finally got the C# programming going to access the serial port. When i have the unit done i will post it in the finished projects but I need a few questions answered on some c# syntax at the moment.

    I will be using a tiny45 to buffer the input from the serial port and feed it to another tiny45 that feeds· a tranceiver that will a stamp interface, you will also need a tranceiver at the receiving side.

    I am using some sipex 481cs chips now but the sipex483 is available at futurlec or digikey has the Texas Instruments SN75176BP that will run on 5V 8pin dip.



    ·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!

    Post Edited (metron9) : 10/7/2007 7:55:22 PM GMT
  • Desy2820Desy2820 Posts: 138
    edited 2007-10-08 02:51
    I think that you're experciencing a voltage drop due to the size and legnth of the LED power supply cables.· I would consider using two seperate cables, one supplying·power and the other for data.

    I'd use some heavier speaker wire with a two position connector for power, then use your serial cable·for data.· If needed, your data cable could supply 3.3 volt power for the logic side of the TLC5940.

    Also, consider adding a large value cap on the 5 volt LED supply, right on the board itself, this will help stabilize the voltage at each module.· Think of adding an amp to a car, where the headlights dim when the bass hits.· Something similair·will happen with your LED boards, the caps should help.· Maybe 47,000 uF or so?

    Hope this helps!
  • metron9metron9 Posts: 1,100
    edited 2007-10-08 07:48
    I looked at it again. If you use the tranceiver approach (attached PNG file)



    Connect VCC +5V and Gnd



    Connect your serial transmit line to A and the serial ground to B



    Connect pins 2 and 3 to ground



    Pin1 will be your output. RO







    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!
    344 x 286 - 14K
    798 x 214 - 8K
    810 x 293 - 9K
  • big_markbig_mark Posts: 49
    edited 2007-10-08 19:08
    Thanks for the replies, but I don't think your suggestions will help.

    @metron9 : Yes I know all about DMX and RS485, but as I said in my second post the TLC does not use a conventional serial communciation system. There are actually 5 data lines, one ground, and one or two power lines that need to be run to the TLC chip. Using RS485 for this would work, but I would then need at least 12-core cable!

    @LilDi : The TLC actually uses (in my application, at least) :

    1] Serial Clock - serial data shift clock
    2] Serial In - Serial data input
    3] Xlat - When set to high, the grayscale data gets updated
    4] Grayscale clock - Reference clock for grayscale PWM control
    5] Blank - Resets the grayscale counter
    6] Ground - Since the TLC5940 is a sink driver, there is only one ground for both power and logic.
    7] Power - Can be 3.3 or 5 volts. Powers both the logic and the LEDs

    I could add another power feed so I can separate logic and LED power. This may alleviate the problems I am having. I am using a DE-coupling capacitor as shown in the circuit diagram of page 17 of the specification. To save you looking, its a 100nf ceramic disc capacitor between Vcc and Ground.

    @Desy2820 : I think I will try your suggestion. I still think that its an interference issue rather than a power issue, but yours is the easiest thing to try first.
  • LilDiLilDi Posts: 229
    edited 2007-10-10 19:54
    Mark,
    ···· After looking at the specs on the TLC5940 and the Propeller, I see that both are CMOS signal level devices. I agree with Metron9 that the 2 meter cable is way to long for the CMOS interface of both devices. I also think you are going to need line drivers of some sort with the 2 meter cables.

    I will see if I can research a good line driver for you, but no guarantees.

    Edit: A quick google - The DS14C88 and matching DS14C89 quad cmos line driver looks like a good fit. There must be dozens of other line drivers out there that will do the trick as well though.

    Post Edited (LilDi) : 10/10/2007 8:06:10 PM GMT
  • mistercrunchmistercrunch Posts: 1
    edited 2008-08-22 15:02
    Hi,

    I am also experiencing similar issues with the TLC5940 and longer wires. Did you ever find a solution? What was it?

    Please let me know.

    Thanks!
Sign In or Register to comment.