Pages: [1] 2   Go Down
Author Topic: TLC5940 with Common Cathode  (Read 3022 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 1
Posts: 85
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I want to build an 4³ LED cube that is controlled by a TLC5940 (and an Arduino Uno).

I just assembled this circuit to test the IC:


I already soldered the LEDs together and all cathodes of a layer a connected to turn on and off the layer.
So the anodes of the LEDs will be connected to the IC.

In the example the cathodes are connected to the IC and the anodes go to 5V.
My idea was to connect the LEDs vice versa between GND and the TLC5940 and invert the values.
However, as soon as I disconnect an LED (or connect it vice versa) there is no more voltage at the ouput pins.

Is it possible to run my LED cube with the TLC5940?
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 150
Posts: 5666
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I already soldered the LEDs together and all cathodes of a layer a connected to turn on and off the layer.
So the anodes of the LEDs will be connected to the IC.

In the example the cathodes are connected to the IC and the anodes go to 5V.

The example is correct, the cathodes should go to the TLC5940.

The anodes are connected together in each layer, not the cathodes. Time to start again...

Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

South England
Offline Offline
Full Member
***
Karma: 3
Posts: 205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Probably best not to solder things until you're sure it works... and do as the example does smiley Made the same cock-up myself before, so don't feel too bad!
Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 85
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Im sure that it works!

I followed a tutorial that instructed me to do like this.
http://www.instructables.com/id/The-4x4x4-LED-cube-Arduino/step4/Construct-the-cube/

I definitely know that it is possible to use this setup but control it with something else than the TLC5940.
The Arduino outputs LOW to the Layers and the LEDs that light up get HIGH from their other pin (connected to the IC).
This would work with a 7HC595 (or two of them) what I intended to do first. But this solution is not able to do PWM (or not fast enough).

The problem I have is that the voltage drops if I disconnect the LED.
Logged

0
Offline Offline
Shannon Member
****
Karma: 216
Posts: 12556
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The TLC5940 _cannot_ drive common cathode LEDs, it is a current sink driver.  The 74HC595 has push-pull outputs so can source or sink.
Logged

[ I won't respond to messages, use the forum please ]

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 637
Posts: 34581
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The only way to get it to drive a common cathode display is to provide an eternal driver from the output of the TLC5940. However this needs to be a non inverting driver and you then need to limit the current in the output because you loose the constant current control of the TLC.
Logged

Offline Offline
Faraday Member
**
Karma: 30
Posts: 2504
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The TLC5940 _cannot_ drive common cathode LEDs, it is a current sink driver.  The 74HC595 has push-pull outputs so can source or sink.

so the 595 is push/pull? so it can drive an Anode AND Cathode RGB leds? (How?)
Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 150
Posts: 5666
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The TLC5940 _cannot_ drive common cathode LEDs, it is a current sink driver.  The 74HC595 has push-pull outputs so can source or sink.

so the 595 is push/pull? so it can drive an Anode AND Cathode RGB leds? (How?)

It's not constant current so using it to drive LEDs is a bad idea.
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Offline Offline
Jr. Member
**
Karma: 1
Posts: 85
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
It's not constant current so using it to drive LEDs is a bad idea.
What is constant current and why cant I use it to drive LEDs?
Since the TLC seems not to work with my LED cube, thats what I would do instead.
I made lots of prototypes with the 7HC595 with LEDs, which worked quite well (I even manged to do "fake PWM" through it).

Another idea is to put the LED cube LEDs directly to the Arduino, since it has 20 pins and the LED cube needs 16+4 pins. But this seems to me to be the least beautiful solution and it keeps me from using inputs such as a button or a remote control.
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 637
Posts: 34581
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The TLC5940 _cannot_ drive common cathode LEDs, it is a current sink driver.  The 74HC595 has push-pull outputs so can source or sink.

so the 595 is push/pull? so it can drive an Anode AND Cathode RGB leds? (How?)
To drive common anode LEDs connect the anode to the +ve an the cathodes to the chip's output. To drive common cathode LEDs connect the cathode to the ground and the anode to the chips output. In each case you need a seriese resistor.

You can use constant current to drive LEDs without a resistor, without constant current you need a resistor. A constant current driver is one that automatically adjusts the voltage coming out of it until a set current is reached.
You only have 40 mA max output from an arduino so don't connect it directly.
Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 85
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Will lighting 16 LEDs at a time with a 7HC595 damage the Arduino?
Because if it is limited to 40mA it could probably only take two LEDs (with 20mA each)?
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 637
Posts: 34581
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Will lighting 16 LEDs at a time with a 7HC595 damage the Arduino?
Because if it is limited to 40mA it could probably only take two LEDs (with 20mA each)?

The LEDs are not being powered from the arduino they are being powered from the 595.
Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 85
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I dont understand what the problem is. Will it damage the 595? Will it damage anything? Or should I just try it? Because the 595s are almost for free (0,25€)
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 637
Posts: 34581
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

How are you proposing to drive 16 LEDs from 8 outputs, series or parallel?
Logged

Offline Offline
Jr. Member
**
Karma: 1
Posts: 85
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I would use two 595s. They use one clock and one latch pin and two data pins and they will receive data simultaneously.
Logged

Pages: [1] 2   Go Up
Jump to: