Correct use of resistors and constant current for LED

Hello,

I’m working on a project to use an Arduino to turn on and off around 4 high power 1W LEDs, each using 350mA. From my research it seems I need to use a DC-DC voltage and current regulator to supply constant current for the LEDs.

I plan to supply the LEDs with a 12v DC power supply. It seems I have about two options for powering the LEDs.

  1. Power all 4 in series (3 blue 1 red), total current output on the buck converter would be 350mA, and voltage around 12, assuming 3.2V for the blue LEDs and 2.1V for red. The problem with this option is I’m not sure the DC-DC converter can output that high a voltage to its input.

  2. Power 4 LEDs with 2 in parallel each (Proposed schematic https://i.imgur.com/g8xzo0l.jpg). What I understand is having two blue on one strand will need a voltage drop on that “branch” to be 6.4-6.6V, and then on the other branch to have a current of 350mA I’ve added a resistor to bring that branch current to 6.6V with the red and blue LED. The problem with this solution is I’ve heard the high power type LEDs experience different voltage drops according to temperature and the resistor needed to keep the 350mA current in each branch would be wrong at times and could end up having too high a current on the blue LED branch, I could counteract this by using a lower set current for the whole system.

My understanding with the 2N2222A is to power the base with a 5V signal from an Arduino pin, a resistor about 500 ohms or bellow is fine (I’m still trying to wrap my head around the data sheet values).

What do you think is the best option, or any advice about getting this system working. Perhaps I should use two seperate LED drivers to ensure proper current, or something else entirely? Thanks :slight_smile:

I'd suggest using a part like this

Available at Digikey.com

Might be able to find this part or a similar one on a breakout board at Sparkfun or Adafruit, or order your own SMD-DIP adapter and solder it up.

@CrossRoads
I was looking at using these https://a.aliexpress.com/_BffvfBxz XL4015 5A DC to DC CC CV Lithium Battery Step down Charging Board Led Power Converter Lithium Charger Step Down Module XL4015 E1|lithium charger|charging boardstep down charging - AliExpress I’m quite an amateur and I haven’t used a stand-alone chip type converter before, I wouldn’t know where to start with it.

That link is not good.

Take a look at this part

and this in the Documents tab
https://learn.sparkfun.com/tutorials/femtobuck-constant-current-led-driver-hookup-guide-v12

@CrossRoads
What are the disadvantages of the product I’ve linked?

I’d rather use a simpler and cheaper solution, your board (in Australia) costs about 10 times more than a DC-DC converter.

Your link comes back with a 404 page not found.
https://a.aliexpress.com/_BffvfBxz

CrossRoads:
Your link comes back with a 404 page not found.
https://a.aliexpress.com/_BffvfBxz

Ahh that makes sense, this is the product I'm referring to. XL4015 5A DC to DC CC CV Lithium Battery Step down Charging Board Led Power Converter Lithium Charger Step Down Module XL4015 E1|lithium charger|charging boardstep down charging - AliExpress
I think a good course of action might be to run two of them, one for each parallel branch, that way in the future I could increase the LED amount and not worry about the extra resistor, what would you recommend?

(Fixing this situation https://i.imgur.com/g8xzo0l.jpg)

Two of those current regulators sounds just fine, assuming their range of current adjustment runs down to 350 mA. Just buy them and check it out with some sort of "dummy load" (resistor will do).

Fiddling with "extra" resistors was going to get you nowhere! :roll_eyes:


Suppose we will see you again (just add to this thread) in - let's see - about eight weeks? :grinning:


Oh, by the way, you can't switch the LEDs with a 2n2222 transistor like that on a constant-current driver. :astonished:

You must switch the constant-current converter itself - I believe it has an "enable" pin.

Paul__B:
Two of those current regulators sounds just fine, assuming their range of current adjustment runs down to 350 mA. Just buy them and check it out with some sort of "dummy load" (resistor will do).

Yes, I think this too is the safest option thanks!

Paul__B:
Oh, by the way, you can't switch the LEDs with a 2n2222 transistor like that on a constant-current driver. :astonished:

You must switch the constant-current converter itself - I believe it has an "enable" pin.

Why can’t the LEDs be switched with a transistor? The 2N2222 application supports up to 800mA. I’m just worried about relying on the PWM pin to enable or disable the lights, I’ve heard people struggling to have them function.

If 3.2V and 2.1V then all you need is 3.9 ohm resistor (1W ideally, 0.5W at a pinch) in series with all four of
them, and give the 2N2222 a 150 ohm base resistor. Job done.

12 - 2*(3.2+2.1) = 1.4V 1.4V / 0.35A = 4 ohms, nearest E12 value is 3.9 ohms. Power in resistor = 3.9 * (0.35^2).

But check those voltages first.

MarkT:
If 3.2V and 2.1V then all you need is 3.9 ohm resistor (1W ideally, 0.5W at a pinch) in series with all four of
them, and give the 2N2222 a 150 ohm base resistor. Job done.

12 - 2*(3.2+2.1) = 1.4V 1.4V / 0.35A = 4 ohms, nearest E12 value is 3.9 ohms. Power in resistor = 3.9 * (0.35^2).

The problem with resistors driving high power LEDs is, beyond the inefficiency’s, the LEDs nature to have a variable voltage drop based on its temperature, and you can end up with them becoming too high powered with a set resistor.

And 1.4V out of 12V is about 12% loss, probably about the same as a constant current circuit.

Tempco isn't a huge effect for a pn-junction, a few mV per degree, and 1.4V is 350mV per pn-junction
which should be a reasonable buffer, assuming an accurate stable supply voltage. I wouldn't want
much less than this, which is why I said "if 3.2V and 2.1V" and "But check those voltages first".

denyol:
Why can’t the LEDs be switched with a transistor? The 2N2222 application supports up to 800mA.

Thought you might ask! :grinning: Just waiting for it.

Notice that the regulator module has a capacitor on the output? If you disconnect the LED, the regulator will attempt to maintain the set current by raising the output voltage to its set limit, which you have of course, set to something way more than the highest you expect the LEDs to require.

So when you now turn them on again with the transistor, the capacitor will deliver a quite massive pulse of current.

denyol:
I’m just worried about relying on the PWM pin to enable or disable the lights, I’ve heard people struggling to have them function.

What PWM pin? What people? What struggle? Where did you hear this?

MarkT knows about what he is talking. If the voltages are as cited (and that is an if), you may be able to just use them all in series with a limiting resistor and switch with the 2N2222.

Paul__B:
What PWM pin? What people? What struggle? Where did you hear this?

MarkT knows about what he is talking. If the voltages are as cited (and that is an if), you may be able to just use them all in series with a limiting resistor and switch with the 2N2222.

Supposedly the chip (XL4015) has PWM capability, from the data sheet "the PWM control circuit can adjust the duty ratio linearly from 0 to 100%".

I've ordered 2, I'm hoping they come with an enable pin.

Paul__B:
Notice that the regulator module has a capacitor on the output? If you disconnect the LED, the regulator will attempt to maintain the set current by raising the output voltage to its set limit, which you have of course, set to something way more than the highest you expect the LEDs to require.

So when you now turn them on again with the transistor, the capacitor will deliver a quite massive pulse of current.

This sounds like a terrible situation. If I have the voltage set very close to expected drive voltage, would this issue be mitigated?

denyol:
This sounds like a terrible situation. If I have the voltage set very close to expected drive voltage, would this issue be mitigated?

Somewhat. But then you may not get the desired current. :roll_eyes:

MarkT:
And 1.4V out of 12V is about 12% loss, probably about the same as a constant current circuit.

Tempco isn't a huge effect for a pn-junction, a few mV per degree, and 1.4V is 350mV per pn-junction
which should be a reasonable buffer, assuming an accurate stable supply voltage. I wouldn't want
much less than this, which is why I said "if 3.2V and 2.1V" and "But check those voltages first".

As I understand it, the issue with high power LEDs as used in lighting applications, the junction temperature may be 40 to 60 C above ambient at the manufacturer's recommended current. Lighting LED may have a temperature coefficient on the order of -5 mV/C, so forward voltage would change something like 0.2-0.3 V per LED in the series. It's a negative coefficient, so the circuit may be susceptible to thermal runaway.

Certainly one could appropriately de-rate the LED current to compensate (use a higher value resistor), but this sacrifices efficiency and light output. Using simple resistive current limiting may be worthwhile trade for simplicity in a particular application, but it's the reason lighting LED circuits generally use active current regulation.

MarkT:
And 1.4V out of 12V is about 12% loss, probably about the same as a constant current circuit.

Tempco isn't a huge effect for a pn-junction, a few mV per degree, and 1.4V is 350mV per pn-junction
which should be a reasonable buffer, assuming an accurate stable supply voltage. I wouldn't want
much less than this, which is why I said "if 3.2V and 2.1V" and "But check those voltages first".

I re-checked the data that I can find. The blue LED's have a voltage drop range of 3.2-3.4v and the red is 2.0-2.2v.

The problem with the LED's operating across their highest voltage drop is the supply of my 12v power supply.