# Connecting resistor in LED parallel circuit

I connect 3 LED in parallel with a two AA battery source 1.2V each. As i searched in the web i realized that it is not correct to connect them without a resistor as they may get damaged.

How mane ohms will the resistor need to be? I think to put one resistor for all the LEDs like this:

The circuit you have shown is also not a very good idea. Ideally, each LED requires a series resistor. If the forward volt drop of one LED is a few percent smaller than the forward drop of another LED, the first LED will "hog" all the current and possibly burn-out. See this graph of forward volt drop and LED current: -

If one LED's characteristic curve starts at a slightly lower voltage (say 1.6 volts), it will be dropping 1.9 volts at 20mA and the other LED (20mA at 2volts) will be forced into taking a current of only 5mA because the terminal voltage of parallel LEDs is dictated by the LED with the smallest volt drop. What if a third LED was starting to conduct at 1.8 volts, with 1.9 volts across (as dictated by the first LED), this third LED will draw about 1mA.

In this simple scenario, you can see that the LED brightnesses will be varied a lot.

Ignoring this, for one resistor and one LED, if the current needed is 20mA and the forward volt drop of the LED is 2 volts then the resistor needs to "drop" a voltage that is $V_{SUPPLY} - 2V$. If the supply voltage is (say) 5V, the resistor carries 20mA whilst dropping 3 volts i.e. it has a resistance of 150 ohms.

I think to put one resistor for all the LEDs like this:

You think wrong. That circuit is very bad and should be avoided at all costs. You are assuming that each LED will have precisely the same characteristics as every other LED, which is simply not the case. The LED with the lowest forward voltage will get most of the current and potentially blow, leaving too much current for the other LEDs, which then also blow. That's called a Cascade Failure.

Instead treat each LED as a separate circuit. Provide one resistor for each LED and calculate them all separately (or use the same value resistor for all of the LEDs if they are all roughly the same).

simulate this circuit – Schematic created using CircuitLab