Please explain to me how this device uses PWM to limit current

I want to drive some larger LEDs for a bar display. To give my Arduino-on-a-breadboard some decent drive power I purchased two of these “RGB amplifiers” to help me drive the following 10 watt LED chip:

http://www.ebay.com/itm/20pcs-Super-bright-10W-watt-high-power-RGB-led-SMD-chip-bead-bulb-light-for-DIY-/121260814124

These devices are extenders for a 12V PWM based controller like this one:

But I figured they could be driven by the PWM signal of an Arduino at 5V as well, and I was right. I have a basic proof of concept project that is working fine (see attached image), and it increases brightness of the LED as the software lowers the PWM rate (255 is off, the LEDs cathodes are grounded when the signal goes low). The LEDs are at 12V. The Arduino-on-a-breadboard is running at 5V.

What I am trying to figure out is how this thing works. The “amplifier” is simply an isolated N-channel MOSFET. My understanding here is when the PWM signal goes low, it connects the cathode of the LED directly to ground. So it may only be connected directly to ground for a small percentage of time, but during that time it is shorted to ground, right? How does this limit current? It seems like current should go through the roof if only for a short period of time. But I have my power supply limited to 2 amps and it does not trip. Is this safe? I don’t have a schematic of the board, but I do have a good image of it and the circuit looks simple to me. The inputs go through optoisolation, there is a protection diode on the optoisolators, then it goes right to a N channel MOSFET that connects the outputs to the power supply. See attached image for the board itself. The two main parts on this board:

http://www.daysemi.com/Upload/Product%20Doc/Datasheet/DTU09N03.pdf
http://www.everlight.com/datasheets/EL817.pdf

Code (simple):

enum PinAssignments {
  pinRed = 9,
  pinGreen = 10,
  pinBlue = 11,
};

void setup() {
  pinMode(pinRed, INPUT); 
  pinMode(pinGreen, INPUT); 
  pinMode(pinBlue, INPUT); 
}

void loop()
{
  for (int i=255;i>180;i--)
  {
      analogWrite(pinRed, i);
      delay(30);
  }
  
  for (int i=180;i<255;i++)
  {
      analogWrite(pinRed, i);
      delay(30);
  }

  analogWrite(pinRed, 255);
  
  for (int i=255;i>140;i--)
  {
      analogWrite(pinGreen, i);
      delay((20));
  }
  
  for (int i=140;i<255;i++)
  {
      analogWrite(pinGreen, i);
      delay((20));
  }

  analogWrite(pinGreen, 255);
  
  for (int i=255;i>140;i--)
  {
      analogWrite(pinBlue, i);
      delay((20));
  }
  
  for (int i=140;i<255;i++)
  {
      analogWrite(pinBlue, i);
      delay(20);
  }

  analogWrite(pinBlue, 255);
}

I simply ramp up and then ramp down red, then green, then blue. Simple test. The power supply shows current ramping for each color from 10mA up to about 550mA and dropping back down afterwards (I go less deep into PWM for the red LEDs, current for the red LEDs ramp up faster because of the lower voltage drop). So it behaves exactly like I hoped it would. I just don’t understand why. It ran for 8 hours without wrecking any of the LEDs.

Side question: why does an LED controller like this need isolation and protection diodes? Is this because of the possibility someone might try to drive an inductive load with it?

Thank you.

Can you make a schematic of your setup ( how you connected your stuff) You can use rimu schematic or simple paint.

Keep in mind that transistors have also a resistance(even saturated) . Sometimes that is the only element used to limit current.

Quite simply it can’t limit the current.
Measurements made on pulses don’t produce sensible results with meters.
The power supplie’s capacitors are probbly handling the surge in current.
Basically it is a crap design that will burn out the LEDs long before there time should be up.

What I am trying to figure out is how this thing works. The “amplifier” is simply an isolated N-channel MOSFET. My understanding here is when the PWM signal goes low, it connects the cathode of the LED directly to ground. So it may only be connected directly to ground for a small percentage of time, but during that time it is shorted to ground, right? How does this limit current? It seems like current should go through the roof if only for a short period of time. But I have my power supply limited to 2 amps and it does not trip. Is this safe? I don’t have a schematic of the board, but I do have a good image of it and the circuit looks simple to me. The inputs go through optoisolation, there is a protection diode on the optoisolators, then it goes right to a N channel MOSFET that connects the outputs to the power supply.

LED SPECIFICATIONS:
•Model: 10W(02)30
•Color: Cool white
•Forward Voltage (VF): DC 9-12V
•Forward current (IF): 1050MA
•Out put Lumens: 800-900LM
•Color temperature: 6000-6500K
•Beam Angel: 140 degrees
•Life span: >50,000 hours

