Pages: [1]   Go Down
Author Topic: Driving RGB LED-Strips with TLC5940 and the power of MOSFET?  (Read 2983 times)
0 Members and 1 Guest are viewing this topic.
Germany
Offline Offline
Jr. Member
**
Karma: 0
Posts: 95
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello!

I am planning to light some RGB LED-Strips with a TLC5940 and a MOSFET, because the strips are rated with 12V (3 LEDs in series with a resistor).

Is the circuit in the attachment ok for this? The thing I am not sure about is if there must be a pull-up or down resistor on the Gate... Is there an additional current limiting transistor needed for the Gate or is this done by the TLC?


And would it be OK if I use a IRLIZ 34N? I know they are a bit overkill but I can get some from a friend, so I would not have to buy them...


* tlc5940+mosfet.jpg (16.62 KB, 352x480 - viewed 177 times.)
Logged

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

If you do this there's a problem that you will never be able to turn off the LED compleatly.
This is because you invert the signal and the chip never fully turns in the LED.
Logged

Germany
Offline Offline
Jr. Member
**
Karma: 0
Posts: 95
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is this caused by the TLC having one always-off-cycle?
Are there ways to bypass this?
Logged

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

Yes it is.
The only way round it is not to invert the signal, so driving with a p-channel FET would work.
Logged

Germany
Offline Offline
Jr. Member
**
Karma: 0
Posts: 95
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Damn, thought I could save some money, these MOSFETS get kind of expensive because I have to order them as I don't know where to buy such stuff here...
Do you think one could see this small cycle where the LEDs are not completely lit?

And do you have a type of logic-level P-Channel MOSFET? I'm not really into this topic and feel kind of lost in the huge amount of MOSFETS...
Logged

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

Quote
Do you think one could see this small cycle where the LEDs are not completely lit?
Yes others have complained about seeing it.

You can use logic level FETs if you want but the chip is capable of running off a 12V supply so you can use other FETs if you want. From Germany you can use Farnell these FETs are less than a Euro each.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 58
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What are you using the FETs for? Are they common Anode? How long is each strip?
The TLC can sink 120mA per pin and the power dissipation on the 12v LED strips should be reasonable as they've already got resistors in the strip. The LED strips are usually about 20mA per 5cm section so you could push approx 30cm if you're keeping the chip cool enough.
You could separate the strip into more segments and use more pins if required.
Logged

Mainz
Offline Offline
Newbie
*
Karma: 0
Posts: 48
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

if you use a FET you also loose the current sink capability of the TLC5940. So the dimming isn't nice anymore.
 But if you only want to switch on and off, it doesn't matter.

Regards
Logged

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

Quote
if you use a FET you also loose the current sink capability of the TLC5940.
Yes

Quote
So the dimming isn't nice anymore.
No that makes no sense at all, the dimming is controlled by the PWM signal not by the current control.
Logged

Germany
Offline Offline
Jr. Member
**
Karma: 0
Posts: 95
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry for the delay but I had a lot to do for university.

The LED strips are common anode so I might drive them directly from the TLC but my strip has a length of 2m, I think this would kill it...

And yes, I know that I would lose the current sink but I just did not find a PWM controller without current sink. Does such thing even exist?
I already tried the ShiftPWM library with a 595 shift register but it did not work very good here.

I know that if I only connect one strip I could easily use the built in PWM pins but I want the project to be expandable.
Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 58
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You could try using 8 pins of a TLC5940 in parallel to drive each colour. This would (potentially) give you the 800mA you'd need for a 2m strip and should be within the tolerances of of the TLC. I don't know how reliable this is though
Logged

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

Quote
I already tried the ShiftPWM library with a 595 shift register but it did not work very good here.
Why was it a lack of decoupling capacitors?
Logged

Germany
Offline Offline
Jr. Member
**
Karma: 0
Posts: 95
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hmm no I had no decoupling capacitor. I had it on a breadboard and left it out. It should go between GND and VCC pins, right?
I will try it out later. Thanks for your help!



Edit: ShiftPWM works good now, I think I am going to stay with that.
But the output seems kind of flickering to me, even with 100Hz. Maybe it's too high for the Arduino and it is missing some interrupts (Which I think should not be the case, as the lib returns a load of 25% for the interrupts...) or I am hallucinating smiley-wink
Hopefully the guy in the laboratory allows me to use one of the logic analyzers so I can check this smiley-wink
« Last Edit: January 25, 2012, 12:33:10 pm by And1G » Logged

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

Glad decoupling sorted it, for the theory of why see:-
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html
Logged

Pages: [1]   Go Up
Jump to: