Go Down

Topic: TLC5940 - with 200LEDs from car battery (Read 1 time) previous topic - next topic

atis-sedlenieks

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.


PaulRB

#1
Oct 19, 2018, 07:55 pm Last Edit: Oct 19, 2018, 08:35 pm by PaulRB
Quote
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.

atis-sedlenieks

#2
Oct 19, 2018, 11:03 pm Last Edit: Oct 19, 2018, 11:39 pm by atis-sedlenieks
What you need is a 12V to 5V dc-dc convertor rated for well over 10A.
Thank you for information :)
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 ?

Paul__B

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.

The Arduino's regulator can so very easily overheat when supplied @12V.
So the answer is it might be able to supply one TLC5940.  :smiley-roll:

atis-sedlenieks

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 ?

PaulRB

#5
Oct 21, 2018, 05:38 pm Last Edit: Oct 21, 2018, 05:44 pm by PaulRB
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.

PaulRB

#6
Oct 21, 2018, 06:04 pm Last Edit: Oct 21, 2018, 06:08 pm by PaulRB
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).

atis-sedlenieks

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.

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 ?

PaulRB

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.

Grumpy_Mike

Quote
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.

atis-sedlenieks

#10
Oct 22, 2018, 12:59 am Last Edit: Oct 22, 2018, 12:59 am by atis-sedlenieks
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.

Grumpy_Mike

Quote
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.

atis-sedlenieks

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-

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.

atis-sedlenieks

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:
Code: [Select]

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.
}

Go Up