No series resistance is needed. As long as the voltage applied is 9-12V, it will draw no more than 1.05A.
(The 2A PS protection will not trip)

The calculated resistance of the LED matrix is P=V2/R, 10=144/R, R=14.4 OHM.
As long as the current is within 1.05A, the LED will last >50,000 hours.

The optoisolation circuit is to drive the gate if the mosfet, basically converting a sensitive voltage controlled device to an isolated and more rugged current controlled device. This offers more flexibility in the control circuit while at the same time protecting the mosfet from damage due to ESD, etc.

That extender isn't designed to be used with high power LEDs. It's designed for 12V LED strips (multiple meters in length) with ~20ma RGB LEDs and current-limiting resistors contained on the strip. (Example)

For a cheap LED driver that accepts 12V and limits current to 950ma you can use a driver like these; basically they're the guts from a MR12 LED bulb. They're based on the PT4115 driver and can be modified to accept dimming if you don't mind some fiddly soldering and PCB modification. You can also find such modules in a more friendly format.

dlloyd:
No series resistance is needed. As long as the voltage applied is 9-12V, it will draw no more than 1.05A.
(The 2A PS protection will not trip)

Ahh! No! Driving high power LEDs with a constant voltage is not a recommended practice.

JoeN:
How does this limit current?

It doesn't.

12V LED strips have resistors built into them.

dlloyd:
No series resistance is needed. As long as the voltage applied is 9-12V, it will draw no more than 1.05A.
(The 2A PS protection will not trip)

The calculated resistance of the LED matrix is P=V2/R, 10=144/R, R=14.4 OHM.
As long as the current is within 1.05A, the LED will last >50,000 hours.

Is this true? I thought LEDs are not current limiting devices. I assume that the fact that these are 10W LEDs means “don’t drive them over 10 watts” not “the LED will self-limit to 10 watts”. I guess I will be finding out soon because I was going to test it with some higher (longer low percentage) duty cycles to see what happens. So far, the current drawn has been linear to duty cycle. I don’t see it plateauing so far. More experiments are in order…

Thanks for the isolation explanation.

Wow, two replies while I was composing that.

I know that the driver was designed for 1 meter 12V strips. I had actually put that into the original message and then removed it because I thought it was not helpful and now I see it really was a very important point. I had no idea those strips limited current with resistors. I always thought it was something more sophisticated and therefore this arrangement would also work for power LED chips which I did and do understood to not be current limiting in any way. Silly me.

I still don't get it that my supply does not trip. It generally trips really quickly in overcurrent situations. It's an Agilent U8002A and maybe I am just too trusting in the name badge on the thing. If there is no current limiting going on, there must be instantaneous currents greater than 2A.

I am running this again tonight and still no dead LEDs on the chip...

Ahh! No! Driving high power LEDs with a constant voltage is not a recommended practice.

As long as the voltage is within spec AND the current is within spec, then the life expectancy will be within spec.

Is this true? I thought LEDs are not current limiting devices. I assume that the fact that these are 10W LEDs means "don't drive them over 10 watts" not "the LED will self-limit to 10 watts".

I wasn't quite specific enough...not current limiting. Just equivalent resistance @ 12V.
An ammeter would be useful to check the rate of current rise .. it won't register until you get near 9V, then it will climb to 1.05A as the voltage increases towards 12V.

dlloyd:

Ahh! No! Driving high power LEDs with a constant voltage is not a recommended practice.

As long as the voltage is within spec AND the current is within spec, then the life expectancy will be within spec.

Is this true? I thought LEDs are not current limiting devices. I assume that the fact that these are 10W LEDs means "don't drive them over 10 watts" not "the LED will self-limit to 10 watts".

I wasn't quite specific enough...not current limiting. Just equivalent resistance @ 12V.
An ammeter would be useful to check the rate of current rise .. it won't register until you get near 9V, then it will climb to 1.05A as the voltage increases towards 12V.

The power supply has a fairly responsive ammeter built-in, and like I said, it ramps from 30mA which is no draw on the LEDs up to about 550mA. This is with the duty cycles currently programmed into my sketch. Also, this is for one and only one channel (color) at a time. If I was pushing this through all 3 channels I would already be over 1.65A on the LED. The issue is that the other thread responders seem to think what is happening is that those current reading are averaged and the current is actually a heck of a lot higher during the active part of the duty cycle. That is the conclusion that I came to after looking at the totality of the circuit, and that is why I posted this question.

But, and I stress this, it seems to be working. XD Good enough for amateur work?

