Go Down

Topic: Control a 36W LED strip. (Read 5258 times) previous topic - next topic

pollop

Hi,

I just bought an Arduino (Uno) and I'd like to use it to control a LED strip !
I'm good at programming but electronic is just a new world to me !

I read that I can't just plug my strip in the pin of my Arduino 'cause it's gonna burn it...
Furthermore, the strip needs 12V.

The strip I ordered is 5meters long (36W 150 x 5050 SMD LED RGB Light Flexible Strip (5M-Length/DC 12V))
I've seen some solutions here and there, some using MOFSET, some using ULN2003, others using amp.
I've also seen people complain that their led are never completely off...

I was going to buy this : http://www.dealextreme.com/p/144w-rgb-signal-amplifier-for-led-strip-light-dc-12v-73695
But it needs 12V as input too and the Arduino only provide 5V so I guess it's not gonna work.

Well as you can see I'm a bit lost and don't know what to use to control my strip !
I would appreciate your help.  :)

PS: Sorry if my english sounds a bit strange, it's not my first language.

pollop.

3dprinter

I looked at the weblink at it seems (on a first view) a nice RGB amplifier. Unfortunatly I couldn't find the spec sheet so some guesses here may not fit.

It is very easy with a simple transistor or MOSFET circuit to turn the 5V arduino to the 12V for the unit. It implies that you use the Arduino PWM output to regulate the light. Here is a good overview http://www.kpsec.freeuk.com/trancirc.htm

It is also "simple" to just amplify the 5V Arduino with a big enough MOSFET to a many watt output. (ie instead of using the amplifier thing) However, LEDs prefer to be driven by a current controlled source, not a voltage as such. Which leads to the LED strip - they may indeed have some intelligence on the strips, ie control the current as long as 12V is available. 12V will burn any LED that does not have some circuitry with it (a resistor, a full IC) sometimes by putting enough in series they will survive 12V (but you get a huge imbalance between Red and Blue...). In short: what is the LED strip ?

Your project - as presented so far - is simple enough. Find the specification sheet (lots of numbers with voltages, input currents, and such like ;) ) for the amplifier and the LED strip.


(NB: English is my 3rd language, and I daily converse in my 4th. Sorry if it sounds strange. Oh - and I have the occasional typing mistake, too :) :) )

pollop

Thanks a lot for your quick answer !

Here's a link to the LED strip I bought : http://www.dealextreme.com/p/36w-150-x-5050-smd-led-rgb-light-flexible-strip-5m-length-dc-12v-93398
There are some infos but nothing about resistor in the strip even if it seems that there are some when looking at the picture.

I'm gonna read the article you gave me to better understand what I'm doing ;)

About the amp, if I understood well, I could use some transistors in order to transform the 5V of my Arduino to the 12V input required by the amp ? (without burning my Arduino :P) ...
Ok I'm gonna read the article first maybe ... :P

Thanks again ;)

odysee_2002

Hello,

if you use a N-FET like IRLU 8721 you connect your port pin with the gate of the FET.
Then you connect 12V + to your stripe. the other pin of your stripe you connect with the drain pin.
And the Source pin with Gnd. So you can switch more than 60A = 720W.

This should be enough for 1 stripe.. and cost's less than a dollar ;-)

Regards

pollop

#4
Jan 23, 2012, 11:37 pm Last Edit: Jan 24, 2012, 08:35 am by pollop Reason: 1
Thanks for your reply !

Is a N-FET the same thing as MOSFET ?
I just read in this article : http://www.bristolwatch.com/ele/transistor_drivers.htm
that:
"Unlike bipoler transistors MOSFETs are voltage operated devices, not current operated"

Does this mean that I can't use analogWrite on the pin of the Arduino but can only use HIGH and LOW for an on/off switch ?

Sorry if what I say just doesn't make sense at all, I just read about what transistors are and I don't really get the difference between FET, MOSFET and transistors :/

By the way, the IRLU 8721 seems cool ! Can I just pick this one even if I use it for less current ? Can I just pick a "big enough" transistor or is there rules I have to respect ?
Should I use a resistor between the Arduino and the gate or between the source and the gate ? Correct me if I'm wrong but I thing I don't need a resistor when dealing with MOSFET, right ?

Thanks again guys !!

pollop.

3dprinter


An N-FET is just a specific variation of a MOSFET, just like a NPN is a varaiation of a transistor (sometimes called a BJT)

Every circuit every signal has both current and voltage. The two are interdependent on each other defined by the resistance. For all "active" components the resistance is "dynamic" and varies with how much voltage/current is applied (as opposed to a resistor). One specifies transistors as "current amplyifying" as that is the easiest way to specify what they amplify (base->emitter current controls the Collect->Emitter current), and on MOSFETs one sepcifies the gate voltage (there is very little current flowing in the gate) but it controls the Drain->Source current.

Just as shown in the webpage for the simple N-Fet example is how you can wire it. A MOSFET(N-FET) will still have some resistance, so at 4A it may become warm (multiply the Rds value from the spec sheet by the current) so in practice you need to cool it, ie mount it on a heat sink. Otherwise the Arduino 5V (and potentientally 30 mA) is enough to turn on/off the specified MOSFET. There is no "surplus" if the MOSFET is rated at 40A, on the contrary, it is always good to have a large margin away from the specified MAXimums.

