MECHOWL ENGINEERING AI
Current-limiting resistor for LEDs and voltage divider calculator (output voltage, divider with a load)
Finds the value of the current-limiting resistor connected in series with LEDs and the power dissipated in it, from the supply voltage, the forward voltage and number of the LEDs and the current to pass. Also finds the output voltage, the currents and the power in each resistor of a divider of two resistors, and gives the output voltage with a load connected and R2 that sets the output voltage. With the rated power of the resistors entered, it is compared with the power dissipated.
Last updated
Inputs
Results
Results appear here as you enter values.
Results are reference values from your inputs and the stated formulas and standards; they do not guarantee that a design is correct or safe. The final decision rests with you.
References
- Introduction to Electronics, Signals, and Measurement (MIT 6.071J, 2006), lecture notes “Resistive circuit analysis. Kirchhoff’s Laws” · MIT OpenCourseWare · p. 6, equation (1.10) (the power in a resistor and the rated power); p. 12 Voltage divider, equations (1.25)–(1.29); p. 15, equation (1.39) (two resistors in parallel) · Open the document
- Introduction to Electronics, Signals, and Measurement (MIT 6.071J, 2006), lecture notes “Linear circuit analysis” · MIT OpenCourseWare · pp. 8–10, the Thevenin equivalent circuit and the Example (a divider with a load connected) · Open the document
- Introduction to Electronics, Signals, and Measurement (MIT 6.071J, 2006), lecture notes “Diodes 2” · MIT OpenCourseWare · p. 6 Light Emitting Diodes (LED), equation (1.10) (the current-limiting resistor) · Open the document
- NPTEL 117101054 Module 6 “Light Emitting Diode (LED)”, Lecture LED - I · NPTEL (open courses of the Indian Institutes of Technology) · Slide 10, Example 2 and the Exercise (examples of the current-limiting resistor and the power in the resistor) · Open the document
The references were chosen independently by MechOwl; they do not recommend or guarantee this page.
Report an error in this calculation (contact page of the official site, opens in a new tab)
Paste this line into your message:
https://mechowl.com/calc/en/electrical/led-resistor-divider/ (calculation version 0.2.0)
Explanation
An LED connected in the direction that passes current (the forward direction) lights at an almost fixed voltage (the forward voltage). To keep the current from becoming too large, a resistor is connected in series to set the current (source MIT OCW 6.071J). The value of the resistor is the supply voltage minus the forward voltage of the LED, divided by the current to pass: R = (V_s − V_F)/I_F (sources MIT OCW 6.071J and NPTEL). In this site’s calculation, when n LEDs are connected in series, the sum of the forward voltages n·V_F is subtracted. The power turned into heat in the resistor is P = I²R (source MIT OCW 6.071J). A voltage divider is a circuit of two resistors R1 and R2 in series that takes the voltage across R2; with nothing connected to the output, the output voltage is V_out = V_in·R2/(R1 + R2) (source MIT OCW 6.071J). When a load is connected to the output, the load is in parallel with R2, so the output voltage drops (this site’s calculation).
How to use
For “LED current-limiting resistor”, enter the supply voltage, the forward voltage of one LED, the number in series and the current to pass. For “Output voltage of a divider”, enter the voltage applied and R1 and R2; for “R2 for a target output voltage”, enter the voltage applied, the target output voltage and R1. For a divider, also choose the “Load on the output” (“No load” when nothing is connected; when something is connected, “A load resistance is connected” and enter the load resistance). To compare with the rating of the resistors, enter the rated power.
Worked examples (hand calculation)
Example 1: One LED: 6 V, 1.5 V, 15 mA (NPTEL example values)
The inputs are the values of the source (Example 2 of NPTEL 117101054 Module 6). V_R = 6 − 1 × 1.5 = 4.5 V. R = 4.5 ÷ 0.015 = 300 Ω (the source also gives 300 Ω). P_R = 0.015² × 300 = 0.0675 W (the source’s solution writes 300 × 2.25 × 10⁻⁴ = 77.5 mW, but this product is 0.0675 W = 67.5 mW). The rated power is not entered: “Required performance only”.
Example 2: One LED: 12 V, 1.8 V, 15 mA, rated 0.25 W (meets)
The voltages and the current are the values of the source (the Exercise of NPTEL 117101054 Module 6, answer 0.153 W). The rating of 0.25 W is a value chosen as an example. V_R = 12 − 1.8 = 10.2 V. R = 10.2 ÷ 0.015 = 680 Ω. P_R = 0.015² × 680 = 0.153 W (the same as the source’s answer). 0.153 W ≤ 0.25 W: “Meets the requirement under the entered conditions” (margin 0.25 ÷ 0.153 = 1.63398…, shown rounded down as 1.63).
Example 3: Three LEDs in series: 24 V, 3.2 V, 20 mA, rated 0.25 W (insufficient)
Values chosen as an example (not in the sources). V_R = 24 − 3 × 3.2 = 14.4 V. R = 14.4 ÷ 0.02 = 720 Ω. P_R = 0.02² × 720 = 0.288 W > 0.25 W: “Insufficient under the entered conditions”.
Example 4: Power exactly at the rating: 5 V, 2 V, 20 mA, rated 0.06 W
Values chosen as an example. V_R = 5 − 2 = 3 V. R = 3 ÷ 0.02 = 150 Ω. P_R = 0.02² × 150 = 0.06 W is exactly the rating of 0.06 W and not above it: “Meets the requirement under the entered conditions” (boundary).
Example 5: Small headroom: 10 V, three 3.2 V LEDs, 20 mA (warning)
Values chosen as an example. V_R = 10 − 3 × 3.2 = 0.4 V. R = 0.4 ÷ 0.02 = 20 Ω. P_R = 0.02² × 20 = 0.008 W. V_R = 0.4 V is smaller than a tenth (0.96 V) of n·V_F = 9.6 V, so by this site’s rule the warning that the current changes a lot with the spread of the forward voltage is given (the verdict does not change; the rating is not entered: “Required performance only”).
Example 6: Forward voltages add up to the supply: 6.4 V, two 3.2 V LEDs (out of scope)
n·V_F = 2 × 3.2 = 6.4 V, the same as the supply voltage (the boundary). The voltage across the resistor is 0 and a resistor cannot set the current (R would be 0 Ω): “Outside the scope” (no result is given; the reason is shown).
Example 7: Forward voltages above the supply: 5 V, two 3.2 V LEDs (out of scope)
n·V_F = 6.4 V > 5 V. With a series resistor, this supply cannot pass I_F through the LEDs (the resistance would be negative): “Outside the scope”.
Example 8: 1.5 LEDs (input error)
The number of LEDs is a whole number. 1.5 is an input error (no verdict is given).
Example 9: Divider: 12 V, 6 kΩ and 6 kΩ (MIT OCW example values)
The inputs are the values of the source (the Example on p.9–10 of MIT OCW 6.071J “Linear circuit analysis”). V_out = 12 × 6 ÷ (6 + 6) = 6 V (the same as the source’s open-terminal voltage of 6 V). I_1 = 12 ÷ 12,000 = 1 mA, I_2 = 6 ÷ 6,000 = 1 mA. P_1 = 0.001² × 6,000 = 6 mW, P_2 = 6² ÷ 6,000 = 6 mW. R_out = 6,000 × 6,000 ÷ 12,000 = 3 kΩ (the source’s 6 kΩ // 6 kΩ). “No load” is chosen, so no load current is given.
Example 10: Divider with a 3 kΩ load: 12 V, 6 kΩ and 6 kΩ (MIT OCW example, 2 kΩ and 1 kΩ in series as the load)
In the circuit of the source (MIT OCW 6.071J “Linear circuit analysis” p.9), the 2 kΩ and 1 kΩ in series on the output are taken as the load R_L = 3 kΩ. R_p = 6,000 × 3,000 ÷ 9,000 = 2 kΩ. V_out = 12 × 2,000 ÷ (6,000 + 2,000) = 3 V. I_1 = 12 ÷ 8,000 = 1.5 mA, I_2 = 3 ÷ 6,000 = 0.5 mA, I_L = 3 ÷ 3,000 = 1 mA (I_2 + I_L = I_1). The source’s vo = 1 V is across the 1 kΩ, so the load current is 1 V ÷ 1 kΩ = 1 mA, the same. P_1 = 0.0015² × 6,000 = 13.5 mW, P_2 = 3² ÷ 6,000 = 1.5 mW. The output voltage without the load is 6 V, R_out = 3 kΩ.
Example 11: Divider: 24 V, 1 kΩ and 2 kΩ, rated 0.125 W (insufficient)
Values chosen as an example. V_out = 24 × 2,000 ÷ 3,000 = 16 V. I_1 = I_2 = 24 ÷ 3,000 = 8 mA. P_1 = 0.008² × 1,000 = 0.064 W ≤ 0.125 W, P_2 = 16² ÷ 2,000 = 0.128 W > 0.125 W, so R2 is “Insufficient under the entered conditions”. R_out = 1,000 × 2,000 ÷ 3,000 = 666.67 Ω.
Example 12: R2 for 5 V: 12 V, R1 10 kΩ, no load
Values chosen as an example. R_2 = 5 × 10,000 ÷ (12 − 5) = 50,000/7 = 7,142.86 Ω. Check: 12 × 7,142.86 ÷ 17,142.86 = 5 V. I_1 = 12 ÷ (10,000 + 7,142.86) = 0.7 mA, I_2 = 5 ÷ 7,142.86 = 0.7 mA. P_1 = 0.0007² × 10,000 = 4.9 mW, P_2 = 5² ÷ 7,142.86 = 3.5 mW. R_out = 10,000 × 7,142.86 ÷ 17,142.86 = 4,166.67 Ω.
Example 13: R2 for 5 V: 12 V, R1 10 kΩ, load 100 kΩ
Values chosen as an example. R_p = 5 × 10,000 ÷ 7 = 7,142.86 Ω (the value needed in parallel with the load). R_2 = 7,142.86 × 100,000 ÷ (100,000 − 7,142.86) = 100,000/13 = 7,692.31 Ω (1/R_2 = 7/50,000 − 1/100,000 = 13/100,000). I_1 = 7 ÷ 10,000 = 0.7 mA, I_2 = 5 ÷ 7,692.31 = 0.65 mA, I_L = 5 ÷ 100,000 = 0.05 mA. P_1 = 4.9 mW, P_2 = 25 ÷ 7,692.31 = 3.25 mW.
Example 14: Divider with the load not chosen (missing)
The load is in parallel with R2 and lowers the output voltage, so when it is not chosen, the divider is not calculated as “No load”. When nothing is connected, choose “No load”. It is not chosen, so nothing is calculated: “Cannot be judged: conditions missing”.
Example 15: R2 for 5 V with a 7.5 kΩ load (R2 is 20 times the load: warning)
Values chosen as an example. R_p = 5 × 10,000 ÷ 7 = 7,142.86 Ω. R_2 = 7,142.86 × 7,500 ÷ (7,500 − 7,142.86) = 150,000 Ω (1/R_2 = 7/50,000 − 1/7,500 = 1/150,000). R_2 is 20 times the load of 7.5 kΩ, so by this site’s rule (10 times or more) a warning is given (the verdict does not change). I_1 = 0.7 mA, I_2 = 5 ÷ 150,000 = 0.0333 mA, I_L = 5 ÷ 7,500 = 0.667 mA. P_1 = 4.9 mW, P_2 = 25 ÷ 150,000 = 0.167 mW. R_out = 10,000 × 150,000 ÷ 160,000 = 9,375 Ω.
Example 16: R2 for 5 V with a 5 kΩ load (out of scope)
The parallel resistance needed, R_p = 7,142.86 Ω, is at least the load of 5 kΩ. A parallel resistance is smaller than the load, so even an infinitely large R2 does not reach it (the output voltage with R2 removed is 12 × 5,000 ÷ 15,000 = 4 V): “Outside the scope”.
Example 17: Target equal to the input voltage (input error, before the load check)
The output voltage of a divider is smaller than the voltage applied. 12 V ≥ 12 V is an error in the relation between the inputs that no divider of resistors can give, so it is an input error (the field is the target output voltage). With the 1 kΩ load it would also meet a condition of “Outside the scope”, but the input error is given first (no verdict is given).
Common mistakes
- Setting the resistor as the supply voltage ÷ the current without subtracting the forward voltage of the LED: the resistance becomes larger and the current falls short (this site’s guidance).
- Choosing a resistor smaller than the calculated value: the current becomes larger than I_F. In this site’s calculation the resistance is the value that makes the current I_F; choosing a larger value makes the current smaller than I_F.
- Looking at the output voltage with the no-load formula when a load is connected to the divider’s output: the load is in parallel with R2 and the output voltage drops. When the load resistance is not large enough compared with R2, choose “A load resistance is connected” under “Load on the output”, enter the load resistance and check (this site’s guidance).
- Not looking at the power the resistor dissipates: choose a resistor whose power dissipated does not exceed its rated power (the source MIT OCW 6.071J writes that a resistor is destroyed by heat when its rated power is exceeded).
FAQ
- What forward voltage and current should I use for the LED?
- This page does not set the values. Enter the forward voltage in the documents (data sheet) of the maker of the LED you use, and a current chosen within the range of those documents (this site’s guidance).
- What do I do when no resistor has the calculated value?
- In this site’s calculation, the resistance is the value that makes the current I_F. Choosing a value on the larger side makes the current smaller than I_F. The current with the chosen resistor can be checked with the Ohm’s law calculator by entering the voltage across the resistor V_s − n·V_F and the value of the chosen resistor (this site’s guidance).
- What about connecting the divider’s output to a sensor or an input terminal?
- Choose “A load resistance is connected” under “Load on the output” and enter the input resistance of what is connected. The output voltage with the load is given. The “resistance seen from the output” is a guide to how much the output voltage drops when a load is connected to the output (this site’s guidance).
Scope
The current-limiting resistor and its power for a DC circuit of 1 to n LEDs in series. The output voltage, currents and power of a divider of two resistors (DC, or AC RMS with resistors only; with no load or a resistive load on the output), and R2 that sets the output voltage. Comparison with the rated power of the resistors.
Not covered by this calculation:
- When the sum of the forward voltages of the LEDs is at least the supply voltage
- LED circuits lit from AC
- Circuits with LEDs in parallel, constant-current circuits and circuits lighting LEDs with PWM
- Output voltages that cannot be reached with the load connected (when R2, however large, does not reach them)
- Dividers of three or more resistors, the internal resistance of the supply, the tolerance of the resistance values and their change with temperature