LED current limiting resistor
The key to maximizing LED life is limiting the current that runs through it. This is frequently done with a simple resistor whose value is calculated using Ohm's Law.
When computing the value of a current limiting resistor for a single LED, the basic form of Ohm's Law V=I⋅R becomes R=Vbattery−VLEDILED
Resistor of 330Ω
For a 9v battery and a single LED the current can be limited to 20mA as R=9v−2v20mA=350Ω
Choose a 330Ω resistor and assuming only a voltage drop of 1.8 volts across the resistor will give a current as I=9v−1.8v330Ω=22mA
![[Click to view larger image] <br>Click to close the image](LED_9v_330.png)
Resistor of 470Ω
A lower current means a longer lifetime for the LED, so lets see what will happen if we choose another resistor. For a 9v battery and a single LED the current can be limited to 15mA as R=9v−2v15mA=467Ω
A close value would be to choose a 470Ω resistor and assuming only a voltage drop of 1.7 volts at this lower current level, the resistor will give a current as I=9v−1.7v470Ω=16mA
![[Click to view larger image] <br>Click to close the image](LED_9v_470.png)
Using an NPN to control the current
An npn transistor can be used to control the turn-on and turn-off of an LED, but this still requires a current limiting resisto. The LED is connected between the emittor and battery-minus and the current limiting resistor between the battery-plus and the collector.
Suppose we want to have 15mA through the LED and we use a npn transistor that has on average has a beta equal to 500 hfe=500. This requires a base current of only Ibase=15mA500=30μA
Assuming a voltage drop of 1.7 volts over the LED and 0.7volts over the base-emittor, we can expect a 2.4 volts at the base of the transistor. To get a base current of 30 μA we would need a base resistor of Rbase=9v−2.4v30μA=220kΩ
![[Click to view larger image] <br>Click to close the image](LED_9v_NPN.png)
As the simulations shows, there is a current equal to 15mA. The voltage drop over the current limiting resistance of 220Ω equals VResistor=220⋅15mA=3.3volts The voltage of the LED equals 1.7 volts, so the remain voltage over the transistor is Vce=9−3.3−1.7=4volts This means that the transistor is not fully saturaed and will dissipate Ptransistor=Vce⋅15mA=60mW
Blinking LED
To create a blinking LED, we can use the Signal Generator. We can either use an NPN transistor for controlling the LED, or directly drive the LED from the Nor output.
![[Click to view larger image] <br>Click to close the image](BlinkingLED_NPN.png)
![[Click to view larger image] <br>Click to close the image](BlinkingLED_Logic.png)