Maker Pro
Maker Pro

PWM Control with Shift Register Support for 3w White LED's

Greets ALL!

I am your worst nightmare if you fully understand analog electricity, and for that I am sorry. I understand and work with micro controllers and work well with them. So the digital I get, but when I add ANALOG to my projects, it usually equals fire. I'm levels ahead of Arduino, and Arduino IDE, but this project is just a little too vast and includes a lot of what I do not know. This is why I am posting my question(s) here.

And it is not for school, it is for a home project for a holiday lighting need.

I am about to buy several 3w white LED's that are mounted on heat sinks. Their power requirements are 3.6-3.8vdc forward voltage at up to 700ma. I can drive strings of these with a mosfet using PWM from MCU, but my real goal is to drive them like the WS2812B to allow me to individually address them to control each LED's brightness. Of course, I want to only have one clock and data connection to the array, so the individual control circuitry needs to be able to condition the signals and pass them on, with overflow of the data, just like strings of the WS2812B does. Except I am only concerned about one channel of PWM. 8 bits should suffice.

I want to bench a single node and daisy chain them later. I figure I need the device that will accept a serial data connection with clock (don't want to worry about speed or timing concerns if I do not have to), use that 8 bit number to control PWM to a single channel, and then use that PWM signal to drive the LED. I am prepared to scale this down to SMD and have boards made.

I just do not know what the best and most cost effective device is out there, and no idea the driving circuit parts either. Mosfet? Something better? Maybe multiple channels per NODE and daisy chain nodes? Size matters here because I want to be able to have a really small board inline with a string of these node arrays.

The end result is simple. I am working on lightning/strobe effects for halloween. I can do that easy and fine with strings of WS2812B devices, but I was looking for something with a little more kick, without having to buy 3w RGB LED's which are expensive still. I only want 6500k white wavelength anyway.

I hope I included enough info. I do not want anyone to create the schematic for me, just point me in the right directions.

Thank you SO MUCH for your time!!

Hop
 
Smallest and simplest hardware would be a 6 pin SMD microcontroller and an SMD MOSFET for each node. You will need a power resistor for the LED though, assuming 5V to drive it all. That would be 1.4V * 700mA or 1W. Since the duty cycle will be low, you need not go more than 1W and can probably actually get by with less. I don't know about Atmel μ's, but with PIC the total part list would be:

1 6-pin microcontroller
1 100nF capacitor
1 MOSFET
1 1W resistor

With the micro, you could implement the exact WS2811 pr

By the way, where is the analog in this? It is all digital except for the resistor + LED.

Bob
 
That looks like a good option, which basically does exactly what I was proposing without requiring any programming. Only drawback is you have to send 3 bytes for each light. On the other hand, you could use one WS2811 (and 3 MOSFETS) to control 3 of the LEDs if that made any sense.

Bob
 
Yes, both of your suggestions are very good ones. I really like Kapp's better though for this year because it will take less time to get this done for Halloween. I like Bob's because it will allow me to design something more related to my lighting needs on my bench, garage, and house. There are a lot of options for devices out there! Yeah programming and prototyping will be a little difficult but not impossible.

Because of my analog electricity handicap, I need to read up on controlling LED's via PWM, MOSFETS, and using a low forward voltage. I will probably get all I need from the WS2811 circuit! I will also most definitely replace the MOSFETS with something beefier to handle the 700ma instead of 20ma.

And is there a mosfet you recommend for this task? The LED's I am getting APPEAR to be the 6500k version,
827061176_708.jpg
180-200 LM 3w and look like tiny poached eggs. :)
Specifications:

LED Emitter: 3W

- Output Lumens: 180-210 Lumens

- DC Forward Voltage (VF) : 3.6-3.8Vdc

- DC Forward Currect (IF) : 700mA

- Color Temp: 6000~6500K ( White)

- Beam Angle: 120 degrees

- LifeSpan Time : > 50,000 hours
 
Practically any MOSFET switching device will work - suggest you look for the smaller surface-mount variety with low Rds(on) values simply to reduce device dissipation.
 
