LED not pulling full current @ 255 PWM value

Hi All.

I am trying to get my RGBW LED to light up for half a second at its brightest.
I am only interested in turning on the Red LED for now.
I am using PWM from an Arduino NANO so that the threshold voltage of the MOSFET is exceeded and in turn current passes through the LED.

The specs for the Red LED are Forward Voltage ( @ 350mA ) 2.6 V max.

The LED is powered with a benchtop power supply set at 2.6V and 950mA.

This is what my hardware in conjunction with the code was supposed to do:

When the user enters a value, between 1 and 255, the LED turns on with the corresponding brightness.

A value of 1 is where the LED is the dimmest.
A value of 255 is where the LED is the brightest.

Here is my problem:

When the user is entering 255, the LED is not drawing 1 Amp. It is drawing only around 337mA. ( I got this current value from the display of the benchtop power supply. )

I ran a few tests and this is what I found out:
a) When the user enters 255, the voltage from the PWM is 4.48V when the PWM signal is high.
b) When the user enters 255, the voltage between gate and source is 4.5 volts.

Can someone tell me why the LED is not pulling 1Amp at 255.
How can the LED be made to pull 1 Amp when the user enters 255?

LED Datasheet: https://www.ledsupply.com/content/pdf/XLampXML_Color.pdf
MOSFET Datasheet: https://www.infineon.com/dgdl/Infineon-IRLB8721-DataSheet-v01_01-EN.pdf?fileId=5546d462533600a40153566056732591

Some Datasheet specs for the MOSFET are below:

image

image

const int pwmPin = 9;  

void setup() {
 
  Serial.begin(9600);
  pinMode(pwmPin, OUTPUT);
  Serial.println("Enter a brightness value (0 to 255):");
}

void loop() {
  
  if (Serial.available() > 0) {
  int brightness = Serial.parseInt();

      if (brightness >= 0 && brightness <= 255) {
      
      analogWrite(pwmPin, brightness);
      
      Serial.print("Brightness set to: ");
      Serial.println(brightness);

      // Keep the LED on for half second
      delay(500);

      // Turn off the LED
      analogWrite(pwmPin, 0);
      Serial.println("LED turned off");
    } else {
      // Error msg if the value is out of range
      Serial.println("Invalid value! Enter a brightness value (0 to 255):");
    }
  }
}

In remarkably good agreement with the data sheet specifications and a small voltage drop across the MOSFET. The circuit is working as expected.

Ty. LOL. So how do I make the LED pull 1Amp so that I can get my money's worth of max brightness that it can output? Ty

Increase the power supply voltage.

If no current limiting resistor is used, the current draw of an LED (or any diode) is an exponential function of the power supply voltage.

What is the max that I can increase the power supply voltage? I am scared I am gonna fry the LED cause these are current driven devices. Ty!

And what is the voltage on the mosfet drain?

You should be. Use a current limiting resistor, like everyone else.
https://learn.sparkfun.com/tutorials/light-emitting-diodes-leds/all

I stuck a Multimeter between Drain and GND. Normally, it is always 1.5V.When the user enters 255, the value goes to like 0.3 V before going back to 1.5V.

LEDs are "current driven"... You supply the correct current and the voltage "magically falls-into place"... Pretty-much the opposite of everything else in electronics. :wink:

Like all diodes, LEDs are non-linear. Their resistance goes down as voltage goes up.

Regular little LEDs use a current-limiting resistor.

High power LEDs (1W or more) normally use a special constant current (or "controlled current") switchmode driver. You can use a resistor but it has to be a high-power resistor (and "extra voltage" so the resistor can determine the current.

...High-power LEDs also normally need a heatsink.

I have no experience with that mosfet, but 0.3V across it may mean that it's not fully turned on. But if you're driving the gate with 5V, it seems like it ought to be, or at least turned on enough to do better than 0.3V.

But as others have suggested, you really can't be doing this without either a resistor or a constant current source. And you may need a different solution for each color.

Right. Unless they are wired in series, because each color requires a different voltage for the same current.

Judging from the current vs forward voltage graph for the red LED, forward current is 1 A at about 2.7V.

If you set the power supply to 3V, the current limiting series resistor should be (3 - 2.7)V/1A = 0.3 Ohms, which is commercially available, or use 3x1 Ohm in parallel for 0.33 Ohms.

To power all the LEDs at full rated current, the power supply voltage needs to be around 4V or higher, with corresponding current limiting resistors.

1 Like

Since you use a bench top power supply, you may simply put voltage at 3V and set current to 1A. The power supply will find out which voltage is needed to get to 1A.
It is a constant current supply...
Or a constant voltage supply depending on the limiting factor...

I just did that. And even at 255, the power supply still says that the LED is pulling only around 340 mA.

Increase the voltage...
And keep an eye on your mosfet...
As it is not fully open, it may get too hot.

Whats the max voltage at which I should stop?

Does it have a heat sink?

Nope. But i just need it turned ON for like half a second.

Doesn't matter, It will still fry.

No that is wrong. The threshold value is where is just begins to turn on the FET. It will be in the linear region and will get very hot. For the FET to turn on you need to exceed the voltage given in the Ron (On resistance) given in the data sheet of the FET. Which is 4.5V with a maximum current of 25A or 10V for a maximum current of 31A.

That will not respond fast enough for you to see the true current. You need to use an oscilloscope to measure the voltage across a very small resistor in the current path.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.