LED's aren't best modeled as a pure resistor. As noted in some other answers, real LED's do have resistance, but often that's not the primary concern when modeling a diode. An LED's current/voltage relationship graph:
Now this behavior is quite difficult to calculate by hand (especially for complicated circuits), but there is a good "approximation" which splits the diode into 3 discrete modes of operation:
If the voltage across the diode is greater than Vd
, the diode behaves like a constant voltage drop (i.e. it will allow whatever current through to maintain V = Vd
).
If the voltage is less than Vd
but greater than the breakdown voltage Vbr
, the diode doesn't conduct.
If the reverse bias voltage is above the breakdown voltage Vbr
, the diode again becomes conducting, and will allow whatever current through to maintain V = Vbr
.
So let's suppose we have some circuit:
simulate this circuit – Schematic created using CircuitLab
First, we're going to assume that VS > Vd
. That means the voltage across R
is VR = VS - Vd
.
Using Ohm's law, we can tell that the current flowing through R (and thus D) is:
\begin{equation}
I = \frac{V_R}{R}
\end{equation}
Let's plug some numbers in. Say VS = 5V
, R=2.2k
, Vd=2V
(a typical red LED).
\begin{equation}
V_R = 5V - 2V = 3V\\
I = \frac{3V}{2.2k\Omega} = 1.36 mA
\end{equation}
Ok, what if VS = 1V
, R = 2.2k
, and Vd = 2V
?
This time, VS < Vd
, and the diode doesn't conduct. There's no current flowing through R
, so VR = 0V
. That means VD = VS = 1V
(here, VD
is the actual voltage across D
, where-as Vd
is the saturation voltage drop of the diode).
Since LEDs drop voltage when there's current through them, and since Ohm's law states that:
$$ R = \frac{E}{I} $$
They can certainly be considered to be resistances of a particular value with a known current through them and a known voltage across them.
For instance, one of your your LEDs, with 20mA through it and 2 volts across it, will look like:
$$ R = \frac{E}{I} = \frac{2V}{0.02A} = 100 \text{ ohms}$$
Usually, though, the resistance of the LED is ignored because it's not needed to calculate the values of the ballast resistors or the transistor's base resistor.
The value of the ballast resistor is determined by:
$$ Rs = \frac{Vs - (n \ \ Vf) + Vce(sat)}{If}\text{ ohms} $$
where n is the number of LEDs, Vf is the forward voltage of one LED, Vce(sat) is the transistor's collector to emitter saturation voltage,\$If\$ is the LED forward current, and Vs is the supply voltage.
In your case that works out to:
$$ Rs = \frac{12V - (3 \times 2V) + 0.5V}{0.02A}\text{ 275 ohms} $$
The 330's you have in there will work, no problem, with the LEDs losing a little brightness.
Since there will be three series strings in parallel, the current into the transistor's collector will be 60 milliamperes. Switching transistors doing this kind of work are usually run at a forced beta of ten, which means that for 60 mA into the collector 6 mA is forced into the base.
The base-to-emitter junction of a transistor is basically a diode, so in this case it'll drop about 0.7 volts with 6 mA through it.
That means that with the Arduino supplying 5V to drive the base, about 4.3 volts of that must be dropped across a resistor with 6 mA through it so, from Ohm's law, R = E/I = 4.3V/6mA = 717 ohms. 750 ohms is a standard E24 value and will work well.
Best Answer
Diodes are not ohmic. Resistors have a linear relationship between current and voltage. That is the relationship described by Ohm's law which you used in your question. Diodes look like this:
We normally model them as a simple voltage drop when they are forward biased and an open circuit when they are reverse biased. If more precision is desired, we sometimes model the forward biased state with a voltage drop and a resistance. However, what you have computed is not the same as this resistance. Your calculation fits a line between the origin and your present circuit's operating point, giving a much different number.
To say that your LED has that resistance is misleading as if you change the current, the voltage will not change proportionately.