Mosfet pullup calculation - Page 1
Forum section: electronics / beginners

author: bryce1
author_rank: Regular Contributor
timestamp: April 10, 2014, 04:55:18 pm
content: Hi guys,I need some advice on the mosfet gate pullup / protection resistor calculation.I want to use a FDT439N n-mosfet with a 3.3V atmega to switch a 12V (1.5A) device on or off (no pwm).How do I calculate the pullup resistor (yes I want a pullup) for the gate?Do I need to protect the atmega pin with an additional resistor?Here is what I drew, but I am almost certain that this does not get me where there :-)Thanks!Mosfet:http://www.digikey.com/product-detail/en/FDT439N/FDT439NCT-ND/1849926

author: tszaboo
author_rank: Super Contributor
timestamp: April 10, 2014, 05:17:42 pm
content: Every MOSFET gate acts as a capacitor. It is about some hundred pF in this case. You ultimately dont want to connect a capacitor directly on any digital outputs, as the current flowing to it when switching is infinite*, so series resistor is added therefore. 47 Ohm is usual.The pullup has a problem, that you will not be able to pull the gate to zero volt (because divider), so there will be some subtreshold conduction, could be some 10uA or something. Could be a problem depending on the application. If it is a problem, i suggest to put a mosfet driver or just a logic gate after the MCU, and put the pull-up before. In general, if you probably want the pullup because of turn-on transients, or it has to be open drain or something, than maybe a pulldown and a not gate is safer.*it is not

author: Simon
author_rank: Unknown
timestamp: April 10, 2014, 05:38:58 pm
content: The pullup is unnecessary. Unless of course you can explain some other requirement.

author: bryce1
author_rank: Regular Contributor
timestamp: April 10, 2014, 05:42:14 pm
content: The application is to reboot an embedded device by cutting off GND for a short amount of time. I want the device to stay on and have a stable power supply.Is this a good enough reason?(I heard that it could pose a problem to certain parts when you take away the reference, but it works fine in practice).So three questions remain.- Pullup yes or no?- What pullup should it be? (I know that 10k is a bit much)- Why only 47ohm for the atmel protection? Wouldnt this be like 70mA?

author: Simon
author_rank: Unknown
timestamp: April 10, 2014, 05:48:32 pm
content: Quote from: bryce1 on April 10, 2014, 05:42:14 pmThen your atmega output needs to stay high all the time and go low when required, the pullup still does not no benefit.

author: bryce1
author_rank: Regular Contributor
timestamp: April 10, 2014, 05:50:40 pm
content: ok but what if for some reason, the atmega does something unexpected? *notthatimsuperstitiousoranything*

author: Simon
author_rank: Unknown
timestamp: April 10, 2014, 05:57:03 pm
content: unexpected but what ? it will either go low when it should be high, or go high when it needs to be low, a pull up or down resistor will not help one little bit.

author: gxti
author_rank: Frequent Contributor
timestamp: April 10, 2014, 06:08:25 pm
content: Micro-controller pins can be high-impedance too, you know. Most of them are that way by default when held in reset. Which is something that might happen while debugging/programming, and you don't really want the gate floating for any period of time because it might cause the FET to partially conduct and heat up. Whether the load and current levels are big enough for that to be a problem, will vary.

author: Simon
author_rank: Unknown
timestamp: April 10, 2014, 06:44:14 pm
content: True enough but there is not a lot of information given. Assuming we are protecting from malfunction the pullup will not help if the micro is damaged or behaves inpredictably with regards to whether it should be high or low.

author: tszaboo
author_rank: Super Contributor
timestamp: April 10, 2014, 09:47:57 pm
content: Quote from: Simon on April 10, 2014, 06:44:14 pmWell I've seen systems catching on fire when you put a breakpoint to a certain code, because the hardware designer thouth that it is safe to rely only on the MCU. It even had NTCs for thermal protection and stuff, connected to the MCU.There are other ways to do this, ie windowed watchdogs, but if you can make something safer with a resistor, why would't you?

author: Simon
author_rank: Unknown
timestamp: April 11, 2014, 06:02:20 am
content: Well I'm just confused and fear the OP maybe too. It won't fix everything. I mean I'm more confident that the MCU won't fail than I am that the software do something unexpected. this looks like something made to work in the event the watchdog timer times out in which case fix the program not make work arounds. I'm also curious as to why this needs to be on an mcu, is the reboot remotely controlled ? a push button can do this.

author: bryce1
author_rank: Regular Contributor
timestamp: April 11, 2014, 10:15:06 am
content: yes it is remotly controlled.and yes, i feared that there are good reasons for using a pullup as stated.where I wasn't confused before, I am now ;-)

author: Simon
author_rank: Unknown
timestamp: April 11, 2014, 10:36:31 am
content: what condition are you trying to protect from ?

author: kcs
author_rank: Regular Contributor
timestamp: April 11, 2014, 03:22:16 pm
content: I don't see why your circuit wouldn't work. Try it - you won't damage anything.I would definitely use pull-up/down resistor because you use logic MOSFET, "otherwise, very small currents from your finger, capacitive coupling, inductive coupling, or other things you'd rather not worry about can change the gate voltage of the MOSFET, resulting in unintended behavior".

author: Simon
author_rank: Unknown
timestamp: April 11, 2014, 03:25:06 pm
content: if the atmega output is set as output then it will be high or low. If it goes low when it should go low then the pullup will do nothing. the only case this will help in is if the atmega resets and the pin remains a high impedance input.

author: kcs
author_rank: Regular Contributor
timestamp: April 11, 2014, 03:38:01 pm
content: Adding a pull-up/down resistor costs next to nothing. And it does its job in situations when something unexpected happens.

author: Simon
author_rank: Unknown
timestamp: April 11, 2014, 04:00:09 pm
content: indeed, I was just wondering when exactly the op wanted it to save the day.

author: Jeroen3
author_rank: Super Contributor
timestamp: April 12, 2014, 09:13:48 pm
content: If I understand this circuit right the mosfet the circuit will almost immediately recover.In powerup situation the mosfet enables though the pullup.When you pull down the mosfet gate to loadgnd using your chip (you chip is on loadgnd right?) the mosfet disables, which will create a loadgnd of 3.3 Volts in respect to ground re-opening the mosfet again.I wouldn't use this method to powerdown my circuits, better use a high-side powerswitch or p-channel.

author: Simon
author_rank: Unknown
timestamp: April 13, 2014, 07:43:56 am
content: You seem to be overlooking the fact that if an output is not high it is most definitely low! the only time this strategy will help is if the output becomes disconnected or a high impedance input. So i ask again, what exact circumstances are we trying to protect against here ?