# Power amplifier to drive a fan

I'm pretty new to the field: I'm a hobbist. I'm trying to drive a fan (H412R) which runs on 12 V, 0.2 A with an Arduino board, as it is easier for me to generate a PWM signal to control the fan speed.

The problem is that the Arduino outputs at best just 5 V with 40 mA of current. Now my task should be to build a power transformer circuit that amplifies both voltage and current to the desired level. This is what I was thinking about:

• amplify the voltage using a boost circuit from 5 V to 12 V (the boost circuit would like the one presented in this article, with the PWM signal given by the Arduino)
• amplify the current using a transistor current amplifier from 40 mA to 200 mA Is this functional? Can this design help me achieve what I need?

In the end I think that this problem can be seen as a circuit that can amplify the power from 0.2 W to 2.4 W.

• For the kind of fan that's on that heatsink, you supply it with 12 V (on the usually black (0 V) and red (+12 V) wires) and then use a PWM signal (at about 25 kHz, yellow wire) with an amplitude of 5 V. Make sure that the ground for the 12 V supply is connected to the ground for the 5 V supply. You'll find lots of additional info by searching for "arduino drive pwm fan". Feb 10, 2023 at 18:14
• Thank you for your answer. My problem is that I want to power the fan with the same arduino, which at best has an output of 5V 40mA. How could I do it? Feb 10, 2023 at 18:29
• do not use an arduino as a power supply ... the arduino can become an expensive fuse ... use the arduino for control only ... supply power from another source Feb 10, 2023 at 19:35
• Take a look at the power balance of your proposed design. 5V at 40mA is 200mW. Your fan's rated power is 2.28W with a stall current of 400mA for 4.8W. Clearly, there is no way to power this fan directly from the Arduino's I/O pin.
– vir
Feb 10, 2023 at 20:02
• Thank you. I will try to find another way then Feb 10, 2023 at 20:03

simulate this circuit – Schematic created using CircuitLab

Note that you will need a 12-volt DC supply.

One way to look at the circuit is that M1 both increases voltage AND increases current.

Be careful of the FET. It MUST be a logic-level FET, or it won't work.

R1 and R2 are just there to protect against the Arduino being accidentally disconnected, in which case the fan will turn off.

The + wire of the fan (red) goes to +12.

• @OP The 5 V can often be derived from the 12 V supply. It would be unusual (i.e. don't do that) to get the 12 V supply from the 5 V supply. Feb 10, 2023 at 21:03
• Thank you very much for your answer. You made it very clear! Feb 10, 2023 at 21:37
• @OP If you're going to use PWM of the supply voltage to adjust the fan speed, for a small fan such as used in a PC you'll need a frequency somewhere in the range 30–60 Hz (you'll need to experiment for best results). Note that fans with internal PWM circuitry (such as the one in the question) might not work well for this. Feb 11, 2023 at 19:03

One way or another you need 12V. Your idea to boost it from 5V is possible, and maybe necessary; that's its own discussion. Using the Arduino PWM to control it? Not a good idea. Consider a pre-made step-up module instead (many based on the popular LM2577.)

Bear in mind that 200mA at 12V will equate to 500 - 600mA on your 5V supply. Plan accordingly.

If you have a choice for your power supply, use 12V. The fan accepts that directly, while your Arduino can accept 12V on its DC IN jack and make local 5V for itself. Much simpler. More here: https://support.arduino.cc/hc/en-us/articles/360018922259-What-power-supply-can-I-use-with-my-Arduino-board-

Back to the fan. This cooler (H412R - link) has a 4-wire type fan with a separate PWM input. It can accept 5V PWM drive directly from the Arduino, no need for a FET.

Wiring diagram:

Amplification, Is NOT getting one thing and make it bigger. Instead, it is "making a bigger copy" of that thing that follows all actions of that former tiny thing. Look at the answer of WhatRoughBeast; the MOSFET is copier here:

• It "looks" at arduino output which varies from 0~5v with little current, controlled by your software.
• It makes a bigger copy of that same variation which has 12V supply and have more current to offer and can go [theoretically] from 0~12 with the same shape of the arduino output.

Notice, that the copy exists in another power "space" which is 12V and have more current to offer because we couldn't create the copy with desired specifications, in the arduino's same space which was 5V with lower current capability.

The same approach applies to audio amplifiers; an amplifier creates a powerful sound with another power supply unit, but mimics the tiny audio sound you make by using a tiny microphone. So the result, is a powerful audio that sounds just like what you said on the microphone. Sure, the copy may not be so accurate that's why audiophiles love amplifiers that are good "copiers" which call them HiFi equipment.

Disclaimer: it is a very basic concept of those things which would help to understand amplification.