Picking another MOSFET or transistor requires a few simple calculations. I wont mention them all here, you can find introductory texts somewhere, but for a MOSFET the important thing is that it is a "logic" MOSFET that turns fully on with a gatevoltage below 5V. Most only turn on halfway and are fully on at 10V. The other to watch for is Ids max current and the voltage it can block.
If you choose a transistor you need to make sure that when the Arduino supplies 30mA into the base that the amplyfying effect "hfe" gives you enough current (the 1 or 4 A you need). You must put a resistor between the Arduino and base so you only get 30mA (or less if possible) at 5V otherwise the Arduino may try and supply more and damage its output circuits (they are not protected against overcurrent). Usually one uses a Darlington Transistor Pair so the input current only needs to be a few mA (you have to choose a larger base resistor) to get multiple A.

Read the good intro to basic transistor/MOSFET knowledge you found, again.

this article : http://www.bristolwatch.com/ele/transistor_drivers.htm


odysee_2002

Hello Pollop,

if you put a resistor between the port output an the gate you limit the first current which goes into the gate.(works like a capacitor)
On the other hand the capacity of the gate is very small, so the first current (which might be too high) will flow only for a very short time. I use 1kOhm inbetween. On the other side the rise time is increased and the time the MOSFET is in analog mode will be increased a little bit, so it will warm up. But since this FET can handle high current, it doesn't matter. I drive one complete 5 m stripe without any significant warming up.
If you want your Fet always be open if the aduino is not connected, but also a 47kOhm resistor between Gate and GND.

If you connet the N-MOSFET as decribed, you can directly drive it with analogwrite from your arduino as you did it before.

The current limit of the FEt only tells you the maximum current if your real current is below, it doesn't matter, the FET will not get hot, so it's good. Nothing to care about anymore..


pollop

Hey,

Thanks again for your help and advices ;)

I'm not 100% confortable but I get it pretty much (I think :P)
I'm gonna recap what I understood just to make sure I won't hurt my Arduino ;)

- A MOSFET is kinda like a transistor but controlled by the voltage on the gate and not the current.
- The characteristics of a MOSFET are: the voltage needed on the gate to turn it fully on and the current supported by the source-drain.

For my project (controlling a led strip with analogWrite), I need:
- A logic level MOSFET (what does that mean ?)
- A MOFSET that is fully on with 5V and the current produced by the Arduino (30mA ?)
- A MOFSET that supports at least 12V and the current that my LEDs are gonna need.

- For connecting it to my Arduino, I just connect the output pin directly to the gate, the +12 to the LEDS and the other cable of the LEDS to the source and then the GND to the drain.
- It's not needed to put a resistor between the Arduino and the gate because it's voltage controlled not current right ?
- A resistor between the gate and the GND will make the LEDs on when my Arduino is off.

Am I right or do I get something wrong ? :P

Thanks again to all of you, if you have more 'introduction lectures' for basic electronic or MOSFETs, that would be great too ;)

Pollop.

3dprinter


I'm gonna recap what I understood just to make sure I won't hurt my Arduino ;)

- A MOSFET is kinda like a transistor but controlled by the voltage on the gate and not the current.
- The characteristics of a MOSFET are: the voltage needed on the gate to turn it fully on and the current supported by the source-drain.
You're doing fine.


- A logic level MOSFET (what does that mean ?)
- A MOFSET that is fully on with 5V and the current produced by the Arduino (30mA ?)
The "logic" means that 5V is enough for MOSFET fully on, other non-logic-MOSFETs usually require 8-10V. But otherwise it works the same - both types could be used in a real analog circuit.

- A MOFSET that supports at least 12V and the current that my LEDs are gonna need.
Yes, but for saftey margings choose a MOSFET for at least double that. Unless you go for a tiny surfacemount one, they will usually far exceed your minimum specs, and that is OK.


- For connecting it to my Arduino, I just connect the output pin directly to the gate, the +12 to the LEDS and the other cable of the LEDS to the source and then the GND to the drain.
Yes. Spot on.


- It's not needed to put a resistor between the Arduino and the gate because it's voltage controlled not current right ?
Yes, no and maybe. It is not really needed, but some MOSFETs the gate capacitance is such that for a short moment the current is large. Putting a resistor (1K Ohm) there limits the current, but it turn on slower (we ar talking few millionths of seconds here, nothing you'd notice) For this application, put it in.

- A resistor between the gate and the GND will make the LEDs on when my Arduino is off.
Sorry, totally wrong. It will make sure the MOSFET is fully OFF (and your LEDs, too) when the Arduino pin is in high impedeance mode or your LED circuits gets disconnected from the Arduino. If it is not there the MOSFET may get a little charge or voltage turning it half on. That means it effectivly will dissipate 6V at 1A and while your LEDs are half lit, the MOSFET will get HOT.

The reason you can have "half" lit LEDs during normal operation is that they are not - they alternate between fully LIT (MOSFET has very low resistance ie no voltage drop to dissipate) and fully OFF (MOSFET has very high resistance, almost no current to make heat) and they alternate so fast your eye only sees the average.

Now go and get that circuit build and the LEDs a'flashing :)

Go Up