Controlling a 7 Amp LED strip with a TLC5947?

It's a BJT so I thought there is no use for a pull-up resistor on the base.

Come to think of it, the spec sheet mentioned a current leak of 0.1 µA, so at a 100x gain that would produce some 10 µA current leakage in that transistor. That won't affect the MOSFET gate, a 10k or 1k resistor will keep it firmly off.

wvmarle:
It's a BJT so I thought there is no use for a pull-up resistor on the base.

No, not really - force of habit I suppose; if tracking could add a few pF and you want it fast then slapping a pull-up in there doesn't hurt. More so with the MOSFET, you want that to turn off reasonably quick.

Looks like the PWM cycles at ~ 1KHz, and it only has to switch a few amps, so it doesn't have to be blindingly fast.

Yours,
TonyWilk

MOSFETs always need a pull-up or pull-down but that's just to not keep the pin from floating.
The fun of BJTs is that you can happily leave the base float. No current so no conduction.

wvmarle:
MOSFETs always need a pull-up or pull-down but that's just to not keep the pin from floating.
The fun of BJTs is that you can happily leave the base float. No current so no conduction.

Ooh no.

MOSFETs do have extremely high gate 'resistance' so you can turn them on or off with a high value (100k+) pull-up or pull-down, they will even turn on and off if you look at 'em a bit funny from across the room :slight_smile:

However, they do have quite a high gate 'capacitance'. To turn them on and off quickly, you have to charge or discharge that 'capacitance' - which means current, which means a low resistance. (look for 'input' and 'reverse transfer' capacitance in a MOSFET datasheet)

If you try to turn a MOSFET on with a high resistance pull-up, it turns on slowly, acts like a resistor and if you have a high current load you'll end up with a fried MOSFET.

The actual details are a bit more complicated, Google: "MOSFET gate charge"

BJT's are not so much of a problem, but you still have to consider capacitance ('parasitic' or 'stray' capacitance). Leaving a base waggling about in free air is bad practice. Using a PNP transistor as a 'high side switch' is particularly susceptible if the base drive is weak (high impedance) and, for example, a high current load causes supply rail noise - imagine the emitter moving with the rail and the base 'held by onboard capacitance'.

Yours,
TonyWilk

here's the behavior of the LED strip. I tried again on the breadboard with am mosfet alone and then tried to drive it with a transistor. Same Effect.

Actually. How about I just convert the PWM of the LED driver to 0 - 5v range output. I've seen some circuits out there that do this.

EDIT: Actually nevermind... PWM IS how you drive the LED brightness. Gang it.
It looks like I need a different mosfet....

Hi,
Can you show us it with slow zero and then 100% duty cycle at say 5Sec On, 5Sec Off please.

Its hard with video to see the zero % glow.

Its hard to image that 1 pulse in 65536 4096 would be noticeable.

Thanks .. Tom.. :slight_smile:

TobiasRipper:
https://www.youtube.com/watch?v=ncwt2s6kUsU&feature=youtu.be

What exact circuit(s) did you try there ?
and what was driving them (just fixed PWM, a ramp, some effect) ?

Yours,
TonyWilk

I'm not in the shop at the moment but I can tell you now that I was not running any complex color ramping or patterns it was just a simple ON for 200ms, off for 400ms (for testing purposes I was just using one color of the led strip). You can see it in the video when the leds are at full brightness, you can tell, but when it's supposed to be off, you can see those little blinks. At that point the Duty Cycle if at 0 and the blinks are not supposed to happen.

Hi,
Okay, well that in my opinion is not due to the little pulse left when at zero duty, it is too slow and too bright.

Can you post your code please?

Also write some simple code that only has the command to send zero duty to the 5947.
Don't put any thing else in it, make fresh bit of code.
Then add 100% in a 5sec On/ 5Sec Off sequence.

Thanks.. Tom... :slight_smile:

TobiasRipper:
but when it’s supposed to be off, you can see those little blinks. At that point the Duty Cycle if at 0 and the blinks are not supposed to happen.

I guess in real life you just see a little blick on all the LEDs.
In the video it looks like different strips are being lit (which can’t be true if they are all wired together), so the blink must be very short.

Just thinking of things to check…

