Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

SPI to RGB Using WS2811 with Constant Current/Amp

Status
Not open for further replies.
R-led; LEDs are not like resistors at all. They are Zener diodes.
Resistor; When the current is cut in half the voltage drop is also 1/2.
LED; A 2:1 change in current results in about 5% change in voltage. (depends on part)
upload_2016-3-19_9-38-46.png

ccr_2pnp_schematic-png.98307

R2 reduces heat in Q1. Good but reduces the ability to pull down if the voltage is low.
R1 reduces the ability to pull down when the voltage is low.
DC(0.018) current source. In LT-Spice the current sources will pull negative. This fooled me at first. The voltage between the current source and R1 when to -2 volts. This is not real life. It make the circuit look like it would work at lower power supply voltage. Watch out!
 
R-led; LEDs are not like resistors at all. They are Zener diodes.
Resistor; When the current is cut in half the voltage drop is also 1/2.
LED; A 2:1 change in current results in about 5% change in voltage. (depends on part)
View attachment 98311

R2 reduces heat in Q1. Good but reduces the ability to pull down if the voltage is low.
R1 reduces the ability to pull down when the voltage is low.
DC(0.018) current source. In LT-Spice the current sources will pull negative. This fooled me at first. The voltage between the current source and R1 when to -2 volts. This is not real life. It make the circuit look like it would work at lower power supply voltage. Watch out!

I know friend. The simulator is an online cheap version with limited library. Even the zeners they had was not adjustable. I know LED is not linear but that's all I could do to model 6v red LED. (0.3 amps x 20 ohms).
Thanks for the heads up on current source on sim. It is just a quick check to build the proto on board. That is why I placed test pins on the pcb for this exact reason. As for voltage (Vdd), you are very concerned. It is ok. Even with long wires (max 20 ft) the voltage drop is not horrible. I have Vsup=12.5V. Keep in mind Vdd is just supply. We are not varying it or modulating it. It is just the feed that is all. And data lines are conditioned and amplified by WS2811 everytime it is bounced. I know better to have multiple runs so my wires do not travel that far for supply. In the new design it can drop to 10.5-11v without significant change in I-led.
As for R2. I can lower it a bit so Pq1 is around 500mw. But I am using T0-92 package at 625mw max for the purpose of keeping the dimension of the board small. I know I can go to T0-220 package and change to PMOS but then again I was trying to avoid large PCB pads or use of bulky heat-sink.
See the picture on my post below. There is not that much room in those aluminum cans.
 
Here is something I put together on Excel for different led colors. Hope you find it useful.
I know LED vary from one manufacturer to the next, specs of LED, and even bin to bin. But this is a good approx. based on the data points I collected and formulated into:
If= A * (B^Vf)
 

Attachments

  • LED Table Chart2.pdf
    227 KB · Views: 226
Ron
I thought about your comment on Vdd. When you consider Grn/Blu require roughly 9.6V for Vf, and you need 1.4V overhead (Vbe1+Vbe2), you have already used up 11V for full brightness with 1V wiggle room.

You call it a bad thing to have such tight voltages, I actually like it since it has less power loss in heat. Not a big deal if the Vdd drops a bit, the LED will be slightly less than 100% brightness. If it really bothers you, we can change Rs to increase the current to compensate (we have the gap between 300 and 350ma to play with). Once Vdd is set, I am not concerned with voltages since constant current sinking of WS2811 will take over setting currents thru use of PWM. If you expect both transistors to saturate instantly (Vdd=low volts) and level off at saturation at Vdd=6-7 V, it will not happen. This is not a constant current to be utilized for all voltage ranges although can be modified to do so. It is specifically designed for 12V supply with 300ma LED. Function of the two transistors are to keep the currents in check in case LED decides to heat up while WS will do its thing.
 
Evil,

NOT saying you should change things. Just a different idea.
Left circuit; current is 18mA + (B-E voltage across a resistor) The B-E voltage changes with temperature. Q1 will run very hot. Inside the box all parts will be hot.
Right circuit; 18mA causes voltage across R5, The same voltage is across R3. Current = IR5 + IR3. The B-E voltage has little effect.
upload_2016-3-21_7-39-36.png

In both circuits the base current causes some errors in the formula.
Voltage Base to Emitter of Q3 will be 5% larger than Q4 because the currents are not the same.
Again, don't make changes. Just something to think about.
I want to know how it works when you are done. Mostly the minimum output voltage of the IC.
 
NOT saying you should change things. Just a different idea.
Left circuit; current is 18mA + (B-E voltage across a resistor) The B-E voltage changes with temperature. Q1 will run very hot. Inside the box all parts will be hot.
Right circuit; 18mA causes voltage across R5, The same voltage is across R3. Current = IR5 + IR3. The B-E voltage has little effect.
Ron
Please help me understand what you are trying to do. Looking at the left diagram: Ie2= 12ma while Vbe2 is fixed at 0.65. This equilibrium is achieved when Q1 gives Q2 a negative feedback. Q2 will run cold since it only uses about 7-8mw. Let's say its Vbe rise a bit due to temp. That increases Ie1, increasing Ib1. This pulls up the base of Q2 and decreases the flow of Ie thru Q2! To complete the cycle, Ie2 reduces, Vbe2 decreases, Current thru Rs (Ie1) reduces, Ib1 reduces, Vb2 reduces, Ie2 goes up. This is why Q2 (setting transistor) does not reach saturation while Q1 (load transistor) does. Here are some numbers my spreadsheet produced when I ran the layout and cross checked against datasheet of 2n4403:
Vbe2=0.65(turn on voltage), Vbe1=0.75(saturation), Ib2=1-1.2ma (turn on current), Ib1=7.5ma. Since IR2=18.5ma and Ib1=7.5ma then Ic2=11ma, Ie2=11+1=12ma, hfe=100 @ 10ma, hfe=40 @300ma. We know Ib=Ie/hfe. Therefore Ib1= 288/40=7.5, I thought Ib2=12/100 but the graph on datasheet of 2n4403 says turn on Ib=1+ma. Current sunk by WS=18.5=Ic2+Ib1 (not Ie1)
PQ2=0.65vx12ma=8mw, PQ1=1.45vx288ma=418mw (these are based on my updated schematics reloaded at original post).

If I am missing something please try to explain it another way as I am open to suggestions. I am concerned a bit, if running IQ1 somewhere around 500ma it might heat it up horribly since it does not have a heat sink. That I have to physically build and test out. I might have to switch to darlington or PMOS after my testing.
Regards,
Rom
 
Last edited:
I am concerned that the wattage is high. The data in the data sheet is for room temperature. Inside the box it will be hotter.
So last night I was looking for a transistor in the next size bigger package.
I can do surface mount. There are parts where the collector comes out on a tab that gets soldered to as much copper as possible.
With through hole there is not much that can be done. I use as much copper as possible. Wide traces.
I wish the flat side of the hot transistors could be pushed against the box.
You have a good idea with the collector resistor on the output transistor. Eating up 0.8 volts really helps the heat.

I don't see that darlington or PMOS will help. You have voltage and current that makes heat. It is more a function of getting the heat out of the part and into air then to the box.

If the output transistor is too hot think about this. Using two Rs will cause the current to share well. ( Rs= 4.1 ohm ) So Q1a and Q1b will have about the same current.
I know Q2 is only watching the current in one transistor.
upload_2016-3-21_8-59-40.png
 

Attachments

  • upload_2016-3-21_8-56-59.png
    upload_2016-3-21_8-56-59.png
    21.5 KB · Views: 207
I can do surface mount. There are parts where the collector comes out on a tab that gets soldered to as much copper as possible.
I did look at SMD, but the situation gets worse since their heat dissipation rating drops compared to 150C on To-92. I have always read in engineering discussions not to parallel transistors even if they are perfectly match as one could easily take the whole load (different on-time).
I considered a larger copper pour using SMD but the size of board will almost double since you need at least (if I recall) about 22mmx22mm pads. I thought of three other solutions just in case Q1 gets too hot without changing parts. 1- Have the entire top side of the board be a solid copper (making it double sided with keep-outs) and then after transistors are soldered to place a drop of heat-sink paste on individual transistors to the top copper. 2- Move the pcb to the other box of the RGB can (see photo) so that LED does not effect the temp. 3- Place small rubber pads under the pcb and add heat-sink paste under it (iso-connected to can's casing).
 

Attachments

  • 10W RGB Can.JPG
    10W RGB Can.JPG
    34.9 KB · Views: 186
I can do surface mount. There are parts where the collector comes out on a tab that gets soldered to as much copper as possible.
If you are actually building this and doing it with SMD, I have couple of good suggestions. Do all your layout on top side with use enough copper pads as you need (i believe you are working with SOT-89), then use the entire bottom side of the board as a solid copper heat sink and then use heat paste between board and the can of RGB casing.
I did something similar and divided the bottom side to 3 large copper pads with small gap between them, then did several drill holes from top to bottom copper on the large smd copper pad. Then soldered the top and bottom vias. Use of thinner pcb will also helps with the dissipation between layers. If soldering top to bottom, just make sure your coppers at the bottom don't directly touch (heat paste in between) the casing. These darn HP LED's are not always isolated from their aluminum sinks and bleed to the can's casing. Connecting to the casing could cause short and a nice puff of black smoke.
 
I have always read in engineering discussions not to parallel transistors even if they are perfectly match as one could easily take the whole load
That is why there are two emitter resistors. (with out resistors they will not share well) With two resistors they will share. If one transistor takes too much current its B-E voltage will drop. The transistor with little current will have more B-E voltage. It will balance out. Because you have 0.7V on the emitter resistors they should balance well.
 
SMD:
You can put only the hot transistors on one side and all the other parts on the other side.
(transistors with heat tab)
The hot side will be three copper areas. (collector for each transistor) Using 1/3 of the board as a heat sink for a transistor will spread out the heat.
I have done this with out "thermals". Many people say you can't solder with out thermals. It just takes more heat to solder. I do SMD in a toaster oven.
I have designs made in several countries with out thermals.
 
SMD:
You can put only the hot transistors on one side and all the other parts on the other side.
(transistors with heat tab)
The hot side will be three copper areas. (collector for each transistor) Using 1/3 of the board as a heat sink for a transistor will spread out the heat.
I have done this with out "thermals". Many people say you can't solder with out thermals. It just takes more heat to solder. I do SMD in a toaster oven.
I have designs made in several countries with out thermals.
If you are toasting with liquid solder then do a thin coating on plain pcb, bake, then place components on with added liquid solder and bake again.
You can have pad under the SMD away from the pins going outwards. It does not have to be perfect square as long as you obtain the mm^2 required. Also your thru-holes can be solder on surface without drilling. So if you want all your parts can be on my side and the entire other side can be additional heat sink.

Here is an updated pcb based on my last post. Traces thickened on Bottom side, pads added to bottom side, transistors are bent 90 degrees to touch the board, and the entire top copper can now be used as a heat-sink with heat-paste.
 

Attachments

  • PCB7.jpg
    PCB7.jpg
    356.2 KB · Views: 212
Several ideas.
a) Connect RED to ground. Remove all BLUE grounds. (feed throughs on ground leads) With the blue ground removed there is more room for heat sink on the blue side.
b) If SMD then all traces and parts can be on blue. Red can connect to the box with goop. The box is a real good way to dump heat.
 
Several ideas.
a) Connect RED to ground. Remove all BLUE grounds. (feed throughs on ground leads) With the blue ground removed there is more room for heat sink on the blue side.
b) If SMD then all traces and parts can be on blue. Red can connect to the box with goop. The box is a real good way to dump heat.
I took your suggestions and took it a bit further. See attached PCB. The 39 ohm resistors are now flat and all grounds fed from bottom.This actually reduced the size a bit! Cheers.
 

Attachments

  • PCB8.jpg
    PCB8.jpg
    352.8 KB · Views: 225
Here is a slightly different one. Power resistors are also flat-mounted on PCB.
 

Attachments

  • PCB9.jpg
    PCB9.jpg
    427.9 KB · Views: 177
I don't know your CAD program.
In Eagle there are reg and blue traces. The green pads indicate both sides.
upload_2016-3-22_6-35-33.png

In your pictures there are no pads in the red layer.
Are you planning on using a double sided with no "via"s? VIAs are strong and keep the pads from lifting.
Maybe you want red pads but the software is still thinking in 1 layer mode.
 
I don't know your CAD program.
In Eagle there are reg and blue traces. The green pads indicate both sides.
View attachment 98386
In your pictures there are no pads in the red layer.
Are you planning on using a double sided with no "via"s? VIAs are strong and keep the pads from lifting.
Maybe you want red pads but the software is still thinking in 1 layer mode.
Good Morning. I am using double-sided board. My software is PCBArtist. Great for such projects but its output is not standard Gerber. I use it for at-home projects.
This software is very user friendly and allows me to set colors for anything I want. In this case Grey is pad on both sides. As for top copper (red) when I poured it, I intentionally removed spokes. So it is a free floating plane. The advantage is that I do not have to worry about parts shorting on top and the whole thing is one copper pour for a great heat sink. I think this last version below does everything I want and provides for copper pours on top and bottom so all parts stay cool. A drop of heat paste under each transistor and power resistor on top. If I put rubber pads or mica under each corner for isolation, I can place heat paste under the whole board to casing and hot glue the corner to stay in place. So it will be air cooled from top (red) and case cooled from bottom. I am liking this more and more.

P.S.: on my pc, all the layers are on top of each other. For your viewing i separated red on top so that you can see below it.
 

Attachments

  • PCB10.jpg
    PCB10.jpg
    256.2 KB · Views: 210
There were several things that discouraged me from using SMD.
1- it's a bit harder to solder (hard to bake double-sided SMD)
2- when you switch transistors from thru-hole to SMD pin layout changes
3- you would need vias or combine thru-hole with SMD (hand solder and bake) then fill vacant vias with solder
4- once any thru-hole is utilized the bottom layer needs to be isolated from casing and concept of using bottom as heat sink is defeated

It is all matter of preferences. I tried it this way for simplicity so that any user can put it all together in a jiffy for plug and play without need of expensive manufacturing and parts! Part cost $0.95
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top