Pages: [1] 2   Go Down
Author Topic: Darlington array (ULN2003) to N-Channel MOSFET (RFP30N06LE)  (Read 5766 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 21
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley-sad

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

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 362
Posts: 17307
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley-sad

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 smiley 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-grin
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 21
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

Red Sea, Saudi Arabia
Offline Offline
God Member
*****
Karma: 12
Posts: 579
..On The Red Sea
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Regards, Terry King  ..On the Red Sea at KAUST.edu.sa
terry@yourduino.com  LEARN! DO! (Arduino Boards, Sensors, Parts @ http://yourduino.com

0
Offline Offline
Newbie
*
Karma: 0
Posts: 21
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley
Logged

Red Sea, Saudi Arabia
Offline Offline
God Member
*****
Karma: 12
Posts: 579
..On The Red Sea
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley

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

Regards, Terry King  ..On the Red Sea at KAUST.edu.sa
terry@yourduino.com  LEARN! DO! (Arduino Boards, Sensors, Parts @ http://yourduino.com

0
Offline Offline
Faraday Member
**
Karma: 16
Posts: 2855
ruggedcircuits.com
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 21
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley

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.


* draft1.PNG (77.19 KB, 937x591 - viewed 168 times.)
* pwmrgb.fz (516.73 KB - downloaded 37 times.)
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 362
Posts: 17307
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 21
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?

Logged

Red Sea, Saudi Arabia
Offline Offline
God Member
*****
Karma: 12
Posts: 579
..On The Red Sea
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Regards, Terry King  ..On the Red Sea at KAUST.edu.sa
terry@yourduino.com  LEARN! DO! (Arduino Boards, Sensors, Parts @ http://yourduino.com

0
Online Online
Shannon Member
****
Karma: 222
Posts: 12731
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

[ I won't respond to messages, use the forum please ]

0
Offline Offline
Newbie
*
Karma: 0
Posts: 21
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

I'll stick to my cheap 1/4 watt ones then smiley
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 21
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

Espoo, Finland
Offline Offline
God Member
*****
Karma: 7
Posts: 586
"Oops, try again..."
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

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.
« Last Edit: March 28, 2011, 02:05:20 am by GaryP » Logged


The only law for me; Ohms Law: U=R*I       P=U*I
Note to self: "Damn! Why don't you just fix it!!!"

Pages: [1] 2   Go Up
Jump to: