As the title says, I'm using a 328P Nano to drive some MOSFETS at about 30kHz. As the gate is capacitive the full current implied by the VCC/Resistance will only flow at the very start of the charge/discharge event and will reduce as the voltage rises or falls to meet the IO pin.
With that in mind, would it be OK to have the initial current flow exceed the 40mA limit for a very short period of time, provided that the average current flow was within spec? For example, can I use a 100R gate resistor, leading to 50mA initial current? Can I go lower? I would like to drive the gates as hard as possible within safe limits.
I understand I could increase gate drive by using BJTs before the gate pins, but I can't justify the extra components and PCB space/ routing complexity etc given that the switching will be fast enough even if I can never exceed the 40mA.
Damage is likely to done any time you exceed the manufacturer's absolute maximum specs, for any interval of time. The damage may not be immediately fatal.
In a design where I/O pin current can even temporarily exceed 40 mA, that damage will occur every time you switch the MOSFET, so at some point your Arduino I/O pin will fail, perhaps taking the rest of the MCU along with it.
That would be your justification for proper circuit design. I recommend using a 150 Ohm series resistor when driving MOSFET gates from an I/O pin, and a gate driver of some sort, if that current does not provide adequately short switching time.
With small FETs (hence lower gate capacitance) and slower PWM, you can get away with this - it's not best practice by any means, but I have multiple installations PWMing MOSFET gates without a resistor and have not had issues with them.
You're PWMing them at a fairly high speed though - how big is the load? Consider whether the switching losses will be acceptable; this can easily cause a MOSFET to generate much more heat than it otherwise would. If either the current from the MOSFET gate or the switching losses posed a problem, I would strongly consider a specialized gate driver IC. These do not have the current pulse associated with directly driving the gate, and can dump a brief pulse of very high current into the gate to turn it on and off quickly, minimizing switching losses.
With little ones of gate capacities of a few 10's of pF you might get away with it - but I'd use a series resistor anyway to be safe.
For bigger devices with several nF gate capacity and many kHz switching , you're pushing your luck, and should really use a mosfet gate driver - there are lots.
DrAzzy:
You're PWMing them at a fairly high speed though - how big is the load? Consider whether the switching losses will be acceptable; this can easily cause a MOSFET to generate much more heat than it otherwise would.
When I say 30kHz, it's actually only at 1/3 duty cycle, so it turns on and off during one cycle, waits two cycles, then does it again. It's 30kHz in terms of how long it's on for before being turned off, but only a third of the heat.
The load is also capacitive, but it will begin drawing 1A, and in the worst case scenario will finish charging just before the MOSFET turns off. IIRC the MOSFETS I'm using are fully on by about 3V gate, which will be reached in around 1 RC constant. Gate capacitance is is the 500pf area.
As others have suggested, you are pushing the conservative design envelope.
Your 30K Hz statement is not clear. Your switching frequency should be measured from going high to next going high.
MosFet's have two charges that have to be overcome,
Gate to source charge
Gate to drain charge
The Gate to source charge is an immediate load on your µP I/O pin. The Gate to drain doesn't start affecting the gate until the drain starts to drop. This means the total charge will be somewhat "staged".
Also consider:
How much current other I/O pins are supplying
Max ambient temperature.
That being said I can give you my "opinion":
For a hobby project it will likely to be fine.
However you mentioned a PC board. If this is a "product" that could have issues in the field, I would contact Atmel/Microchip tech support and run it by them.
The short answer is the manufacturer hasn't characterized this, you are on your own. Yes you will
get away with brief excursions, but for how long and by how much without affecting reliability? That's
not documented.
Your PWM is 10kHz, not 30kHz. Cycles per second, not reciprocal of the shortest time interval in
the decomposition of the waveform, that's bizarre thing to use.
Duty cycle is irrelevant to switching loss calculations since the switching losses don't care when the
transitions happen, just how many there are.
I understand I could increase gate drive by using BJTs before the gate pins
Well no, that's really complicated and not actually true for logic-level MOSFETs which need
driving right down to 0V for the off part of the cycle. MOSFET driver chips are what you'd
use, many work from 4.5V to 18V supplies and thus work both for 12V and logic-level
gate drive. A BJT based MOSFET gate driver is a quaint old-fashioned thing these days(!)
jremington:
Damage is likely to done any time you exceed the manufacturer's absolute maximum specs, for any interval of time. The damage may not be immediately fatal.
In a design where I/O pin current can even temporarily exceed 40 mA, that damage will occur every time you switch the MOSFET, so at some point your Arduino I/O pin will fail, perhaps taking the rest of the MCU along with it.
Whenever I see such statement I ask: what about driving capacitive load other than MOSFET? For example what if you have "large" SPI bus with long wires running at 8MHz clock speed? It will have tens (hundreds?) of pF capacitance, comparable with small FETs. Where is the difference? I never got an answer. After all the pin itself has small capacitance so even switching a pin connected to nothing should destroy it. Or not?
You can probably get-away with it. If the ATmega chip doesn't overheat, and your program doesn't crash, you're probably OK. I wouldn't go into mass-production but for a home project the worst that can happen is you fry your Arduino. It would be a bummer, but it's unlikely to happen.
If the chip gets hot (or hoter with the MOSFET connected) or if program execution is flaky, I'd recommend against running it that way!!!
I once had an output pin shorted to ground for several minutes (or more) until I figured-out it was shorted. The program was still executing and there was no damage. I didn't notice if the chip was getting hot because I was actually expecting to find an open connection and as soon as I found the short I fixed it. ...NOT recommended, but the chip survived.
You'll also find people running LEDs with no current-limiting resistor (which I think is stupid) but some people get away with it.
Chris935:
As the title says, I'm using a 328P Nano to drive some MOSFETS at about 30kHz. As the gate is capacitive the full current implied by the VCC/Resistance will only flow at the very start of the charge/discharge event and will reduce as the voltage rises or falls to meet the IO pin.
With that in mind, would it be OK to have the initial current flow exceed the 40mA limit for a very short period of time, provided that the average current flow was within spec? For example, can I use a 100R gate resistor, leading to 50mA initial current? Can I go lower? I would like to drive the gates as hard as possible within safe limits.
If failure of it isn't mission critical or anything, then no problem. If it happily keeps on keeping on, then that's ok too. The main thing is that you know how what is happening with the system....such as, you're aware that some kind of recommended peak current value is being exceeded momentarily (where 'momentarily' needs to be defined....eg...what sort of time duration). But.....then again, if something breaks at time scales of nano-seconds due to over-voltage or over-current, then better design the device to not exceed manufacturer specs for good practice.