user-1: I have a fan control circuit with Arduino (PWM). I did all things and it worked. My question is why we did not directly connect the fan to Arduino. Why should we have a driver circuit?


user16098: Arduino is a low voltage and low current device. Arduino max current output delivery capecity is 200ma, you can read about diffrent arduino's limitations here,
http://playground.arduino.cc/Main/ArduinoPinCurrentLimitations
Fan or anything that has a coil inside it, needs a huge amount of current during their start up. The current draw decreases as it gains its motion to some limit. The initial huge current is called surge current. There is a high chance that it will blow you pins dead.
Let's say we are using really small fan. And it managed to start and rotating, that dosen't meant there is no problem at all. When a coil is rotated inside a magnetic field an opposite voltage is induced called Back Emf . This is another huge potential concern. This is why we are always suggested to use a diode which will block the opposite flow of current. 
Transistor, being a low voltage device and as it can deliver tremendous large amount of output current, It is very widely used to drive high current devices

user22820: The 
Vin pin = 5V or 3.3V

You cannot use the 5V from the USB to power up the FAN and the LOAD because the USB port usually delivers only 100mA, and this is not enough to switch the relay and the LOAD. 
That is why you must use an external power supply (Vcc) that is between 7 to 12 volts to power up the Arduino board and the transistor + relay. The load uses its own power supply, for instance if you use a light bulb then you might connect it to the 110/220V mains or any other power source.
or
you can also use a fan that has one of the pins of the fan is a PWM input. The fan has an internal transistor to switch the 12V power when given a 0-5V input. That is the pin you want to connect to the actuator pin.
please get back to me if it was helpful

user23717: Actually the Arduino Uno dc current per I/O pin is 40mA. When fan is connected directly to Arduino Uno, it cannot withstand, because the fan draws more-than 20mA current. 
The driver circuit provides sufficient current to rotate the fan. The TIP 121 can withstand up to 3A current.

user39924: I know this is an old link but MAXIM has a tutorial on using PWM to drive "normal" DC fans.  The link is here: https://www.maximintegrated.com/en/app-notes/index.mvp/id/1784
It was helpful.
Personally, I am designing a simple 5-step temperature-driven device that uses an ATtiny13A to drive a 5 volt fan and a thermistor mounted to a heatsink.  I was originally trying to use a PWM frequency of 4687Hz (CPUclk / 256) but it was way to high.  The MAXIM article states that frequencies in the range of 20Hz to 160Hz are useful.  Obviously, the 4687Hz was TOO HIGH.  I dropped it down to 18Hz and everything works now.  The problem was that the pulse width at 4687Hz was too short to give the DC fan enough electrical "momentum" to spin the fan.  Using a lower PWM frequency gives more electrical energy to the fan to get it to spin.  An analogy would be trying to push a toy car with short and rapid "pushes" as opposed to using longer and slower "pushes".
Hope this helps.
Peace and blessings.

