Arduino/TLC5940/LED multiplexing experiment

void loop()
{

  Tlc.set(0, 4095);
  Tlc.set(1, 4095);
  Tlc.update();
}

This works quite well so far - saturate the second transistor and control the current through the LED with the first transistor.

But to multiplex a full 8 x 8 RGB LED cube I will need some heftier transistors for the vertical RGB LED cube slices than BC327.

So far so good any how.

BC327 is good for 500mA?
http://www.digikey.com/product-search/en/discrete-semiconductor-products/transistors-bjt-single/1376376?k=BC327
16 LEDs at 20mA only need 320mA. Might be okay.
Or did you mean the left hand transistor to control 24 LEDs, 8 each of red/green/blue across multiple TLC5940s? In which case I would agree it's not correct for the task.

CrossRoads:
BC327 is good for 500mA?
http://www.digikey.com/product-search/en/discrete-semiconductor-products/transistors-bjt-single/1376376?k=BC327
16 LEDs at 20mA only need 320mA. Might be okay.
Or did you mean the left hand transistor to control 24 LEDs, 8 each of red/green/blue across multiple TLC5940s? In which case I would agree it's not correct for the task.

8 x 8 RGB LED cube - all the red leds in one vertical slice will be electrically joined

8 x 8 = 64 LEDs at say 15mA each = 960mA.

I was going to go for 3A transistors to make sure.

Actually I wont be able to use BC327 because I will not be able to generate enough drive current for more than one LED at 5V LED supply.

Even if I increase the LED supply to 10V the maximum drive current I can generate is about 37mA which ends up apply about 9V to the TLC5940 sink pins. Which, from what I have read, means I will probably run into excessive power dissipation by the TLC5940 with a full LED cube.

I think I will have to try BC516 - darlington PNP.

According to my calculations I should be able to get something like 400mA drive current with just 0.016mA base current sinking to the TCL5940 pins at 5V LED supply.

I will purchase 5 of them and do a bit of test.

Try logic level, low Rds, P-channel MOSFET instead. Only need voltage to switch them on/off instead of large amounts of current.

CrossRoads:
Try logic level, low Rds, P-channel MOSFET instead. Only need voltage to switch them on/off instead of large amounts of current.

I just had a look in RS Electronics and ebay and all the appropriate voltage/current rated ones are surface mount, which is rather inconvenient for my purposes.

Might have a better choice if I could use N channel FETs but there is no chance of that huh!

It looks as though I will have to stick with through hole darlington transistors.

"RS Electronics" So you're in the UK or Europe then?
Did you try Farnell?

CrossRoads:
"RS Electronics" So you're in the UK or Europe then?
Did you try Farnell?

Australia actually.

Well, Farnell is global.

Any of these?
Australia: Little Bird Electronics, Toys Down Under, RobotGear, Australian Robotics, ProtoGEAR, Squarebit, Bilby CNC, Gorillabuilderz, The Life Automatic, Ocean Controls, Electron Hobbies, Sedonia Technologies, Grifby, Core Electronics

Links here, may or may not be good

You can easly use surface mount chips on 0.1" strip board, see
http://www.thebox.myzen.co.uk/Hardware/Mini_Monome.html

CrossRoads:
Well, Farnell is global.

Any of these?
Australia: Little Bird Electronics, Toys Down Under, RobotGear, Australian Robotics, ProtoGEAR, Squarebit, Bilby CNC, Gorillabuilderz, The Life Automatic, Ocean Controls, Electron Hobbies, Sedonia Technologies, Grifby, Core Electronics

Links here, may or may not be good
Distributors — Arduino Official Store

I looked in Farnell and also noticed this.....

The PNP FETs rated at around 2A also often have a voltage rating of 80V or more making them more expensive, combined with the surface mounting issue.

I still reckon the PNP darlingtons are going to be my best option in this instance.

In the end it amounts to pretty much the same thing as your logic level FETs doesn't it? Low switching current in return for high drive current.

Grumpy_Mike:
You can easly use surface mount chips on 0.1" strip board, see
http://www.thebox.myzen.co.uk/Hardware/Mini_Monome.html

Looks like a bit of a pain in the ar$e I reckon! Compared to just sticking some leads through the holes.

It seems to me that the options available for PNP transistors are wider than they are for PNP FETs

Looks like a bit of a pain in the ar$e I reckon!

Well once you get use to it you might find you actually prefer it. Surface mount allow you to make things much smaller and the components are so much cheaper. And as you said there is much more choice.

are for PNP FETs

No such thing.
I am sure you mean a P-channel FET.

Grumpy_Mike:

Looks like a bit of a pain in the ar$e I reckon!

