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

  • Thread starter Thread starter Camzke
  • Start date Start date
  • Tags Tags
    Electromagnet
Click For Summary

Discussion Overview

The discussion revolves around calculating resistor values for a MOSFET in an electromagnet circuit powered by an AVR microcontroller. Participants explore the necessary components and configurations to ensure the electromagnet operates correctly when activated by a sensing mechanism.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant mentions the need for a MOSFET as a switch to control the electromagnet and expresses uncertainty about calculating the resistor values required for the circuit.
  • Another participant suggests that resistor values are not overly critical, recommending a range for R1 between 100 Ohms to 1k Ohms, with a common choice of 1k Ohm for microcontroller outputs.
  • It is noted that if the MOSFET does not switch reliably, lowering R1 to around 560 Ohms may help.
  • R2 is described as a pull-down resistor, with common values suggested between 4.7k Ohms and 10k Ohms.
  • A participant emphasizes the necessity of a freewheeling diode to prevent high voltage spikes that could damage the circuit when the electromagnet is turned off.
  • Concerns are raised about the impact of R1 on the turn-on speed of the MOSFET, with a time constant related to the gate capacitance being discussed.
  • Another participant highlights the importance of ensuring the selected MOSFET can turn on completely, pointing out that Vgs-on specifications can be misleading.
  • There is a discussion about the need to determine the maximum voltage required to drive the MOSFET at the desired current of 0.5 Amps.
  • Several specific MOSFET models are suggested for consideration, along with links to their datasheets.
  • A later reply introduces the Infineon BTS smart switch series, which includes built-in gate drivers and does not require a series resistor.

Areas of Agreement / Disagreement

Participants express varying opinions on the necessity and values of resistors in the circuit, indicating that there is no consensus on the optimal approach. Some agree on the importance of certain components, while others propose alternative configurations.

Contextual Notes

Participants discuss the implications of different resistor values and the characteristics of various MOSFETs, but there are unresolved aspects regarding the specific requirements for the circuit and the selection of components.

Camzke
Messages
1
Reaction score
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
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
 
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
 
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.
 
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:

Similar threads

  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 37 ·
2
Replies
37
Views
5K
  • · Replies 26 ·
Replies
26
Views
7K
  • · Replies 14 ·
Replies
14
Views
4K
Replies
3
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
Replies
12
Views
3K