How much revrse voltage can my MOSFET take?

Hello,

I am worried that my MOSFET may be slowly damaged from negative voltage spikes from inductance (solenoid).
My MOSFET: IRL540Nchannel http://www.mouser.com/ds/2/196/irl540npbf-936642.pdf
I dont know what area I can check to see what is the maximum negative voltage spike is safe for my MOSFET.

I have a 1N5401 diode to drain the flyback current.
MOSFET is switching at 97,000Hz

I get spikes around -12V based on this picture:

The initial spike is very large and then there are two smaller ones. Is this ok?

Another question I have is what resistor to put between my PWM source and the gate of my MOSFET.
I wish to put the lowest possible resistor because my MOSFET will switch cleaner and wont overheat.
My pwm driver is a PCA9635, it is capable of "totem-pole, or open drain" Totem pole is 10mA. The output voltage is 5V. I dont know how to get open drain to work. So I am using totem pole.

Based on V=IR, I have to use a 500ohm resistor or else I will surpass the 10mA limit?? However, When I use any resistor above 100ohms, the Mosfet will get too hot.
What can I do? Will going to open drain give me cleaner square waves so that my mosfet gets clean switches?

No negative spikes are possible across an N-channel mosfet, because of the internal body diode.
You probably are reading the scope wrong. Bottom line could be ground, and top line could be supply.

Post a circuit diagram.
Is source connected to ground, and diode across the solenoid? What voltage/current.
I think you need a schottky diode for that switching speed. A common 1N5401 is too slow to recover.
Why such a high switching speed for a solenoid (I know the PCA9635 is fixed frequency).
So why the PCA9635.
Leo..

The diagram looks like this:

On the picture, it was at 20V. The current is about 3A everytime it is switched on.

I choose the PCA9635 because it is the only thing I could find that can output above 20KHz to eliminate audible sound. I have the PCA9685 from adafruit and it works so much more reliably, but the 1.6KHz is horrible. I need to be powering 50 solenoids with individual duty cycle control.
Sometimes the PCA9635 wont even output a PWM signal or hold its signal. It takes a few random resets of the arduino board and I get it to work.

likevvii:
I get spikes around -12V based on this picture:

There's no voltage scale. So it's hard to decipher this plot. Also.... where is the zero Volt line.... half way along the vertical axis?

likevvii:
I choose the PCA9635 because it is the only thing I could find that can output above 20KHz to eliminate audible sound. I have the PCA9685 from adafruit and it works so much more reliably, but the 1.6KHz is horrible.

Default PWM for the PCA9685 is 200Hz. Did you try lower instead of higher.
Leo..

Your spike is clearly +32V, ie 12V above the 20V level. Yes, that's normal, you have no decoupling on
the 20V supply so its ringing badly.

Ok… so the spike is NOT ‘-12’ Volt (as mentioned in the original post)… but is +12 Volt higher than the 20V source voltage. The zero Volt level of the scope waveform is down toward the bottom of the screen. And the vertical scale is 5V per large division.

likevvii:
Another question I have is what resistor to put between my PWM source and the gate of my MOSFET.
I wish to put the lowest possible resistor because my MOSFET will switch cleaner and wont overheat.
My pwm driver is a PCA9635, it is capable of "totem-pole, or open drain" Totem pole is 10mA. The output voltage is 5V. I dont know how to get open drain to work. So I am using totem pole.

Open drain would be very bad indeed - you absolutely have to drive MOSFET gates totem-pole.
The answer is as small a resistor as you can get away with without damaging the PCA9635 output stage,
which has 25mA quoted as absolute max output current, so 15 to 20mA, ie about 270 ohms

You could look at using a FET-driver chip. They are pretty much just a Schmitt trigger input plus a totem pole output. Their purpose is to drive power MOSFET gates fast and hard.

Thanks for the suggestions, I really appreciate it.

Now I think I understand the spikes more. The spikes are positive; since my MOSFET is rated at 100V, does that mean I will be ok?

I was using a 10ohm resistor at first, so I must have been overworking the outputs! I now put a 400ohm resistor and arrived at a new problem. The gate switching is now slower.
This is what the gate looks like:

This is what the mosfet is outputting (using 10V source because mosfet gets pretty hot):

It is producing a large amount of heat.
-Should I try using a gate driver for all 50 mosfets that I want to control? I tried looking around but I cant really find a multi channel gate driver to make things easier for me.
-Should I put heatsinks on my mosfets?
-Or find another mosfet with very low gate capacitance?
-Or find another PWM controller that can output around 25KHz?

Any suggestions would really help me out. Thank you.

Did you already change the slow recovering 1N5401 for a schottky diode.

Did you try the PCA9685 with LOWER PWM frequency.
Try a range of 30-200Hz, and pick the one with the least noise.

