TryEnter a 5 V supply, a 2 V LED drop and a 20 mA target in the three input fields, then lower the target current.
ObserveThe results show 150.0 Ω, a nearest standard value of 150 Ω, 20.0 mA and 60.0 mW.
ExplainSubtracting the LED drop from 5 V leaves 3 V across the resistor; dividing by 0.020 A gives 150 Ω.
Technical boundaries. This model assumes a fixed forward voltage and selects the closest resistance from a fixed list of 100–4700 Ω values. Power uses the ideal resistance rather than the selected standard value.
TipLED Current-Limiting Resistor Calculator
Calculate the required series resistor for safe LED operation:
viewof supply_voltage = Inputs.range([3,12], {value:5,step:0.5,label:"Supply Voltage (V)"})viewof forward_voltage = Inputs.range([1.8,3.5], {value:2.0,step:0.1,label:"LED Forward Voltage (V)"})viewof forward_current_ma = Inputs.range([5,30], {value:20,step:1,label:"Desired Current (mA)"})