Control 10 rgb leds

Hi,
I'm a complete newbie and I wanted to do something that sounds easy, want just to control 10 rgb leds with a IR remote control, particularly I want that if I click to a number (0-9) the same led switches on or off.
'till now I've bought:

  • arduino nano 3.0
  • nano I/O shield
  • led rgb (R: 2-2.2V G,B: 3.2-3.4V)
  • 40 cavi dupont F-F
  • IR remote control with HX1838 module
    My question is, how to power up the leds, if I take a Voltage converter (to 2-3V) I don't need any resistor and breadboard, is it right??

Thanks in Advance
Leo

if I take a Voltage converter (to 2-3V) I don't need any resistor and breadboard, is it right??

Wrong, very wrong.

http://www.thebox.myzen.co.uk/Tutorial/LEDs.html

Grumpy_Mike:
Wrong, very wrong.

http://www.thebox.myzen.co.uk/Tutorial/LEDs.html

Referencing ohm's law: V_total - Vled_turn_on = R * I
If V_total < Vled_turn_on =~ 3V then R*I=0 so I don't need a resistor, I made this think, why is it wrong?

Do you read?

Quote from the link from Mike:
"LEDs are not like normally electronic devices in that you can’t just apply a voltage to them and they work"

So, easiest way, use a resistor :wink:

septillion:
Do you read?

Quote from the link from Mike:
"LEDs are not like normally electronic devices in that you can’t just apply a voltage to them and they work"

So, easiest way, use a resistor :wink:

ok, got it! :smiley:

Next question, for rgb leds is it better to put 150ohm resistors to all colours or 150ohm for red and 100ohm for blue and green? (The values 100/150 are good?)

You can not use just one resistor. If you do then you can only turn one LED on at a time. If you try and turn more than one on then the one with the lowest forward voltage will be on and the others will be off.

Leopesto:
Next question, for rgb leds is it better to put 150ohm resistors to all colours or 150ohm for red and 100ohm for blue and green?

Sounds reasonable.

The red LED in an RGB LED has a lower forward voltage.
~2.4volt vs. ~3.3volt for the other colours.
So the red LED needs a higher value current limiting resistor for equal currents (brightness).
Leo..

Wawa:
So the red LED needs a higher value current limiting resistor for equal currents (brightness).

That of course, presumes comparable efficiency of the different colours, however this is generally engineered into the design of the RGB LEDs.

Leopesto:
'till now I've bought:

Hi Leo,

That was your mistake. Ask here before you buy!

If you want to control 10 RGB leds individually, you would need 30 outputs, and the Nano 3 does not have enough.

I would have advised you to buy 10 x ws2812b rgb leds.

Paul

PaulRB:
I would have advised you to buy 10 x ws2812b rgb leds.

that will surely do the trick! Thanks paul, I'll buy the ws2812b... is there a way to connect them (10x) to the 5V power without use a breadboard?

Thanks in advance
leo

Leopesto:
I'll buy the ws2812b... is there a way to connect them (10x) to the 5V power without use a breadboard?

Yes, just solder them up in a string. Wire the 5V pins and GND pins in parallel, wire the Data Out pin of each led to the Data In pin on the next led and a ~200~300R resistor from the Ardunino output to the Data In pin of the first led. Also wire a 10uF cap accross the 5V and GND wires.

However, there could be a problem. 10 of these LEDs can in theory draw up to 600mA, which would overload the Nano's regulator. This maximum current would only be seen if all 10 leds display white at maximum brightness. At other times, if other colours or lower brightness are used or if some of the leds are off, then the current draw will be much less and may be OK. So what patterns & colours do you wish to use?

PaulRB:
and a ~200~300R resistor from the Ardunino output to the Data In pin of the first led. Also wire a 10uF cap accross the 5V and GND wires.

I can control 10 of them with just one data pin? so, the 5V and GND pin sold I in series with all leds, that's nice!
Do I really need a resistor? adafruit shop says "no external choke resistors are required making your design minimal. Power the whole thing with 5VDC and you're ready to rock. "

I can control 10 of them with just one data pin?

Yes, I have controlled 240 LEDs with just one pin like this.

Do I really need a resistor?

Do you want it to break? If not then yes you need a resistor, it matches the impedance of the lines and absorbs reflections.

adafruit shop says .....

That is marketing not engineering.

that will surely do the trick! Thanks paul, I'll buy the ws2812b... is there a way to connect them (10x) to the 5V power without use a breadboard?

See this video: https://www.youtube.com/watch?v=NiiBt74WvEk

The LEDs are connected without resistors. There is one 10uF electrolytic on the back. It probably would be advisable to add 4 or 5 0.1 caps just for low noise, but I have not had any problems. My power distribution is 12ga wire but the signal interconnect is 30ga wire wrap.,
If you look at the referenced WEB page, it talks about using 1x8 NEOPIXEL strips. (I may be wrong about the connections required.)

You will probably need an external power supply for the LED strip.

The code is currently downloadable from the referenced WEB page.

Here I'm back,
I just made a prototype of my project using everycircuit: EveryCircuit - Led RGB 3
so I can control my 10 leds with just 13 outputs (10 for each led and 3 for colors which can be R,G,B,RG,RB,GB,RGB).
there are still a few problems:

  1. resistors, with 150ohm I have 20mah each led, but with 100ohm I've 30mah each led which is better because of more luminosity, everycircuit says leds won't burn but would it really?

  2. intensity - if I use "unicolor" (R, G or B) all the current goes thrue one led, but using more leds (RG f.e.) I get half the current each led so lower in intensity

  3. links - the circuit is electrical friendly but I don't know if it's possible to integrate it with arduino... f.e. the 5V supply goes thrue 3 switches (arduino outputs)....

  4. Red - Red normally needs higher resistors but here current and potentials are equal for the colors

  5. Power - the problem n. 2 has a positive point, current will never exceed 200mah or 300mah (with 100ohm), can the arduino nano supply that power??

Thanks in Advance
Leo

Leopesto:
I just made a prototype of my project using everycircuit: EveryCircuit - Led RGB 3

That's hard to read, very small. I don't have Chrome installed.

Leopesto:

  1. resistors, with 150ohm I have 20mah each led, but with 100ohm I've 30mah each led which is better because of more luminosity, everycircuit says leds won't burn but would it really?

It depends if you are multiplexing or not, and also the max continuous current the leds can withstand. Some are OK at 30mA continuous. When multiplexing, although the instantaneous current is higher than the max current for the leds, the average current will probably be less. Do you have a link to the data sheet for your leds? Also, don't get confused between mA and mAh. The first is a measure of current, the second is a measure of charge (like you would measure a rechargeable battery).

Leopesto:
2) intensity - if I use "unicolor" (R, G or B) all the current goes thrue one led, but using more leds (RG f.e.) I get half the current each led so lower in intensity

That is because you are not multiplexing yet. It will not happen when you are multiplexing because only one of R, G or B will be on at any instant, but they will take turns too fast for the eye to see and so you will see the required colour at the same brightness.

Leopesto:
3) links - the circuit is electrical friendly but I don't know if it's possible to integrate it with arduino... f.e. the 5V supply goes thrue 3 switches (arduino outputs)....

Not directly, no. The Arduino outputs cannot provide enough current for 10 leds at the same time. You will need 3 transistors between the Arduino outputs and the rows. These will act like the switches.

Leopesto:
4) Red - Red normally needs higher resistors but here current and potentials are equal for the colors

That does not sound correct. Let's see that data sheet.

Leopesto:
5) Power - the problem n. 2 has a positive point, current will never exceed 200mah or 300mah (with 100ohm), can the arduino nano supply that power??

Yes, I think so, but the Nano's regulator may get warm if all 10 leds show white for example.