I'm a beginner so this question might sound rather basic. Anyway here it is.
I need to switch on/off a DC Motor (12V, ~20A) with an arduino.
Is it possible to do it with a simple mosfet circuit or do I need to use a relay considering the high current rating.
Also can you give a circuit to interface the same with the arduino.
Is it possible to do it with a simple mosfet circuit or do I need to use a relay considering the high current rating.
Either method can be used. If using a mosfet be sure it's a logic level device that will fully turn on at the +5vdc Arduino output pin value. Also be sure it's current/and voltage ratings are well above the motor's maximum rating and be sure to plan for proper heat sinking.
If using a relay be sure the relay contact ratings are well above the maximum current of the motor and that the contact maximum current ratings are applicable for DC switching.
The key is the selection of the MOSFET. The NDP6060L shown in the figure is a logic-level MOSFET (so it can be turned on directly from 5V) and has a resistance (when on) of no more than 0.025 ohms. If you want 20A operation, that means the MOSFET will dissipate power according to the expression IIR:
Power = IIR = 20200.025 = 10W
That's too much for this MOSFET and it will burn up without aggressive heat sinking and forced air cooling. If you select a MOSFET with lower on-resistance it will be much more manageable. For example, the FDP8860 has only 0.0029 ohms of resistance and will only dissipate 1.16W of power at 20A...much more manageable with a simple heatsink.
There is more background and circuit suggestions at this fellow's web site:
I keep reading that the motor and the arduino need to have isolated power supplies. But the thing is that I can only use a total of 12V (Restriction) and I have to run a 12V motor and the arduino with the same power supply. Any ideas?
An isolated power supply will help but is not strictly necessary if you wire things properly.
Here are two things that can happen with a non-isolated supply:
a) When you turn the motor on it draws a large instantaneous current, the 12V supply can't handle it, its voltage dips way down temporarily, and since it's also powering the Arduino then the Arduino resets itself until the voltage comes back up
b) if the motor current return path (coming out of the MOSFET Source terminal and back to the power supply) and Arduino ground return path (coming out of the GND pin or GND terminal of the power input) share the same wire, turning on the motor will cause that stretch of wire to develop a "large" voltage (due to resistance and inductance) that will again cause the Arduino to reset.
Solutions:
a) Big capacitors, one for the Arduino and one for the motor (from +12V to GND). These don't fix things as well as we'd usually like.
b) Careful wiring. Make sure the path that electrons follow from the power supply, to the motor, through the MOSFET, and back to the power supply run over different wires than the electrons going to the Arduino (generally called a "star ground" scheme). The ground wires will meet and come together at the power supply.