How much resistance of resistor should i use for my LED?

Hello there... :smiley:

So i'm gonna add 4 LEDs to my project as an indicator, there are Red, Green, Blue, and White LED each one. i'm gonna connect it to the Lolin V3 NodeMCU, however, to protect the LED we need to use resistors...but i still dont know how much resistance do i need for all those LEDs, does color matter?

Note : I'm connecting it to the Digital pins on the NodeMCU. I am also using a typical small LEDs(don't know how to say)

use 1000Ω and you'll be fine :slight_smile:

otherwise yes there is a bit off reading to do, tons of tutorials on line... did you google your question?

How miuch current through the LED? Most modern LEDs will be plenty bright with
Iled = 10mA or so. To calculate the resistor take your Arduino Vcc and subtract tha Vf of the LED to see how much voltage that the resistor must drop. Divide that by the desired current in Amps. (Vcc - Vf) / Iled = R.

Vf of the LEDs is different for each color.
image

Yes i did, but still confused, since some says that the color of LED does matter, and you need to calculate the voltage across the LED while i don't know the spec of the LED. i have a multimeter however, can i count the resistance needed with it?

I edited my post with the Vf specs for different color LEDs.

Like @J-M-L says, there is a ton of tutorial pages on the internet if you still do not understand.

so...does that mean that(for example) i'm using the red LED and 3V from the MCU, so the formula will be "( 3 - 1.8 ) / 10 = 0.12? sorry if i'm wrong, not really good at math

0.12 then how many kilo Ohms do i need?

does the Iled like you said previously (10mA) or like the spec sheet (20mA)?

ok...i'll stick with 1000Ω for all the color on 3V digital pin, you sure this will do alright? (not too dim and not too bright that it would blow up) :smiley:

Sorry if my question was to basic

well with 1000Ω and a 3.3V arduino it won't be very bright but you should be safe :slight_smile:

Typicaly 220Ω is good enough but if you want to avoid global warming and climate change, 1000Ω will result in lower current draw

you can find on line calculators

I’m so confused :face_with_spiral_eyes:


Just a thought, if black solar cells convert suns rays to electricity and IR heat instead of these rays bouncing back off the earth into space, won’t these black solar cells increase global warming ?
:scream:

Like i said in my post, the current for the calculation is in Amps. 10mA is 0.01 Amps.

Yep.
not every photon will be converted into electricity and to produce infra red is a common way to dissipate residual heat.

:sunny:

Okay, the sun is causing global warming.

Up here (north pole) we have 6 months of darkness so we are doing our best to slow global warming.
:+1:

You should use 330 ohms or 220 ohms, anything around 100-500 ohms is... PERFECT.

Wh-what, what do you mean by that? I think you meant highering the LED lifespan?

LED life is not an issue.

Have regular type LEDs run at 50mA 24/7 for the last 25 years, no noticeable degradation.

Okay.

The LED strip should be powered using a 5V power source. At 5V, each LED draws about 50mA, when set to its full brightness. This means that for every 30 LEDs, the strip may draw as much as 1.5 A. Make sure you select a power source that matches the strip’s needs. An AC to DC power adapter that provides 5V and 2A should do the job:

Or do not use full brightness... it is really bright even at 1/4th full brightness.

Don't forget this is an esp chip, so the max current sourced or sunk by a pin should be kept below 12mA, in fact ideally no more than 80% of that.

Where is this LED strip coming from? OP did not mention it...