2
\$\begingroup\$

I am trying to produce a variable speed fan control using an arduino UNO. I tried something using a BJT which didn't work and so it was suggested that I use a MOSFET instead. I am just looking for some feedback about something I have designed before I go and prototype something that is useless or breaks delicate hardware.

Here is the schematic that I have drawn:

Basically the PWM value is set serially via the serial monitor varying the pulse width sent to the gate of the MOSFET and hence the amount of time per wavelength that the DC fan is switched on.

Basically the PWM value is set serially via the serial monitor varying the pulse width sent to the gate of the MOSFET and hence the amount of time per wavelength that the DC fan is switched on.

I got the idea from this guy here https://www.youtube.com/watch?v=Pw1kSS_FIKk who did the same thing except with the fan powered by a 12 V battery. The battery seemed like it would provide more than enough current but would I be able to get maximum RPM with just the 12 Volt power supply being fed into the arduino?

My fan is rated at 130 mA but I know that the arduino only gives 40mA at best. Does anyone have anything to suggest?


This is what I mean enter image description here Ignore the math below because I am pretty sure its wrong. After revising this component I understand it will have a variable current flowing from the drain to source depending on its operating point (determined by the gate to source voltage and the 12v power supply).

With that said the overall output current due to Vgs will be reduced due to the resistance of the DC fan am I right? What would you suggest I do to find the drain current when the FET is switched on?

\$\endgroup\$
7
  • 1
    \$\begingroup\$ First, good choice to ask this here - this is an EE question, not an Arduino question. However, 1) Less than ideal choice of MOSFET, it won't be fully on at 5v gate drive 2) you need a pulldown resistor on the gate to keep the motor off until the processor is running your program 3) don't run the fan power through the processor board 4) While not out of spec, 12v starts to challenge an Arduino's regulator \$\endgroup\$ Commented Oct 18, 2017 at 7:22
  • \$\begingroup\$ Thanks for the prompt response. I have studied the MOSFET a little further and found some alternate configurations using a separate 12 Volt power supply and a switching signal coming from the UNO itself. \$\endgroup\$
    – burton01
    Commented Oct 19, 2017 at 5:03
  • \$\begingroup\$ That doesn't make much sense, unless you mean to switch to a fan that has a PWM input that is a control signal, not a power supply. \$\endgroup\$ Commented Oct 19, 2017 at 5:14
  • \$\begingroup\$ Check my answer I write below and I'll show you what I mean. Sorry I'm running out of time and want to get a second opinion asap and don't have time to learn how to attach images or mention people. \$\endgroup\$
    – burton01
    Commented Oct 19, 2017 at 5:18
  • \$\begingroup\$ You're on the wrong track - you want an approximation to perfect switching. So just get a lower threshold MOSFET of suitable voltage rating. In the through hole realm hobby project vendor Adafruit picks the IRLB8721PBF as the only N-FET they carry, and it seems more suitable than your choice, though there are also many others that would work. \$\endgroup\$ Commented Oct 19, 2017 at 5:25

1 Answer 1

2
\$\begingroup\$

Using a MOSFET is not a bad way to switch loads. You will need a few resistors though; see this post for some good examples of MOSFET switch circuits.

Your Arduino can give ~40mA max on an output pin. A MOSFET should draw next to nothing into its gate (in fact, many times it is assumed to be zero). Consider where current for the fan is being drawn from - when the MOSFET switches on, current flows from your 12V supply (Vin is connected to the barrel jack, so the current output of this pin is determined by whatever supply is plugged into the barrel jack) through the fan to ground. The 12V is also connected to a 5V regulator on the Arduino, so it essentially has its own supply fed by Vin. You just have to ensure that when your fan switches on, it doesn't draw so much power from the supply that the Arduino resets.

\$\endgroup\$

Your Answer

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

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