Practically any MOSFET switching device will work - suggest you look for the smaller surface-mount variety with low Rds(on) values simply to reduce device dissipation.
Am I looking for N channel or P channel? I also found a cool diffuser that might serve my lighting pod needs. Daisy chaining these modules with one WS2811, 3 mosfets (not sure which one yet based on my LED specs), a circular board I will design, and connectors. I thought about changing one of the LED's to a 2500k warm white spectrum for my plants. So 2x 6500k and 1x 2500k. Daisy chained as needed and using the WS2811 to control intensity. Maybe with a STM32F1 Arm Cortex MCU. I'm excited!!
led-diffuser-lens-500x500.jpg
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
By the way, those LEDs you show are not on heatsinks. The little board they're on is what you attach to a heatsink.

You can purchase the chips used to control strings of LEDs and white each one to something which can drive the higher current required by these LEDs at full power. If you use these then you have exactly the same interface as a LEDs stop using the same IC.

These LEDs are best driven from a constant current source. These are some constant current drivers with PWM input, these can possibly be driven directly from the LED string controllers.
 
Thank you, I did not know that about the heat sinks! I will consider that in my board design that I place 3 of these on. I guess I will need to do some thermal testing. I have just the thing for that though, and be able to chart it over time while testing with PWM.
 
I am hung up trying to decide on a SMD mosfet device. I believe a P-Channel MOSFET with low RDS(ON) is my target, but there are so many available. What is popular for this type of application? For my Halloween lightning effects project, I will probably need at LEAST 10 drivers, or maybe more. So I want to keep the costs down. A friend of mine is helping me with the board design and getting a prototype built. I will be using a 5vdc, 6 amp switching power supply for the 3x LED pod array.

Please excuse my lack of analog knowledge, and reading again what BobK wrote about RDS(ON) rating, I am wondering about PWM. There is resistance during the off/on stage, so with PWM, that resistance and resultant heat generated would be collective based on off/on frequency. Am I correct? So as far as an SMD P-Channel MOSFET that is not mounted to a heatsink, should I be concerned about PWM frame rate?

I can test this with thermal monitoring, but thought I would throw that out there here to see what you brilliant minds had to say.

Again, I'm so appreciative for the WS2811 suggestion. I wish there was a cheap single channel solution, or maybe there is that I do not know about yet. I just need it to be cheap and not so prohibitively priced per node.

LED's are on their way from China of course, 21 days probably. Is there something else I can throw on the circuit safely to emulate the load for testing?

Thank you so much for your help with this!!!!

AFTERTHOUGHT: I realize that just one pod with 700ma per LED at full on would add up to 2.1 amps. So 10 of these full on will be way over the power supply capability. Not only am I going to test current with a single pod, I plan to write into my control software a fail-safe to prevent over-tasking the PSU. My Halloween effects project for example, it's lightning effects. So different pods will be triggered at full on for very brief periods of time. The software driver I am writing will take into account how many nodes will be flashed at any given time and prevent getting "too busy" to exceed a constant setting (called "PSU_AMPERAGE_SUPPLIED"). To have the full array on needs to have ample supply current, and I know that. Just wanted to clarify that.
 
Last edited:

Harald Kapp

Moderator
Moderator
I believe a P-Channel MOSFET with low RDS(ON) is my target,
Typically N-channel MOSFETs are used.

