-1

I have a 12V fan and I should control it's speed via Arduino PWM, how should it be done? The fan is pengda technology 12V-DC fan. Already tried circuits in https://srituhobby.com/how-to-make-a-12v-pwm-circuit-using-arduino-uno-board/

https://forum.arduino.cc/t/arduino-pwm-to-12v-pwm/575834

https://www.instructables.com/Arduino-Based-12V-PWM-Generator/

and How do I convert 0-5v PWM to a 0-12v PWM

  • 1
    You already asked this question. It was closed because you didn't provide enough information and you also didn't answer the questions in the comments. Unfortunately this version of the question is not better. Please explain in way more detail: What fan do you have exactly? Have you googled for how to control a fan via Arduino? What was the result? How exactly did that not help? What exactly is your problem in doing that? – chrisl Jan 17 '23 at 08:32
  • `Already tried circuits` ... what was the result exactly? – jsotola Jan 17 '23 at 12:36
  • you add a logic-level n-chan mosfet (i like the IRLZ44N) to the circuit to act as a switch for the pwm signal; Gate-GPIO-PWM, Source-ground (both fan and arduino), drain to the black wire (-) of the fan. Some types of DC motors will need a 10uf capacitor across the fan leads and a higher PWM frequency, eg. 20Khz, to convert the PWM to a semi-stable DC voltage that limits the power the fan can draw, reducing it's speed. – dandavis Jan 18 '23 at 06:04

1 Answers1

0

From what I could find with that product description of the fan, I don't think, that you even can control it via PWM. It has a brushless motor (like most of these small DC fans), which means, that the supplied voltage goes to an internal driver circuit, which then controls the fan motor. Brushless motors need such a circuit, so that the phases of the motor get activated at the correct moment.

When providing a PWM voltage to such a driver you are only turning its power on and off very quickly. That doesn't control its speed. Such fans are just not made for speed control. So, if you really need speed control, you need to buy a different fan.

There will be exceptions, but generally you can divide such fans by the number of wires coming out of it:

  • 2 Wires: These fans only have the power connections (Vcc and ground). Thus they cannot be controlled and you don't know how fast they spin.
  • 3 Wires: In most cases the third wire gives out a pulse signal indicating the speed of the fan. Depending on the fan that might be one pulse per revolution or more.
  • 4 Wires: The 4th wire is commonly the PWM control wire. With this wire you can control the speed of the fan. Check the datasheet and info of the fan to see, what voltage is needed to control it. It might be, that the 5V PWM from the Arduino Mega is enough voltage, so that you can connect the PWM pin of the fan directly to the Arduino. If it needs more voltage, then you still need a transistor to create the higher voltage PWM.

So: If you buy a brushless DC fan with 4 wires you should be good to go. Otherwise make sure, that the fan, that you are buying, is capable of being controlled via PWM. The seller should provide information about such things (at least reputable sellers do that).

chrisl
  • 15,197
  • 2
  • 16
  • 26