I draw the circuit for driving Strings of LEDs. I have regulated DC supply of 17.5V @ 1A. I didn't choose constant current supply because it was adding extra cost to the whole project, therefore for driving LEDs I am using Constant Current source driver based on N channel MOSFET and NPN Transistor with some resistors, it's cheap and cost effective solution, as I have to keep the cost of project as low as possible.

I visited many website and tutorials for how it works and have this circuit made, I am still not sure about the circuit :-

Here is the Circuit to Drive 20 LEDs using ESP8266 SoC Module.

enter image description here

Component Specifications :-

White LED(SMD) - Package 2835

  • Vf = 3.1-3.2V
  • If = 60mA(Typ), 90mA(Max), Pulse current = (150mA)

Q1 (N-channel MOSFET) - Package SOT-23

  • IDS: 5.8A
  • VGS: ±12V
  • VDS: 30V
  • VGS(th) = 1.05V
  • RDS(ON) (at VGS=10V) < 28mΩ
  • RDS(ON) (at VGS = 4.5V) < 33mΩ
  • RDS(ON) (at VGS = 2.5V) < 52mΩ

    Some Other info :-

enter image description here

Link to Datasheet :- http://www.aosmd.com/pdfs/datasheet/ao3400.pdf

MMBT3904 NPN Transistor

enter image description here

Link to Datasheet :- http://www.onsemi.com/pub/Collateral/MMBT3904LT1-D.PDF

Some Calculations :-

  • The Needed Current to fully glow all 5Series 4Parallel LEDs = 360mA (90*4).
  • Total voltage drop across LEDs = 16V (3.2*5).
  • Input Voltage = 17.5V @ 1A
  • The Vbe of NPN = 0.7V

The Current though MOSFET and LED will be defined by R5 and R6 resistors. Therefore

  R5 = R6  = 0.7/If(LED)
  R5 = R6  = 0.7/0.45 ohm.  (450 mA taken, extra 100 mA as buffer)
  R5 = R6  = 1.5 ohm

Power Dissipation at R5 and R6 :-

Ps = 0.49/1.5 W
Ps = 326 mW

Voltage Drop Across MOSFET:-

Vm = Vs - Vf(LED) - Vbe
Vm = 17.5 - 16 - 0.7
Vm = 0.8 V

Power Dissipation on the MOSFET :-

Pm = Vm * If (LED)
Pm = 0.8 * 0.45
Pm = 360 mW

Reference PCB board with Aluminium Heatsink on the backside :-

enter image description here

Questions :-

  • Is circuit appropriate to drive all 20 Leds with above calculations?
  • Any thermal run away issue with the circuit?
  • Do I need limiting resistance on the LED side?
  • What does Pulse current refer to in LEDs?
  • What is the use of Resistance R21 & R7 in circuit?

Edit :-

The Vf vs Junction temperature Graph :-

enter image description here

The Vf vs If Graph :-

