Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Feedback on LED cube circuit sought

Status
Not open for further replies.

boylesg

Advanced Member level 4
Advanced Member level 4
Joined
Jul 15, 2012
Messages
1,023
Helped
5
Reputation
10
Reaction score
6
Trophy points
1,318
Location
Epping, Victoria, Australia
Activity points
11,697
I am toying with the idea of using this circuit to supply and control the columns of an RGB LED cube.

My idea behind the LM317 part of the circuit is to mitigate the voltage drops across the transistors, i.e. so I can adjust the voltage supplied to the common anodes of the RGB LEDs so that it is exactly 5V despite the transistors I am using the control the LEDs.

I can't supply 12V straight to the columns because that will prevent the TLC4950 channels from turning off the LEDs .

I can't use 5V because the transistor reduce the voltage at the RGB anodes to somewhat less than 5V.

I am intending to use an ATX power supply for the logic and LED supplies.

Any comments or suggested changes?

LEDCube.jpg
 

Hi,

a rather ineffective solution.
12V input for just 1.2V (or so, LED voltage) .. means you waste 9 times the energy that you give to the LEDs.

I´m confused about the LED driver type. In the text it is: TLC4950, in the schematic it is: TLC5950 .... but I assume none of them is correct.

Why don´t you use NPNs to to control the low side of the LEDs?

****
ATX power supply... are you sure this is suitable. The LEDs just consume less than 1W. ..If you design your circuit more effective then a small wall wart will do.


Klaus
 

As you have sufficient voltage headroom, it will be better to put several LEDs in series and reduce the waste of power.

LEDs are basically current devices and you can configure the LM317 as a const current cource but why a ATX power supply?
 

Sorry folks but I have had a failed attempt to modify that schematic I posted - I realised about 23 minutes after I posted it that it was incomplete. Some how it ended up as duplicate post and was deleted.

Here is the correct schematic:
LEDCube.jpg

  1. I am intending to use an ATX PSU to power it hence on 12V and 5V are available.
  2. MCP23017 that I am using to control the common anodes of the RGB leds is limited to about 15mA source or sink, so I must use a darlington transistor.
  3. TheRGB led cathod columns will be linked to TLC4950 channels but as these are limited to 120mA sink current I must use BC327 between the channels and the cathode columns.
The result is that, if I were to use 5V directly from the ATX the actual RGB LEDs would see 4V or less due the voltage drops across the transistors.

So my idea was to use the LM317lz in this schematic to drop the 12V down to around 7V to compensate for the voltage drops across the transistors.

Now apart from the fact that it is inefficient to waste 5V or so, are there any other issues that I have not thought of?

With the TIP120 the LM317lz can supply a peak of 8A, or perhaps a bit less?

I intend to supply 8 columns of 8 RGB LEDs from one of the above LM317 circuits. I have calculated that 8 columns of 8 RGB LEDs can draw a max of around 8A. So I would need 8 of those LM317 circuits to supply 64 columns of 8 RGB LEDs.

- - - Updated - - -

but why a ATX power supply?
Because I have a bunch of salvaged ATX PSU and I may as well make use of them I figure.

Even if I chose to use a LED power supply from ebay, I have not ever seen one that can supply 7V or so. They all seem limited to 5V, 9V, 12V, 24V,.........
 
Last edited:

Hi,

I´m confused. please clarify:

* I can´t find MCP23017 in your datasheet. So how is it related to your circuit, or should we just ignore it?
* "I must use a darlington transistor". Are you talking about the BC373 (this is the only darlington I see..)? It is rated for 1A only, but you calculated up to 8A of current.
* You talk about "TLC4950", I can´t find the datasheet, please post a link.
* in the schematic there is a "TLC5950", I can´t find the datasheet, please post a link.
* in the schematic there is a "MCP2007", I can´t find the datasheet, please post a link.
* "actual RGB LEDs would see 4V". What RGB LEDs are you using? Please post a link to the datasheet.
* "With the TIP120 the LM317lz can supply a peak of 8A". If you drop voltage from 12V down to 7V then there is a power dissipation of 5V x 8A = 40W. You need a fan and a big heatsink.
* "So I would need 8 of those LM317 circuits to supply 64 columns of 8 RGB LEDs.", If you need 8A for 8 columns you need 64A for 64 columns. multiplied with 12V this gives more than 750W of heat. This is in the range of a hairdryer. You may heat your room in winter with that application..

