Electronic – How much current will this LED draw

currentledraspberry pitransistors

Sorry if this is a really basic question – software engineer here, so I'm a little out of my element.

I'm working on an IoT project, and I'm planning on using this button with a red LED inside of it.

For most of their products, this manufacturer lists how much current their stuff draws. However, in this case, they don't. The information they give is:

The forward voltage of the LED is about 2.2V 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.

I'm planning on powering it using a 2N2222 transistor connected to the 5V rail on a Raspberry Pi.

I would have naively tried simple Ohm's law, but I know that can't be correct here.

EDIT: I did a little digging through some old textbooks.

Since I'm powering it from the 5V rail, $$V = 5V = 2.2V_{LED} + V_{RESISTOR}$$

So,

$$V_{Resistor} = 2.8 V$$

Which, from Ohm's law, then gives:

$$ I_{Resistor}=I_{LED}={2.8V\over1000\Omega}=2.8mA$$

Are my calculations/reasoning correct?

Best Answer

At 5V you have V = I*R equivalent to (5V-2.2V) = I * R(from 220 to 1000 ohm).

The 2.2V varies slightly based on the source voltage but in this case it's safe to approximate that your current would be between 2.8V/220ohm=12mA and 2.8V/1000ohm=2.8mA

2.8mA should be a decent amount for any red LED you're playing with. Blue LEDs can be a lot brighter at the same current so just keep that in mind before you solder anything because there are tons of examples of blue LEDs that are way too bright because somebody expects the same luminance curve.

The 220 ohm resistor would be appropriate if you were running at 3V (would give you ~3.6mA) but at 5V you would have 12mA through the LED which would almost certainly get it way brighter and hotter than you need it to be.