Modern electronics industry has developed very efficient LEDs with nice and fancy colors (“true green” , “cyan”, and “blue”) based in InGaN technology, or similar. Some of these LEDs are specified as having forward voltages of 3.2 to 4.2 V. Here are examples of such LEDs, Kingbright WP7104PR51C/A, or surface-mount APT3216VBC.

But the usual MCUs are powered from 3.3 V supply, and the GPIO output is usually at 3.1-3.2 V, which seems to be barely enough to drive these LEDs . How can I use these LEDs as indicators of some signal statuses, or power rail status? Do I need a series resistor R1 here?

enter image description here

If yes, how do I choose its value?

DISCLAIMER: This "question-answer" comes as elaboration of the original question "Is there a point in adding a 1 Ohm resistor to this LED circuit?", to address the particular use case of LEDs as logic state indicators.


1 Answer 1


You can use these LEDs with no reservations whatsoever. Modern LEDs are very efficient light emitters. The caveat is that LEDs specifications define the forward voltage at certain current, typically at 20 mA. At the same time the luminous intensity is also specified at 20 mA test conditions. And the light intensity is huge, something like ~1000 mcd for WP7104PR51 LED, and ~150 mcd for APT3216VBC LED typical.

Yet the old-style LEDs used to output just 2-3 mcd, and were perfectly visible for human eye as status indicators. Shining 1000 mcd will light up the entire room and be blinding for eyes if looking directly at the LED. Therefore there is no need to feed these LEDs to their maximum capabilities, and it will be necessary to reduce their lilght output to a comfortable level. Below are considerations for APT3216VBC (150 mcd at 20 mA).

The good things are that (a) the forward voltage of a LED is not a constant, the I-V graph is strongly non-linear, staring from about 2.4 V:

enter image description here

and (b) the light intensity drops linearly with reduced current:

enter image description here

So, to get a comfortable light out of APT3216VBC LED, the drive current should be reduced at least 10-20 fold, to 1-2mA , to get ~15 or ~7.5 mcd of light. The operating point on I-V graph (a) therefore should move to point (2), which corresponds to the LED forward voltage of about 2.6 V. Therefore the GPIO should have a resistor that drops about 0.7 V (3.3 - 2.6) at 1-2 mA, or about 350-700 Ohms. This setup will give the light output at 8-15 mcd. This might be still too bright for a naked eye. To reduce the light down to more normal 1.5 mcd, or another tenfold, the resistor R1 can be as high as 3-4 kohms. You should experiment a little bit with LED samples to choose the right resistor for the application.

With drive currents in the area of ~1 mA, all concerns about temperature variations and internal GPIO impedance can be safely ignored, unless the LEDs are used for some color calibration purpose.

In short, the normative luminous output of a selected LED must play a major role in determining the R1 value.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.