Current-limiting resistor

A resistor in series with an LED or similar part that sets its current, since the part's own curve won't: R = (supply − forward voltage) ÷ current.

5 V 160 Ω (E24) drops 3.15 V LED 1.85 V 3.15 V ÷ 0.020 A = 157.5 Ω next E24 value 160 Ω → 19.7 mA Kingbright WP7113SRD-D red LED 1.85 V typ. at 20 mA, 30 mA max

Kingbright's WP7113SRD-D red LED drops 1.85 V typical at 20 mA. On 5 V the resistor takes 3.15 V, so 3.15 V ÷ 0.020 A = 157.5 Ω. The next E24 value up, 160 Ω, gives about 19.7 mA, under the LED's 30 mA maximum.

Current-limiting resistor

A resistor in series with an LED or similar part that sets its current, since the part's own curve won't: R = (supply − forward voltage) ÷ current.

5 V 160 Ω (E24) drops 3.15 V LED 1.85 V 3.15 V ÷ 0.020 A = 157.5 Ω next E24 value 160 Ω → 19.7 mA Kingbright WP7113SRD-D red LED 1.85 V typ. at 20 mA, 30 mA max

Kingbright's WP7113SRD-D red LED drops 1.85 V typical at 20 mA. On 5 V the resistor takes 3.15 V, so 3.15 V ÷ 0.020 A = 157.5 Ω. The next E24 value up, 160 Ω, gives about 19.7 mA, under the LED's 30 mA maximum.