Well once you get use to it you might find you actually prefer it.
Surface mount allow you to make things much smaller and the components are so much cheaper. And as you said there is much more choice.

Making my circuits smaller is not really an option with the soldering iron I currently have. I would have to have a much finer tip than I currently have.

You would probably be horrified with some of the circuits I have done earlier on. I made no attempt to make them small but rather the components were spaced well apart so that I can more easily detect soldering errors and fix them.

I have started using the matrix boards a little more efficiently, space wise, as my confidence has grown but still.......

Grumpy_Mike:

are for PNP FETs

No such thing.
I am sure you mean a P-channel FET.

Excuse my mangling of electronic terminology.

I tried replacing the two BC327 transistors with BC558 ones and got a little improvement on drive current at 5V.

Then I tried using the BC558 to make darlington pairs with some 2SA1837. I got a further slight improvement in driver current at 5V.

But then I increased the LED supply voltage to 10-11V and got a massive improvement in drive current judging by the alarming colour that my green LED took on briefly. That was at a grey scale value of about 200 on the TLC5940 channel that was driving one of the darlington pairs.

I checked the TLC5940 power dissipation calculation for 12V and I should be OK with only 1mA or so current sinking into each channel.

Have you got some form of current limiting on the LEDs?
If you are just using the TLC5940 to trigger a transistor then you have nothing limiting the current.

Grumpy_Mike:
Have you got some form of current limiting on the LEDs?
If you are just using the TLC5940 to trigger a transistor then you have nothing limiting the current.

I have not got as far as setting up the whole cube yet. All I have done thus far is to confirm the idea of controlling multiple LEDs per channel via PNP transistors.

But I had wondered about current limiting resistors on the transistors controlling the vertical LED slices. 8 x 8 = 64 LEDs per slice x 15mA = 960mA. So I could put a 12R (for 12V LED supply) resistor on each emitter to make sure the total current passing through all the LEDs in a slice can never exceed 1A.

At least with 1 LED controlled by 2 transistors and 2 TLC5940 channels, I can control the current going through that LED via the PWM in the TLC5940 channels.

So if I instead have 4 LEDs, each in series with a transistor on its cathode to GND, and with all their anodes controlled by a single transistor then I can increase the PWM value for the this transistor's base and thus progressively increase the current supply for 2, 3 and 4 LEDs on at the same time with the same brightness. This is pretty much how I envisaged controlling my LED cube.

I have purchased a small number of the transistors I was intending to use so that I can conduct the above experiment and further confirm that the concept is sound.

I can't put an individual resistor on each RGB LED leg because they are soldered into columns and then joined as colour slices.

It will be a matter of programming the changing PWM values on each channel such that any particular LED does not get more than 15mA or so in any animation sequence.

I was intending, at some point, to build a full slice and then start working on the programming and testing it before I put together the whole LED cube.

So as to void having a very difficult task of replacing damaged RGB LEDs in the middle of the cube.

My RGB LED columns are like this except that the LEDs are not rotated relative to each other:

My LED cube will end up looking something like this:

3 of the vertical wires in each column will be either red, blue or green and I will wire these together in colour slices from front to back and each slice will be controlled by a 2A darlington. These wires will also serve to re-enforce the columns a bit.

The last vertical wire in each column is coated with epoxy so that there is no electrical connection between the RGB LED anodes.

I will then solder another length of wire to the common anode leads of the LEDs from left to right on each level - there will be 64 of these in total and each will be connected to a 1A darlington - 8 RGBs x 3LEDs = 24 LEDs x 15mA = 480mA maximum . I can either connect these directly to the TLC5940 channels to keep things simple but use more TLC5940s or else further multiplex them with more transistors and use less TLC5940s. I am not decided yet but I am perhaps leaning towards keeping things simple as possible.

This scheme is going to reduce the brightness range for each individual LED. For example with this initial experiment I can only use a maximum PWM value of about 200 or something before the current through the LED exceeds the usual 20mA or so. But even 0 - 200 still seems to give me reasonable control of the LED brightness. With 2 leds I will use a PWM value of 400, for full brightness of the 2 LEDs, and so on.

At least with 1 LED controlled by 2 transistors and 2 TLC5940 channels, I can control the current going through that LED via the PWM in the TLC5940 channels.

I think you do not understand LEDs
PWM will not control the current. It only affects the average voltage. These is no control over peak current.

A 12R resistor will not acheave very much.
LEDs in parallel do not shair current evenly.

You need to concentrate first on your schematic befor you consider the mechanical construction.

see:-
http://www.thebox.myzen.co.uk/Tutorial/LEDs.html

"alarming colour" - as in going super nova on you 8) ?