Uno running 6 diffused RGB led - possible?

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
jjhp3
 
Posts: 9
Joined: Tue Jan 06, 2015 10:46 am

Uno running 6 diffused RGB led - possible?

Post by jjhp3 »

True beginner. Read a lot and am coming to the conclusion that running 6 of adafruit's diffused RGB LEDs ( in parallel) from one Uno board draws too many milliamps. True? If so, what is the direction forward? Thanks! John

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Uno running 6 diffused RGB led - possible?

Post by adafruit_support_bill »

Yes. The absolute maximum the pins can handle is 40mA. 20mA is a more reasonable target. To drive that many leds, you need a transistor of some kind to switch the current.

6 RGB leds in parallel is the equivalent of a short piece of analog RGB LED strip and the control circuit would be the same:

https://learn.adafruit.com/rgb-led-strips/usage

Since you are not driving a full strip, you could get by with a smaller transistor than shown. A PN2222 would replace the TIP120 in the diagram below.
https://www.adafruit.com/product/756

Image

User avatar
jjhp3
 
Posts: 9
Joined: Tue Jan 06, 2015 10:46 am

Re: Uno running 6 diffused RGB led - possible?

Post by jjhp3 »

Thanks for such an informative reply! My young assistant came over to help and we ended up with a couple of questions, if you don't mind.

1) we used 3 TIP120 with 3 100 ohm resistors as per your diagram with 6 diffused RGBs from adafruit. My Uno was running a typical RGB fade from one color to another sketch. If I use a parallel LED web-based calculator, it seems as if around 50-70 ohms is correct for this number of LEDs. Does the TIP120 have an effect on the resistors needed by the LEDs?

2) we got it working but with confusing results. It only worked, as programmed, when getting power from my MacBookPro USB. Or a plug-in 5V USB phone charger. Using the PS that came with the Arduino (9V 660 mA) produced odd blinking and an external PS of either 9V or 12V 500 mA up to 1A produced bright regular flashes. I have no idea what this means, or what power supply to buy to make it work well.

3) are LED strips wired in parallel or series and do they have built in resistors?

Thanks again so much for taking the time to answer!

John

User avatar
Franklin97355
 
Posts: 23912
Joined: Mon Apr 21, 2008 2:33 pm

Re: Uno running 6 diffused RGB led - possible?

Post by Franklin97355 »

1. Not in any significant way.
2. Make sure you have a ground connection between your components and the power supply.
3. I don't have those strips here so I don't know the answer to that one.

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: Uno running 6 diffused RGB led - possible?

Post by adafruit_support_mike »

The analog LED strips are wired series-parallel.

The LEDs are arranged in groups of three, which are wired in series and have a current-limiting resistor. A strip contains multiple groups, and the groups are wired in parallel.

User avatar
jjhp3
 
Posts: 9
Joined: Tue Jan 06, 2015 10:46 am

Re: Uno running 6 diffused RGB led - possible?

Post by jjhp3 »

Thanks for more info. Naturally, it brings up more questions for a beginner like me... Using web calculators, it seems that the rgb leds I'm using draw 20mA each for a total of 60mA per LED. If I wire 6 of these in parallel, the calculator shows the resistors should be around 50 ohms and that's for each RGB lead, correct? The diagram above shows one resistor per lead attached to the transistor. So it should work as required if I use just one resistor per at the "source" of the line of LEDs, and that resistor is around 50 ohms or a little more?

Many thanks for the quick replies!

John

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Uno running 6 diffused RGB led - possible?

Post by adafruit_support_bill »

The resistor on the base of the transistor serves a different purpose. It limits the current through the base. You still need current limiting for the leds. Strictly speaking, you should have one on each cathode leg of each RGB led. If you tie multiple parallel leds through single current limiting resistor, there is no guarantee that the current will be shared equally. If one LED has a slightly lower Vf, it will take more of the current and could potentially burn out.

When I said the circuits were the same as the strips, I should have posted the schematic diagram for the strips from that same tutorial. The strips are wired series-parallel as Mike explained. Each series of 3 leds has its own current limiting resistor.
https://learn.adafruit.com/rgb-led-strips/schematic
Image

User avatar
jjhp3
 
Posts: 9
Joined: Tue Jan 06, 2015 10:46 am

Re: Uno running 6 diffused RGB led - possible?

Post by jjhp3 »

Wow - thanks for this! OK - I'll solder the correct resistor to each leg of the LED. Still confused about value of resistor though.

The site where I've found a calculator ( http://www.hobby-hour.com/electronics/ledcalc.php ) shows around 60 ohms per color leg, also says "If you want to connect the LEDs in parallel each one should have its own resistor. Calculate the value for a single LED and connect all the LED-resistor pairs in parallel." The schematic they show seems to go against the advice they give... If I do one led (9V-20mA) it is 300 ohms. 6 leds in parallel = 50 ohms each.
led-circuit.php.gif
led-circuit.php.gif (1.39 KiB) Viewed 698 times
Any advice on how to determine the correct resistor attached to each of the three legs wired in parallel?

Greatly appreciated! John

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Uno running 6 diffused RGB led - possible?

Post by adafruit_support_bill »

The wording there is a little confusing. Bottom line is, you should use a separate resistor for each leg of each led. The resistor required for the red and the green will be about the same. (Usually about 330 ohms for a 9v source). The blue led will have a higher Vf, and will take a smaller value (around 270 ohms for 9v.)

User avatar
jjhp3
 
Posts: 9
Joined: Tue Jan 06, 2015 10:46 am

Re: Uno running 6 diffused RGB led - possible?

Post by jjhp3 »

Great info - thanks. Just to double check, wired in parallel, I will use a 270 -330 ohm resistor on each leg of each LED, not the approx 50 ohms shown by the calculator.

John
Screen Shot 2015-04-12 at 10.43.59 AM.png
Screen Shot 2015-04-12 at 10.43.59 AM.png (89.26 KiB) Viewed 679 times

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Uno running 6 diffused RGB led - possible?

Post by adafruit_support_bill »

Yes. The 50 ohms shown by the calculator would be for the leds wired as in the diagram - not really a good way to do it.

User avatar
jjhp3
 
Posts: 9
Joined: Tue Jan 06, 2015 10:46 am

Re: Uno running 6 diffused RGB led - possible?

Post by jjhp3 »

Hopefully my last question on this... so this drawing is an OK way to do this? Arduino to breadboard with transistors acting as central distribution point: 4 conductor 27 awg wire to each LED? - John
parallelLEDs.jpeg
parallelLEDs.jpeg (48.69 KiB) Viewed 670 times

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Uno running 6 diffused RGB led - possible?

Post by adafruit_support_bill »

Yes, that is correct.

User avatar
jjhp3
 
Posts: 9
Joined: Tue Jan 06, 2015 10:46 am

Re: Uno running 6 diffused RGB led - possible?

Post by jjhp3 »

Thanks you all so much!

As I teacher myself, I know how it can become tedious to go over and over basic stuff.

One more: I'm going to need to get a power supply for this. 9V at 600+ mA would be best? 5V OK? Is "type 2 transformer: what is needed? I bought an adafruit 5V yesterday, but an not sure it is what this requires.

Cheers, John

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Uno running 6 diffused RGB led - possible?

Post by adafruit_support_bill »

Are you using this power supply for the LEDs only? Or are you using it to power the Arduino too?

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”