so with PWM, that resistance and resultant heat generated would be collective based on off/on frequency.
Off resistance is almost infinite. Power dissipation is 0 (for practical purposes)
On resistance is Rdson as per datasheet. Power dissipation is Pon= Rdson*Ids²
With PWM, duty cycle is DC = Ton/(Ton+Toff), therefore mean power dissipation is Pmean = Pon*DC (neglecting losses during the switching transients, which is acceptable for moderate PWM frequencies (10 kHz or less).
 
The WS2811 has outputs that are constant current sinks, so they are active low, which means using a P channel MOSFET is correct. You will also need a pullup resistor to 5V on each channel to turn the MOSFET off. Since the output is trying to sink a constant current, I am not sure what happens if the pullup does not allow that current to flow. I calculate 270Ω as the resistor that would pull the constant current of 18.5mA at 5V.

As far as heat sinking goes. I think you can safely dissipate 1W with no further heat sink, which would amount to a 33% duty cycle. I actually have some 3W RGB LEDS on similar boards that I run constantly with maybe 1-2W and they get warm but not hot enough to be a problem.

Bob
 
I found a part. I am trying to make use of the specs so if you see something wrong, please tell me what it is and why. I am learning but like I said in the OP... I'm analog needy.
These are 0.61 cents (USD) apiece and quantities available make it look popular.
STD15P6F6AG
Product Category: MOSFET
Manufacturer: STMicroelectronics
RoHS:
icon_rohs.gif
Details
Technology: Si
Mounting Style: SMD/SMT
Package / Case: TO-252-3
Number of Channels: 1 Channel
Transistor Polarity: P-Channel
Vds - Drain-Source Breakdown Voltage: - 60 V
Id - Continuous Drain Current: - 10 A
Rds On - Drain-Source Resistance: 130 mOhms
Vgs th - Gate-Source Threshold Voltage: - 4 V
Vgs - Gate-Source Voltage: 20 V
Qg - Gate Charge: 6.4 nC
Minimum Operating Temperature: -
Maximum Operating Temperature: + 175 C
Configuration: Single
Channel Mode: Enhancement
Packaging: Reel
Brand: STMicroelectronics
Fall Time: 3.7 ns
Forward Transconductance - Min: -
Pd - Power Dissipation: 35 W
Rise Time: 5.3 ns
Factory Pack Quantity: 2500
Transistor Type: 1 P-Channel
Typical Turn-Off Delay Time: 14 ns
Typical Turn-On Delay Time: 64 ns
Unit Weight: 0.139332 oz
 
Nope, no good. This part requires 10V to turn on. This is what you are looking for in the datasheet

RDS(on) Static drain-source onresistance VGS = -10 V, ID = -5 A 0.13 0.16 Ω

When they do not characterize Rds(on) at 5V (or less) it is most likely not going to work at 5V.

The Vgs threshold, which can be as high as 4V here, is where the MOSFET just begins conducting. The threshold voltage is not the voltage at which it is turned on, it is more indicative of the voltage below which it will turn off.

I will try to look up a part for you.

Bob
 
Thank you sir, I cannot tell you how much I appreciate it! I am learning and wish I had noticed and thought of that. I am comparing the specs, focusing on what you mentioned so I can get a better understanding. Also, this will help me to get a larger through-hole version for prototyping and testing.

I heard of the RGB 3w versions. Are they all under one diffuser?
 
The ones I have are all 3 under one lens, but it is clear. They are in an application were there is an outside diffuser.

The key things you need to look for in the MOSFET are:

1. Current capability. Allow at least twice what you need.

2. On resistance. The lower the better, but for 700mA not all that important. You can calculate the wattage by
P = I^2 * R. In this case, you have 700mA and 0.134Ω, which works out to 65mW, which means it will not even get warm.

3. Gate voltage for that on resistance. If it is not characterized at say 4.5V, don't trust it. "Standard" MOSFETs are designed to turn on at 10V and they will list the on resistance only at 10V. For P channel, the voltage will be negative, so it will list -4.5V as this one does.

4. Package type. I chose SOT-23 because you said you wanted SMT and SOT-23 is about the easiest SMD package there is to solder.

5. Cost.

Bob
 
The ones I have are all 3 under one lens, but it is clear. They are in an application were there is an outside diffuser.
I always considered the lens as the diffuser clear or otherwise. I guess because even clear lens diffuse to and angle somewhat. Thank you for clarifying.
4. Package type. I chose SOT-23 because you said you wanted SMT and SOT-23 is about the easiest SMD package there is to solder.
5. Cost.
Yes, I appreciate that. And it would have been my end goal device. I also realized that I can solder these to a through hole prototyping board to work with,
or better yet, use a Double-Side SMD SOT23-3 to DIP SIP3 Adapter
$_35.JPG

http://www.ebay.com/itm/like/262548612714?chn=ps&dispItem=1 for about 15 cents apiece.

IDEA...
s-l500.jpg
 
Isn't Ebay great, Adapters like that used to cost 10 times as much as the part they were adapting.

Bob
 
Top