Klaus
 

Hi,

I´m confused. please clarify:

* I can´t find MCP23017 in your datasheet. So how is it related to your circuit, or should we just ignore it?
* "I must use a darlington transistor". Are you talking about the BC373 (this is the only darlington I see..)? It is rated for 1A only, but you calculated up to 8A of current.
* You talk about "TLC4950", I can´t find the datasheet, please post a link.
* in the schematic there is a "TLC5950", I can´t find the datasheet, please post a link.
* in the schematic there is a "MCP2007", I can´t find the datasheet, please post a link.
* "actual RGB LEDs would see 4V". What RGB LEDs are you using? Please post a link to the datasheet.
* "With the TIP120 the LM317lz can supply a peak of 8A". If you drop voltage from 12V down to 7V then there is a power dissipation of 5V x 8A = 40W. You need a fan and a big heatsink.
* "So I would need 8 of those LM317 circuits to supply 64 columns of 8 RGB LEDs.", If you need 8A for 8 columns you need 64A for 64 columns. multiplied with 12V this gives more than 750W of heat. This is in the range of a hairdryer. You may heat your room in winter with that application..

Klaus

Sorry but I am a bit dyslexic when it comes to those two components. They are meant to be MCP23017 and TLC5940 but I have mislabelled them as MCP2007 and TLC5950

- - - Updated - - -

Sorry but I am a bit dyslexic when it comes to those two components. They are meant to be MCP23017 and TLC5940 but I have mislabelled them as MCP2007 and TLC5950

And I don't have a datasheet for the RGB LEDs - got them from ebay. They are commonly available, e.g. these ones:**broken link removed**

I have just assumed the recommended resistor values (plus bit) for red, green and blue LEDs, powered with 5V) on the Jaycar website

100R for blue and green and 180R for red (and they are quite bright enough)
 

Hi,

And I don't have a datasheet for the RGB LEDs - got them from ebay. They are commonly available, e.g. these ones: **broken link removed** i

I have just assumed the recommended resistor values (plus bit) for red, green and blue LEDs, powered with 5V) on the Jaycar website

100R for blue and green and 180R for red (and they are quite bright enough)

The most important electrical values are : voltage and current. Both is given at that site.
* Forward Voltage: R: 1.8-2.2 G: 3.0-3.4 B: 3.0-3.4
* Electric Current: 20mA

--> There´s nothing to "assume". You can calculate it.
Additionally this means: With "4V" across the LED you will kill them.

Klaus

Added:
I have calculated that 8 columns of 8 RGB LEDs can draw a max of around 8A.
How do did you calculate?
 

Hi,



The most important electrical values are : voltage and current. Both is given at that site.
* Forward Voltage: R: 1.8-2.2 G: 3.0-3.4 B: 3.0-3.4
* Electric Current: 20mA

--> There´s nothing to "assume". You can calculate it.
Additionally this means: With "4V" across the LED you will kill them.

Klaus

Added:

How do did you calculate?

V=IR
I=5.0/100=50mA for blue and green
I=5.0/180=27mA for red

1 RGB led will consume about 127mA assuming all cathodes are GND'ed simultaneously.

64 (rgb leds in one row of columns) x 127mA = 1.016A

I am clearly not puting 4V or 5V across any RGB LED without an appropriate resistor on each cathode lead.

Those voltages on ebay are the same values that Jaycar quotes on their website for red, blue and green leds.
And for blue and green LEDS at 5V Jaycar specifies 80R for blue and green and 150R for red.
I have gone 100R for blue and green and 180 for red.
Is there a problem with this?
Does this help with getting your head around how I am constructing this.
RGBLEDCube2.jpgRGBLEDCube1.jpg

