7
\$\begingroup\$

I came across the first picture below. But I am not able to find out how such arrangement is necessary or beneficial when you want to switch a load with an N channel MOSFET?

Question number 1: Is there any advantages or disadvantages associated with the first and second type? Assuming that the MOSFET is saturated at 3 volts?

I found the text below, where I found the first picture:

This circuit is pretty simple. The only part that looks funny is the resistor. This is a pull-down resistor. The resistor holds the gate low when the arduino does not send a high signal. This is here incase the arduino comes loose, or the wiring is bad it will default to off. You don’t want this pin to ever be floating as it will trigger on and off.

Question number 2: I don't understand how the first resistor not being present, can cause any problem? (like the second picture, without any connection from output pin to the GND)

Question number 3: In case that you think the first resistor is adding robustness to the circuit, don't you think still the inclusion of the 2nd resistor is also beneficial?! Because each Arduino's pin can only output 40 mA.

Thank you very much in advance.

enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ Note that a stock Arduino's bootloader will take a few seconds to time out and start the main program each time it is powered on or reset. During that time everything but the serial transmit pin will be left in the reset state of floating and unconfigured, as the bootloader has no idea what other pins might be used for. \$\endgroup\$ Sep 10, 2019 at 13:19

2 Answers 2

11
\$\begingroup\$

The resistor to ground is exactly as the description says so - to prevent the pin floating high and turning on the FET, thus making the motor move erratically/uncontrolled.

Floating MOSFETs are bad, and because the "on" control of the FET is essentially just a capacitor with very low capacitance, it is quite easy for it to float up and turn itself on.

This situation will only really happen in your arduino program if you make the output pin an Input by mistake, or during power off/on/restart states. The ATMEGA328P on the Uno makes all it's pins go into high impedance state during power cycle, which is a prime opportunity for the gate of that FET to float high.

The resistor ensures there is always a known state, and only an active output HIGH from the Arduino will cause it to actually turn on.

For your third question - MOSFET gates only "use" current for a brief time during the ON period, to charge the gate capacitor. The Arduino's 40mA output maximum per pin is not going to be an issue. It WOULD be an issue if the FET was a BJT Transistor instead, as those will constantly draw current into the base in order to operate. MOSFETs work differently, and do not consume current to have them be "on" constantly.

Putting a 10K ohm resistor is also too high in general, it will slow down the ON/OFF time of the FET considerably, and cause major switching losses if you are doing any reasonable frequency PWM. Use something like 100 Ohms if you want to put a resistor there. Putting a resistor there may not be needed for a MOSFET, but it IS recommended to reduce the possibility of inductive feedback into the microcontroller and other forms of dirty business related to switching an inductive load like a motor.

One last comment - if you ARE using the RFP30N06LE as the MOSFET in your circuit, do not put 60V across it - it will fail very quickly. The maximum rated Drain-Source voltage is 60V, and you are driving an inductive load! Inductive loads can cause large voltage spikes which can destroy the FET, and just operating it at it's maximum of 60V is a terrible idea in general. Personally I wouldn't have anything more than 24-30V inductive load for a 60V rated FET - as this gives some room for spikes and you the ratings for FET should usually be 1.5x the expected voltage across it anyway just for safety margin even in a non-inductive load.

If you are actually using a 60V motor, I suggest getting a 120-200V rated FET if you can. Just look out for the fact that at these ratings, the on-resistance and the gate capacitance can be quite high (meaning you should switch at slower frequencies if possible).

\$\endgroup\$
9
  • \$\begingroup\$ "power off/on/restart"... and maybe also during reprogramming? \$\endgroup\$
    – Ben Voigt
    Jun 1, 2015 at 23:13
  • \$\begingroup\$ yes, the programming involves multiple restart processes, usually first when entering programming mode, then again at the end. @BenVoigt \$\endgroup\$
    – KyranF
    Jun 1, 2015 at 23:15
  • \$\begingroup\$ Thank you very much for the through answer, especially caring to analyze the circuit. Actually it was an image I found somewhere on the web. I am using a 200V MOSFET for a 12v solenoid, with 70V Zener & 800V diode! \$\endgroup\$ Jun 3, 2015 at 9:11
  • \$\begingroup\$ @arudino.tyro No problems! We are here to help on EE.SE. Can I ask what you are using the 70V Zener for? And you can definitely find a lower rated diode than 800V if you need to, if the size is too large/annoying. \$\endgroup\$
    – KyranF
    Jun 3, 2015 at 15:15
  • \$\begingroup\$ Thank you for your kindness. I am using 8 valves in an application that requires 20 turn on/off per second. My valves' reaction speed is 0.05s and lower. Using a single diode as flyback slows them. So I use a Zener+diode so the voltage can rise to 70V to dissipate faster. I reduced the coil current from 100% to 2% from about 30ms to about 9ms with the Zener. This is the delay for the coil current to! There is another delay for the mechanical mechanism of the valve to shit the air. I cannot measure that delay accurately. \$\endgroup\$ Jun 4, 2015 at 13:25
4
\$\begingroup\$

As the quote clearly states, a pull-down resistor is required to keep the pin low until it receives a high signal from the Arduino. If it was floating, your transistor might switch on/off when you don't want it to. If it oscillates (very possible), then it would likely get very hot and waste power, if not burn it out.

The resistor in the second picture is useless, because if pin 3 on the Arduino starts floating, it will be like the connection isn't even there, which again could cause the transistor to oscillate.

Try this page. It explains why pull-up and pull-down resistors are necessary:

https://www.elprocus.com/pull-up-and-pull-down-resistors-with-applications/

\$\endgroup\$
3
  • \$\begingroup\$ I'm glad it helped! :) \$\endgroup\$
    – DerStrom8
    Jun 3, 2015 at 16:55
  • 1
    \$\begingroup\$ Dead link, as long as you're editing. \$\endgroup\$ Sep 10, 2019 at 11:30
  • 1
    \$\begingroup\$ @ScottSeidman Thanks for pointing that out, I've replaced it with a similar source \$\endgroup\$
    – DerStrom8
    Sep 10, 2019 at 11:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.