dlloyd:
As long as the voltage is within spec AND the current is within spec, then the life expectancy will be within spec.

That's better, but it's just the current you're worried about.

dlloyd:
I wasn't quite specific enough...not current limiting. Just equivalent resistance @ 12V.
An ammeter would be useful to check the rate of current rise .. it won't register until you get near 9V, then it will climb to 1.05A as the voltage increases towards 12V.

The spec states that the Vf is between 9V and 12V. A single, particular LED from the batch will be in spec if it consumes 1A at some voltage between 9V and 12V. That could be 10.4V, 11.7V... you don't know, and it's going to differ between multiple LEDs in the same batch.

If you follow the method of finding the voltage that the LED consumes 1A at then you add two additional considerations: You have to make sure that the temperature of the LED stays constant (Vf drops as temperature increases) and you also have to make sure you periodically check on your LED every week or so because the Vf also changes with age. It can be done but it's a lot more effort than driving it with constant voltage.

Chagrin:
They're based on the PT4115 driver

Truly an interesting part. Just ordered a few. Not the modules, just the ICs. Too bad they require a high current 68uH inductor, otherwise it would have been actually cheap.

I will play with these when the ship it is on makes port.

wayengineer.com has good prices on shielded inductors. They might even come in on the same boat. The circuit also requires a schottky diode and sub-1-ohm resistor that you might need to order as well.

Chagrin:
wayengineer.com has good prices on shielded inductors. They might even come in on the same boat. The circuit also requires a schottky diode and sub-1-ohm resistor that you might need to order as well.

I scanned the datasheet. It’s a .13 ohm resistor which is used for current sense and it doesn’t look all that expensive. The diodes and other external parts do not look exotic. If I order those parts in 2 weeks from Digikey or Mouser it will still beat the PT4115s. I didn’t see any .13 ohm resistors on eBay that looked worth ordering.

But, and I stress this, it seems to be working.

Yes it might appear to be working.

smiley-lol Good enough for amateur work?

Well that depends on how long you want it to continue to work, and how much light reduction you can stand and how wide a temperature range you want to work in it.

JoeN:
But, and I stress this, it seems to be working.

Key word: "seems"

LEDs don't explode in a shower of sparks when you stress them (well, not unless you really stress them) but they can easily fade over time. Even 0.2V extra can mean far too much current.

Where's the win if you make them "nice and bright" but that causes them to fade away to below what they should be at the correct power? All you did was raise your electricity bill.

JoeN:
Good enough for amateur work?

Depends on how long you need it to last, how many hours a day it's switched on, etc.

The spec states that the Vf is between 9V and 12V. A single, particular LED from the batch will be in spec if it consumes 1A at some voltage between 9V and 12V. That could be 10.4V, 11.7V... you don't know, and it's going to differ between multiple LEDs in the same batch.

Based on my experience testing several thousand infrared leds of the same part#, where there are 2 connected in series and driven at 100mA, I would in all cases get voltage drop readings within 3.20 to 3.35, (1.60 to 1.68) Vf per LED. This represents about 5% tolerance. You know, the series resistors used in all those circuits had a 5% tolerance, so I really don't know the Vf tolerance of the IR leds, except that they would make rather good 1.7 V zener diodes.

So I'm not convinced that the spec from 9V to 12V is due to differences in the same batch. I believe it has much more to do with LED Dye Material. From the chart, the Vfs are Red 2.0, Green 2.1, Blue 3.8.

From this image we can see a 3x3 matrix so it appears that each colour has 3 leds connected in series. If that's the case, now the Vfs become Red 6.0, Green 6.3, Blue 11.4. So this gives a Vf spec of 6V to 11.4V based on dye material alone.

Grumpy_Mike:

But, and I stress this, it seems to be working.

Yes it might appear to be working.

smiley-lol Good enough for amateur work?

Well that depends on how long you want it to continue to work, and how much light reduction you can stand and how wide a temperature range you want to work in it.

How much light reduction do you think it is experiencing? It's already so bright I can't directly look at it, at least inside. I wonder what it looks like outside.

Edit: I think I know what you mean, degradation over time.

I think I like Chagrin's idea with the PT4115. When I receive those, I am going to rebuild this using the PT4115 part and see how well it works for me.

JoeN:
How much light reduction do you think it is experiencing? It's already so bright I can't directly look at it, at least inside. I wonder what it looks like outside.

It's not really something you can measure by just looking at it.

The point is that you can not remember brightness so it will be hard to tell subjectively.
But if you want to know how how bright it will be in 3 years.
You can't run it for three years so what you do is to measure changes over a week and take the results and extrapolate them to three years.
So what seems to work can be a disappointment over time.