Shop OBEX P1 Docs P2 Docs Learn Events
TLC5940 Controll Issue — Parallax Forums

TLC5940 Controll Issue

JoshuaLewisJoshuaLewis Posts: 24
edited 2008-09-03 08:49 in Propeller 1
Hello,
I am currently using the PropBlade Board from Brilldea brilldea.com/product_PropBlade.html to light up a chain of LED painters brilldea.com/product_LEDPainter.html
on each of the two outputs i have 4 LED painters, so in total 8 LED painters being controlled off of the PropBlade board. The LED painters uses 3 TLC5940 Chips on each board, so that would be a total of 24 TLC5940 chips being driven off of the PropBlade Board. The code i am using is from the Brilldea's website, http://brilldea.com/resources.html


Now this is the dream, the reality is, i can only control two boards absolutely perfectly, if one LED painter board is connected to each of the outputs, everything is fantastic. Now in taking baby steps i will only work off of one output connection with two boards. the first board still works fine, but the second board does random stuff while the data line is being updated, and pauses on the random colour that it is on when the clock select line stops oscillating, i have described most of what is happening here in this link http://www.atticsolutions.com.au/joshuasstuff/dancefloorissues.mp4

when only two boards are connected on one output if i setup the program to show a colour on the boards then blank out all lights, then show another colour, it shows the correct colours, so i thought this could be a buffer clearing issue maybe im not sure, if the board is set to fade, the end board does random stuff regardless, and the between boards are not as smooth as the first board.

I am at a loss as to where to go and what to do with this, any help would be greatly appreciated

Josh

Comments

  • BTXBTX Posts: 674
    edited 2008-09-01 00:26
    Hi Josh.
    Did you comment this with Thimoty ?
    Maybe it's the better way.
    I've linked until 24 boards of three TLC's each in my LED screen project succesufully (not the same PropBlade board).
    Maybe you need to add some extra 'boards', to avoid noises and signal degradation in long wires between boards.
    Here's the link: www.youtube.com/watch?v=1Ki8SUTulV8

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Regards.

    Alberto.
  • JoshuaLewisJoshuaLewis Posts: 24
    edited 2008-09-01 00:48
    Hello Alberto,
    I have spoken with Timothy, he has suggested that i look for help on this forum. the length of the wire between the boards is around 1 meter, so all up a total of 4 meters of shielded cable. So did your project used 72 TLC chips in parallel? and used the propeller ic to communicate with the boards?

    Did you have any other driving circuitry? or was the propeller boards fan out high enough to drive the whole lot?

    I would love to see if i could apply your code to this same project if that is ok with you, this would allow me to see if its a coding issue or hardware issue

    --Josh
  • TimmooreTimmoore Posts: 1,031
    edited 2008-09-01 00:58
    The data sheet says the input current for the shared pins is 1uA so the prop should drive it without problem. Have you tried reducing the length of wire to see if thats the problem?
    I also have a driver for Tim's board but it hasn't been tried on multiple boards. It only uses 1 cog so doesn't have any timing issues between xlat and gsclk.
    The other thing is are you powering it over the 4meter cable, have you checked whether you are getting power loss for the led power and tlc5940 power. You could also be getting cross-talk from the power onto the signal wires if they are not shielded from each other.

    Post Edited (Timmoore) : 9/1/2008 1:05:36 AM GMT
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2008-09-01 01:16
    Joshua and I have been working back and forth on e-mail for a couple weeks now revising this and adjusting that in the overall design. There are a couple larger issues that I am trying to research and understand, but my current travels and schedule are weighing me down. Joshua has been doing an excellent job in stepping through the problems and sending me details and I unfortunately have been slow in my responses. I have been trying to respond as I get time to think clearly.

    The Prop Blade/TLC5940 driver listed on the Brilldea's site should work for at least two boards in a chain, maybe three. I haven't hooked three boards in a chain recently so I could have missed something in the code adjustments. Some time, as soon as I get a good block of time and a clear mind, I am going to write a new TLC5940 driver/object that handles multiple boards better.

    BTX has shared some data with me about what he did, but again I haven't had a moment to digest it all so I thought perhaps there may be some help here from other using the Prop Blade or the LED Painter.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.

    www.brilldea.com·- Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto fo SunSPOT, BitScope
    www.sxmicro.com - a blog·exploring the SX micro
    www.tdswieter.com
  • JoshuaLewisJoshuaLewis Posts: 24
    edited 2008-09-01 01:33
    I have the power for the chips and the data lines in the same shield, but the power lines for the LED's are running at 90 Degrees to the communication lines.

    If i have only two boards connected, that is a total of 2 meters of cable, from the controller to the end board, the end board still shows random incorrect colours. this is consistent regardless of how many boards are connected. so i dont think it is a line length issue, but i wouldnt rule it out.

    I have had 6 boards connected in parallel, and 5 were nearly correct, the flickered occasionally, but the end board still shows random information.

    I would love to test out the code that you have made for the same boards. that would help to see if it is a synchronization issue.

    What is the Signal Return line used for?
    I have it connected to the end board to relay back to the PropBoard, but i don't understand why it is needed
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2008-09-01 01:36
    The TLC5940 act as shift registers. The driver I provide doesn't support it, but when you shift new data into the TLC5940 then data is shifted out regarding the status of the channels or error information. This is in the data sheet. I wanted to have the LED Painter be the most flexible, so I added that header to route the SOUT of the last chip to either another LED Painter or back to the controller.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.

    www.brilldea.com·- Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto fo SunSPOT, BitScope
    www.sxmicro.com - a blog·exploring the SX micro
    www.tdswieter.com
  • BTXBTX Posts: 674
    edited 2008-09-01 01:39
    Hi Josh.
    Yes, my project uses Three TLC's each board, and there are 24 boards connected in serial, so it is 72 TLC working, first 24 for red channel, seccond 24's for green, and last 24's for blue.
    And I used propellers to do the comunication and the control.

    But...........
    I've used in each board LVDS chips to isolating one by one of them, this is in the data in-data out section as in the SLCK, BLANK and XLAT bus, in fact, I did like a RS485 bus but with MLVDS chips. And I did that, because I was afraid of have your problem with long distances of wires, imagine, my propeller that control all that boards, are about 25 meters from the fisrt board, and between the first board and the last 24th, there are about 3.5 meters.
    Maybe what I did is a bit excesive, seeing it from an engineer view point, but it works fine showing video at a rate of 20fps.

    My code was published sometimes in this forum...sorry I haven't the link now, but.. look for it searching TLC5940. Or better simply send me a PM, and I'll send it to you by mail.
    Although I think your problem is hardware related.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Regards.

    Alberto.
  • JoshuaLewisJoshuaLewis Posts: 24
    edited 2008-09-01 02:15
    I think the problem could be hardware related as well, but i don't understand how i can have 6 boards connected with the same length cables and the same controllers with only the end board showing random data. while having 2 boards connected also shows random data on the last board. I think this rules out the cable length being an issue. But I'm not sure, i am about to set up all of the boards and ill post a new video that might shed some light
  • JoshuaLewisJoshuaLewis Posts: 24
    edited 2008-09-01 05:27
    I think, "Think" i might have worked out an issue, at least a contributing factor. if i lower the vcc lines to the chips (was at 3.3 volts, now at 3.0 volts) i have three boards in a row working perfectly, not a single hiccup, i am going to try 4 soon. what this says to me is that their is not enough definition between the high and the low state for the TLC5940's to decide what to do, me bringing the vcc line of the chip down, has made the other communication lines seem higher.

    So i would need a buffer IC to rectify this tell me if im on the right track.

    I did try and use a buffer IC a little while ago, and it blew up one of my propeller chips. the Buffer i used was the 74HC240 Octal Buffer Line Driver IC and the 74LS241 OCTAL TRI-STATE BUFFER IC. both did not work, but i might have connected them incorrectly.

    What Buffer would you suggest, or how could i pull all of the lines up to around the 5-6 volt level?

    Cheers,
    Josh
  • JoshuaLewisJoshuaLewis Posts: 24
    edited 2008-09-01 23:21
    I was able to have the 24 TLC5940's controlled for hours if i changed the vcc line going to the chips to a lower voltage. the 3 volts instead of 3.3. the end boards were still acting erratic and random, showing only primary colours, say red and blue LED's flickering, but not red/blue PWM to make purple like the rest of the board.

    I also noticed if i changed the output voltage pin of the 5 volt regulator to 4 volts,.... EVERYTHING WORKS!!!! EVEN THE END BOARDS!!!!!
    now i have no idea why this is or if this could cause long term damage, but it defiantly seems to me like a power issue. if someone could come up with a logical explanation to why this behavior is occurring it would be greatly appreciated!
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2008-09-01 23:25
    Joshua - you are persistant and you are providing good details. Man! I am scratching my head on this and can't wait to get back to Hong Kong to try and figure out what is going on. So you lowered the 5V DC on the Prop Blade to 4V DC and then it worked? The 5V DC on the Prop Blade feed thes Maxim Chip and the 3.3V regulator. Man, what is going on?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.

    www.brilldea.com·- Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto fo SunSPOT, BitScope
    www.sxmicro.com - a blog·exploring the SX micro
    www.tdswieter.com
  • BTXBTX Posts: 674
    edited 2008-09-01 23:29
    For what I suspect, you had incorrect GND wiring.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Regards.

    Alberto.
  • JoshuaLewisJoshuaLewis Posts: 24
    edited 2008-09-02 00:21
    I never changed the ground wiring. i connected an external variable power supply to the output pin of the 5 volt regulator, and to the ground that was on the input of the Prop Blade board. i then varied the voltage from 5 volts downwards to 3.3 volts, when i got to below 4 volts the board would freeze on the last shown colour, probably because of the voltage drop through the 3.3volt regulator was to great to power the propeller. but when the supply was at 4 volts everything seems to work fine.

    How would i go about wiring in a Buffer IC to up the signal lines to 5.5 volt instead of 3.3?
    The Buffer that i think would be the correct one is the 74HC240 Octal Buffer Line Driver IC.
    I think that the 1A0 - 2A3 lines connect to the output of the propeller, and the corresponding 1Y0 - 2Y3 lines connect to the driving lines. GND to the propeller board. the VCC into the Buffer chip would need to be the 5.5 volt from an external source, and the 1OE and 2OE trigger lines should connect to Clock Select.

    Is this correct?
    I have blown up a propeller IC already in doing something wrong there, do i need any other circuitry?

    Are Buffers bi directional?

    I am at a loss for the line level amplitude issue.

    Will lowering the voltage from the 5.0 Volt Regulator to 4 Volt damage anything?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Thanks

    ---Josh
  • DroneDrone Posts: 433
    edited 2008-09-02 10:25
    I agree with BTX, this sounds like a ground problem. Put a short thick ground wire from each board to a single grounding point and see what happens. If that doesn't fix it see if you're getting voltage drops on the high-side supply at the farthest point with lots of current being drawn.

    David
  • JoshuaLewisJoshuaLewis Posts: 24
    edited 2008-09-02 12:04
    I am drawing 500 mA over the length of the circuit off of the VCC line, and 700mA including the Propeller board and all circuitry.

    I tried using Thicker ground cables, and shorter given my situation, but this did not seem to help at all.

    2.93 for the VCC line at the end of the line

    3.28 at the beginning of the VCC line


    Does this mesh with the results that you were expecting?

    --Josh

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Thanks

    ---Josh
  • JoshuaLewisJoshuaLewis Posts: 24
    edited 2008-09-02 23:15
    The minimum supply voltage for the TLC5940's is 3 volts, so i am right on the edge of them working, if anyone knows how to buffer 3.3volts upto 5.5 volts, im sure i should get more definition in what is a high and low bit, and this should fix the issue.

    Thank you in advance,
    Josh

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Thanks

    ---Josh
  • DroneDrone Posts: 433
    edited 2008-09-03 05:06
    Ya, sounds like you have too much drop in your power supply lines. How long do they need to be? You tried thicker-shorter ground cables, but that may not solve your problem unless you use thicker-shorter supply cables as too. You can measure the drop across the ground by putting a volt meter at both ends of the ground wire.

    As for 3.3V to 5V:

    You really should get your supply and ground cable voltage drops under control first, then you may not need to do something like 3.3V to 5V at all. For very long runs this may not be possible though. I've read about some projects where they put lights in buildings to make an artistic display. They can't distribute DC to the LEDs because of voltage drop in the long cable runs. So they power the LED's with local power supplies, the control signals see a high impedance so voltage drop isn't an issue. Anyway...

    So I presume you need 5V with relatively high current for the LED displays and 3.3V for the micro-controller electronics? If so, just use a 5V linear regulator in series with a 3.3V Low Drop Out (LDO) linear regulator. The attached picture is how Parallax does it on the Propeller Protoboard. I quick google search came up with a little board that does 3.3V to 5V at 200mA:

    www.tekgear.ca/index.cfm?pageID=90&prodid=466&section=73

    If you seriously want to up-convert 3.3V to 5V, go to most any of the semiconductor manufacturer sites and search for Boost Converter or Boost Regulator. I would start with www.linear.com, they have a free SPICE simulator (LTSpice/SwitcherCAD III) and SPICE models for their converters so you can simulate and optimize your design before the buy-and-build.
    718 x 283 - 28K
    PS.jpg 27.5K
  • JoshuaLewisJoshuaLewis Posts: 24
    edited 2008-09-03 05:42
    I have got the shortest wire length given the distance i have to travel, the furthest TLC5940 chip is 4 meters away, and the length of the wire is 4.2 meters. their is many of these chips all along the length of the communication wires.

    The Prop Board needs to have 3.3 volts supply voltage, and outputs 3.3 volts through the IO lines, the TLC5940 LED drivers can handle up to 5.5 volts without an issue and work fine with the 3.3 volts over shorter distances, if i could just increase the high value of the communication wires to 5 volts, instead of 3.3 i would think this would get around the issue.

    I have been told that schmidt triggers could be used to do this, what is the best method?

    the LED's are powered off of separate lines that can handle up to 7.5 amps of current, the LED's combined power draw significantly less.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Thanks

    ---Josh
  • DroneDrone Posts: 433
    edited 2008-09-03 07:18
    Well, first of all a 7400 series Schmitt trigger will invert your signal. Plus since you are doing level shifting there's no advantage to the input hysteresis provided by a Schmitt trigger, in-fact it may cause problems by raising the input threshold.

    Using 74LSXXX logic should work; when powered by 5V the input threshold should be OK with the 3.3V propeller output (check the data sheet). I don't think HCMOS logic (e.g., 74HCXXX) powered by 5V will work well with a 3.3V input.

    For up to four control lines use a 74LS08 quadruple 2-input AND gate. Just tie the two AND gate inputs together and connect them to the propeller. For the same or more control lines, look at the likes of 74LS07/125/126/241/244/365/465. These are non-inverting buffer/drivers. You may also try to buffer with an NMOS transistor and a resistor, something like a 2N7000.
  • JoshuaLewisJoshuaLewis Posts: 24
    edited 2008-09-03 08:08
    I have got my hands on some 74LS241N Octal Tri-state Buffer IC's,
    are they bi-directional?

    I will try them when i get the chance and let you know the results.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Thanks

    ---Josh
  • DroneDrone Posts: 433
    edited 2008-09-03 08:25
    The 74LS241N is a uni-directional non-inverting buffer, the buffers are Schmitt triggers. You might want to try using the 74LS241N anyway. It should work from the propeller at 3.3V to other devices at 5V, the data sheet says it has an input threshold of 2V when powered at 5V.

    If you need bi-directional buffering, then bus transceivers like the 74LS243 bus transceiver can be used provided you are only communicating in one direction at a time and you have some means of switching the direction of the transceiver. You can get the same kind of operation by putting two 74LS241's back-to-back and using the tri-state control on each to control direction. Also when receiving data, the input to the propeller will be 5V, not 3.3V, look at the sticky in this forum about how to interface 5V inputs to the propeller.

    If you need simultaneous bi-directional level shifting, then you need a different kind of animal. Have a look at the NXP GTL2002 part.

    I did a quick simulation of a uni-directional buffer using a single 2N7000 NMOS transistor and one resistor. Given the circuit shown in the attached schematic, the buffer should work through around one megabit/sec. (Don't increase the resistor value unless your data rate is much lower, around 100 kilobits/sec or less.)

    You may replace the 2N7000 with a BS170 or BS270, all are TO-92 packages. The 2N7002 is similar but is in an SMT package. There are likely faster parts out there, but I don't have the models handy.

    Regards, David

    Post Edited (Drone) : 9/3/2008 8:52:56 AM GMT
    640 x 333 - 15K
  • JoshuaLewisJoshuaLewis Posts: 24
    edited 2008-09-03 08:41
    Ok that was a very fast reply!,
    I understood most of what you were saying except for:

    "just connect two Schmitt triggers in series to ensure true logic."

    So i would connect two 74LS241N's in series or the output of one of the buffer lines into the input of another and ten the output of that line to the device and it should work?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Thanks

    ---Josh
  • DroneDrone Posts: 433
    edited 2008-09-03 08:49
    I made a mistake, the 74LS241 is a NON-inverting buffer, so forget what I said about connecting the two schmitt triggers in series. I corrected my previous post.

    Sorry... David

    Post Edited (Drone) : 9/3/2008 8:56:19 AM GMT
Sign In or Register to comment.