16
\$\begingroup\$

I have been interested in this particular switch with a built-in LED.

According to the website, the forward voltage for the LED inside the switch is "about 3 V". It then goes on to recommend a resistor of ateast 220 Ω resistor as do some other sources. I plan on powering the LED through the Pi Pico VBUS pin which, if I understand correctly, is roughly 5 V. Also, after some research I came to the conclusion that the blue LED is most likely in the 25 mA current draw ballpark. So with that info in mind...

5 V - 3 V = 2 V

2 V / 0.025 A = 80 Ω

Now, although the current draw was a guess on my part, I figured that even if it is slightly different than the number I gave it wouldn't be enough to change what I am trying to convey. I don't quite understand the disparity between what articles say and what Ohm's law seems to say.

Ohm's law, at least on paper, seems to indicate a resistor in the ballpark quite a bit lower than the 220 Ω I see on Adafruit as well as other articles. Is it just because 220 Ω is much more standard and easier to find? If so, will the decreased current resulting from the 220 Ω resistor cause enough of a difference in brightness in the LED for it to matter, or can I just use 220 Ω and be done with it?

\$\endgroup\$
4
  • 7
    \$\begingroup\$ My best guess is that it consumes around 10 mA. No data sheet; no current spec; no answer only guesses. \$\endgroup\$
    – Andy aka
    Jul 31 at 19:29
  • 13
    \$\begingroup\$ For a modern indicator LED, 25 mA is a lot of current. I'd start with 5-10 mA and see if that's bright enough. \$\endgroup\$
    – Hearth
    Jul 31 at 19:45
  • 4
    \$\begingroup\$ Seems like your math and assumptions are all correct. Also I agree with Hearth and Andy that 25 mA is probably way too much. \$\endgroup\$
    – mkeith
    Aug 1 at 6:46
  • \$\begingroup\$ Something that's often mentioned on this site, although usually connected to buying from shady places like Amazon or AliExpress/AliBaba: no datasheet, no buy. \$\endgroup\$
    – jaskij
    Aug 1 at 15:43

2 Answers 2

37
\$\begingroup\$

LEDs are not very fussy about the current you apply, but will be dimmer with lower currents.

The 25 mA you mention is around the Absolute Maximum rating for common LEDs. If you exceed the Absolute Maximum rating for a part, the part may be damaged.

I find most common LEDs are bright enough for indicator use with 10 mA or less. I once had to reduce the current for a green LED to under 1 mA to get it dim enough for my application!

If you have a few resistors on hand, try various values in series with different LEDs to see what effects they have on the brightness.

If you are just using the LEDs as indicators, you will probably find quite low currents are adequate.

If you are using the LEDs for general lighting, you will want to operate the LED near the Absolute Maximum rating to get most brightness.

\$\endgroup\$
4
  • 8
    \$\begingroup\$ From the Adafruit link: The forward voltage of the LED is about 3V so connect a 220 to 1000 ohm resistor in series just as you would with any other LED to your 3V or higher power supply. If you run the numbers, a 3.3V power supply with 220 ohms gives about 1mA, a 5V power supply with 1K gives about 2mA so it appears the application note is looking for the 1-2mA range. \$\endgroup\$
    – Rodney
    Aug 1 at 10:16
  • 3
    \$\begingroup\$ I would dare to disagree with the last stetement of recomending maximum current for maximum brightness Most LED's are most efficient between 60-80% of current and if you go above that the increase in brightness is minimal but shortning of lifespan speeds-up. This is why cheap LEDs burn so much quicker on chips. because they are pushed harder. if you are making your own light you should not use minimum resistor, but find reasonable value. In practice most 3V ish LEDs give very similair light ouput oon 0K5 as 220ohm. the rest is heat and damage \$\endgroup\$
    – Tomas
    Aug 2 at 18:40
  • \$\begingroup\$ @Åsmund your math is rusty: 2V * 25mA = 50mW. \$\endgroup\$
    – user242579
    Aug 3 at 3:52
  • \$\begingroup\$ Urgh. Deleted, thanks. \$\endgroup\$
    – Åsmund
    Aug 3 at 7:27
25
\$\begingroup\$

25mA is enough to almost blind someone with a modern blue LED, it can throw shadows across a dimly lit room which is really irritating.

It will also cause the LED to have a truncated life span. These switches are from the very cost-competitive Chinese market and may not have the finest LEDs inside (the mark-up is actually quite large to the price you see at Adafruit). Even top-quality LEDs that cost more than the entire switch will lose brightness much faster when run hot and at high current (which causes the die to heat up).

When you see "Absolute Maximum" on a datasheet, you should think of the "Red Line" RPM on a car engine. It's not anything you really want to aim for on a continuous basis and even exceeding it briefly may not be good.

In any case, 5mA or less is often enough. Sometimes 0.5mA, though I doubt so in this particular case because the LED is indirectly viewed. Don't use more current than required to get acceptable brightness, in other words, use the highest value of resistor that works for you. With 5V I would try 470 ohms to 1K and see if that is enough brightness.

\$\endgroup\$
4
  • 1
    \$\begingroup\$ Don't most blue LEDs already have a shorter life span on average? Something about the high energy needed to emit those wavelengths? \$\endgroup\$
    – Nohbdy
    Aug 1 at 12:48
  • 2
    \$\begingroup\$ @Nohbdy: In RGB leds that are driven to produce bright white, blue LEDs will often fail sooner than the red and green ones, but if when operated dimly even blue LEDs will last essentially forever. \$\endgroup\$
    – supercat
    Aug 1 at 21:30
  • 4
    \$\begingroup\$ Early blue LEDs had that problem and they also have relatively high forward voltage so more self-heating for the same current. And cheapskate manufacturers have every reason to overdrive blue (for white) LEDs to the limits of acceptable life. I wouldn't want to bet on which colo(u)r has more longevity under similar junction temperature conditions though. So much money has been pumped into making lighting LEDs useful (which also reflects in the life of blue LEDs) that they would tend to win even if the physics was unfavorable. \$\endgroup\$ Aug 1 at 21:38
  • 4
    \$\begingroup\$ A single bright LED on a product whose manufacturer hasn't put any thought into this can be enough to keep someone awake at night. Ask me how I know. This leads to people putting opaque tape over these LEDs. \$\endgroup\$
    – user253751
    Aug 3 at 13:35

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