what resistor in serie/paralel for rgb diode

For Sinterklaas(sort of christmas but then in the netherlands and in beginning of december) i whanted to make a DIY Letter light with a arduino and rgb diodes.
I haven't used a arduino for 1 year and i never make electronic things.
So i whanted to know what resister i would need.

There are 12 rgbs in serie(per color) and what i could find online whas this:

and in Current limiting Resistor calculator for leds with the values:
Supply Voltage: 5
Voltage Drop Across LED: 2
Desired LED Current:20
How many leds connected: 12

I got this:

It says it needs 56 Ohm resistor for every 2 diodes or 180 Ohm for every 1 diode.
Is this correct? and could i use this resistors:
https://nl.aliexpress.com/item/Free-Shipping-100pcs-180-ohm-1-4W-180R-Metal-Film-Resistor-180ohm-0-25W-1-ROHS/32481576565.html
It says its 1/4 watt instead of the recommended 1/8 watt on the ledcalc website

I am thinking about just doing them all in paralel because that sounds better then 2 in serie.
Or is serie better?

Hopefully you can help me else I will just have to try if it works

Look closely at the data sheet you linked from Sparkfun. Each of the RGB LEDs have 4 wires - a common ground and one each fro the red, green and blue LEDs housed on the same component. Each individual LED needs a resistor, and each resistor will need to be selected to provide 20ma or less current, using Ohm's law. The circuit you drew will not do what you describe.

As Chris mentioned.

One resistor and one LED combination. (red might be 2vf but green and blue are different)
For red LEDs.
V/I = R, 5v-2v / .02A = 3v / .02 = 150 ohms BrownGreenBrown
W=V*I, 3v * .02 = .06W use either 1/8 or 1/4 watt.

Note if you are driving LEDs with Arduino outputs limit current per pin to 20ma or use a driver transistor.

.

ChrisTenone:
resostor

Whoops :slight_smile:

Hoi pepijn21, welkom op het forum.

The responders before me didn’t mention this explicitly (they did tell, but not in these words), so i will do so:
You’re mentioning that your RGB LEDs are supposed to be connected in series.
But each RGB LED consists of 3 LEDs in parallel.
This means you can’t do what you proposed here.
Chris and Larry worked out a solution for this so you’ll still be able to do your project in time on December 5th.

Weer eens wat anders dan een chocolade letter.
Fijne sinterklaas alvast.

INTP:
Whoops :slight_smile:

See edit and edit time ... great (or otherwise) minds, eh? :stuck_out_tongue:

Hey pepijn21 (if you are still here) - you might want to check out neopixel devices. They simplify handling large arrays of LEDs, so you can concentrate on getting the your ornament together.

ChrisTenone:
Look closely at the data sheet you linked from Sparkfun. Each of the RGB LEDs have 4 wires - a common ground and one each fro the red, green and blue LEDs housed on the same component. Each individual LED needs a resistor, and each resistor will need to be selected to provide 20ma or less current, using Ohm's law. The circuit you drew will not do what you describe.

Yes I know Sorry the picture wasn't that good here is what I would whant:

Then only with 12 instead of 4
Here all the diodes have there own resistor. the red has a 180 one and then blue and green have a 100 ohm(wrote in the img ogm sorry)

LarryD:
As Chris mentioned.

One resistor and one LED combination. (red might be 2vf but green and blue are different)
For red LEDs.
V/I = R, 5v-2v / .02A = 3v / .02 = 150 ohms BrownGreenBrown
W=V*I, 3v * .02 = .06W use either 1/8 or 1/4 watt.

Note if you are driving LEDs with Arduino outputs limit current per pin to 20ma or use a driver transistor..

thx idd blue and green wore other vf but i thought that that would not matter mutch but 80 ohm diffrents is idd a lot.
sorry but if you have more then 2 diodes do you have to use another pin? because 3 is 34.5 mA
Also the website Current limiting Resistor calculator for leds said that i could better go with the 180 on the red. dont know if it matters? except a litle bit less light and safer?

MAS3:
Hoi pepijn21, welkom op het forum.

The responders before me didn't mention this explicitly (they did tell, but not in these words), so i will do so:
You're mentioning that your RGB LEDs are supposed to be connected in series.
But each RGB LED consists of 3 LEDs in parallel.
This means you can't do what you proposed here.
Chris and Larry worked out a solution for this so you'll still be able to do your project in time on December 5th.

Weer eens wat anders dan een chocolade letter.
Fijne sinterklaas alvast.

Bedankt :D, Jij ook alvast als je het nog viert :stuck_out_tongue:
yes sorry I didn't put enough information about how I whant to do it.

ChrisTenone:
Hey pepijn21 (if you are still here) - you might want to check out neopixel devices. They simplify handling large arrays of LEDs, so you can concentrate on getting the your ornament together.

I whanted to do a litle DIY because that what makes it fun, but thx.
I am now for litle bit more than 5 euro done so it would be awsome if it worked, else I will think of something else smalls to give some one. I have looked at the WS2812B but that would cost a lot more then i got the normal rgbs(intresting video about it: Easy Addressable LEDs with Arduino! WS2812B Tutorial - YouTube)

Green and blue LEDs have a forward voltage in the 3.0 to 3.2V range typically, but red
is a lot less, 1.5V or so. The voltage depends on the colour and the precise semiconductor
formulation used (all modern high brightness LEDs are heterojunction, they are complicated).

Thus trying to do two green or two blue in series from 5V wasn't likely to work though
its fine with red.

Often when many LEDs are used they are placed in series and current driven - this doesn't
work for RGB unless you have a 6 pin RGB LED (some surface mount ones are).

[ often green blue and white LEDs are heterojunction gallium nitride devices which is why
they all have similar forward voltages ]

