Go Down

Topic: driving high powered RGB/transistor question(s) (Read 6564 times) previous topic - next topic

xl97

hi everyone..

I am trying to swap out my regular old 5mm (radioshack) common anode RGB led, for a high powered RGB led star version.. (again I believe it to be common anode as well)

http://dx.com/p/3w-led-emitter-on-star-multicolored-rgb-4530?item=1

however the current requirements are MUCH more demanding.. and more than the Arduino can give.
- Driving voltage and current per channel:

    Red: 2.5V ~ 3.0V, 350mA
    Green: 3.2V ~ 3.8V, 350mA
    Blue: 3.2V ~ 3.8V, 350mA



So I thought it could be done much the similar way I am running/driving a high powered motor in the same circuit... (using a transistor for the 'power by pass' and Arduino to trigger gate on transistor..etc)

Currently set-up as such: (using a 2N222 NPN transistor)



but Im confused on the NPN vs PNP transsistors.. (and current sourcing vs current sinking..etc in general to be honest)..

and am unsure about how to correctly add in this 3W RGB led..

project specs:
Arduino (custom board) powered by battery pack
Battery pack 7.2v Li-Ion pack
odd surplus motor as posted above (3v-9v rating it said on box??? and somethign about stall current or stall voltage,...I dont recall off hand)
There will only be one led die (color) on at a time..


my current approach was/is using 3 transistors one for each color

but not sure what transistor I should use?

I also think I need resistors on the leds between transistor(s) too....correct?

Here is my current schematic of visualizing it:


Do I need a NPN or PNP transistor? (I have seen links/images with both?)
What would a correct value/transistor to get? one that has the enough current and close enough/equal to 3.3 volts?
(was wanting to pick up a few from local radioshack if available)


thanks.





DVDdoug

#1
Sep 07, 2012, 12:05 am Last Edit: Sep 07, 2012, 12:11 am by DVDdoug Reason: 1
Typically, high-power LEDs are driven by a special LED driver circuit.... A constant-current switching supply, which means the power supply itself doesn't have to dissipate much power.  You can build or buy a high-power LED driver, but if you build one the first time and you don't know what you are doing, you might end-up burning-out some components (or your LEDs) and spending more money than if you just buy one (or three for an RBG LED).

Normally (with a regular low-power LED) there is a resistor that limits current...  You can do the same thing with high-power LEDs, but I don't see any current limiting resistors in your circuit...  Either the transistors or the LEDs will fry... Or both. :( 

As far as the transistors, since they are used as switches you should only have to worry about the current rating.   To be safe, I'd choose a transistor rated at least 1 amp (maybe 1/2 amp minimum).   I don't there are any transistors rated for less than 12V, so I wouldn't worry about the voltage rating.

Quote
Do I need a NPN or PNP transistor?
Probably NPN, depending on how you desing your circuit...  But, your circuit won't work...  The current need to flow through the LED and transistor in series (through the emitter & collector of the transistor), and the "arrow" in the transistor & diode need to be in the direction of current flow (positive to negative).  You don't have a ptth to ground, so you've got no current  flow...  :(

With a high-power LED, the resistor will need to dissipate about the same power as the LEDs (with a 5V supply), so you'd have to use 2W resistors if you want some safety margin.  If you are running off a battery, you probably don't want to be wasting half of the power heating-up resistors and cutting battery life in half...

Here's how you calculate the current limiting resistor for an LED -

1. The voltage gets divided between the resistor and the LED.  (The same current flows through both when they are in series.) 

If there is a transistor, there is also a small voltage-drop across the transistor when it's on (~0.2V or so), but we are making some approximations anyway so we can ignore that for now.  (There is a bigger voltage drop across the transistor when it's off, but who cares...)

