LED not pulling full current @ 255 PWM value

Thread Starter

Track99

Joined Jun 30, 2022
81
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 and the C.V. light turned on. ( 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?

Thank you!


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



1716497186820.png



1716497196425.png

1716497203301.png



Some Datasheet specs for the MOSFET are below:




1716497218418.png


1716497225368.png

Code:

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):");
}
}
}
 
Last edited:

crutschow

Joined Mar 14, 2008
34,844
What is the MOSFET drain voltage at the 255 setting?
If it's less than 0.1 volt (normal), you may need to increase the supply voltage.
 
Last edited:

ronsimpson

Joined Oct 7, 2019
3,220
I do not like running LEDs with a fixed voltage across them.

LED voltage is 2.6V (at 1A)
The voltage loss in the MOSFET is 0.8V.
That totals 3.4V.
You need to increase the voltage of the power supply.
 

dendad

Joined Feb 20, 2016
4,503
Your circuit has no no built in current limiting and that is not a good idea. The LED MAXIMUM current is 1A and it is also not wise to run at maximum.
I'd add either an active constant current 750mA source or at least just series resistors to limit the current.
LEDs are current rated devices, not voltage, so running LEDs straight off a supply with no current control will risk popping them, or at least drastically reducing their life.
Without seeing it all, the current you are getting may be limited by your power supply or wiring.
If you short the FET out, do you get the current you want, and hopefully, not blow up the LED?

EDIT: I missed the low power supply voltage!!!
 
Last edited:

LowQCab

Joined Nov 6, 2012
4,305
LEDs operate on Current, Not Voltage.

Since You have the luxury of an adjustable Bench-Supply,
set the Current-Limit to the Maximum-Current-Rating of the LED,
with the Voltage set substantially higher than
the 2.6-Volts Nominal Forward-Voltage-Rating of the LEDs.
~5-Volts should work just fine.

Next, keep in mind that the PWM-Output never reaches the full 100% "On-Time".
.
.
.
 

Ian0

Joined Aug 7, 2020
10,276
The specs for the Red LED are Forward Voltage ( @ 350mA ) 2.6 V max.
That's not what the datasheet says.
It says that the maximum value for the forward voltage is 2.6V
It also says that the typical value for the forward voltage is 2.25V
From that, it's a pretty good guess that the minimum ought to be 1.9V (because "typical" is usually half way between min and max)
So what makes you think you should drive it with 2.6V? If it is a typical LED then it is going to get too much.
LEDs should be driven by constant current (otherwise you might break them)
 

Thread Starter

Track99

Joined Jun 30, 2022
81
What is the MOSFET drain voltage at the 255 setting?
If it's less than 0.1 volt (normal), you may need to increase the supply voltage.

Ty for your reply.

As you asked me to, I went ahead and tried to find out the MOSFET drain voltage. I connected my O-Scope probe's positive lead to the Drain and the negative lead to the Source.

Here are the results:

The pic below shows the scope when the power from the benchtop was completely OFF.

SDS00003.jpg



The pic below shows the scope when the power from the benchtop was turned ON but the LED was not told to do anything by the Arduino. ( I am pretty sure, this state is the same as having a PWM value of 0 ).

SDS00004.jpg



The pic below shows the scope when the I gave a 255 PWM value. Please note that the Power supply was showing that the LED was drawing only around 337mA and the C.V. light turned on at this point. ( The settings on the benchtop were set at 2.6V and 950mA. )


SDS00005.jpg



Building on your reply, yes it is greater than 0.1 volt.

Ty
 

Thread Starter

Track99

Joined Jun 30, 2022
81
I do not like running LEDs with a fixed voltage across them.

LED voltage is 2.6V (at 1A)
The voltage loss in the MOSFET is 0.8V.
That totals 3.4V.
You need to increase the voltage of the power supply.
Ty.
You said that you do not like running LEDs with a fixed voltage across them. So do you just give some sort of variable voltage? Arent you scared that giving a variable voltage might damage the LED? Or do you choose your variable voltage such that, it is in a range where it is still within the max safe voltage?

I increased the voltage to 3.40V and now it is drawing 690mA, which is twice the previous amount! We are getting there!

What else can I do to get the LED to draw close to 1 Amp?

Ty!
 

Thread Starter

Track99

Joined Jun 30, 2022
81
Your circuit has no no built in current limiting and that is not a good idea. The LED MAXIMUM current is 1A and it is also not wise to run at maximum.
I'd add either an active constant current 750mA source or at least just series resistors to limit the current.
LEDs are current rated devices, not voltage, so running LEDs straight off a supply with no current control will risk popping them, or at least drastically reducing their life.
Without seeing it all, the current you are getting may be limited by your power supply or wiring.
If you short the FET out, do you get the current you want, and hopefully, not blow up the LED?

EDIT: I missed the low power supply voltage!!!

Ty.
I didnt put a built in current limiting resistor because I have a benchtop power supply that stops the voltage from exceeding 2.6V. ( The settings on the benchtop are set at 2.6V and 950mA. )

Yes, I agree that running an LED at max is a bad idea. That is why I chose a 5% safety net and went down to 950mA.

You said that you would add either an active constant current 750mA source or at least just series resistors to limit the current. The problem is that when I added series resistors, the current is also being limited. It like a catch 22. If I add resistors, then the current is limited, if I dont add resistors then I am risking of burning the LED.

I will respectfully not short the MOSFET to see if I get the current I want. I dont want to risk damaging the LED. It was very expensive. You are welcome to give me more less risky test ideas.
 

ElectricSpidey

Joined Dec 2, 2017
2,885
Do yourself a big favor and run your tests with the actual circuits you will be using in the final design, because I'm pretty sure it won't involve 4 current limiting power supplies.
 

Thread Starter

Track99

Joined Jun 30, 2022
81
LEDs operate on Current, Not Voltage.

Since You have the luxury of an adjustable Bench-Supply,
set the Current-Limit to the Maximum-Current-Rating of the LED,
with the Voltage set substantially higher than
the 2.6-Volts Nominal Forward-Voltage-Rating of the LEDs.
~5-Volts should work just fine.

Next, keep in mind that the PWM-Output never reaches the full 100% "On-Time".
.
.
.

Ty.
As you said, I set the Current-Limit to the Maximum-Current-Rating of the LED which is 1 Amp.
I set the voltage to 5 volts.
When I gave a 255 PWM value, the LED drew 1Amp at 4.24V. ( I got both theses values fromt he bench top power supply's display )
The C.C. light turned on.

You have solved my issue.

I have one last question.

Why were you not scared that I could've burnt the LED by asking me to set the voltage to 5V even though the nominal voltage was 2.6V according to the data sheet?

Ty
 
Last edited:

Thread Starter

Track99

Joined Jun 30, 2022
81
Do yourself a big favor and run your tests with the actual circuits you will be using in the final design, because I'm pretty sure it won't involve 4 current limiting power supplies.
Ty for the reply.

I am planning on using this rechargeable battery as the final power source.
It is a 2S 5200mAh Lipo Battery 7.4V 50C

Here is the link for it:
https://www.amazon.com/Zeee-5200mAh-Battery-Truggy-Airplane/dp/B06ZYRCPS3

Can you foresee any design items that I need to be aware of?

One of the items that I need to be aware of is that I definetly need current limiting resistors. This is because this battery doesn't have any mechanism to stop too much current from flowing out.

Can you think of anything else?

Ty
 

Thread Starter

Track99

Joined Jun 30, 2022
81
Do you realize that the voltage across and LED at a given current is highly temperature dependent.

That is why life is much easier when you drive and LED with current instead of voltage.

It might help if you read and understand this:
https://www.linkedin.com/pulse/constant-current-source-basic-application-circuits-design-pumpe/
Does this hold true even if the amount of time that the LED will be ON is just 50 milli seconds? I always thought that the most significant temperature affecting an LED is the junction temperature, which is the temperature at the point where the P-type and N-type materials meet in the semiconductor.

In my project, the LED will be ON for just 50 milliseconds. So my concern about junction temperature was significantly reduced compared to continuous or long-duration operation.

My LED's power dissipation would be 1 Amp x 2.6V = 2.6W

The energy dissipation is 2.6W x 0.05 s = 0.13 Joules

This is a pretty small amount of energy for this particular LED.
 
Last edited:

ElectricSpidey

Joined Dec 2, 2017
2,885
I am planning on using this rechargeable battery as the final power source.
It is a 2S 5200mAh Lipo Battery 7.4V 50C

Can you foresee any design items that I need to be aware of?
Well, if you are using battery power, I would consider a more efficient current limiting device than a resistor, perhaps the PT4115 driver from the other thread.

Of course, there is probably a reason you chose to abandon that course.

I would also recommend using the least amount of power, while still getting acceptable brightness.

Also consider what happens when the battery starts to decline in voltage.
 
Last edited:

Thread Starter

Track99

Joined Jun 30, 2022
81
Well, if you are using battery power, I would consider a more efficient current limiting device than a resistor, perhaps the PT4115 driver from the other thread.

Of course, there is probably a reason you chose to abandon that course.

I would also recommend using the least amount of power, while still getting acceptable brightness.

Also consider what happens when the battery starts to decline in voltage.
Ty.

Yes, I was indeed running a secret side project with an IC based LED Driver Board that was built similar to the PT4115's recommended circuit. I just didn't tell anyone here about it. lol.

I wanted to go ahead and build a driver based on the info in the PT4115's datasheet; but that project is on pause cause the datasheet info was a little contradictory and I wanted to get this MOSFET based project wrapped up with a proper ending. ( Also, there was a user who kept telling me to use MOSEFTs with a resistor instead of an IC lol )

Here is the PT4115 based circuit:

1716566092506.png



I did not build this above circuit yet, cause the datasheet was a little not clear in its wording.

The PT4115 datasheet is here:
https://www.electroschematics.com/wp-content/uploads/2014/07/PT4115E-datasheet.pdf

Anyway, after much looking around, I found that the 'LD24AJTA' is a LED driver that was built using the PT4115 datasheet as its basic circuit; albeit with some changes that the designer of the 'LD24AJTA' made.

The 'LD24AJTA' link is here: https://www.amazon.com/dp/B08T9JJW6Y?psc=1&ref=ppx_yo2ov_dt_b_product_details

So, I got the LD24AJTA from Amazon, but one of the Inductor housing was damaged. That ain't no big deal.

So this is what I did with the LD24AJTA till now:

I wired it up, like in the pic below. This is the best pic that the seller of the LD24AJTA could give me lol.
1716566441160.png
The problem I ran into was that the LED is turning ON full blast, the moment the power supply is turned ON, as if I inputted 255 in the serial monitor, even though I did nothing.

So this will be my next task to tackle.
 
Top