pepijn21:
I have looked at the WS2812B but that would cost a lot more then i got the normal rgbs

I have no idea what your layout is exactly, but if it's some sort of sign that is just constantly on and doesn't need to be flashing or playing patterns, then there are cheaper 5050 SMD RGB LEDs you can look at.

However, you need to understand that the price isn't the whole story. A single SMD LED is several times brighter than standard 5mm bulb types. So if you can use just 1 SMD for every 4 bulb-types, it could be cheaper (especially since these SMDs could already have their own resistors inside).

INTP:
I have no idea what your layout is exactly, but if it's some sort of sign that is just constantly on and doesn't need to be flashing or playing patterns, then there are cheaper 5050 SMD RGB LEDs you can look at.

However, you need to understand that the price isn't the whole story. A single SMD LED is several times brighter than standard 5mm bulb types. So if you can use just 1 SMD for every 4 bulb-types, it could be cheaper (especially since these SMDs could already have their own resistors inside).

It's just a litle extra gift for someone for sinterklaas(christmas in holland)
I whanted to build something like this: http://www.instructables.com/id/Hacking-Marquee-Lights/?ALLSTEPS
But then in paralel and with rgbs(red green blue seperate from etch other but in paralel with the same color). it would be really small and a fun project.

pepijn21:
... red green blue seperate from etch other but in paralel with the same color...

Or if you hook them up to show different colors for the same input, you could make the colors 'chase' through the four leds.

For the schematic in reply #7, make sure that you don't exceed the current limits of the ATTiny. You might need transistors or fets.

And by the way, "zwarte piet moet blijven" :wink:

Can't wire RGB LEDs in series, it would all be parallel per color.
So if you have common anode LEDs, then all anodes would be hooked up to + of your power source.
A resistor from every cathode leg and then join all the cathodes by color. Sink through 3 mosfets.

The reason every LED path gets its own resistor (so 3 resistors per RGB LED), is that when you wire up LEDs in parallel, the variances in actual LED resistances will result in some LEDs passing more current than others, so you will have uneven brightness from one LED to the next. It may be imperceptible, it may be obvious, you may be extremely lucky to have LEDs identical in real-world spec, or most likely some may just burn out from taking the majority of the current due to being the path of least resistance for current.
While not the best way to do it, if this is a cheapie throwaway thing that doesn't really need to definitely last past the holidays, you could only use 1 resistor per color, as long as you recognize that you will likely get uneven coloring and a compromised lifespan of the LEDs.
Not a worthwhile trade-off in my opinion, resistors are a cent per. Do it right.

Thx everyone.
Because its just a small project I whent with the 180ohm I hope you don't see as mutch of a diffrents brightness.

ChrisTenone:
Or if you hook them up to show different colors for the same input, you could make the colors 'chase' through the four leds.

Thx, sounds nice. Will test it when i get everything

sterretje:
For the schematic in reply #7, make sure that you don't exceed the current limits of the ATTiny. You might need transistors or fets.

And by the way, "zwarte piet moet blijven" :wink:

jep ben met je eens dat die zwart moet blijven maar jammer genoeg vinden sommige mensen dat ongepast.

Thx I don't know mutch how that works. I know that the ATTiny84 has a max I/O per pin of 40.0 mA and in the datasheet the forward current is 20 mA. does that mean i can have 2 rgbs on one pin? sorry stupid question.

Stupid questions are those that were never asked.

You could operate 2 LEDs on one pin, but not 2 RGBs this way.
What you call a RGB, is in fact 3 LEDs, you need to keep that in mind.
If you need to do so, you can control 3 LEDs by a single pin, but you need to keep the current per pin below 40 mA.
So then you would need to divide these 40 mA across the 3 LEDs.
You would need to reduce the current to some 13 mA per colour, which means you will be reducing the intensity too.
And that’s for a single ‘RGB’.

If you would use a few transistors, you could expand the total number of LEDs a lot.
But that would take a bit more time to create, to learn, and a bit more money (not a lot).

pepijn21:
Thx I don't know mutch how that works. I know that the ATTiny84 has a max I/O per pin of 40.0 mA and in the datasheet the forward current is 20 mA. does that mean i can have 2 rgbs on one pin? sorry stupid question.

With two RGBs and 20mA per color, you're pushing the limits (my opinion). It might be better to use slightly bigger resistors (e.g. 220 Ohm instead of a calculated 180 Ohm).

There is also a total maximum for the ATTiny of 200mA (through the Vcc or GND pin).

Can we drop this talk of driving LEDs from chip pins? It’s like this guy is afraid of scary transistors and y’all are giving him hope he can somehow run 12 RGB LEDs aka 36 LEDs without transistors. The ATTiny is plenty sufficient for providing base signal.

pepijn21:
Thx everyone.
Because its just a small project I whent with the 180ohm I hope you don't see as mutch of a diffrents brightness.Thx, sounds nice. Will test it when i get everythingjep ben met je eens dat die zwart moet blijven maar jammer genoeg vinden sommige mensen dat ongepast.

Thx I don't know mutch how that works. I know that the ATTiny84 has a max I/O per pin of 40.0 mA and in the datasheet the forward current is 20 mA. does that mean i can have 2 rgbs on one pin? sorry stupid question.

No. A tiny cannot supply 40ma over an extended time, or even when pulsed. 40 ma will work at first, but over time, your pins will die. Keep the current per pin equal or less than 20ma.

This is probably a good time to learn how to use transistors (or FETs) to do the heavy lifting when lighting a diode. Use cheap, available, and easy to hookup npn transistors, a few 10K and 330 ohm resistors, and you can easily double up (or more) the LEDs you can control with a single pin.