Common ground problem and/or missing pull-down resistor?

Apologies in advance if this seems too trivial a problem for you. I have really tried to read and read, and I'm too scared to burn everything off to just experiment with it.

I'm trying to power 2 Noctua NF-S12A PWM fans from a 12V DC power supply, and controlling the speed using a PWM signal from the Arduino. I know there are many guides on this, and I've read them all I think, but when I set it up (see image), the fans are running at max the whole time.

It is not a PWM frequency issue, because when I simply try digital write to either LOW or HIGH on the PWM pin, which should turn the fans OFF on LOW corresponding 0 duty cycle for any frequency PWM signal, the fans are still at max throttle.

I've come up with two (not exclusive) explanations of why it is not working.

  1. Since I'm powering the Arduino from my PC through the USB, it may be a common ground problem.
  2. The PWM signal stays at HIGH because of a missing pull-down resistor.

Is any of these explanations correct, and if I'm missing a pull-down resistor, how many OHMS does it needs to be and why?

Thanks in advance!

You need a open collector/drain driver (keying to GND) on the blue wire then control the driver from a PWM pin on the Arduino.

https://www.google.com/search?rlz=1C9BKJA_enCA832CA832&hl=en-US&ei=rsRSXvDjLqC90PEP1MSUwAU&q=computer+fan+control+arduino+4+wire&oq=computer+fan+control+arduino+4+wire&gs_l=mobile-gws-wiz-serp.3..33i160.4960.9969..10361...1.1..0.137.848.2j6......0....1.........0i71j0i22i30j33i22i29i30.qhfuCAGYJAA#kpvalbx=_PsZSXrivBJ7J0PEPoZad4Ag42

Something like this should work:

If you want to play with the PWM frequency for pins 9 and 10 (UNO) see the Timer One library.

Okay I think I understand. I will digest this, make a diagram for a lesser electronics mind like myself and see if I understand.

Thank you so far!

Did you watch this?

I saw the video you linked a few weeks ago. It didn't make much sense to me then. I understand it much better now. So as he says, the PWM is pulled high internally (I'm guessing so fan can be used as a 3-pin fan as well), and needs a switch to ground using something like a transistor. I'm a little confused about two things however.

  1. In the schematic you show. It seems to me when the PWM signal from the Arduino is on, the PWM pin from the fan is connected to ground? Or am I reading it wrong? I'm reading that as an inversion of the PWM signal.
  2. A very basic question about grounding. If I'm using a single DC 12V power source powering both the Arduino and the fans. Are they then sharing a common ground? Is it important in this case.

And a third question.

  1. Do I need to worry about reverse polarity when connecting the Arduino and Fans to the same power source? That the current might briefly move the wrong way in the circuit damaging the Arduino.

Thanks for the help!

Edit: clarification

arngorf:
3) Do I need to worry about reverse polarity when connecting the Arduino and Fans to the same power source? That the current might briefly move the wrong way in the circuit damaging the Arduino.

No. "Reverse polarity" has nothing to do with the power source. :grinning:

The NPN transistor is inverting the PWM signal.

Invert your thinking in your coding ;). i.e. 30% is 70%

Or, you can add a second NPN transistor.

When 12v is powering both the Arduino and the fan you have a common GND.

Perfect! Thank both of you!
Will buy the parts I'm missing and then I'll try it out. Can't wait :smiley: