TLC5940 - with 200LEDs from car battery

Hi!
I'm working on project that involves 100 white and 100 RGB leds, controlled with 25 TLC5940.
I've managed to connect three TLCs to Arduino MEGAv3 and so far so good.
I've found out that I have to add 0.1uF capacitors( ceramic, but I can only get film) between TLCs VCC and GND to smooth out voltage drops and 1uF / 100uF caps along the positive, negative rails. (to not burn down TLCs)
I'm using these LEDs:RGB and WHITE
So, from TLC5940 basic use example, i calculated that i have to use 1,5kohm resistor on each TLC to provide 26,04mA per LED channel. So at full on, all this should pull 26.04x400=10.416Amps
As this is going to be freestanding installation I'm thinking on using 12v 105Ah car battery.
As I have found out I can connect this battery to Arduino via DC jack and it will convert to 5V.

So the questions, that I haven't found answers to, are:

  1. Can I draw 10A from Arduinos Vin pin ? ( as I understand, this is pin that outputs DCjacks input current)
  2. Should I use transistors and connect battery directly to board ? And power arduino with another battery.
  3. How to protect TLCs from any possible overheating that i'm not aware of ?
  4. Are my LED mA calculations correct ? as i measured with single led turned on, between arduino 5V pin and breadboard it shown ~36mA on multimeter.
    I have attached sketch below, it's only showing two TLCs, but this wiring will continue as shown.
  1. Can I draw 10A from Arduinos Vin pin ? ( as I understand, this is pin that outputs DCjacks input current)

Good grief, no! Look for the PCB trace that connects the DC jack to the Vin pin. Would you put 10A through that tiny piece of copper?

What you need is a 12V to 5V dc-dc convertor rated for well over 10A. You can power the Arduino from this convertor by connecting to the 5V pin but you must use separate wires to power the Arduino.

You need some good quality thick copper wires to carry that current to the LEDs and tlc chips.

Alternatively, if you are prepared to connect your LEDs in groups of 3, you can connect each group of 3 in series between 12V and the TLC chip. This way, you will only need a small current @5V and most of the current will come directly from the 12V battery and will not need to be converted to 5V. But this will mean you will not have individual control of each led, only each group of 3 LEDs. This groups-of-3 idea can only work for the white LEDs. Unfortunately it cannot work for the RGB LEDs because each led has only one common anode lead.

Even with this arrangement (ALL LEDs in groups of 3), I'm not sure the Arduino's 5V regulator will be able to supply itself plus 25 tlc chips. It might, but you will need to check the tlc data sheet to find out how much current each chip itself will need @5V. The Arduino's regulator can so very easily overheat when supplied @12V.

PaulRB:
What you need is a 12V to 5V dc-dc convertor rated for well over 10A.

Thank you for information :slight_smile:
unfortunately I cannot use LED groups of 3 technique..

I plan to solder everything to veroboards with 0,3 copper wire.
So I need something like this: 12v/24v to 5v 15a 75w
That brings to question resistors for LEDs and TLCs..
Can I input 10A to TLC ?
And how to calculate resistors for LED? It's stated I = 39.06/R(in ohms) (i don't know why U is 39,06..)
U = (Vc-Vled)/ILed = (5-3,4)/0,03 = 53ohm ?

PaulRB:
Even with this arrangement (ALL LEDs in groups of 3), I'm not sure the Arduino's 5V regulator will be able to supply itself plus 25 tlc chips. It might, but you will need to check the TLC data sheet to find out how much current each chip itself will need @5V.

Well, since it is a CMOS device and supply draw very dependent on conditions, it is hard to pin down but driven by an Arduino, the datasheet implies something in the order of 20 mA.

PaulRB:
The Arduino's regulator can so very easily overheat when supplied @12V.

So the answer is it might be able to supply one TLC5940. :roll_eyes:

So from advice in other forum I've come to conclusion that I'll use RSD-60G-3.3 an Uin 9÷36V Uout 3.3VDC Iout 12A converter with 2k resistors for TLCs and more efficient white LEDs .
For now everything seems to work in theory.. What worries me, is this post dealing with signal problems. Due to length of whole chain I guess - 100inch(254cm). My driver chain would take about 35inch(90cm). Should I also think about including 74HC7014 hex buffers ?

I'm not sure I agree with the advice you got from the other forum. White LEDs on your link have forward voltage up to 3.4V, and the constant current circuits in the tlc chips will drop some voltage also. So running the circuit at 3.3V won't be enough, I think. I would recommend 5V supply.

Another problem with using 3.3V supply is that you will need logic level convertors between the Mega and the tlc chips, otherwise the 5V from the Mega could damage the tlc chips.

With 2K resistor to set the current, the current per led will be less than 2mA (1.24/2000*31.5=1.9mA). This will not be very bright.

Why do you say those white LEDs are more efficient? I expect there are more and less efficient white LEDs available, but I would think the difference in efficiency would only be a few percent. They are not going to be twice as bright for the same current, for example.

When comparing LEDs, you must be careful because often the brightness is often specified in milli-candella (mcd). This is a measure of light intensity in the forward direction, not a measure of the overall light output. So LEDs with a narrow beam angle will have a higher mcd value than a led with a wider beam, but that does not mean they produce more light in total.

I found a mcd to lumens calculator here.

Using that, your original white LEDs produce 1.24lm. The white LEDs in your new link produce about 1.61lm. Both these figures assume 20mA current. So the "new" LEDs are about 30% more efficient than the "old" LEDs. That is more than I expected, but not what you would describe as dramatically brighter.

The "new" leds will look much brighter if you are directly in front of them. But because they have a narrow beam (15 degrees), if viewed from the side, they may look less bright than the "old" LEDs, which have a wider beam (30 degrees).

PaulRB:
The "new" leds will look much brighter if you are directly in front of them.

It's all good, because they are placed under epoxy tube that distributes light.

PaulRB:
Another problem with using 3.3V supply is that you will need logic level convertors between the Mega and the tlc chips, otherwise the 5V from the Mega could damage the tlc chips.

I thought of wiring 12v battery to Mega input DC jack. Will it convert 12v to 5v? Or I could wire DC converters 3.3V to Mega input DCJack ?

Yes, if you connect 12V to the Mega's DC jack, the on-board regulator will make enough current @5V to run the Mega. But not enough current to run anything else, or the regulator will overheat.

No, you cannot connect 3.3V to the Mega's DC jack. It needs more than 6.5V to work.

I've found out that I have to add 0.1uF capacitors( ceramic, but I can only get film)

Then you can't do your project. Film capacitors will not work correctly it has to be ceramic.

Here is an old thread where not using a ceramic proved troublesome and using a ceramic cured the problem.

One where using ceramic ones instead of mylar ones made a difference
http://forum.arduino.cc/index.php?topic=343563.10

I would also go through the data sheet of the TLC5940 and calculate the heat dissipation of each chip. That might make you want to reduce the LED current.

Using the same TLC5940 for white and red, green and blue LEDs is a bad idea because all the LEDs on one chip have to run at the same current and that will give you vastly different brightness over the colours. It is more wiring but you are best to stick to one colour per TLC5940.

Grumpy_Mike:
Then you can't do your project. Film capacitors will not work correctly it has to be ceramic.

I would also go through the data sheet of the TLC5940 and calculate the heat dissipation of each chip. That might make you want to reduce the LED current.

Using the same TLC5940 for white and red, green and blue LEDs is a bad idea because all the LEDs on one chip have to run at the same current and that will give you vastly different brightness over the colours. It is more wiring but you are best to stick to one colour per TLC5940.

Hi, Mike, thanks, I already ordered ceramic ones.. Funny, that in Latvia, where I live, I cannot buy 0.1uF ceramic ones :))
I will try to look and calculate that heat dissipation, that worries me. That and signal strength problems mentioned in this post
Because of my overall construction i have to use rgb and LED white in one TLC.. I will have to manage to shift colors with those grayscale values.

I will have to manage to shift colors with those grayscale values.

Fine in theory but I have never managed to get those working, not sure why. Maybe the chip needs to be supplied with the extra program voltagefor that.

Yes you will need buffering on the signal lines. I normally use the 74HTC04, these are inverting buffers so I use one to invert the signal and feed it too the inputs of the other five. Then you get five buffered outputs you can send to bunches of TLC chips.

Grumpy_Mike:
Yes you will need buffering on the signal lines. I normally use the 74HTC04, these are inverting buffers so I use one to invert the signal and feed it too the inputs of the other five. Then you get five buffered outputs you can send to bunches of TLC chips.

Oh that's clever! But then how you daisy chain those TLCs ?
Like so-

No need to do anything with buffering the signal that is done by the TLC chip itself. The input signal is regenerated at each chip. You only have to buffer signals going from the Arduino to all chips.

That diagram implies the outputs of all the buffers are connected together, don’t do that but connect one buffer output to a whole bunch of chips, then the next output to the next load.

Grumpy_Mike:
No need to do anything with buffering the signal that is done by the TLC chip itself. The input signal is regenerated at each chip. You only have to buffer signals going from the Arduino to all chips.

That diagram implies the outputs of all the buffers are connected together, don’t do that but connect one buffer output to a whole bunch of chips, then the next output to the next load.

Like this? I just want to be sure I understand correctly before I start wiring etc.
I have to connect SIN for first chip, so they know their order. And all other signals are buffered through HTC?

If scheme are correct, will standard TLC5940 library code work,like for example:
Tlc.set(channel, value); function:

int directionChannel = 4;
int valueAddition = 10;
int value = 0;
int activeChannel = 3; // 0-green; 1-blue; 2-red; 3-white
int maxValue = 2000;
////TEST CHANNELS
void testLEDChannel(int activeChannel)
{
  Tlc.clear(); // clear all channels
  for (channel = 0; channel < NUM_TLCS * 16; channel += directionChannel)
  {
    for (value = 0; value < maxValue; value += valueAddition)
    {
      if (channel == 0)
      {
        channel = activeChannel;
      }
      Tlc.set(channel, value);
      Tlc.update();
    }
  }
  // Exit the loop
  exit(0); // The 0 is required to prevent compile error.
}

That schematic is fine.

However not too sure you need the exit(0 ) bit or indeed the rest of that code.
You seem to have a nested loop but you are changing the outer loop’s index variable in the inner loop for some reason. Code fragments are hard to follow.

Grumpy_Mike:
However not too sure you need the exit(0 ) bit or indeed the rest of that code.
You seem to have a nested loop but you are changing the outer loop’s index variable in the inner loop for some reason. Code fragments are hard to follow.

yeah.., exit(0) is to exit main loop so that this function runs just once, if i want to turn on one channel (or all white channels 4,8,12, etc). You're right about that inner loop, i should put that

  if (channel == 0)
      {
        channel = activeChannel;
      }

before for loop :sweat_smile: .

Grumpy_Mike:
That schematic is fine.

I did test this approach with 74HTC04 and it works wonderfully! at least for two groups of three TLCs :sweat_smile:
I'm designing veroboard layout in groups of 4 TLCs and for now I think this is going to work:
(i hope that this image is somewhat understandable as I draw this in autocad..)
Dotted lines are connections via veroboard strips and thick lines are connections via copper wire on the other side of verob.


The question is, should I connect loose ends of SCLK, XLAT, BLANK, GSLCK like in left side, so it makes full circle ? (or it doesn't matter)
And, do you put 1uF capacitors somewhere near 74HTC04 ?

The question is, should I connect loose ends of SCLK, XLAT, BLANK, GSLCK like in left side, so it makes full circle

No that will tend to make matters worse. If you want to do something with them then but a 4K7 resistor from the end to 5V. This will terminate the ends and help stop reflections from the open circuit.

The 74 buffer chips should have a 0.1uF ceramic across the power and ground pins just like the TLC chips.

Unfortunately that physical layout diagram makes no sense, I am not saying it is wrong, it is just that you can’t read that sort of thing like you can a schematic, no one can.

Grumpy_Mike:
Unfortunately that physical layout diagram makes no sense, I am not saying it is wrong, it is just that you can’t read that sort of thing like you can a schematic, no one can.

yeah.. i'm bad at drawing schematics, so this is mostly for veroboard layout..
Another thing that I'm worrying about, wire thickness to LEDs. Maximum length for wire from TLC to LED is ~5m(16feet). Mostly ~1-3m (3.2-10feet).
I have bought 4x0,22mm (gauge 31, inch 0.0089) wire for RGB and 2x0,2mm (gauge32 inch0.008). Is this thick enough? I tested whole 100m roll with no voltage drops.. And for the 5m wire, seems like 1,5-2ohm resistance.