The next project I'm looking to control 12V LED strips using the WS2811 three-channel PWM IC. I'm looking at having a WS2811 IC driving three MOSFETS, that way I can attach the driver to a LED Strip. I was hoping to throw up my basic schematic and see if anyone sees anything that's wrong, something that I Have picked up it the output of the WS2811 chip is Cathode and won't be able to trigger the Mosfets, Ive seen another thread where they use optoisolators to achieve this but it will cost me quite a lot extra. Is it possible to fix this problem with it being cheaply and not increase PCB/Board Size to much.
PNP transistors of the appropriate current-carrying capacity.
Collectors to ground, base to the WS2811 pins - no resistor necessary, emitters to the LED strips.
This will not provide current limiting, but this is already implicit in the 12V LED strips.
The WS2811 provides 18 mA fixed drive; you may need more gain in the PNP transistors if they have to provide more than a few hundred milliamps; may then need Darlingtons.
No, ground. What would the use be of pulling the LED strips down to 5V (if that is what you mean by Vcc)?
In case you are confused about all this, most RGB LED strips are (12V) common anode, so you require the cathodes to be switched to ground - which is exactly what the WS2811 does and is rated for 12V (but no more) on its outputs, except that its current control limits it to 18.5 mA. So what you need is an emitter follower buffer, which is a PNP transistor wired as I explained. Emitter followers require no base resistor, you do not need a resistor from base to emitter as any leakage will be trivial, and you lose 0.7V which is of little consequence for a 12V supply.
MarkT:
That chip has constant current sinking outputs (analog), not logic (digital) outputs, so it will not produce PWM signals.
What makes you think that?
Did you read the datasheet? The part where it says "PIN function"?
OK, it's substantially less than clear, I know. Not the world's best datasheet (but pretty average I suppose for China). The chip provides constant (not variable) current drive so you do not need to add current-limiting resistors - read the text just under "Fig 1" and remember, these chips are actually used to implement "neopixels" - but the brightness control is implemented using PWM.
MarkT:
Just drive the MOSFETs from PWM pins. Use 180 ohm gate resistors to protect the Arduino.
Where did MOSFETs ever come into this discussion?
fungus:
Not at all, I just thought that when you use a PNP (your emphasis) transistor that one of the legs has to go to Vcc or it won't work.
You must be having a bad day! Both of you guys in fact.
Yes, one of the legs does have to point in the general direction of a positive Vcc. Which one? For a PNP transistor (and yes, I was pointing it out), that would be the emitter.
Thanks for the replies I have found this schematic (below) on a other thread that is pretty similar to my schematic is there a way to make is simpler (removing the opto isolators) some replies say that i should use PNP transistors to trigger the mosfets, can someone quickly draw a schematic because there is some people saying one thing and someone else another.
ianscott-arduino:
I have found this schematic (below) on a other thread that is pretty similar to my schematic
Massively over-complicated and quite unnecessary and inappropriate.
ianscott-arduino:
is there a way to make is simpler (removing the opto isolators) some replies say that i should use PNP transistors to trigger the mosfets, can someone quickly draw a schematic because there is some people saying one thing and someone else another.
I am sorry about that but it wasn't me - some others have not read the datasheets and begun floating all sorts of tangential and irrelevant matters.
You use PNP transistors - need to be rated for the appropriate collector current which will depend on your LED strips.
For each transistor, not entirely dissimilar to your original circuit:
The transistor base goes to the WS2811 control output. As it is in emitter-follower mode, you need no base resistor.
The transistor emitter goes to your LED strip negative on the output socket. Since the LED strip contains its own current-limiting resistors, you do not need to provide any others.
The transistor collector goes to ground. If you had already constructed your circuit board and were using through-hole mounted transistors, you could simply insert the PNP transistors instead of the FETs by re-arranging the "legs" accordingly (swapping source for collector and drain for emitter). The 1 ohm resistors could stay and the 10k resistors must be removed.
Paul__B:
The transistor collector goes to ground. If you had already constructed your circuit board and were using through-hole mounted transistors, you could simply insert the PNP transistors instead of the FETs by re-arranging the "legs" accordingly (swapping source for collector and drain for emitter). The 1 ohm resistors could stay and the 10k resistors must be removed.
So your saying I can use a P channel Mosfet or a PNP Transistor connected straight to the WS2811 chip (Gate/Base) (with resistors if needed of course)
ianscott-arduino:
So your saying I can use a P channel Mosfet or a PNP Transistor connected straight to the WS2811 chip (Gate/Base) (with resistors if needed of course)
You can't use a MOSFET. It simply won't work.
If you need more current than a BJT can handle then you have to use a BJT to drive a MOSFET.
fungus:
You can't use a MOSFET. It simply won't work.
And why? Because of the Vgs threshold characteristics, FETs are almost always unsuited to "source follower" configuration.
fungus:
If you need more current than a BJT can handle then you have to use a BJT to drive a MOSFET.
Using a transistor to drive a FET is again complicating things - a little.
If you did need more current than a "bipolar" (ordinary) transistor can amplify it is a matter of the transistor gain at the required current - it would be easiest to use a PNP Darlington. You lose 2V instead of 1 however.
Again, I repeat, there should be no need for resistors; though the base resistors (could be 220 0hm) can remain if you have already built the PCB.
fungus:
You can't use a MOSFET. It simply won't work.
And why?
Because the WS2811 is a current sink, not a voltage output. When it turn on it tries to sink 20mA, when it turns off it goes to high impedance.
A MOSFET might work with a pullup resistor but I have a feeling that it would need to be a fairly high resistance to fool the WS2811 into pulling it down to 0V and that means the gate would take ages to go high again.
Even if it works it would invert the PWM signal and that might mean it never turns fully off (nb. I haven't looked at the output of a WS2811 so it might be OK...)
Paul__B:
Using a transistor to drive a FET is again complicating things - a little.
fungus:
Because the WS2811 is a current sink, not a voltage output. When it turn on it tries to sink 20mA, when it turns off it goes to high impedance.
A MOSFET might work with a pullup resistor but I have a feeling that it would need to be a fairly high resistance to fool the WS2811 into pulling it down to 0V and that means the gate would take ages to go high again.
Let's see - the pullup is to 12V, 18 mA is 680 ohms. Sounds not unreasonable.
No, the problem is that even a "logic level" p-FET will still have a Vgs drop of 4 volts or more, so pulling its gate down to 0V will only pull its source down to that 4V and your LED strings will get less than 8V instead of 12.
fungus:
Even if it works it would invert the PWM signal and that might mean it never turns fully off (nb. I haven't looked at the output of a WS2811 so it might be OK...)
Where is this inversion? We are talking of a source follower or emitter follower.
fungus:
You might not have a choice.
I think a Darlington PNP is an excellent choice - but that only if it is indeed needed beyond a simple, plain PNP bipolar.
What concerns me is that all this quite inappropriate discussion continues distracting the OP from the clear and obvious approach I have detailed.
ianscott-arduino:
I have found this Darlington transistor that might work. How do I find the resistor value?
It might indeed, though those saturation figures demonstrate why you do not want to use a Darlington unless a single PNP transistor will not do the job, due to the voltage loss involved.
Doesn't the Transistor only take a maximum Base voltage of only 4.5V, so shouldn't i need a resistor to lower the voltage from 5v to 4.5 or this is'nt necessary