SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By the_julle
#199645
Hi All.

Hardware:
SparkFun Pro Micro 5V
SparkFun LED Driver Breakout - TLC5940 (16 Channel)


I'm using the Pro Micro as a battery powered device, to control some LEDs on my kids little toy car. I was thinking of using 6*1.5V batteries a total of 9V.
I have 3 different design choices, and I do not know which one to go with...

Option 1: See drawing, Option1.
Connect external power supply to TLC5940 breakout. But I have read somewhere, that the TLC5940 breakout only supports 5V... In addition, my plan was to feed it with 9V, and then have 3 LEDs in series to get approx 3V voltage drop over each LED.

Option 2: See drawing, Option2.
If it is not possible to connect 9V, then it will be possible to use the regulated 5V signal from the Pro Micro Vcc pin. The question is; how much current can I draw from that pin?!?
Having 5V on the TLC5940 breakout means I could have my 3 LEDs in parallel.

Option 3
I also have the bare TLC5940 chip. If I read the data sheet correct, then the chip itself support a "LED Power Supply Voltage up to 17 V", however it also states that "VCC= 3 V to 5.5 V". So does that mean, that I should power the chip from the Pro Micro 5V Vcc pin, but how do I then power the LEDs?


I hope you can guide me in the correct direction :-)
Also, I'm not really sure what features I get by having the SparkFun TLC5940 breakout compared to the TLC5940 chip itself?

Thanks, Julle!
By jremington
#199663
The TLC5940 chip is powered by 3-5V, but the outputs can withstand 17V. In addition, the outputs are constant current sinks, which means you program them for the maximum current allowed.

This means that you don't need a series resistor for the LED, and one output can control many LEDs connected in series, using a separate LED power supply.

The LED anodes are connected to a positive LED supply, and the cathodes are connected to the TLC5940 output, which acts as a PWM-controlled ground connection when that channel is on. If you use two power supplies, don't forget to connect the grounds.

You'll need to spend some time studying the TLC5940 data sheet, and consult whatever tutorials you can find, such as this one on the Sparkfun web site: https://learn.sparkfun.com/tutorials/in ... -led-array
By the_julle
#199676
Thank you for your reply!

Yes, so you confirms that the original design I had in mind is valid: 5V to the chip from Arduino, and External power supply to power the LEDs. When using the SparkFun LED Driver Breakout - TLC5940 (16 Channel), this will be the wiring:

Vcc from Arduino to Vcc Led Driver.
Gnd from Arduino to Gnd Led Driver and GND External Power Supply (all share common GND).

Catode (-) to Out Led Driver.
Anode (+) to Vcc External Power Supply.

This is working. However, I have 1 issue:
The LEDs never turns off completely. When off they have a weak light. What can be the issue? I guess the pull down is not strong enough - if so, how can I modify that?

In addition: Do you know why I should use the SparkFun board over the chip itself?
By jremington
#199686
5V to the chip from Arduino
...
Catode (-) to Out Led Driver.
Anode (+) to Vcc External Power Supply.
Sorry, this is not clear to me. Please post a hand drawn wiring diagram. The Sparkfun breakout board has an on board regulator, so you should NOT be supplying 5V to the chip.

If the LEDs don't turn off, that may a code issue. Post the code you are using, with code tags.

What "pull down" resistor are you talking about?
By the_julle
#199706
Okay. What is the difference between powering the 5940 chip using the external 9V supply, or the 5V powered from the regulated signal from the Arduino? If I power the 5940 chip with 9V, then I need a regulator on both the Arduino and the 5940 - which of course is already there, but doesn't I waste a lot of energy by doing the "conversion" twice? This is why I powered the chip from with the 5V signal from the Arduino.

The attached drawing illustrates the 2 different ways.
Originally showing the chip is powered from the Arduino 5V, then crossed the wire and connected to external 9V.

FYI: The "not-turning-off" is "fixed":
At least it only happens when the Arduino is USB powered, and the chip is powered from the Arduino Vcc signal.

If the Arduino is USB powered and the chip is powered from 9V external, they are able to turn off completely.
If the Arduino is powered from RAW pin using external power supply, the LEDs are always able to turn off no matter if the chip is powered from Arduino Vcc or External Power.


This is my code. It is just a simple test:
Code: Select all
#include "SparkFun_Tlc5940.h"

void setup()
{
	Tlc.init();
}

void loop()
{
	Tlc.clear();
	Tlc.update();
	delay(1000);

	Tlc.set(0, 2048);
	Tlc.set(1, 2048);
	Tlc.set(15, 2048);
	Tlc.update();
	delay(500);
}
You do not have the required permissions to view the files attached to this post.