Resistance and LED: on the anode or on the cathode?

The role of resistance in a circuit powersource/resistance/LED/ground is essentially limiting the current that flows through the LED.
To work properly a LED needs a current of about 15-20mA (or more if it is a high brightness LED).

Without a resistance the LED would tend to absorb all of the current that the source (in our case the arduino pin which feeds it) can provide. The LED might burn if the source can provide a lot of current (i.e. a battery car) or the generator could be damaged.

Because the LED has a fixed voltage drop of 1.5V (it is a common value, but different LED could have different voltage drop) the resistance value to be used is calculated as [R = (Vcc - 1.5) / I] as ohm laws tell.

In a simple case as a 5v power from the resistance value is suitable: (5 - 1.5) V / 0.015A = 233ohm.
The commercial value of 220ohm would be fine.

Like Leon Heller say resistor and led are series-connected, both if you connect source/resistor/led/ground or source/led/resistor/ground, so the current flow will be the same.

If you have a digital/analog multimeter try to build the first 2 circuit in attachment (use 220ohm as resistor) and measure the current flow: It will be the same. Try to measure voltage on resistor, and voltage on diode: it will be the same. Try to use an higher resistor (i.e. 470ohm) and you will measure a lower current flow and, of course, your LED look less bright. Try to remove resistor as in third circuit if you want to burn your LED!

aaa.bmp (24 KB)