Why we use 330 ohm resistor to connect a LED?

This is to limit current through LED, without resistor LED will eat current until it melts.

Voltage drop across a LED depends on a it's color, for blue led for example - 3.4V. So if you have 5V power supply, and want 5mA current through led (5mA usually gives good visibility), you need (5V-3.4V)/0.005A = 320 Ohm resistor. (I.e. this resistance will give voltage drop across resistor of 1.6V, remaining 3.4V drops on LED => 5V total)

Red LEDs usually have smaller voltage drop (~2V), so you'll have slightly higher current with same resistor, but anything below 20mA is usually ok. Also, slightly smaller currents are ok, LEDs at 1mA are easily visible.

PS. few extra things:

1) Light output of led is linearly proportional to current until it's well over specifications. That's why everyone are talking about current through led.

2) Personally I throw 220 Ohm in 5V circuits to make it really bright :-)

But on my recent project where I had 3.3V supply, and leds of different color (green, red, blue) I had to calculate resistances more carefully, and they were 68 Ohm for blue and 220 Ohm for green and red.


Solution summary:

  • A series resistor limits the current to a value which can be designed for if you know, V supply, LED voltage drop at desired current and desired current. See LED data sheet for typical Vled at a given current. Then -

    • Iled = (Vsupply-Vled)/ Rseries or
    • Reseries = (Vsupply - Vled) / Iled.
  • Many small LEDs are rated for 20 mA max operation.

  • Using 330 ohms in series is a "lazy man's" calculation-free and thought-free method of ensuring that an LED will be able to be safely operated on a 5V supply but still have a reasonably large percentage of the output that it would have at 20 mA.

  • LED current or resistor calculators may be found
    here - from Jeremy Kerr
    and here - from @AndrejaKo
    also see Voltage/colour chart here - from Endolith


Detail:

330 ohms may be used by some people as a "get you going" value that works "well enough" in many cases.

The purpose of the resistor is to "drop" voltage that is not required to operate the LED, when the LED is operating at the desired current. As the forward voltage of LEDs varies both with colour and chemistry used and with current, and as the "desired" current varies with the user's needs, there is NO single correct value. See "Procedure:" at end for a step by step application of this.

However:

White LED, forward voltage = Vf = ABOUT 3.3V.
On a 5V supply resistor voltage = Vr = 5-LED voltage = 5-3.3 = 1.7V.
Current = Iled will be V/R = 1.7/330 = 5.15 ~= 5 mA

Red LED. Vf =ABOUT 2.2V.
Vr = 5-2.2 = 2.8V.
Iled = 2.8/330 = 8.4848... ~+ 8.5 mA.

IR LED. Vf = 1.8V. Iled =~ 10 mA.

In the above cases Iled varies from ABOUT 5 mA to ABOUT 10 mA.
A factor of 2:1.

In reality currents will be somewhat higher as typical Vfs I used are at 20 mA typically.
At lower currents Vf is lower (see LED data sheets) and so R has more voltage drop so there is more current so ... .

________________________________________

PROCEDURE:

  • Specify desired current = I_LED Specify supply voltage = Vs

  • Use data sheet to determine typical LED 'forward' voltage drop at specified current = Vf

  • Voltage drop across resistor = Vr is the portion of Vs voltage which is not across LED. ie Vr = Vs - Vf

  • Resistor value = R is given by Ohms law: R = V/I

    where V is voltage across resistor and
    I is current through LED + resistor in series.

  • So: R = V/I = Vr / I_LED = (Vs-Vf)/I_LED

Tags:

Led