Go Down

### Topic: WS2801 with high current LED (Read 6126 times)previous topic - next topic

#### KirAsh4

##### May 06, 2012, 09:38 pm
All this talk about high current LEDs ... time for me to add another twist.  Many of us use the WS2801 for driving RGB LEDs that don't require more then 20mA per channel.  It works great as each channel on the WS2801 can provide up to 50mA in constant current, or up to 100mA in constant voltage, though I haven't seen anyone do that yet.

One of the lesser known configurations is the ability to drive high current LEDs with an external switch, like this:

The part I'm having trouble with is understanding the various formulas that go with that.  This is what the datasheet says:

For one, what is ß (Beta)?

If I'm putting 3 LEDs in series, each with a voltage drop of 3.4, forward current of 140mA, and a 12V supply (as opposed to the 24V in that figure), I calculate a current limiting resistor value of 12.86 Ohm, or a more standard value of 15 Ohm.

How do I work that in here?  How do I figure out what the current on the base and collector is?  The value of XOUT is calculated using the value of RXFB - the 'X' refers to a particular channel, be it R, G, or B, so you can think of the values as 'GOUT' and 'RGFB' for the Green channel.  Voltage on XOUT is -0.3V to 7V (or whatever VCC is, really.)

I just don't know how to calculate the different values that I need for the resistor and specific NPN that I would need to match the LEDs details.

Anyone feel like shedding some light please?

#### Grumpy_Mike

#1
##### May 06, 2012, 10:44 pm
Quote
For one, what is ß (Beta)?

RXFB will give a voltage when current flows down it. When that voltage equals the referance voltage the the FET will stop turning on anymore so the rest of the voltage is dropped across the FET which will get warm.

#### KirAsh4

#2
##### May 06, 2012, 11:00 pm
So, taken the above mentioned values for the LEDs, 3 of them in series, what do I need to look for in an NPN to work with this?  Is the value of RXFB what's going to set the current that the NPN turns on/off?

I know from the datasheet that Vref = 0.6V

I need to figure out what RXFB needs to be and what RB needs to be, which I assume applies to the NPN's base.  And, is RXFB what will change based on the voltage drop for the LEDs used (red, green, or blue)?

With the "normal" operating circuit for the WS2801 (without the FET), RXFB is what controls the current sink for the LED.  So on a (single) 20mA LED, RXFB is set to 30 Ohm.  (IXOUT = VRef / RXFB)

Having an NPN in the circuit and I end up throwing my hands up in the air because I don't quite understand them and what's needed to trigger them.

#### Grumpy_Mike

#3
##### May 06, 2012, 11:13 pm
The transistor is just to turn the LEDs on and off.

Quote
Is the value of RXFB what's going to set the current that the NPN turns on/off?

No.

With the required current you must drop 0.6 V across that resistor so RXFB = 0.6 / the led current.

Quote
what do I need to look for in an NPN to work with this

One with enough gain to satisfy that equation, and sufficent to carry the required amount of current.

#### KirAsh4

#4
##### May 07, 2012, 01:10 amLast Edit: May 07, 2012, 01:12 am by KirAsh4 Reason: 1
Would you mind giving me either the specs I need to look for, or an actual part?  As I mentioned, I don't quite understand FETs yet so I'm slowly learning about them.  The WS2801 uses PWM to control the LEDs.  I don't know if the NPN needs anything special to be able to handle that.

#### Grumpy_Mike

#5
##### May 07, 2012, 08:19 am
What current do you want to send through the LEDs?

#### KirAsh4

#6
##### May 07, 2012, 08:26 am
140mA.  Voltage to the NPN and IC will be 5V.  Voltage to the LEDs will be 12V.

#### Grumpy_Mike

#7
##### May 07, 2012, 09:15 am
Let us assume you have a base resistor of 1K.
When the transistor is on it will have 0.6V across the emitter / base. So if the emitter sits as high as it can it is at 4.4V.
Base current will then be 0.6 / 1000 = 0.6 mV
If you have a collector current of 140mA you need a current gain of at least
140 / 0.6 = 233 times

Do the same calculation for other values of base resistor.

#### macegr

#8
##### May 07, 2012, 09:16 am
That is a common configuration for driving higher VOLTAGE devices from a lower voltage sink output. That circuit will not allow you to control more current than the WS2801 can handle, as obviously the current is going through the WS2801.
Unique RGB LED Modules and Arduino shields: http://www.macetech.com/store

#### KirAsh4

#9
##### May 07, 2012, 11:36 am
macegr, I wondered about that.  That schematic is labeled as 'constant current with external switches'.  There is another schematic labeled 'constant voltage with external switches' which looks like this:

That one looks more like what I'm used to seeing.  RL can be used to set the current through the LEDs.  RB = 2K to 5K.  Saturation voltage is 0.5V - 0.8V.  The formula given for RL is:

RL = (VDD - VLED - VCE) / ILED

I presume VDD = the indicated 24V.  VLED ... is that the sum total of the voltage drop of all the LEDs?  So if I have 3 of them, each with a VDROP of 3.4, VLED = 3.4 x 3?  And VCE = saturation voltage (per datasheet).

#### fireman_sam6986

#10
##### Jun 09, 2012, 01:25 pm
Hi Guys,

How did you go with this?

I am also working on a similar project but having some issues. I want to control some 12V LED strips using the WS2801 however I am unsure which schematic in the datasheet is suitable. I have got one of these chips working with a single RGB LED but want to expand a bit.

I normally control these strips with the Arduino PWM output via a transistor however I want to control 4 strips which exceeds the number of PWM outputs. I normally use the following setup with a  N-channel MOSFETs such as the STP16NF06.

I was going to use the "constant current with external switches" schematic as this makes sense to me. However, before I started soldering I thought I would try to work out what the difference between this and the "constant voltage with external switches" is???

Any help?

Thanks
Sam

#### Grumpy_Mike

#11
##### Jun 09, 2012, 04:42 pm
Quote
I was going to use the "constant current with external switches" schematic as this makes sense to me.

No, you have a strip that is designed to work when you connect it to 12V. Therefore the current limiting you need for an LED is already incorporated into your strip.
You just want a simple switch like that physical layout diagram you posted.

#### fireman_sam6986

#12
##### Jun 15, 2012, 03:20 pmLast Edit: Jun 15, 2012, 03:42 pm by fireman_sam6986 Reason: 1
Thanks gumpyMike.

So I can basically take the setup in the diagram I posted however instead of of taking the PWM output from the Arduino I take the output from the WS2801? with the WS2801 setup the same way I would power a single LED?

OR...

This setup from the datahseet where from what I can tell the only difference is the polarity reversed?  In this schematic each channel from the WS2801 switches the transistor just like in the diagram I posted.

Just for my own knowledge, what does the "constant voltage with external switches" achieve? What does adding the op-amp do?

#### Grumpy_Mike

#13
##### Jun 15, 2012, 05:51 pm
Quote
what does the "constant voltage with external switches" achieve?

Not sure what you mean by achieve but it controls a load by means of an external switching transistor. The voltage applied to the load is independent of the impedance of the load.

Quote
What does adding the op-amp do

It turns the driver into a constant current. Here the voltage applied to the load is varied according to the impedance of the load until a certain current flows. This is what you need when driving a high power LED because the impedance of the load changes as the LED warms up.

Your strip is designed to have a constant 12V applied to it so any impedance changes in the LED is taken care of in the electronics of your strip.

Go Up

Please enter a valid email to subscribe