I'm using one of these as a switch for a small electromagnet (200mA at 5V):
http://www.irf.com/product-info/datasheets/data/irl530n.pdfI believe electromagnets are slightly inductive loads, so I'll need a diode to prevent back-emf damage. However, it seems like the MOSFET I have already has an integrated diode going from source to drain. Does that mean I can just wire the drain to ground, source to the load (which is flipped from how I'd normally wire a MOSFET) and have this integrated diode do the same job?
Example circuits online show their diodes are in parallel, not in series, as this setup would be. Would it still do the job?
Don't use the mosfet's parasitic diode as a real one since it is slow as hell.
If you need to do that, you can get mosfets with internal diode.
Or use an external one.
It would be good to omit zener diode, these things can cause ringing on the gates. If you are worried about excess voltage on gate, use it at the driver part.
Electromagnets are inductive loads, same with relays.
Clamping diode is installed (paralel) at the inductive load. A simple diode in series doesn't do a thing.
EMF can be reduced with ferrite rings, chokes and snubbers.
You can install a ferrite ring on the drain of a mosfet and a good snubber across it - 100nF multilayer cap with ~20-100 Ohm resistor in series
Hmm, I think I measured the inductance of my electromagnet at 50mH to 100mH at 100Hz. That seems like a lot. Simulating this in LTspice, there's a 100V spike. I'll put a diode in parallel then.
I think the simulation may produce larger spikes as its working on theory and not practical parts, however yes you need to be careeful, as other said don't use the mosfets diode for this i tried it once and it made the thing run hotter and it is not designed for it, it is just for emergency only, I was doing some testing on an air con system at work recently where the "engineer" did not realize he needed diodes on ALL inductive loads (some had diodes) and i got up to 400 V out of the thing, infact i got a shock off it.
Any inductance will degrade mosfet over time if left untreated, same with transistors, ic's and other silicone chips.
Inductive kickback can go all the way up and downstream, causing all sorts of weird errors, like pushing powersupply into overvoltage protection, perhaps causing it to oscillate wildly, reset or freeze uC's, etc.
IRL530n is a good part at such a small load. Perhaps watch gate capacitance if you see gate going up and down not fast enough, such as the mosfet is in its linear region, heating wildly.
Even some old bells, working at about 6V DC could give you a nasty shock.
Yeah I decided to use the IRL530N because they're ridiculously cheap at digikey right now, due to them phasing out the non-RoHS version. It's only $0.63 in single quantities, while the replacements are $1.42. I stocked up on enough to last me a while
The IRL540 is better because it has a lower channel resistance.
Which is the circuit you are simulating? Is it similar to the one you posted at first? If it is so, the intrinsic diode has no influence , since it direction is opposite to the current on the "motor" when this last is energized
yes but when you turn that motor off you will have a back EMF spike that will be of reverse polarity and if not for that diode will destroy the mosfet
Yes, the parasitic diode is in the wrong place to be effective for back EMF suppression so another diode is required.
Its called a flyback or free wheeling diode. Its a pretty good rule of thumb to have one when switching any considerable amount of inductance.
Its called a flyback or free wheeling diode. Its a pretty good rule of thumb to have one when switching any considerable amount of inductance.
Thats what I tried to explain to them at work when I found 400 V back EMF in their air conditioning system,
Its called a flyback or free wheeling diode. Its a pretty good rule of thumb to have one when switching any considerable amount of inductance.
Thats what I tried to explain to them at work when I found 400 V back EMF in their air conditioning system,
Don't worry. People usually are like this.
yea particularly when its the company's flagship contract that they are putting down the toilet !, we had an item returned the other day that is a few years old, guess what ? it has relays with internal diodes, the twit doing the new stuff has only just discovered that these exist
yea particularly when its the company's flagship contract that they are putting down the toilet !, we had an item returned the other day that is a few years old, guess what ? it has relays with internal diodes, the twit doing the new stuff has only just discovered that these exist 
At least he learned, not many do
Ah yes but i had to tell him to put fly-back diodes on fan motors, he thought relays needed one but did not seem to realize fan motors do ..... duuuuuuuuuuuuuuuuuuuuuuuuh
I would;ve thought the motors would be AC on an air conditioning system so ordinary diodes wouldn't work, a snubber network, a MOV or a couple of zeners back-to-back would be the only options.