Can I Use PWM to Control My Electromagnet with a MOSFET and 12V Battery?

  • Thread starter Thread starter EagleOnePro
  • Start date Start date
  • Tags Tags
    Electromagnet Pwm
Click For Summary

Discussion Overview

The discussion revolves around the use of PWM (Pulse Width Modulation) to control an electromagnet using a MOSFET and a 12V battery. Participants explore the challenges faced in implementing this setup, including issues related to transistor burnout, inductive spikes, and circuit modifications.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Exploratory

Main Points Raised

  • One participant describes their attempt to use a MOSFET with a PWM signal to control an electromagnet, expressing concerns about the transistor burning out and asking if inductive spiking is the cause.
  • Another participant suggests that the transistor may be sinking more current than it can handle and recommends using a current limiting resistor and a Zener diode for protection against back EMF.
  • A different participant emphasizes the necessity of a diode across the coil for back EMF protection, recommending a standard diode like the 1N4004 instead of a Zener diode.
  • Concerns are raised about the MOSFET's gate driving method, with one participant suggesting the use of a MOSFET buffer IC to improve switching performance and reduce power dissipation.
  • Another participant mentions the potential for strong eddy currents in the electromagnet's core, which could lead to excessive currents in the transistor, and suggests adding an inductor in series to mitigate this issue.
  • Participants discuss the importance of selecting an appropriate PWM frequency, with a suggestion of around 10 kHz being mentioned.

Areas of Agreement / Disagreement

Participants generally agree on the need for a diode for back EMF protection and the importance of managing current through the MOSFET. However, there are multiple competing views regarding the best methods for circuit protection and optimization, indicating that the discussion remains unresolved.

Contextual Notes

Participants have not provided complete schematics or detailed specifications for their setups, leading to some uncertainty regarding the exact causes of the issues faced. The discussion includes various assumptions about component ratings and circuit configurations that may not be fully validated.

EagleOnePro
Messages
11
Reaction score
2
Hi, I need help with my electro magnet pulse with modulation PWM. I have a Velleman® IR Light Barrier Kit from Radio Shack and this kit is ment to turn on and off a 9V buzzer. But instead of soldering in the buzzer I tried to hook it up to a MOSFET transistor NTE2984 so that I could use it with my 12V 3.6A battery to turn on/off my electro magnet. When I get it all hooked up it burns out my transistor every time. And the reason why I can't just use a solenoid is because I need this to PWM for a few thousand times an hour and no 9V solenoid that I know of can hold up to that much use. Do you think that I am inductively spiking my MOSFET? Should I use a flyback diode? Is my transistor choice good enough? How would you use a 12V 3.6A battery to get signals from a passive IR switch like my 9V IR Light Barrier Kit? Is there something that I can do with an Arduino Uno. Basically If you have any idea I would be very happy to know how you think I should approach this PWM problem.
 
Engineering news on Phys.org
MOSFET and electromagnet

Hi,

Without seeing schematics of exactly what you have done it's hard to be sure but you are almost certainly doing two bad things to the transistor - when you switch it on it is sinking more current than it can handle and when you switch it off a whopping great back emf from the collapsing magnetic field is sending charge racing backwards through it.

So I would recommend a current limiting resistor between Vcc and the transistor and a Zener diode between the tranny and the magnet connecting to ground, again via a sensible sized resistor. Remember to get the Zener pointing the right way.

Check the data sheet for the transistor and use Ohm's Law to work out the values of the current limiting resistors. I know the MOSFET can sink a big current for a long time, but it won't take kindly to huge spikes.
 
Last edited:
Definitely need a diode across the coil for back EMF protection. Not usually a zener, just something like a 1N4004. See here:

http://www.winpicprog.co.uk/graphics/relay_example.gif

The MOSFET you spec'ed is rated 17A at 60V so should handle the current with a proper heatsink. (68 amp pulsed.) Make sure you're not overdriving the gate and that it's wired correctly. Also that your magnet has sufficient windings to limit current to an appropriate value. A battery can provide a very high current in a short circuit condition, even though it might be rated 3.6 amp/hour. 50 amps plus is easily possible if you don't have enough wire or the wire gauge is too heavy in your coil. Check it with an ammeter in series with the coil hooked straight to the battery without the rest of the circuit in play...

Also, I looked at the schematic for the receiver you mentioned--from what I see you can't just remove the buzzer and put a MOSFET in its place. That seems like it would have the MOSFET in the ON state all the time, only turning OFF when the original output LED and transistor turns on, triggering the original buzzer. Needs to be a bit of a modification to the circuit.
 
Last edited:
Several notes:

1. For PWM it is better to drive gate not via resistor but with special MOSFET buffer IC ( low impedance, high speed, high current driver). This way you reduce transition time between on/off stete and power dissipation.
2. The diode is a must. It should be rated for high enough current and be fast to avoid voltage spike. For this low voltage some few Amp Schottky should be good.
3.The electromagnet likely will have strong eddy currents in the core thus wasting PWM energy and causing excessive currents in transistor. One should consider adding few tens uH , several Amps ferrite inductor in series.
4. The PWM frequency should be carefully selected, likely should be 10 Khz or so.
 
Thanks for the help guys, you clearly know more then I do and it is very helpful to learn from you all.
 

Similar threads

  • · Replies 37 ·
2
Replies
37
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
5K
Replies
7
Views
15K
Replies
10
Views
2K
Replies
3
Views
3K
Replies
4
Views
3K
Replies
3
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 10 ·
Replies
10
Views
12K