A solution for the PCA9635 could be a smaller (less gate charge) mosfet.
Leo..

Hello,
I forgot to mention I did try all the lower frequencies (20~200Hz) and have no luck because the solenoid literally rattles and makes even more noise.

I am about to do a mouser.com order to try the IRL510, 520, 530 (lower gate charge) and see what happens.

I will also order the HE504 5A 70ns diode to try.

For the voltage spikes, since it is positive, should I not worry about it as long as it does not reach above 100V? I also have a 35V 5000uF capacitor on my supply, will that be affected? I am curious to see what is that from, and why there is ringing.
Someone mentioned the spike can be fixed with a decoupler. Is the decoupler a ceramic capacitor?What would I need to do to remove the spike if It is necessary.

Does everything look ok here?

Also, do you think using a gate driver here would be a realistic option? Thanks!

likevvii:
For the voltage spikes, since it is positive, should I not worry about it as long as it does not reach above 100V?

The back-emf diode should clamp drain voltage to "supply + 0.5volt" (20.5volt).
The diode shorts back-emf. No dumping on the supply, so supply caps have no influence.

Gate drive for 50 mosfets could be expensive. Smaller mosfets and abusing the PCA a bit might be enough.
The IRL510 has an RDS(on) of 0.5ohm. Seems like trading one evil for another one.
Leo..

likevvii:
I will also order the HE504 5A 70ns diode to try.

Is there such a diode HE504? Maybe there is.

Yes, you are right, the on resistance is pretty bad. However, the solenoids are not going to be on most of the time.

The solenoids are drawing about 3A.

Every 5 seconds:
100% duty for 50ms
20% duty for 3000ms
0% duty for 1950ms

Seems like I will be using heatsinks afterall.

Since I have a clamping diode, how come I still see a spike?

The PCA9635 is rated for 25mA output, what happens if I work it harder at maybe using a 50 ohm resistor? Will anything happen in the long run? How would it break?


oops, the diode is actually HER504, not HE504 o;

likevvii:
Since I have a clamping diode, how come I still see a spike?

The PCA9635 is rated for 25mA output, what happens if I work it harder at maybe using a 50 ohm resistor? Will anything happen in the long run? How would it break?

I guess breadboard and wiring.

You might not need <100ohm with smaller mosfets.
Leo…

likevvii:
Since I have a clamping diode, how come I still see a spike?

You added proper decoupling on the 20V line did you? If not its the whole 20V line that's bouncing...

The PCA9635 is rated for 25mA output, what happens if I work it harder at maybe using a 50 ohm resistor? Will anything happen in the long run? How would it break?

If you operate a chip beyond its limits, yes, it can fail. Slowly, quickly, who knows, its an experiment
you can carry out if you wish, but if you want a reliable circuit, avoid this. Remember abs max ratings
are typically across all devices (there is always spread in device characteristics, remember), and usually
across the full temperature range. So there may be some leeway, you could contact the manufacturer
direct and pay them for consultancy about pushing the device over these limits if you have the resources!

A particular issue with exceed the ratings is that different batches of a device may be different - one
batch may be able to handle the abuse, the next batch all fail. If you just go by what you can get
away with today, you may set yourself up for huge problems in the future. This is called shooting
yourself in the foot!

I Just added a diode across the solenoid. I don't know how to properly decouple. Where should I be adding my capacitor? I did some research online and they suggest adding a Electrolytic (10~100uf) and a ceramic (0.01 µF – 0.1 µF). These caps will always be parallel to power/signal lines, and never in series right? I will try to do some more reading.

Thank you for the explanation. Your advice is very clear, and going above ratings will definitely hurt me in the long run.

Capacitor from 20V to ground near the MOSFET, keeps the voltage spikes right down on the 20V line.
You said you are switching 3A at about 100kHz, so the charge per cycle is about 30µC, so 100µF ought to limit
voltage ripple to about 0.3V. Ideally a capacitor rated for 1.5Arms of ripple current

dQ = I dt = C dV

MarkT:
Capacitor from 20V to ground near the MOSFET, keeps the voltage spikes right down on the 20V line.
You said you are switching 3A at about 100kHz, so the charge per cycle is about 30µC, so 100µF ought to limit
voltage ripple to about 0.3V. Ideally a capacitor rated for 1.5Arms of ripple current

dQ = I dt = C dV

Wow awesome.
I don't really understand the eqution dQ = I dt = C dV comes from and how you used it to calculate charge per cycle and voltage ripple. Can you please provide me some direction/terminology to learn more about this?

The purpose of the 100uF electrolytic capacitor is to absorb the spike that is generated when the MOSFET is switched back on? Will I need to look for low ESR capacitors? Not sure if 100KHz and 3amps is high or not. They seem pretty expensive, since I will need 50, should I get cheaply rated ones (under 0.30usd each) or just not put any at all?