2. So, let's say your battery has a nominal voltage of 7V  (the actual voltage depends on the charge).  For the RED LED, we'll say the voltage drop is 2.75V.  (Since they give you a range, that means it varies and if you have two "identical" LEDs, they may have different operating voltages at 350mA.  With a 7V supply and 2.75 V across the LED, that leaves 4.25V across the resistor. 

3. Now that we know the voltage across the resistor and the current through it, we can calculate the required resistance with Ohm's Law.  4.25V / 0.350A = ~12 Ohms.   

Note that you cannot use Ohm's law directly with the LED because the LED is not "linear"...  it's resistance changes when the voltage and/or current changes.  This is why you have to use something else...  A resistor or a constant current source to drive the LED.

4. We can also calculate power dissipated by the resistor.  4.25V x 0.35A = ~ 1.5 Watts. 





 

xl97

ha.. Im even 'more' confused!  (but thanks for the reply/response!)  :)

I didnt think it would be this hard to use a common ANODE high-powered led..


Im trying to take it all in and (understand it)...lol..

So I can use the transistors.. but would need a huge resistors in it.. (which would be using/losing lots of power as heat...yes?)

(dont want that).. although.. to be fair.. the leds will NOT be on constantly very much if at all.. you can either press button and blink manually.. or switch over to 'auto-mode' and you hold down the button..and it rapidly blinks the led..

but those seem like HUGE resistors..and not ones easily purchased at your local radioshack..etc.

still unclear about npn vs pnp?  and this current sinking vs current sourcing..

gonna search around some more see about how others have done high powered led + Arduino stuff..etc.

thanks


Docedison

you would do best for now and in the long run to search for a basic electricity text and read it CAREFULLY. Getting answers for single questions only fixes single problems.
Understanding electricity as a beginning means you have the answers, you don't have to ask and you never have to wonder if the answer is right... unless you are a bad student. There is also the point that at some time there won't be anyone to ask, Then what will you do?

Doc
--> WA7EMS <--
"The solution of every problem is another problem." -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard


jamieriddles

#5
Sep 12, 2012, 11:59 pm Last Edit: Sep 13, 2012, 12:00 am by jamieriddles Reason: 1
The biggest problem with your solution is going to be as you said, the high heat dissipation on the resistors. Instead of burning up all that heat, try building a constant current source.

I had an project with some high power LEDs as well.
After some googling, I decided that this constant current source was easily the best option for me powering high current LEDs from an arduino.
Might not be the absolute cheapest option (see ebay for LED drivers), but the simplest I could find that I could build and play around with:
http://www.instructables.com/id/Power-LED-s---simplest-light-with-constant-current/

Calculated the setting resistor value and built x3 channels. At 350ma per channel (same as your LED), the thing works a treat 24/7 and the mosfets on a heatsink put out barely any heat.

retrolefty

High power LED should always be driven via active constant current drivers if you wish to use them at close or at their maximum brightness/current value. If you really have to use simple series current limiting resistors to set the led currents then I suggest you run them at 150-200ma value and live with the decreased brightness.

Lefty


MarkT

You don't need large power resistors - just parallel some regular ones - if you use 400mW resistors then the red LED needs 2 resistors (either 2.7 ohms in series or 12ohms in parallel).  green / blue would just about be OK on single 400mW resistor for light use (not continuous duty).

However the resistors will get hot (hot enough to burn you even), need to be spread out and need free airflow to cool them (not inside a small box for instance).

For 250mW resistors you'd need 3 for red, 2 each for blue/green.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Erni

#8
Sep 13, 2012, 04:30 pm Last Edit: Sep 13, 2012, 04:37 pm by Erni Reason: 1
I have used a LM317 as a constant current source, see the schematic.
The only problem is the resitor, if the current should be limited to 350 mA, the resistor should be 3,6 ohm.

The transistor  is a BC547

A better way to use the LM317, see reply #7 in this thread:
http://arduino.cc/forum/index.php/topic,102101.0.html

xl97

thanks guys...

I didnt really need a high powered led.. I just figured since I had it laying around.. I'd try to use it..

I opted for just using an RGB 5050 SMD led....  and tapping the Aruino 3.3v volt pad..etc.

made a quick home brew/etched pcb for it....and baked it in the toaster oven (as well as turned a bit of aluminum to make a housing for the 'led/pcb' to go in the prop/project)











thanks guys..


Go Up