Re: resistors!
To calculate the correct value of series resistor for an LED, there are 3 things you need to know - the forward voltage and current of the LED, and the supply voltage you will be using. most LED's are designed for a forward current (denoted If in the technical specifications) of about 20 milliamps, or 0.02 Amps, but check to make sure. some will work with lower current just as well. Then the forward voltage Vf is usually around 1.2 volts for RED leds, rising to approx 3 volts for WHITE leds. The supply voltage will need to be greater than the forward voltage, or it won't light. This will not usually be an issue with a single LED and a car battery voltage (12V), but will be if you put several LED's in series. so you could use approx 10 red leds in series (10 X 1.2V = 12V), but only 4 WHITE leds (4 X 3V = 12V).
To calculate the value of resistor needed in OHMS, take the supply voltage (12V usually, but in a car with engine running this may rise up to 14V), and subtract the forward voltage Vf, or if using several LEDs in series, subtract the sum of the forward voltages of the LEDs. Then using ohms law, divide by the forward current required in AMPS (20 mA = 0.02 Amps). this is the value in ohms. not all values are available easily, to take the next highest standard value available (e.g. calculatated 310 ohms, next highest standard value = 330 ohms)
summary :
resistor value ohms = (Vs (supply voltage) - Vf (Sum of LED forward voltages)) / If (foward current in Amps)
example :
resistor value ohms = (14V - 12V (4 x WHITE LED Vf)) / 0.02 A = 100 ohms.
If the resistor gets hot, its probably too small, so use the next higher power rating available, e.g. 0.5 or 1 Watt.