There was a recent post on these forums about how many LEDs a Pico could power, and this got me thinking about the subject which I hadn't looked at in a while, and it has been forever since I took Electronics.
The truth is I recently broke my dominant hand which has put a damper on things like coding. To keep busy and distracted, I decided to test out the forward voltages of LEDs when I realized I could still hold multimeter leads in my bad hand with my fingertips. Fortunately I have speech to text pulled up on my phone so I can do this post more easily. I haven't made speech to text to work on the computer yet. I tried to update VS Codium, installed the speech to text plug-in, but it always crashed the extension manager. My C building environment has been on an old PC that doesn't take a lot of power but I have a Raspberry Pi 4 which I guess I might see if I can get any speech to text going on that. I just put the latest Raspberry Pi OS on it so basically it just went through first boot, but I digress.
Back to LEDs! In general it seems to power many LEDs it is better to use an external LED controller and power supply since this is more of the right tool for the job than using digital logic pins. But if you do use those pins I read an article that your eye actually sees the LED brighter if you use a PWM to drive it rather than a steady voltage, so doing this is always recommended.
Anyway, I recently used a rather high forward voltage LED (high brightness blue Vf 3.0-3.4 VDC) directly on a GPIO pin of a Pico, this is not a good idea but I measured 9.1 mA with no resistor. As you may know each individual LED has a slightly different forward bias that's why there is a range in the data sheet, given as minimum, typical, and maximum. Another consideration aside from color is if you need diffused or directional LEDs. The value of a current limiting resistor can be found once you have subtracted the forward voltage from the supply voltage and applied Ohm's law but when you are dealing with voltages that are less than Vf you can subtract that new value from your supply voltage then divide. There is a voltage region where the LEDs are partially forward biased and therefore you can attach a resistor and run it lower than Vf. In other words some of these LEDs seem to turn on a little bit and are still plenty bright before reaching forward bias. Of course to forward bias a diode, you connect the positive voltage source to the anode (positive terminal) and the negative voltage source (or ground) to the cathode (negative terminal) and apply enough voltage so that the diode fully passes current. At this state very small increases in voltage create very large increases in the current of the circuit.
https://cdn-shop.adafruit.com/product-f ... -5TB-1.pdf
Consider the data sheet for these LEDs, especially the VI graph, that is, how forward current changes as forward voltage increases. As seen on the graph (and with any diode) the relationship between voltage and current is not linear, unlike in a resistor. We see that for the blue LED, as the voltage is applied the current change is very little until 3.4 or 3.5 volts at which point the LED is fully forward-biased. Often these graphs are drawn as IV, like here https://lednique.com/current-voltage-re ... /iv-curves. Also see the relative intensity vs. forward current graph. These bright LEDs emit quite a bit of light for not having reached the forward-bias state. They are however quite directional so you would want to point them in the direction they would be viewed. The white super bright 5MM LEDs are similar, with a nomial Vf of approx. 3.0 VDC.
Since Pico digital pin source voltage is approximately the forward bias for these resistors I decided to play around with whatever low value resistor to test for any light and current under Vf. I randomly grabbed a 220 Ω resistor, then a 270 Ω.
I got out the digital multimeter and used a 2 second blink program on the Pico pin to easily measure the current and voltages. My DMM is decent, DC current accuracy is +-(0.5 rdg + 10 dgts) in the 40 mA and 400 mA ranges.
With the 220 Ω resistor I read 2.7 VDC across the LED, the pin output voltage dropped to approx. 3.2 VDC, and measured current was 2.3mA. The 270 Ω resistor/LED load dropped the GPIO pin to approx. 3.1932 VDC and the current to 1.96mA. Note, there was a small but noticeable change in pin output voltage perhaps as expected per the “Typical current vs. Voltage curves of a GPIO output.” graph, Figure 171 of section 5.5.3.5 of the RP2040 Data sheet. But I see a small drop also when using a 9V DC wall power supply, so I am not sure about that.
I wanted to know what running the LED at the 20mA nominal forward-bias looked like, so I hooked up a 9 Volt DC wall supply to a breadboard and got carried away testing the voltage drops across the LED at many different currents by testing various resistors as well as using a 10k potentiometer. I figured I may as well plot my own graph of voltages and associated currents. As far as brightness, 10mA seems to produce almost full brightness, 20mA and up are brighter but not drastically. At 2mA they are still usable for certain purposes.
I tested a few LEDs burning up a couple along the way. Here's what I found at the top end; I measured 3 volts across the LED when the current was 21 milliamps (270 ohm resistor), 3.15 VDC at 37 mA (147 ohm), and 3.29 VDC at 53 MA (100 ohm). The LED popped with a 47 ohm resistor. On my plot a straight line can be drawn between the 21 mA and 53 mA points which shows the LED is fully forward-biased in this region. At the low end, less than the nominal 20 mA the current changes very little with applied voltage until after about 2.75 VDC (at about 5 mA) where the voltage / current relationship starts to accelerate. So between 2.4-2.7 VDC a tenth of a volt increase changes the current very little; 2.50 VDC is 0.9 mA, 2.54 VDC is 0.98 mA, 2.6 VDC is 1.27 mA, and 2.65 VDC is 1.96 mA. Then the process of becoming biased accelerates; 2.7 VDC is 4 mA, 2.75 VDC is 7 MA, 2.9 VDC is 10 mA (and very bright to my eyes). Between 10-20 mA it is almost fully biased, it seems.
Here are the plots on graph paper. y-axis is a tenth of a volt per step, x-axis 2 MA per step. Please excuse the sloppy writing and extra dots and marks since I'm learning to write with the other hand.
![Image]()
Like any diode an LED is not considered on until it is forward-biased and current is flowing. However according to the data sheet graph and my testing you can get quite a bit of light out of an LED in the region when it is not considered forward biased but some current is still flowing.
On the other hand most LEDs can be operated at a bit higher current than the current at forward-bias voltage but the current increases exponentially as the voltage is increased once forward-biased. So an LED is more efficient when operated at forward bias voltage, and will likely last a bit longer
Encyclopedic background: As you may know a diode is a semiconductor and has a p-n Junction. At the junction, some electrons from the n-side combine with holes from the p-side, forming a depletion region, where there are no free charge carriers and an electric field prevents electrons moving from N to P. Applying DC voltage in the forward-bias direction (+ to P, - to N) reduces the width of the depletion region, allowing electrons to flow from the n-side to the p-side and recombine with holes. In an LED, the recombination of electrons and holes releases energy in the form of photons (light). This process is called electroluminescence. The color (or wavelength) of the light depends on the material's bandgap energy. A larger bandgap corresponds to shorter wavelengths (e.g., blue or UV light), while a smaller bandgap corresponds to longer wavelengths (e.g., red or infrared light). Band gap energy is the energy difference between the top of the valence band (where electrons are bound to atoms) and the bottom of the conduction band (where electrons are free to move and contribute to electrical conduction) in a material. In LEDs, when an electron transitions from the conduction band to the valence band, it releases energy equal to the band Gap. This energy determines the wavelength (and thus the color) of light emitted. This is an interesting visual of how quantum mechanics governs the behavior of electrons in materials.
The truth is I recently broke my dominant hand which has put a damper on things like coding. To keep busy and distracted, I decided to test out the forward voltages of LEDs when I realized I could still hold multimeter leads in my bad hand with my fingertips. Fortunately I have speech to text pulled up on my phone so I can do this post more easily. I haven't made speech to text to work on the computer yet. I tried to update VS Codium, installed the speech to text plug-in, but it always crashed the extension manager. My C building environment has been on an old PC that doesn't take a lot of power but I have a Raspberry Pi 4 which I guess I might see if I can get any speech to text going on that. I just put the latest Raspberry Pi OS on it so basically it just went through first boot, but I digress.
Back to LEDs! In general it seems to power many LEDs it is better to use an external LED controller and power supply since this is more of the right tool for the job than using digital logic pins. But if you do use those pins I read an article that your eye actually sees the LED brighter if you use a PWM to drive it rather than a steady voltage, so doing this is always recommended.
Anyway, I recently used a rather high forward voltage LED (high brightness blue Vf 3.0-3.4 VDC) directly on a GPIO pin of a Pico, this is not a good idea but I measured 9.1 mA with no resistor. As you may know each individual LED has a slightly different forward bias that's why there is a range in the data sheet, given as minimum, typical, and maximum. Another consideration aside from color is if you need diffused or directional LEDs. The value of a current limiting resistor can be found once you have subtracted the forward voltage from the supply voltage and applied Ohm's law but when you are dealing with voltages that are less than Vf you can subtract that new value from your supply voltage then divide. There is a voltage region where the LEDs are partially forward biased and therefore you can attach a resistor and run it lower than Vf. In other words some of these LEDs seem to turn on a little bit and are still plenty bright before reaching forward bias. Of course to forward bias a diode, you connect the positive voltage source to the anode (positive terminal) and the negative voltage source (or ground) to the cathode (negative terminal) and apply enough voltage so that the diode fully passes current. At this state very small increases in voltage create very large increases in the current of the circuit.
https://cdn-shop.adafruit.com/product-f ... -5TB-1.pdf
Consider the data sheet for these LEDs, especially the VI graph, that is, how forward current changes as forward voltage increases. As seen on the graph (and with any diode) the relationship between voltage and current is not linear, unlike in a resistor. We see that for the blue LED, as the voltage is applied the current change is very little until 3.4 or 3.5 volts at which point the LED is fully forward-biased. Often these graphs are drawn as IV, like here https://lednique.com/current-voltage-re ... /iv-curves. Also see the relative intensity vs. forward current graph. These bright LEDs emit quite a bit of light for not having reached the forward-bias state. They are however quite directional so you would want to point them in the direction they would be viewed. The white super bright 5MM LEDs are similar, with a nomial Vf of approx. 3.0 VDC.
Since Pico digital pin source voltage is approximately the forward bias for these resistors I decided to play around with whatever low value resistor to test for any light and current under Vf. I randomly grabbed a 220 Ω resistor, then a 270 Ω.
I got out the digital multimeter and used a 2 second blink program on the Pico pin to easily measure the current and voltages. My DMM is decent, DC current accuracy is +-(0.5 rdg + 10 dgts) in the 40 mA and 400 mA ranges.
With the 220 Ω resistor I read 2.7 VDC across the LED, the pin output voltage dropped to approx. 3.2 VDC, and measured current was 2.3mA. The 270 Ω resistor/LED load dropped the GPIO pin to approx. 3.1932 VDC and the current to 1.96mA. Note, there was a small but noticeable change in pin output voltage perhaps as expected per the “Typical current vs. Voltage curves of a GPIO output.” graph, Figure 171 of section 5.5.3.5 of the RP2040 Data sheet. But I see a small drop also when using a 9V DC wall power supply, so I am not sure about that.
I wanted to know what running the LED at the 20mA nominal forward-bias looked like, so I hooked up a 9 Volt DC wall supply to a breadboard and got carried away testing the voltage drops across the LED at many different currents by testing various resistors as well as using a 10k potentiometer. I figured I may as well plot my own graph of voltages and associated currents. As far as brightness, 10mA seems to produce almost full brightness, 20mA and up are brighter but not drastically. At 2mA they are still usable for certain purposes.
I tested a few LEDs burning up a couple along the way. Here's what I found at the top end; I measured 3 volts across the LED when the current was 21 milliamps (270 ohm resistor), 3.15 VDC at 37 mA (147 ohm), and 3.29 VDC at 53 MA (100 ohm). The LED popped with a 47 ohm resistor. On my plot a straight line can be drawn between the 21 mA and 53 mA points which shows the LED is fully forward-biased in this region. At the low end, less than the nominal 20 mA the current changes very little with applied voltage until after about 2.75 VDC (at about 5 mA) where the voltage / current relationship starts to accelerate. So between 2.4-2.7 VDC a tenth of a volt increase changes the current very little; 2.50 VDC is 0.9 mA, 2.54 VDC is 0.98 mA, 2.6 VDC is 1.27 mA, and 2.65 VDC is 1.96 mA. Then the process of becoming biased accelerates; 2.7 VDC is 4 mA, 2.75 VDC is 7 MA, 2.9 VDC is 10 mA (and very bright to my eyes). Between 10-20 mA it is almost fully biased, it seems.
Here are the plots on graph paper. y-axis is a tenth of a volt per step, x-axis 2 MA per step. Please excuse the sloppy writing and extra dots and marks since I'm learning to write with the other hand.