enter image description here

  • \$\begingroup\$ Do you just intend on simply turning them on always at 100% duty cycle? Also, which manufacturer is making the 2835 LED are you using? \$\endgroup\$
    – jonk
    Commented Mar 4, 2017 at 22:17
  • \$\begingroup\$ @jonk Turning ON for like 10 hours per day. I am using Edison LEDs. Here is the link to product page : edison-opto.com/en/product/plcc_2835_series and part number is 2T03X2CW11000002 \$\endgroup\$
    – MICRO
    Commented Mar 5, 2017 at 8:43
  • \$\begingroup\$ Do you know what binning you are using? Makes a lot of difference. See bottom of page 5 of your datasheet. The curve you show is just an example. A lot still depends on the bin. \$\endgroup\$
    – jonk
    Commented Mar 5, 2017 at 14:52
  • \$\begingroup\$ @jonk Yes, I will be getting either VA2 or VB3 Voltage Bin group. I am purchasing LEDs from authorised dealer. \$\endgroup\$
    – MICRO
    Commented Mar 5, 2017 at 18:03
  • \$\begingroup\$ Thanks. Do you care if there are four chains of 5 LEDs or 5 chains of 4? Does the increase in dissipation matter to you? (I'm worried about the headroom available.) \$\endgroup\$
    – jonk
    Commented Mar 5, 2017 at 19:59

3 Answers 3


I would never power LEDs in parallel without a series resistor in each branch to balance the currents between the branches, especially if the LEDs are intended to be powered close to their maximum current. If you don’t try the balance the currents, a branch may get slightly more current than the others, which will make the LEDs in the branch slightly hotter, changing the U-I characteristics such that the branch will get more current, and you have thermal runaway. I think a 1Ω resistor in each branch should be enough.

The pulse current is the maximum current allowed in the LED for a short time (for example if one wants to flash the led for a still picture camera). The max current should be the maximum current the LED can accept, probably with perfect thermal dissipation. I’d rather not use currents much higher than the nominal current.

Your calculations for resistor values and power dissipations look fine to me.

Edit: it is not fine. First, if the maximum current in your LEDs is \$4 \times 90\textrm{mA} = 360\textrm{mA}\$ you should certainly not design a current regulator for a higher current, or you will burn your LEDs. You should rather design it for a lower current to ensure you won’t burn them. I’d go for \$4 \times 60\textrm{mA} = 240\textrm{mA}\$. Then, you’d get \$\textrm{R5} \parallel \textrm{R6} = \frac{0.7\textrm{V}}{0.24\textrm{A}} = 2.9\Omega\$, with \$\textrm{R5} \parallel \textrm{R6} = \frac{\textrm{R5} \times \textrm{R6}}{\textrm{R5} + \textrm{R6}}\$. If you choose \$\textrm{R5} = \textrm{R6}\$ (which is sane), you have \$\textrm{R5} \parallel \textrm{R6} = \frac{\textrm{R5}}{2} = \frac{\textrm{R6}}{2}\$, hence \$\textrm{R5} = \textrm{R6} = 5.8\Omega\$.

Your circuit is more a current limiter than a current regulator. It works because when current gets (too) high, the Vbe of T1 gets high, and then T1 will reduce the Vgs voltage of Q1, which become more resistive and will reduce the current. R7 is useful so that T1 can reduce the voltage. Without it, you might just burn T1 if WHITE_GPIO was connected to a low-impedence voltage source.

I have no idea about the use of R21.

  • \$\begingroup\$ His current control resistor calculations are actually wrong, even assuming his current estimate was wisely chosen (it's not) and assuming his NPN BJT \$V_{BE}=700\:\textrm{mV}\$ is also correct. Take a closer look. \$\endgroup\$
    – jonk
    Commented Mar 4, 2017 at 22:21
  • \$\begingroup\$ Ok, you’re right, I did not look closely enough, I will edit my answer. \$\endgroup\$ Commented Mar 4, 2017 at 22:30
  • \$\begingroup\$ @jonk How are current estimates wrong? The attached specs sheet of NPN shows the range of 0.65-0.85 of Vbe. Can be increase if Ib = 10mA which will be not as 1K resistance limits the current and max current at base will 3.3mA (3.3/1000). \$\endgroup\$
    – MICRO
    Commented Mar 5, 2017 at 9:08
  • \$\begingroup\$ @AnujMattóõ: I editted my answer: you should not design a current regulator for a current higher than the max current of your diodes, or you will burn them! Your “extra 100 mA as buffer” is plain wrong. \$\endgroup\$ Commented Mar 5, 2017 at 10:10

Is circuit appropriate?


The biggest concern for the uninitiated here is thermal runaway and temperature rise and this depends on LED supplier quality for matched Vf.

  • The conditions for runaway require that the NTC Vf changes in ΔI per string cause a rise in junction temp due to the lower Vf string of that string while the other shared strings share less current and drop in temperature.

  • It should be intuitive that the more LEDs in series the less variation in current changes due to -ΔV/+ΔT a drop in Vf for each degree rise in Tjcn.

  • However the NTC value is only -1.9 mV/ºC

    • so a thermal difference of 50ºC means a drop of 0.1V
    • I expect LED's should be matched within +/-0.1V in a batch but mixed batches are possible.
    • for this case size of 2835 (metric) Rj-sp = 18 ºC/W typ.
    • The thermal coupling between LEDs is unknown but this is far better than off board
    • To analyze this properly requires a stability criteria with a "loop gain of <1" where the gain is the product of the +ve voltage rise with current and the -ve voltage fall with rise in temperature , causing a rise in current across the LED ESR.
      • e.g. a ΔT rise of 20ºC @-1.9 mV/ºC means a drop of Vf of 38 mV which with a forced constant voltage is actually a 38 mV rise in V across 2Ω ESR or a current rise of 19mA with a power rise of ΔI²ESR= 0.72mW which results in a temp rise of 0.72mW * 19'C/W = 0.13'C so this should be stable.
      • using the difference between strings and not the absolute values for one LED.
      • stability margin is greatly enhanced using a series R equal to the ESR of one LED or 2 Ω.
      • the photo uses values of 3R3 and 5R5 Ω
    • The loop becomes more critical at high temperature gradients and high currents.
    • I expect the temperature rise from one LED across the board should be fairly uniform steady state, but initially may be high if there is a huge mismatch
      • but this is becoming less common especially with high efficacy LEDs and better Vf control because higher ESR than nominal (1/Pd) means much lower efficacy. This is a vendor quality control issue, so choose sources wisely.

    What does Pulse current refer to in LEDs?

Normally PWM can be used at greater than I max current at lower than 100% duty cycle. The ratio is generally low for pk/avg like <1.2 for PWM applications with some loss in efficacy. Often they rate it in max Pulsed Flux and compared with DC flux so you don't get any silly ideas of driving 2x current at 50% duty cycle.

What is the use of Resistance R21 & R7 in circuit?

. R17 (100 = 10Ω) could be to bridge the different LED size strings due to greater mismatched Vf.

In short the need for series R's per strings is totally dependent on the Vf tolerance of the LEDs and the thermal coupling between them.

So minimal values of 1/Pd Ω are used per string and sometimes more and in my case I get matched <0.1V parts so I use 0 Ω.


From the Edison datasheet there are bin numbers for Vf. Only your supplier can control what you get after you request . Normally cost increases significantly for single bin range +/-0.05V. Requesting two adjacent bins might be reasonable. Most distributors will choose depending on how much you order unless you specify cost impact.

  • VB1 2.9 3.0 < .
  • VC1 3.0 3.1 < ...
  • VA2 3.1 3.2 < most common for some suppliers.
  • VB2 3.2 3.3 < most common for some suppliers.
  • VC2 3.3 3.4 < ...
  • VA3 3.4 3.5 < ..
  • VB3 3.5 3.6 < .


Colour temp options are critical for personal choice. mine is 4000~4500K

  • \$\begingroup\$ I am using Edison LEDs. Here is the link to product page :- edison-opto.com/en/product/plcc_2835_series and part number is 2T03X2CW11000002. \$\endgroup\$
    – MICRO
    Commented Mar 5, 2017 at 8:54
  • \$\begingroup\$ I understand the fact that with rise in junction temperature the forward voltage will start to decrease. And the LEDs will beconsuming 90% of their Max current limit ( 90mA) for like 9-10 hours per day. So, adding resistor of either 1Ω or 0Ω will be sufficient to match the Vf of LEDs? \$\endgroup\$
    – MICRO
    Commented Mar 5, 2017 at 9:05
  • \$\begingroup\$ Remember Rs added depends on ΔT vs ΔVf matching . The amount of mismatch increases with I²ESR so a reduction from rated I means more margin away from runaway and sensitivity of ΔI vs T drops rapidly with ESR+Rs. Testing is essential using Vf @I pulse test using a test jig such that Tjcn does not change with narrow Δt pulse. If you want to guess go ahead rather than use my Rule of Thumb. Resistors are almost free. Failure is not an option with blind assumptions. Time > 1 minute is irrelevant. \$\endgroup\$ Commented Mar 5, 2017 at 15:56
  • \$\begingroup\$ Yes, I will be getting either VA2 or VB3 Voltage Bin group. I am purchasing LEDs from authorised dealer. The Color Temp is Cool white and Warm White both. I am will be using 1 ohm as resistor in all parallel strings. Just to confirm, add leds on cathode side or anode side? Will that make any difference? \$\endgroup\$
    – MICRO
    Commented Mar 5, 2017 at 18:08
  • \$\begingroup\$ no diff ok then. If you want to measure board temp. rise for quality test purposes, measure Vbe voltage with a series R for isolation and external dimming feature. \$\endgroup\$ Commented Mar 5, 2017 at 18:18

If you have the space availabe and can afford the almost free resistors, this is one way of making sure to have both current balance between the strings and minimuze the increased current in adjecent LEDs when one fail. Choose the resistors to give enough voltage to overcome the maximum difference in forward voltage between two LEDs at maximum current one could expect.


simulate this circuit – Schematic created using CircuitLab


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.