TLC5940 with PNP transistors

Hey ,

I’m looking for some guidance on approaching TLC5940 with PNP transistors. To give background on this project I would like to get my DIY ambilight. I decided to use ardiuno with TLC5940 however from the information I have gathered I presume I would need to use PNP transistors as I will need to sink more than 170 mA per channel.

I got my first version of schematic. I have placed pull up resistors to avoid “floating”

Will this work ?

Will this work ?

No.

  1. No resistors in series with the LEDs.
  2. No Iref resistor on the TLC chip
  3. No current limiting on the transistor's base
  4. The base can only go up to 5V which is not enough to turn a PNP transistor off who's emitter is up at 12V

Hey ,

Thanks for the reply ! I think I would need to share more detailed information regarding this project. Idea is that I have RGB led stripes with common anode (so that all 3 channels share 12V). As far as I understand this is important here as TLC5940 is current sink.

AD 1. I have not placed resitors in series as they are build in into LED stripes
AD 2. This I have to calculate still
AD 3. Then I will connect resistor between TLC output and base of PNP transistor and remove Pull up ?
AD 4. In this one I would probably would need some guidance ... As I looked at the following (but might have not understood completly :frowning: )

The reason for that is I would like to have PC connected to arduino which is communicating with TLC connected with RGB leds.

The approach I would like to take is briefly described doku.php:tutorials:extending_pwm_output_pins_with_a_texas_instruments_tlc5940_led_driver [SensorWiki.org] and the most interesting part says :

An Arduino microcontroller is limited in its output current to 40 mA, while it should probably not be driven at maximum. Overall, you should not draw more than 200 mA current from the Arduino as that is the processor chip package current.
If you need to drive high power consuming devices, you should design a control circuit and a work circuit. The control circuit, which is driven with a low current, will tell the work current when to let current flow to your connected devices. This is accomplished through the use of transistors. For every output pin that you want to control separately, you'll need a PNP transistor.

So in my case the control circuit would be 5V arduino and TLC and 12 V TLC and RGB LEDs .... Question is that control/work design is possible ?

To turn off the transistor, the base has to go up to 12V.

There's no way to do that without adding a second transistor, but that inverts the signal and it gets messy.

Why do you need 170mA? The point of ambilights is that all the LEDs can be a different color.

Why not just use a programmable LED strip?

Hey ,

The whole point of this exercise is learning curve :smiley: I have approximately 12 LED stripes that max go to 170 ~ 180 ma .

Each of the led stripe we can call a "zone". I have written a C# app that takes probes of 12 different edge parts of screen and makes average RGB of it and then sends it to arduino.

Considering that TLC5940 Data sheet says :

V(OUT0) to V(OUT15) | 0.3V to 18V

could I then pull up the output of TLC to 12V (instead of 5 on my schematic) of my LED supply and have TLC and arduino VCC connected to 5V ?
That would get base to open and close right ?

rpieniaz:
could I then pull up the output of TLC to 12V (instead of 5 on my schematic) of my LED supply and have TLC and arduino VCC connected to 5V ?
That would get base to open and close right ?

In theory, yes.

In practice your transistor probably has a maximum Veb which is less than -12V. You'll kill the transistor if you connect the emitter to 12V and the base to GND. You'll need to use a voltage divider instead of a pullup.

If you plan to use the BC556 like you had in the original diagram note that the maximum current for that transistor is 100mA and the maximum emitter / base voltage -5V. That means the base can not be more that 5V lower than the emitter.

Is there anything you would suggest for me to achieve this project ? Should I change the approach from PNP to somethign different ? Or change components used ?

You just need a better PNP transistor and a potential divider on the base.

Probably one of last questions in this thread :slight_smile: Is there a PNP that you would recommend to use here ?

There are lots and lots. A BC807 would do. It has 500mA max current.

If you can guarantee the 12 power supply is not powering the Arduino the the attached circuit can be used.
Just remove the relay portion and replace it with your resistor/LED.

Hey,

Unfortunately I wanted to power on arduino from the same 12 V source :frowning:

But thanks for the circuit - I might get to used it next time :smiley:

I think you want to follow this document:

Hey ,

I think I "googled" all links with key words "tlc5940", "mosfet" and "transistor in different combinations" :wink:

Thanks for the link I have seen it. Following that logic I think I will give a try and use solution posted here

I think that should work :slight_smile:

The problem with that circuit is that the LEDs are inverted, on for off. So the maximum brightness is got by feeding the chip with zero. That might not sound so bad but the chip never actually reaches 100% full brightness in normal operation it has one clock cycle missing. You do not notice this in practice. However if you invert the sense of the LEDs this means that you can never turn the LEDs fully off, they will always be dimly lit. If that is acceptable then it will work for you.

Hey Mike ,

Thanks for heads up - I think for ambilight behnd TV and first DIY it can be "acceptable". I think down the road as my knowledge in electronics hopefully gets better I would be able to resolve this.

Question I would have : This is inverted because of using N channel right ?

Question 2 : Would be using P channel would be more appropriate ?

Question I would have : This is inverted because of using N channel right ?

Yes

Question 2 : Would be using P channel would be more appropriate ?

Yes

Hey ,

I have created a quick schematic of a circuit that i tested with online circuit simulator. Below is the P channel mosfet with pull up.

So common anode RGB stripe connected to 12V and then each R,G,B connected via p-channel mosfet.

question is if this circuit will work as it should :smiley: by design… or I should look to make further changes

WithPChannelMosFet.JPG

The LED is in the wrong place it should be between the drain and ground.