driving logic level mosfets using the arduino

this was probably discussed numerous times but i can't find a straight answer to my question and i'll hope you can help me

i need to control logic level mosfets (n-channel as well as p-channel) by the arduino and i'm also going to use pwm and since i'm going to be switching a large amount of current (up to 15 amps for the n-channel) i need to be able to switch the mosfet on and off as fast as possible in order to limit power dissipation. the mosfets i'm going to be using (probably) are: IRLZ44N for the n-channel and FDS4435 or Si4425DY for the p-channel

so i have been thinking of using uln2803 for sinking the gates and a pullup resistor for charging it though i'm not sure about resistor values or even if that's a smart setup or maybe i should connect the gates straight to the arduino and put a series resistor to limit the current to 40mA and that would be good enough or maybe there's even a better solution

please help

Pull up resistor probably way too weak if you want high-speed PWM. A specialist MOSFET driver chip is a great solution here (they go up to many amps of drive for instance, so properly fast switching of the highly capacitive MOSFET gate is possible.

Incidentally what PWM frequency and what switching-time are you desiring?

I've used MIC4420/MIC4422 before (there's several in that family BTW), its available surface mount AND thru-hole, can work at 5V up to 18V and switch several amps at 25ns rise/fall times... Be sure to provide lots of decoupling next to the driver chip (1uF or more ceramic). The gate resistor can be 10 ohms or less.

There are many other MOSFET drivers, just look for low-side drivers that work down to 5V supply...

The gate resistor can be 10 ohms or less.

I would say that 100R was the smallest resistor to keep the current below 40mA. Note that this is just very short term current flow at the instant of switching and not sustained if the output is held at a logic level.

i need to be able to switch the mosfet on and off as fast as possible in order to limit power dissipation.

Then a FET driver would be useful.

Read my post - the MIC4422 can source/sink AMPS....

If the PWM frequency is low (e.g. the default pwm frequency of the Arduino, below 1KHz), it should be sufficient to drive the mosfet gate from the Arduino pin through a resistor of 100 to 150 ohms. If you are using much faster PWM (which means that switching losses are more important), use a mosfet driver such as the MIC4420.

i'll be using the original pwm frequency (490 Hz) i'm worried since i'll be switching 15 amps and i want to limit power dissipation as much as possible or would you say that with a frequency this low it wont make any difference whether i use a driver or just a series resistor?

i also found this mosfet: IRL3803 that has much lower resistance though it's gate capacitance is significantly bigger maybe i should use this one?

also, do i need to pull down the gate (pullup in the p-channel mosfets) to prevent it from floating or the arduino takes care of that (in case that i use only a series resistor)?

Yes it is a good idea to pull the gate off. A 10K resistor should work.

The PWM frequency will only matter with some kinds of loads, but you haven't told us what you are driving. For example a heater is not at all bothered by low frequencies.

a lot of leds all in all will pull 10-15 amps (haven't decided about the exact number yet)

should i use a different frequency to the stock one to get a better control over the leds?

The PWM frequency is high enough already so that you don't get any flicker, so I can't see any point in using a high PWM frequency, it would just create more EMI and increase switching losses.

When the Arduino powers up, before the pinMode call to set the pin to be an output is executed, the pin driving the mosfet is floating. Therefore you should use a pulldown resistor. If you are using a mosfet driver, the pulldown needs to be on the input to the driver.

Typically the only application that really needs very high speed switching is power-conversion (switch mode power supplies) where faster switching allows smaller capacitors and inductors for a given power rating. Sometimes when driving motors increasing the PWM removes annoying whines from the range of hearing.

For LEDs the default PWM (500 and 1000Hz depending on pin) might be a little slow if they are moving, I guess, otherwise I'd not worry about it.

One benefit of a MOSFET driver chip is that you don't need to worry about very high power inductive loads coupling back into the gate via the gate-drain capacitance (this can take the gate voltage out of spec and damage the microcontroller - a driver chip is "beefy" enough to absorb these transients). Another approach is using a zener diode to prevent the gate voltage going too high or low.