Like any diode an LED is not considered on until it is forward-biased and current is flowing. However according to the data sheet graph and my testing you can get quite a bit of light out of an LED in the region when it is not considered forward biased but some current is still flowing.
On the other hand most LEDs can be operated at a bit higher current than the current at forward-bias voltage but the current increases exponentially as the voltage is increased once forward-biased. So an LED is more efficient when operated at forward bias voltage, and will likely last a bit longer
Encyclopedic background: As you may know a diode is a semiconductor and has a p-n Junction. At the junction, some electrons from the n-side combine with holes from the p-side, forming a depletion region, where there are no free charge carriers and an electric field prevents electrons moving from N to P. Applying DC voltage in the forward-bias direction (+ to P, - to N) reduces the width of the depletion region, allowing electrons to flow from the n-side to the p-side and recombine with holes. In an LED, the recombination of electrons and holes releases energy in the form of photons (light). This process is called electroluminescence. The color (or wavelength) of the light depends on the material's bandgap energy. A larger bandgap corresponds to shorter wavelengths (e.g., blue or UV light), while a smaller bandgap corresponds to longer wavelengths (e.g., red or infrared light). Band gap energy is the energy difference between the top of the valence band (where electrons are bound to atoms) and the bottom of the conduction band (where electrons are free to move and contribute to electrical conduction) in a material. In LEDs, when an electron transitions from the conduction band to the valence band, it releases energy equal to the band Gap. This energy determines the wavelength (and thus the color) of light emitted. This is an interesting visual of how quantum mechanics governs the behavior of electrons in materials.
Statistics: Posted by breaker — Sat Dec 28, 2024 7:16 pm