- - - Updated - - -

The first photo is not quite in focus but there are 1/8W resistors in the corners of those matrix board squares.....connecting the cathodes of the LEDs to those vertical wires.

- - - Updated - - -

Actually you can clearly see the blue resistors in the second photo of the single column.
 
Last edited:

Hi,
1 RGB led will consume about 127mA assuming all cathodes are GND'ed simultaneously.
This is the wrong way of calculation.

Each color in the LED must consume not more than 20mA. Thus the max current per complete LED device is 60mA. Don´t overload them. Don´t ever use 127mA or in that range.
Even if you pulse them you must never get more than 20mA average current per LED. Indeed you may pulse them maybe with 100mA, but then the duty cycle needs to be less than 20%.
I assume about 15..17% to get equal dissipated power.

I assume they calculated with total voltage of 5V = V_LED + V_R
Let´s try:
V_LED (red) = 2.0V--> V_R = 5V - 2V = 3V, 3V / 180R = 16,7mA
V_LED (green, blue) = 3.2V--> V_R = 5V - 3.2V = 1.8V, 1.8V / 100R = 18,0mA
Both values look reasonable

Klaus
 

Hi,

This is the wrong way of calculation.

Each color in the LED must consume not more than 20mA. Thus the max current per complete LED device is 60mA. Don´t overload them. Don´t ever use 127mA or in that range.
Even if you pulse them you must never get more than 20mA average current per LED. Indeed you may pulse them maybe with 100mA, but then the duty cycle needs to be less than 20%.
I assume about 15..17% to get equal dissipated power.

I assume they calculated with total voltage of 5V = V_LED + V_R
Let´s try:
V_LED (red) = 2.0V--> V_R = 5V - 2V = 3V, 3V / 180R = 16,7mA
V_LED (green, blue) = 3.2V--> V_R = 5V - 3.2V = 1.8V, 1.8V / 100R = 18,0mA
Both values look reasonable

Klaus

Oh!

I have used the correct resistors but used an incorrect calculation.

It doesn't really change what I need to do re the LM317s though.

It just means that my rows of 8 columns will consume 3-4A if all colors are on simultaneously.

This has been an ongoing problem with teaching myself electronics haphazardly through the internet - I am still filling in gaps in my understanding of things.
 

Hi,

TLC5940 datasheet says it includes LED current regulation.
If so, then you don´t need the resistors at all. Then I recommend to omit them.

Klaus
 

Hi,

TLC5940 datasheet says it includes LED current regulation.
If so, then you don´t need the resistors at all. Then I recommend to omit them.

Klaus

I am aware of that but, for coding simplicity, I want to be able to turn on all 8 RGBs in a column simultaneously.

The traditional way of constructing them, without resistors, means that you can only turn on 1 horizontal layer of RGBs at any given moment.

Otherwise uneven sharing of current in parallel LEDS...

That means that, to display any vertical structures, you must do so as a POV display....which makes the coding of animations more complicated....which I wanted to avoid.

The one restriction that remains in my scheme is that all RGBs in a column must be same color because all of their cathodes are connected to the same TLC5940 channels.

Although I still have the option of POV coding techniques to make each RGB in a column a different color at any given human vision moment.
 
Last edited:

an ongoing problem with teaching myself electronics haphazardly through the internet - I am still filling in gaps in my understanding of things.

I'm like you more or less. I really recopmmend you start reading application notes, design notes, copy reference designs wheere needed - TI, Analog, Microchip, OnSemi, blablabla provide so much information and working designs and free design tools it's foolish to drift around other places on the Ingternet unless really the only option for some reason. Give it a go, you save loads of frustrating time and learn a lot more and faster.

