# Need a little help with resistors for rgb led

I was wondering if anyone here would know what resistors I need for this rgb led? All I’ve been able to find out from searching online is that a 1k is recommended for red and blue and 3.3k for green. But I have no idea if I should use 1/4 watt, 1/2 watt, or 1 watt. Any help would be much appreciated.

1 Like

Each LED will drop around a couple volts, which should be considered, along with the voltage that you’re driving them at. However, even with not taking the LED voltage drop into account, and with a 5V supply, a 1K resistor will only dissipate 0.025 watts.

1/4 watt is 0.25 watt, which is 10 times more than the absolute worst case above. Higher value resistors will draw even less power, so even 1/8 or 1/16 watt resistors are much more than necessary.

In other words, don’t worry about the resistor wattage.

Note that if you got the 1K and 3.3K values from something I posted, that’s for a regulated 5V to the processor. If you’re running at a different voltage you may have to experiment to determine the resistor values that look the best. The specific LED you’re using will also be a factor because the voltage drops and light output to current ratios may be different for that particular part.

Which was why I get myself three adjustable resistors for the three leds I use.
“To get the perfect white in flashlight mode”, you know.

There’s a simple equation for working this out like so:
Resistance in Ohms = (Supply voltage in volts - LED voltage drop in volts) divided by required current draw in amps.
So for example if you had a 5 volt supply and you wanted to run the red LED at 2 volts with a current draw of 30ma
the answer would be R in ohms = (5v -2v) / 0.030 amps. So the answer is 100 ohms
Now to work out the power the equation is simply: Power in watts = voltage x current.
So our resistor in this case is dropping 3 volts at 0.030 amps or 30ma in other words, which gives us .090 watts (90 milliwatts). So a 1/4 watt resistor is plenty.
Cheers
PS: Each of your LEDs has different specifications with regard to voltage drop etc but the spec implies the 3 of them will handle 60ma each so you need to decide how bright you want them.

1 Like

On my last clone I used this breakout board it made life simple.

Thanks this was exactly the info I was looking for. I’d be running it from the 5v on the arduino

I appreciate the info. I must have stayed up till 3 in the morning searching for info before I decided to ask for help lol.

You have to be carefull if you’re trying to run these LEDs directly off an I/O pin on your arduino, because the MCU can only supply 40ma max per I/O pin with a max package current of whatever it is. Can’t remember.
Best to use a transistor to drive your LEDs off the supply rail and use your I/O ports to drive the transistor.

If you drive the LEDs at 40mA each, they will be far too bright for an Arduboy clone. They would probably blind and distract you enough that it would be hard to see the display when any of them were on.

On my breadboarded system, I run at 5V, with 1K for red, 1K for blue and 3.3K for green. This results in about 0.75mA for green, 2.2mA for blue and 3.0 mA for red. They are plenty bright.

The pins have no problem driving 3mA, so there’s no need to add drive transistors.

If you drive the LEDs at 40mA each, you will likely destroy them as well. If not immediately, they will probably start to go dim pretty quickly. These LEDs are only rated for 25mA continuous MAX, and even that should be derated down to 20mA or less.

But, if you use the breakout board linked above, there are already current limiting resistors for each LED, so you can easily drive it directly off of MCU pins without needing transistors.

There is a caveat to being able to safely overdrive LEDs. If you are pulsing them for a short enough time and a low enough duty then you will be fine overdriving them quite a bit. This is exactly how IR LEDs for remote controls are driven upwards of 100mA although their DC quiescent operating current is spec’d at only ~30mA max. The datasheet for any given LED will have all the useful info about max pulse amplitudes and pulse widths so you still need to be within those bounds to ensure you are in the safe operating region.

1 Like

i ended up ordering the breakout board that has the resistors. i figured it would make for the cleanest instal

1 Like

You’ll possibly find the resistors are a bit low for your purpose, though, making the LEDs too bright. You may have to add external resistors, or change the ones on the board, to reduce the LED brightnesses to acceptable levels.

1 Like

Ill order some extra resistors then just in case i have to swap them out, thanks.

1 Like

Brief spec sheet above states ‘Forward Current 60ma’ so it either is or it isn’t. I’ve never used these particular devices.

60mA is the maximum rated continuous operating current allowed. The LEDs would be far too bright for your purposes at this current. You’ll want to feed the LEDs much less, by restricting the current using appropriate dropping resistors.

The rgb module came in today, just finished wiring it in and it works perfectly . Now I just need to find a better speaker, the 9x9x1.8mm piezo I have is way too quiet. Thanks everyone again for the help.

1 Like