Go Down

Topic: Darlington array (ULN2003) to N-Channel MOSFET (RFP30N06LE) (Read 6240 times) previous topic - next topic

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...

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 :(

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

retrolefty


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 :(

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 :) 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.  :D

lerum

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

The MOSFET I'm going to use is: http://www.sparkfun.com/products/10213

Terry King

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!
Regards, Terry King  ..On the Red Sea at KAUST.edu.sa
terry@yourduino.com  LEARN! DO! (Arduino Boards, Sensors, Parts @ http://yourduino.com

lerum


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 :)

Terry King


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 :)


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. 
Regards, Terry King  ..On the Red Sea at KAUST.edu.sa
terry@yourduino.com  LEARN! DO! (Arduino Boards, Sensors, Parts @ http://yourduino.com

RuggedCircuits

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

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 :)


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. 



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.

retrolefty

Quote
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

lerum


Quote
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?


Terry King

Resistors can be any power rating from 1/10 watt up...
Regards, Terry King  ..On the Red Sea at KAUST.edu.sa
terry@yourduino.com  LEARN! DO! (Arduino Boards, Sensors, Parts @ http://yourduino.com

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.
[ I won't respond to messages, use the forum please ]

lerum


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


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

lerum


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 :) Just need to find some way of screwing them on since I dont have thermal adhesive.


GaryP

#14
Mar 28, 2011, 08:59 am Last Edit: Mar 28, 2011, 09:05 am by GaryP Reason: 1


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


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


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.
The only law for me; Ohms Law: U=R*I       P=U*I
Note to self: "Damn! Why don't you just fix it!!!"

Go Up