When you had some version of the transistor+MOSFET, did it look like the ON was for 400mS and the OFF for 200mS ? (in other words… did it invert ?)

One transistor cct. used an NPN, the other a PNP… right transistor ?

Yours,
TonyWilk

TomGeorge:
Okay, well that in my opinion is not due to the little pulse left when at zero duty, it is too slow and too bright.

Yeh, it's faster than a video frame, but one pulse would only be 0.25 uS - it can't be that short, unless the MOSFET's not turning off quick.

Checking out the code's a good idea.

Yours,
TonyWilk

Hi,
The output pulse that is output at zero % is;

(1 / 4096) x 100 = 0.0244140625 %

A single pulse will be;

4Mhz = 0.00000025 seconds long

And is repeated every;

4096 x 0.00000025 = 0.001024 seconds

Which equals 976.5625 Hz.

Your video shows the flashes at zero % as about 2Hz.

Tom.. :slight_smile:

It's ON 200ms and OFF for 400ms, I've taken care of the inversion in code. It's really the OFF state that bothers me. All strips are indeed wires together so they ALL light up at once. I'll have to do a better video once I'm back in the shop.

To be honest though, I did not have this issue with using Arduino's Straight PWM Pins. I think it' has something to do with the way I'm trying to set up this Resistor to Base - Path of Lowerst Resistance type of deal to control the mosfet. It's just this time when instead of a PWM 0 - 5v Pin I"m dealing with a Ground sink pin instead with this TLC driver.

If anything I can simply switch to using an STM32 instead of the arduino as it has way more PWM pins to work with. (but it's 3.5v)

Post your code and circuit diagrams of how you set up both experiments.

A PWM value of 0 (as presented to the chip) should switch off the output completely (high impedance state). No flashes.
A PWM value of FFF (4096 - as presented to the chip) should switch on the output almost completely (so sinking current); one in 4096 cycles it is off.

As you're inverting in both software and hardware this is getting confusing, fast.

Hi,
Have you got the gnd of your controller connected to the gnd of the 5947.

We rally need your code and a complete circuit diagram.

Thanks.. Tom.. :slight_smile:

TobiasRipper: Duty Cycle if at 0 and the blinks are not supposed to happen.
TomGeorge: not due to the little pulse left when at zero duty, it is too slow and too bright.
wvmarle: As you're inverting in both software and hardware this is getting confusing, fast.

Ok: if you can see it as a 'blink' it isn't the zero duty thing.

Back to just using the MOSFET you should get:

PWM Value:   Output     Output Level      LEDS
  000        100% Off   Pulled HIGH     100% ON
  FFF       99.98% On   Driven Low     mostly off
            0.02% Off   0.02% High     v.dim if anything (BUT NOT A BLINK)

However, looking again at the datasheet Figure 22. Grayscale Data Write Operation it shows XLAT causing all outputs to go OFF for the remainder of a PWM cycle with (1) GS data = FFFh.

So if you write FFF and then just delay(2000) the most you should see is very dimly lit LEDS
(due to tiny pulse at, as Tom said: 976.5625 Hz) - BUT NO BLINK.

But every time you re-write FFF it looks like you'll get a random 0 to 1mS Blip on the LEDS.

Successfully inverting the output with a transistor will make PWM value 000 = 100% OFF

Yours,
TonyWilk

Hi, my apologies for a long reply time. It took me a while to get back to the shop as it’s located in the garage and the past few weeks have been really cold (to the point that not even my propane heater could keep me warm)

So here’s a proper video explaining the circuit:

Now one of the things I tried to do is use a some sort of 0.1uF decoupling capacitor. At this point I’m just throwing random ideas at the wall and seeing what sticks. The cap got rid of the blinking but it also got rid of PWM (understandably) so I can try to play around with different capacitor values for this.

A capacitor is not the solution here.

You really have to try and figure out what causes this flash in the first place, as only then you can come with a proper solution. Lots of info above already.

It seems to be related to writing 0xFFF to the chip. Experiment with that - just write that value at different intervals, and see what happens to the blink. Does it follow the write frequency?
Then that's what's causing the problem, and the most likely solution would be to modify your code to only write something to the chip when there's a change.