help with N-channel MOSFET to adjust motor speed

Hello every one i have just gone to RS components to buy a N-channel MOSFET to control the speed of a superbike radiator fan which runs at 12v, here is the link to the MOSFET:mosfet specs pdf link i did some research before buying it has a very low gate threshold and very low resistance which i hope it correct here another link to the page where i bought it from http://uk.rs-online.com/web/p/mosfet-transistors/4857721/

Anyway i have such a very basic knowledge of electronics and i can not get the mosfet to work with the arduino to power the motor, it runs fine just of the battery. and if i wire it to the MOSFET then jump the gate pin to straight to the battery positive the motor spins but the MOSFET get very hot and starts to smoke, i am using a large 12v deep cycle car battery to power the fan, the positive is going straight to the positive of the superbike fan and the negative is going into the MOSFET then to battery ground and the gate is going to pin 9 of the Arduino, i followed a Youtube video https://www.youtube.com/watch?v=Lzxuro0Z2Ew&t=65s for the design and method i.e. a battery and fan with a MOSFET.

What have i done wrong ? is the MOSFET itself wrong for the arduino or am i picking the wrong pins on the MOSFET, On the MOSFET Internal schematic diagram i assume pin(G) 1 is the gate, pin 2 D (TAB) is ground and pin 3 S, is the source - input ? or is the fan just to powerful for the MOSFET. the fan is supplied power on the bike with a thin 3mm wide cable so i assume it does not pull that much load ? i dont want to kill my arduino as i have very little money.

Many thanks from kawa

EDIT found the fan specs: Kawasaki Zx10r D6F D7F Cooling Fan. Voltage: 12 volts Amperage Draw: 2.4 amps

NO, transistor is backward, conducting continuous current through the body diode.
You DO have a kickback diode across the fan motor ( cathode (striped end) toward + Ve), don’t you?
MosMot1.png

No im a total noob and the person in the video did not use one so i thought it would atleast work the same, will the MOSFET not work with out the diode ?, i just read that the MOSFET could die if i don't use it, i have 4 left to play with as i bought a pack of 5. At the moment the MOSFET seems to power the fan with out any voltage to the gate which is odd, i have tried this diagram http://bildr.org/2012/03/rfp30n06le-arduino/ and i have many resistors spare but no diodes. i will buy some tomorrow But is the MOSFET the right one - spec wise ? and should the arduino be able to control the fan - MOSFET without the diode for now ?

You need the 10k resistor between gate and GND so the gate (very high impedance) is not "floating" and turning on from noise, the diode keeps inductive kickback from the motor from killing the transistor, if you want to risk it,...it's yours :) AND you SHOULD have at least a 100R resistor between Arduino and gate, but again... That transistor should work OK, also you need a diode that can handle the motor current with reverse voltage of 100+. https://www.amazon.com/AMP-DIODE-D6A-10-PACK/dp/B0071E2JU2/ref=sr_1_1?ie=UTF8&qid=1501617326&sr=8-1&keywords=6+amp+diodes

That MOSFET is fine as a logic level MOSFET, but don’t connect the gate to the 12V battery, its likely
to fail (the gate-source absolute max is only 16V) and 12V vehicle supplies are very noisy and spikey.

I’d recommend adding a 5V6 zener across the gate and source to keep any noise spikes on the gate
under control and protect the gate oxide layer (obviously that assumes the gate drive is 5V, not higher)

Your motor is an inductive load, so you must use a free-wheel diode across the load
or you’ll probably fry the MOSFET the instant you turn it off due to massive voltage spike.

So the lessons are:

  1. protect the gate from any chance of over-voltage, that’s instant destruction to a MOSFET,
    and most MOSFETs have no built-in protection at all - the gate oxide thickness is measured in nanometres!

  2. inductive loads kick back.

  3. Buy spare components if possible.

The power mosfets usually have got a protection diode inside (parallel to D-S) so when you wired your mosfet such it got the minus of the fan at S and battery ground at D the fan will run (the internal diode will conduct).
Again - wire the mosfet as the schematics above (take care how you wire G, D, S), there must be a 10k-1Meg resistor between G and S (wired as close to the mosfet as possible), 100-1k between arduino’s pin and G, the diode across the fun is not a must, but better to have it there.
Double check the wiring. The mosfet must be cold all the time.

pito: the diode across the fun is not a must

Mm, it's not a must if you find it okay that it might randomly stops working in the future because you happen to have stopped it at the wrong moment and the voltage spike was high enough to break the mosfet... Otherwise, use a diode :)

pito: The power mosfets usually have got a protection diode inside (parallel to D-S) so when you wired your mosfet such it got the minus of the fan at S and battery ground at D the fan will run (the internal diode will conduct). Again - wire the mosfet as the schematics above (take care how you wire G, D, S), there must be a 10k-1Meg resistor between G and S (wired as close to the mosfet as possible), 100-1k between arduino's pin and G, the diode across the fun is not a must, but better to have it there. Double check the wiring. The mosfet must be cold all the time.

No, its not a protection diode, its fundamental to the structure of a vertical-current-flow power MOSFET, and its unavoidable for high current density devices. Its very handy in bridge configurations as these body diodes form free-wheel diode network for free (needed for driving inductive loads).

Seeing as that fan is almost 30W under load, the mosfet MIGHT get hot. Add in the ambient temp for it's environment (hot engine area) and you better think carefully about placement, heatsinks, and enclosures. Ever think of just using a relay?

Seeing as that fan is almost 30W under load, the mosfet MIGHT get hot.

The power dissipated by the Mosfet when driving 30W fan is

  1. when mosfet is OFF, the I_DS=0A, U_DS=12V

P=0A * 12V = 0W

  1. when mosfet is ON, the I_DS=3A, U_DS= R_ON*3A=0.018 * 3= 0.054V

P= 3A * 0.054V = 0.162W

Note: example only, you may calculate with your mosfet's and fun's precise parameters.. Note1: when switched with high frequency PWM, the dissipated power will be higher (the transitions during on/off states). With proper design the additional power dissipated will be small.

Alternatively, just purchase a MOSFET module from any one of a squillion suppliers, and it will have all the gear you need already on the board - no mess, no fuss.

Yay i got it to work perfectly, it goes through the speed well, come to a complete stops fine and the mosfet does not get hot at all :) . I bought a 1N5400 Rectifier Diode for the fan and some more resistors and made edgemoron diagram as posted above. I am using pin 6 on my arduino uno as i hear it has the fast pwm Frequencies, however the fan hums until the pmw is at 255 "max speed", can i do anything to improve the wiring diagram and stop the humming i dont want to change my arduinos clocks so can i implement any physical components to stop the hum, i hear of something called a IC gate driver for the mosfet gate to improve switching time, will that help ? if so how do i implement it into the diagram and what one should i use, please could someone post a pic of a improved diagram with said component to stop the hum such as a IC, thanks again from Kawasaki.

KawasakiZx10r:
I am using pin 6 on my arduino uno as i hear it has the fast pwm Frequencies, however the fan hums until the pmw is at 255 “max speed”

Higher (or lower) PWM frequency is not “better”.
To minimise fan “throttle/brake” noises, you should pick a PWM frequency that is outside our hearing range (<30Hz or >20kHz). Try e.g. pin4 (~500Hz) first. The fan could be less noisy than on pin6 (~1000Hz).
Leo…

KawasakiZx10r: am using pin 6 on my arduino uno as i hear it has the fast pwm Frequencies, however the fan hums until the pmw is at 255 "max speed", can i do anything to improve the wiring diagram and stop the humming i dont want

Capacitor across the fan? It might do extremely weird things, though.

You may need to change the PWM frequency of the timer in question to something much higher to remove the hum.

Adding a large capacitor across the fan will just severely stress the MOSFET and the capacitor and strongly increase interference on the power supply itself.

You can add a small value ceramic cap across the fan motor terminals to reduce EMI from the brush sparking (typically 10nF or so would serve for this).

Wawa:
Higher (or lower) PWM frequency is not “better”.
To minimise fan “throttle/brake” noises, you should pick a PWM frequency that is outside our hearing range (<30Hz or >20kHz). Try e.g. pin4 (~500Hz) first. The fan could be less noisy than on pin6 (~1000Hz).
Leo…

Hmm ok that makes sense, i understand that the frequencies between 30 Hz and 16 Khz are audible, “looking at my equalizer on my sound system”, my volvo s60r fan is controlled by pmw and makes no unusual noises, is it just more complex or a special fan ? see this link here Testrun Volvo PWM controlled FAN - YouTube
I have seen people make drones from these fans LOL.

With a PWM frequency <30Hz you can still hear some “knocking” sounds, so it might be better to use >20kHz.
Computer CPU fans use ~25kHz PWM.
Many projects here about fan control. Use the search box on top of this page.
Leo…

Wawa:
Higher (or lower) PWM frequency is not “better”.
To minimise fan “throttle/brake” noises, you should pick a PWM frequency that is outside our hearing range (<30Hz or >20kHz). Try e.g. pin4 (~500Hz) first. The fan could be less noisy than on pin6 (~1000Hz).
Leo…

< 30Hz is still audible as all the harmonics spread across the audio band, or even the modulation in
rotation speed may be audible. Its also risks winding resonance/vibrations.

Ultrasonic PWM is normally done at 16kHz (PWM is commonly done at 4kHz, 8kHz, etc for some
obscure reason). Faster is usually avoided due to increased losses in the driver and the motor.
20kHz is better if you have young ears as 16kHz is within the range of hearing then.