How Do You Calculate Resistor Values for a MOSFET in an Electromagnet Circuit?

In summary, Camzke is trying to create a working electromagnet that will be turned on and of when metal is sensed. He is having problems with the electromagnet, and is looking for advice on how to overcome them. R1 and R2 are not critical, but Vgs-on is. There are a variety of options for MOSFET drivers, depending on what is available on the microcontroller and what is desired.
  • #1
Camzke
1
0
Hey, so currently I am trying to achieve a working electromagnet that will be powered by an AVR microcontroller and will be turned on and of when metal is sensed. Currently I have LED reflecting and sensing the block which passing through the photo diode and tells the AVR when to turn on the electromagnet. My problem is with the electromagnet. I have made my own and current I need to put 9V through it with 0.5Amps. Now I know I cna use a mosfet as a switch to turn it on and off however I am not sure how to work out the values for the resistors in the circuit. I will be using a similar circuit to the one shown on this page http://www.embeddedrelated.com/showarticle/77.php. However I am unsure how to develope the resistor values I would need to ensure my magnet works correctly. Any help?
 
Engineering news on Phys.org
  • #2
Camzke said:
Hey, so currently I am trying to achieve a working electromagnet that will be powered by an AVR microcontroller and will be turned on and of when metal is sensed. Currently I have LED reflecting and sensing the block which passing through the photo diode and tells the AVR when to turn on the electromagnet. My problem is with the electromagnet. I have made my own and current I need to put 9V through it with 0.5Amps. Now I know I cna use a mosfet as a switch to turn it on and off however I am not sure how to work out the values for the resistors in the circuit. I will be using a similar circuit to the one shown on this page http://www.embeddedrelated.com/showarticle/77.php. However I am unsure how to develope the resistor values I would need to ensure my magnet works correctly. Any help?

Hi Camzke
welcome to PF :smile:

the resistor values are not overly critical
he gave you a value range for R1 100 Ohm to 1k ... I would commonly use 1k on the output of micros or other driver ICs
if you found the MOSFET wasn't switching reliably, lower that value a but , say to 560 Ohms

R2 is just being used as a pull-down resistor. 4k7 or 10k are common values for that ( or something in between ... 5k6, 6k8, 8k2)Dave
 
  • #3
First off you definitely need the freewheeling diode or else high voltage spike will destroy the system when you turn off.

You don't "really" need R1, and in fact it will slow down the turnon of Q1. But, as the article said, it does afford some protection and is good practice.
The time constant of the RC (R1*(Cgd+Cgs)) will determine the Q1 turnon time. The slower it is, the more power consumed in Q1 as it slews on, but the inductance of the coil will slow the current so that may not be an issue.

R1 can be as low as 270 ohms (3.3V/ 270 ohms = 12ma) or as high as you want to go.
R2 just needs to pull leakage to ground, so can be 4.7K to 10K or even more.

Another possibility is to use a mosfet driver or other high current buffer to isolate the FET from the uC.

Be sure your FET will turn on completely. Vgs-on specs can be pretty misleading. Best you post the FET you want to use.

EDIT: davenn posted while I was composing. Pretty similar answers. LOL
 
  • #4
meBigGuy said:
Be sure your FET will turn on completely. Vgs-on specs can be pretty misleading.
Camzke; Vgs-on is a most important parameter.
You need to take care that the Vcc supply and output voltage from the AVR, with the resistor network, will satisfy the Vgs-on of the MOSFET you select.
 
  • #5
The problem with many Vbs-on specs is that it is the voltage to get to 250uA, the cusp of turnon, so to speak. You need to determine the maximum voltage that is required to drive to 500ma. Mosfets are fine for 5V Vgs, there are fewer devices that work well at 3.3V Vgs.

I don't know what fets are popular.
This one looks reasonable http://www.mouser.com/ds/2/200/ irlml2402gpbf-90059.pdf

https://www.fairchildsemi.com/datasheets/FD/FDN337N.pdf

http://www.vishay.com/docs/68645/si2302cds.pdf
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
WOW --- just found the infineon BTS smart switch series with built in gate drivers. No series resistor required.
There are selection guides
http://www.infineon.com/cms/en/product/solutionFinder.html?channel=db3a30433f764301013f7abefcbc265c#!showAllParameters=false&5546d4694909da48014909dc0f330233_true=12&5546d4694909da48014909dbf95300d1_false=1&5546d4694909da48014909dc0d1e0208_remark=5546d4694909da48014909dc76eb05b1&5546d4694909da48014909dc0d1e0208_false=100&sort=group&sortField=SMALLEST&5546d4694909da48014909dc13370259_true=Low-Side&statusValue=active%20and%20preferred

Here is a HUGE 3A TO220 part you can drive from an AVR
http://www.infineon.com/dgdl/Infineon-BTS117-DS-v01_04-en.pdf?fileId=db3a30433a747525013abff8302d549c&ack=t

http://www.infineon.com/dgdl/Infine...fileId=db3a3043163797a6011667b19dc90e14&ack=t
 
Last edited by a moderator:

FAQ: How Do You Calculate Resistor Values for a MOSFET in an Electromagnet Circuit?

What is an electromagnet?

An electromagnet is a type of magnet that is created when an electric current is passed through a wire. The magnetic field produced by the current causes the wire to act as a magnet.

How do electromagnets work?

Electromagnets work by using the principle of electromagnetism, which states that an electric current can create a magnetic field. This magnetic field can be turned on and off by controlling the flow of electricity through the wire.

What is a MOSFET?

A MOSFET (Metal-Oxide-Semiconductor Field-Effect Transistor) is a type of transistor that is commonly used in electronic devices. It is a type of field-effect transistor that uses an electric field to control the flow of current.

How does a MOSFET work?

A MOSFET works by having a metal gate separated from the semiconductor material by a thin layer of insulating material, usually silicon dioxide. When a voltage is applied to the gate, it creates an electric field that controls the flow of current through the transistor.

What are the applications of electromagnets and MOSFETS?

Electromagnets are used in various devices such as motors, generators, and speakers, while MOSFETs are used in a wide range of electronic devices, including computers, smartphones, and power supplies. They are also commonly used in switching and amplification circuits in electronic devices.

Similar threads

Back
Top