Darlington array (ULN2003) to N-Channel MOSFET (RFP30N06LE)

I have a working project where I am using an ULN2003 darlington array to power an RGB LED strip.

I want to expand to a bigger strip and have therefore bought some MOSFETs from sparkfun as these could be controlled directly from a microcontroller...

I have seen a few projects with MOSFETs, and some use transistors to drive the gate. Some use pull-up resistors and some use resistors to protect the mosfet. Now I'm not sure what I need. I thought this was just replace the darlington with the MOSFET :frowning:

Looking for some advice :slight_smile: How to wire it all up. I have 12v supply voltage and 5v from the arduino board, also using the PWM outputs on arduino.

lerum:
I have a working project where I am using an ULN2003 darlington array to power an RGB LED strip.

I want to expand to a bigger strip and have therefore bought some MOSFETs from sparkfun as these could be controlled directly from a microcontroller...

Linking to the actual mosfet you brought would be useful to try an answer your questions. Are they logic level mosfets?

I have seen a few projects with MOSFETs, and some use transistors to drive the gate. Some use pull-up resistors and some use resistors to protect the mosfet. Now I'm not sure what I need. I thought this was just replace the darlington with the MOSFET :frowning:

Depends on if you are using a logic level mosfet or not. pull down resistor is useful for safety purpose in cases where the externally controlled device is powered up but the arduino is power off. series resistor from arduino to gate is for output current pin protection during charging and discharging the gate capacitance. Again it depends on the specifc mosfet you are using how important that might be. 300 ohm series resistor is a good compromize.

Looking for some advice :slight_smile: How to wire it all up. I have 12v supply voltage and 5v from the arduino board, also using the PWM outputs on arduino.

Your best bet is to draw something up and post it and then we will punch holes in it. :smiley:

Thanks for the quick response. I have a drawing, just need to update it a bit, I'll post it later :slight_smile:

The MOSFET I'm going to use is: N-Channel MOSFET 60V 30A - COM-10213 - SparkFun Electronics

This is a "logic gate level" device.. I think you'd have no problem just driving it like the Darlington you had, up to 5 Amps output or so.

A 10K input Gate-to-Source pulldown and a 220 ohm series resistor from Arduino pins would be nice conservative design..

Modern Power FETs are So nice!

One of the reasons I was concerned, I saw some guy had a problem where the MOSFET never would turn fully off.

By "10k input gate-to-sorce pulldown" do you mean a 10k resistor from the MOSFET gate pin to MOSFET source pin? I think I saw a drawing where there was a 10k resistor from get to ground, is that wrong?

Why would 220 ohm resistor protect the mosfet? From voltage spikes? Will the MOSFET fully saturate/turn on if I use this resistor?

Thanks for the replies :slight_smile:

lerum:
One of the reasons I was concerned, I saw some guy had a problem where the MOSFET never would turn fully off.

By "10k input gate-to-sorce pulldown" do you mean a 10k resistor from the MOSFET gate pin to MOSFET source pin? I think I saw a drawing where there was a 10k resistor from get to ground, is that wrong?

Why would 220 ohm resistor protect the mosfet? From voltage spikes? Will the MOSFET fully saturate/turn on if I use this resistor?

Thanks for the replies :slight_smile:

The 10K should be from Gate to Source. But usually the source (of an N-FET) is grounded, so "same thing"... So gate can't float around or pick up noise easily..

The 220 Ohm series resistor protects the Arduino output. Just at the moment the Arduino output goes from about Gnd to about +5V it has to charge up the small capacitance inside the FET. This might momentarily draw a "spike" of current from the Arduino.. Probably not damaging it but possibly disrupting it's operation. This happens so fast that the FET still turns fully on "fast".. (This is not like a bipolar transistor where you have to keep supplying Base current. But even in that case , 220 ohms will work.)

Keep on asking these kinds of questions! The WHY will apply to new situations you find, and it will all make more sense over time.

Here's a circuit we just added to our circuit gallery that looks like it might be what you want:

http://ruggedcircuits.com/html/circuit__28.html

--
The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons

Aaaah of course. I think I'm beginning to understand now. Is 10k and 220 just random numbers, or are they something I need to calculate to fit my circuit?

I have attached the fritzing diagram I have made so far. The big RGB LED in the diagram is meant to be LED strip with integrated resistors etc.

pwmrgb.fz (517 KB)

Is 10k and 220 just random numbers, or are they something I need to calculate to fit my circuit?

Neither random nor calculated. Just good nominal values to use. In truth the transistor will work without either resistor, it's just for protection and circuit safety.

Lefty

retrolefty:

Is 10k and 220 just random numbers, or are they something I need to calculate to fit my circuit?

Neither random nor calculated. Just good nominal values to use. In truth the transistor will work without either resistor, it's just for protection and circuit safety.

Lefty

I see... Do these resistors have to be sized accordingly, or can I just use cheap ones I already have since they are on 5v not on the 12v pwm?

Also if someone could have a quick look on the left part of my drawing, with the MOSFETs. The right breadboard is almost copied off a guide here, so I believe it should be right.

My end goal is to pack all this into a package which is as small as possible. Maybe I should think of adding some kind of short-circuit and overheating protection?

Resistors can be any power rating from 1/10 watt up...

It's a good idea to add decoupling on the Vin - voltage regulator specs usually specify an input-side decoupling capacitor as well as output side.

What current will the MOSFETs have to carry? - those MOSFETs will need heatsinking above 2 or 3 amps.

I'll stick to my cheap 1/4 watt ones then :slight_smile:

MarkT:
It's a good idea to add decoupling on the Vin - voltage regulator specs usually specify an input-side decoupling capacitor as well as output side.

What current will the MOSFETs have to carry? - those MOSFETs will need heatsinking above 2 or 3 amps.

Decoupling capacitors are those two that sit between Vin and GND, and Vout and GND in my drawing right?

I believe the MOSGET are going to carry just under 1 amp each, but I already bought heatsinks just in case :slight_smile: Just need to find some way of screwing them on since I dont have thermal adhesive.

lerum:

[quote author=Terry King link=topic=56586.msg406800#msg406800 date=1301222114]
Resistors can be any power rating from 1/10 watt up...

I'll stick to my cheap 1/4 watt ones then :slight_smile:
[/quote]

Why are you so worried about watts in this case? Check my signature and calculate, are you even close 0.1W?

Cheers,
Kari

EDIT. Ok, second look at the values, 5V with 220 ohm gives 0.11W.
EDIT2. No, that point is for driving FET, so if was for securing arduino, and there's no such current.

Thanks for your help guys. I hooked this up today and it works perfectly! The MOSFETs dont even go lukewarm, as opposed to the ones in my chinese controller which fried itself.

It's driving a 5 meter "300led 5050" LED strip from dealextreme.com

Now I need ideas on how to control it. I'm thinking slowly rotating colors - controllable from my PC :slight_smile: