Do i need a resistor at the output port?

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
oookey
Posts: 42
Joined: Thu Mar 08, 2012 3:00 pm
Has thanked: 17 times
Contact:

Do i need a resistor at the output port?

Post by oookey »

Hi :D ,

i 'm puzzle whether or not to have a resistor of below 1k ohm at the O/P port (PWM) before connecting a mosfet(IRF540) as circuit sketched.

For using the timer IC 555 to drive the IRF540, i need not to have the "R", can i apply the same to a MCU such as 12F615?

thanks for advice. :D

oookey
Attachments
NeedRforMcu.png
(120.29 KiB) Downloaded 1966 times

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: Do i need a resistor at the output port?

Post by medelec35 »

In my opinion a low value resistor is recommended especially at fast switching speeds, to limit initial current surge when first switching mosfets on.
Although mosfets have a very high input impedance and people may think high impedance = very low current.
A mosfet also has i/p capacitance (due to insulated gate), so there will be a high surge current very briefly (like a kick) to overcome gate capacitance( just like there is when a capacitor is first charged).
So perhaps a 150R resistor is suitable.
For the price of a resistor, its worth protecting microcontroller.
Since output from microcontroller has a low impedance, then a resistor from MOSFET gate to ground should not be necessary.

Martin
Martin

oookey
Posts: 42
Joined: Thu Mar 08, 2012 3:00 pm
Has thanked: 17 times
Contact:

Re: Do i need a resistor at the output port?

Post by oookey »

thanks Martin, :D

i think the resistor connecting gate to ground should not leave out, it acts to discharge the gate when the PWM at low level.

oookey

medelec35
Matrix Staff
Posts: 9521
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times

Re: Do i need a resistor at the output port?

Post by medelec35 »

When the output of a microcontroller is at 0V it effectively connects the gate to ground so it will discharge the gate so resistor will not be required for that purpose.
However thinking about it, It's not a bad idea leaving it in place, since when power is 1st applied to a microcontroller all pins are in high impedance state.
Therefore the resistor will just make sure that FET stays off during initial powering up. Resistor is a much higher value than series gate resistor, so it can be at least 22k+
Then you're not wasting much power when output is at +5V

So yes both resistors should be kept for a better circuit design.
Martin
Martin

Post Reply