I hope you plan to use at least a 50% duty cycle there so as to nearly half the current consumption. I personally feel that a 10% on/90% off duty cycle at a ...not sure how fast, can't remember good example frequency now, and it doesn't have to be that fast, by memory even maybe 1kHz and the eye won't notice at all. That's down from 4Ato 400mA + ideally trivial switching circuitry requirements - a clock signal to tap into and a few MOSFETs!

Why do you use BJTs so much in designs that really are quantatively and qualitatively better with MOSFETS? It seems wasteful, besides archaic - a good circuit is designed by a Scrooge-like mind "You want how many milliamps?!!! No, no no, I can't afford that."
 

Why do you use BJTs so much in designs that really are quantatively and qualitatively better with MOSFETS? It seems wasteful, besides archaic - a good circuit is designed by a Scrooge-like mind "You want how many milliamps?!!! No, no no, I can't afford that."

Simply because they are nearly always cheaper and more readily available than FETs.

For example I am trying to keep to TO92 packages to keep board real estate to a minimum.

But try and find a 1-2A logic FET in a TO92 package - they don't exist as far as I can see.
 

Otherwise uneven sharing of current in parallel LEDS...

You are trying to use a const current source/ sink as a logic to turn on a transistor? That may be or may not be a good idea.

The you have 24 LEDs in three groups. Each group has 8 leds and the intensity depends on the current. You are using three channels of the controller as logic signal.

Each LED needs 20mA and 24 LED (if lit simultaneously) will consume 480mA; at 12V you will dissipate 6W. Out of this the LEDs will dissipate 1W (approx).

My suggestion: use the const curr feature of the IC and use 2 or 3 or 4 leds (I suggest 2 each) in series and more channels to control the lights. You will get more flexibility in the software.
 

Hi,

For example I am trying to keep to TO92 packages to keep board real estate to a minimum.
But try and find a 1-2A logic FET in a TO92 package - they don't exist as far as I can see.

Sadly you refuse to accept the warnings about dissipated power.
--> No way to use a TO-92 case bjt for your application.....because of the dissipated power.
You need BJTs that have to be screwed to a heatsink.

In best case a single TO-92 case can dissipate 0.5W of power...free standing in 25°C air.
But the combinalion of a lot of these BJTs, each with maybe 2W of dissipated power, will make your complete PCB hot enough that the solder melts.

Without heatsink and without fan you risk fire. Don't burn down your house.

Klaus
 

You are trying to use a const current source/ sink as a logic to turn on a transistor? That may be or may not be a good idea.

The you have 24 LEDs in three groups. Each group has 8 leds and the intensity depends on the current. You are using three channels of the controller as logic signal.

Each LED needs 20mA and 24 LED (if lit simultaneously) will consume 480mA; at 12V you will dissipate 6W. Out of this the LEDs will dissipate 1W (approx).

My suggestion: use the const curr feature of the IC and use 2 or 3 or 4 leds (I suggest 2 each) in series and more channels to control the lights. You will get more flexibility in the software.

Not really. I have looked but I cannot find any of those LED power supplies on ebay with an adjustable voltage. They all seem to be fixed voltage (5V, 12V, 18V, 24V) with 10% or so adjustment.

The LM317 in this schematic is simply an inexpensive way of supplying my construct with enough voltage such that the actual RGB LEDs see 5V despite the transistors dropping some of the voltage.

And it means I can power the whole lot with a salvaged ATX power supply - just drop the 12V down to what I need at about 7V.

- - - Updated - - -

Hi,



Sadly you refuse to accept the warnings about dissipated power.
--> No way to use a TO-92 case bjt for your application.....because of the dissipated power.
You need BJTs that have to be screwed to a heatsink.

In best case a single TO-92 case can dissipate 0.5W of power...free standing in 25°C air.
But the combinalion of a lot of these BJTs, each with maybe 2W of dissipated power, will make your complete PCB hot enough that the solder melts.

Without heatsink and without fan you risk fire. Don't burn down your house.

Klaus

According to your correction of the way I was calculating the LED current, to supply 8 x RGB LEDs with all colors turned on I would need to supply around 400mA from each BC516.