user379: This is an electronics question, and it should be forwarded to the electronics stackexchange.
The fan needs to have a proper amount of current to spin, and because the microcontroller that controls the fan draw very little current on its output pins (check the datasheet for the exact value, but it should be a few milliamps), unless you have a miniature fan, wiring it directly on the microcontroller will not be able to move the fan.
And this is by design that microcontrollers cannot provide much current. Because to provide larger amount of current than what they do, they'd need to have bigger copper tracks between the transistor to avoid having they internal circuits building too much heat, and they would be much much bigger.
So as a work around, we use an transistor, which receives on the "Base" pin a voltage, drawing almost no current, which will "connect" the collector and emitter pins where you can have a much bigger current flowing (though be careful to respect the datasheet's nominal values for current! Or use either a MOSFET, a Triac or a Relay for bigger currents).

-1: <p>I have a fan control circuit with Arduino (PWM). I did all things and it worked. My question is why we did not directly connect the fan to Arduino. Why should we have a driver circuit?</p>

<p><img src="https://i.stack.imgur.com/Oa8rY.png" alt=""></p>
 16098: <p>Arduino is a low voltage and low current device. Arduino max current output delivery capecity is 200ma, you can read about diffrent arduino's limitations here,
<a href="http://playground.arduino.cc/Main/ArduinoPinCurrentLimitations" rel="nofollow">http://playground.arduino.cc/Main/ArduinoPinCurrentLimitations</a></p>

<p><strong>Fan or anything that</strong> has a coil inside it, needs a huge amount of current during their start up. The current draw decreases as it gains its motion to some limit. The initial huge current is called <strong>surge current</strong>. There is a high chance that it will blow you pins dead.</p>

<p>Let's say we are using really small fan. And it managed to start and rotating, that dosen't meant there is no problem at all. When a coil is rotated inside a magnetic field an opposite voltage is induced called <strong>Back Emf</strong> . This is <strong>another</strong> huge <strong>potential concern</strong>. This is why we are always suggested to use a <strong>diode</strong> which will <strong>block</strong> the opposite flow of <strong>current</strong>. </p>

<p><strong>Transistor</strong>, being a low voltage device and as it can deliver tremendous large amount of output current, It is very widely used to drive high current devices</p>
 22820: <p>The </p>

<pre><code>Vin pin = 5V or 3.3V
</code></pre>

<p>You cannot use the 5V from the USB to power up the FAN and the LOAD because the USB port usually delivers only 100mA, and this is not enough to switch the relay and the LOAD. 
That is why you must use an external power supply (Vcc) that is between 7 to 12 volts to power up the Arduino board and the transistor + relay. The load uses its own power supply, for instance if you use a light bulb then you might connect it to the 110/220V mains or any other power source.</p>

<p><strong>or</strong></p>

<p>you can also use a fan that has one of the pins of the fan is a PWM input. The fan has an internal transistor to switch the 12V power when given a 0-5V input. That is the pin you want to connect to the actuator pin.</p>

<p><strong>please get back to me if it was helpful</strong></p>
 23717: <p>Actually the Arduino Uno dc current per I/O pin is 40mA. When fan is connected directly to Arduino Uno, it cannot withstand, because the fan draws more-than <code>20mA</code> current. </p>

<p>The driver circuit provides sufficient current to rotate the fan. The <code>TIP 121</code> can withstand up to <code>3A</code> current.</p>
 39924: <p>I know this is an old link but MAXIM has a tutorial on using PWM to drive "normal" DC fans.  The link is here: <a href="https://www.maximintegrated.com/en/app-notes/index.mvp/id/1784" rel="nofollow noreferrer">https://www.maximintegrated.com/en/app-notes/index.mvp/id/1784</a></p>

<p>It was helpful.</p>

<p>Personally, I am designing a simple 5-step temperature-driven device that uses an ATtiny13A to drive a 5 volt fan and a thermistor mounted to a heatsink.  I was originally trying to use a PWM frequency of 4687Hz (CPUclk / 256) but it was way to high.  The MAXIM article states that frequencies in the range of 20Hz to 160Hz are useful.  Obviously, the 4687Hz was TOO HIGH.  I dropped it down to 18Hz and everything works now.  The problem was that the pulse width at 4687Hz was too short to give the DC fan enough electrical "momentum" to spin the fan.  Using a lower PWM frequency gives more electrical energy to the fan to get it to spin.  An analogy would be trying to push a toy car with short and rapid "pushes" as opposed to using longer and slower "pushes".</p>

<p>Hope this helps.</p>

<p>Peace and blessings.</p>
 379: <p>This is an electronics question, and it should be forwarded to the electronics stackexchange.</p>

<p>The fan needs to have a proper amount of current to spin, and because the microcontroller that controls the fan draw very little current on its output pins (check the datasheet for the exact value, but it should be a few milliamps), unless you have a miniature fan, wiring it directly on the microcontroller will not be able to move the fan.</p>

<p>And this is by design that microcontrollers cannot provide much current. Because to provide larger amount of current than what they do, they'd need to have bigger copper tracks between the transistor to avoid having they internal circuits building too much heat, and they would be much much bigger.</p>

<p>So as a work around, we use an transistor, which receives on the "Base" pin a voltage, drawing almost no current, which will "connect" the collector and emitter pins where you can have a much bigger current flowing (though be careful to respect the datasheet's nominal values for current! Or use either a MOSFET, a Triac or a Relay for bigger currents).</p>
