Mosfet question

I am powering a 5v DC motor with a potentiometer and an n-channel Mosfet. I connect the gate of the Mosfet to the analog middle pin of the potentiometer, source to 5v rail and positive of the motor, drain to ground bus and negative of the motor. Everything works fine but In past projects, i would control the switching of the motor with an NPN transistor and that would require a diode for an inductive kick back. Do I need the same for my MOSFET and motor setup? And also this is considered a PWM control of a motor?

tjones9163:
Do I need the same for my MOSFET and motor setup?

Yes.

tjones9163:
And also this is considered a PWM control of a motor?

It is not. Search 'pwm arduino' on YT.

Show us a good schematic of your circuit.

N or P channel?

.

The kickback cares not about whether you switch with a BJT or a FET, always need that diode.

You'll probably need a heatsink on the MOSFET if using it in analog mode like this, motors take a fairly
large amount of power.

Its not clear if you are using source-follower or common-source circuit, and you've not told us what
FET or motor.

This 5V supply isn't being shared with logic chips by any chance?

I have an N channel power MOSFET.I am a beginner so I understand how to read basic electrical schematics, but I have not created one myself. I have downloaded Fritzing in the past but have not messed with it yet. Is this a good program for beginners? I also noticed when I used a 12v LED strip with the same setup that when I get to a certain point on the potentiometer the lights dips off heavy( not very smooth analog) can I put a capacitor in the circuit and typically where would I place it? I will try and work on a schematic. Thanks for the help!

tjones9163:
Do I need the same for my MOSFET and motor setup? And also this is considered a PWM control of a motor?

Certainly not PWM - you might get away without the diode if you ramp the pot slowly, but rapid changes,
or wiper-noise would risk large inductive voltages - so yes its wise to add it.

The inductive kick-back is directly related to how rapidly the current is switched off, so in theory for
slow changes there is no issue, but in practice you'd play safe - any inductive spike in source-follower
configuration will blow the gate oxide due to Vgs going too high.