So you need a resistor in series with an LED or two or five to avoid runaway current overload..
What often confuses beginners, is that resistor in series can be any place in the series group.. View the first two images.
Notice the battery is reversed in the last frame !
Notice the small change in LED forward voltage causes large changes in LED forward current..
The colors indicate LED colors and blue curve also represents white LEDs..
When the the current is not limited by a resistor the LED will get hot and start to get damaged to the point of changing color and eventually loosing complete lighting especially white LED which depends on phosphors to mix with the blue LED light..
Turning to the mistake of parallel LEDs is series with a single resistor..
See the different intensity of the LED CUBE which is made from 125 identical white LEDs..
I hope someone reading this, Understands LED Current is what accounts for the Brightness Intensity. As long as the current is at or below the Design LED Current.. Also if you run white LEDs at lower current (say 80% of Design) the Life Time of white LEDs get doubled..
There are still some LEDs with a tiny lower forward voltage and draw (pull) more current appearing brighter..
You can see the internal LED parallel wiring details in pictures #2 and #3..
Both of these use a nine volt battery, five white 3.6 forward voltage LEDs and circuits that draw (pull) the same current about 100 milliamps..
There is a tendency to use the single 54 ohm 1 watt resistor but that is a very poor design because of variable light intensity like the cube explained in the previous step.. When actual LEDs are parallel wired together. The LED with the lowest forward voltage will rob the current from the other LEDs getting BRIGHTER and causing the other higher forward voltage LEDs to be Dimmer !
The Best Design is to use that single 270 ohm 1/4 watt resistor with each white LED, a Superior Design with the even light intensity in each of the five LEDs !!
As a LED newbie feel free to skip the advanced concept presented in the following steps..
It just shows graphically how a simple resistor protects a single LED..
.
Looking at the first wide plot note the standard Red LED and Blue/White LED plots we have come too know. As you probably know a designed 20 ma LED will get burned out at over 3 volts which will push excessive 100 ma or more !
Then note the green straight line is the 270 ohm resistor plot.
Finally the pink plot represents the combined Red LED and the Resistor as a single item.
Note the single (Resistor+LED) pink line item. Only uses 24 ma at 9 volts..
.
You can use a spread sheet or program any micro to generate the plot points.
Here is the text flow sequence to do this;
Naturally there is no significant current flow as long as the LED is blocking from 0,0 to 1.4v,0.1ma..