In fact I could swap those in my schematic for BC337.

There will be 64 BC337s each supplying a max of about 400mA to 8 x RGB LEDs - no risk of fire there.

The only place I will need a heat sink is on the TIP120s (high current LM317)

Let's say they can deliver 5A max. 5A / 0.4 = 12.5 = 12

So one high current LM317 can supply 12 groups of 8 x RGB LEDs with all colors turned on simultaneously.

Have I made any errors here?
 

Hi,

Have I made any errors here?
Yes. You only talk about current.

Multiply the 5A with 12V and get 60W. 60W of heat.
It doesn´t matter which control scheme you use, if you draw 5A average current from the 12V supply it will cause 60W of heat in your application.
Additionally the power dissipation of the power supply itself.

This is just for 12 columns. But in post#4 you talk about "to supply 64 columns of 8 RGB LEDs."
Then you get 26A. ... more than 300W of heat.
Mind: My soldering iron is able to generate 25W of heat peak.

***
Transistor.
A TO-92 case has about 200°C/W of R_th_ja.
Let´s assume you have a single transistor in free 25°C air. (best case assumtion)
Max junction temperature is 150°C.... this means max. allowed power dissipation is: 0.625W.
With a current of 400mA -- the max allowed voltage across CE is less than 1.6V.
With your application you simply can´t guarantee this.
Not the voltage, not the free airflow, not the 25°C ambient temperature... and thus not the 150°C.

For sure you are free to ignore all this.
My recommendation: Buy a fire extinguisher.

Klaus
 

Not really. I have looked but I cannot find any of those LED power supplies on ebay with an adjustable voltage...

If I understand correctly, your TLC5940 can take LED voltage upto 17V and can regulate current from 5mA to 130mA. And you have 16 such currents. And the currents can be set by a single resistor...

The LM317 in this schematic is simply an inexpensive way of supplying my construct with enough voltage such that the actual RGB LEDs see 5V despite the transistors dropping some of the voltage..

You do not need the regulator but you will need a microcontroller to program the driver...

Anyway, the LM317 will need a heatsink...

ATX does have 12V regulated output (as well as 5V);

Just use a bigger (and heftier) dropping resistors with the LED and run them off the 12V. Anyway, you will dissipate the same heat but resistors can take abuses better.

It gets better if you use LED pairs in series. Less wastage of heat (not really but so what...)
 

If I understand correctly, your TLC5940 can take LED voltage upto 17V and can regulate current from 5mA to 130mA. And you have 16 such currents. And the currents can be set by a single resistor...



You do not need the regulator but you will need a microcontroller to program the driver...

Anyway, the LM317 will need a heatsink...

ATX does have 12V regulated output (as well as 5V);

Just use a bigger (and heftier) dropping resistors with the LED and run them off the 12V. Anyway, you will dissipate the same heat but resistors can take abuses better.

It gets better if you use LED pairs in series. Less wastage of heat (not really but so what...)

It is impractical to model the entire schematic in multisim and capture it all in one screen shot. So I have only done a representation of the primary building block of the cube. And yes the MCP23017s and TLC4950s will be driven by an arduino.

The LM317 from 12V is simply to compensate for the voltage drops of the transistors - the resistors on the LEDs were calculated for 5V. I guess I could have calculated the resistor values for 4V or whatever, and powered the building block from 5V, but I didn't think of it before I purchased the resistors.

The addition of the LM317s is not that much of a hindrance anyway.

And I have experimented with TLC4950 on my bread board. If you apply 12V to a single led attached to one of the channels then the TLC4590 can't completely shut off the LED. It's logic circuit runs of 5V and can only apply 5V to the channels. Same principal as trying to turn off a PNP transistor with the voltage applied to the base less that the voltage applied to the emitter.

Apparently the purpose for the channels being able to take 17V is to accommodate strings of LEDs in series on one channel, where as I have 8 LEDs in parallel with individual resistors.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top