Calculating LED resistor value, this is very easy and the most of you had this in the school.
A typical LED requires 20 mA and has a voltage of 2 V across it when it is working. The power supply for the circuit could be 9 V – Block battery.
For the right calculation you need three values:
1. Power supply (Your Battery 9 V)
2. LED voltage (2 V)
3. The current flowing (20 mA)
First things first:
Milliamp conversion: 20 mA = 0.02 A (20/1000)
R = (9V – 2V) / 0.02A = 350 Ω
So we choose 390Ω (the nearest standard or available value). You will not find any resistor with 350 Ω capacity :(