I have a 12V Noctua industrial fan (it's for a project, the amount of airflow is needed). The fan doesn't turn on by itself (with only 12V and GND connected), but it does turn on when I connect GPIO pin in HIGH state from Raspberry into PWM connector. Although the fan does turn on, every time I use PWM with GPIO pin fan turns off, thus making the fan uncontrollable.

From what I've searched I need 5V input to control the fan using PWM connector (why does it turn on with only 3V is unknown). So basically I need a 5V rail for PWM controlled via 3V GPIO pin. What should I use? Some transistor? Or is there IC for this?

  • Hi @Astra3, Must read white bible: Noctua PWM specifications white paper noctua.at/media/wysiwyg/…. Now some quick and dirty, not verified comments: (1) PWM signal must be 5V. (2) Therefore must step up GPIO 3V3 signal to 5V, (3) Do not use bidirectional 3V3/5V logical level converters. They are good for I2C type open drain circuits, but weak and problematic to push pull driving. I would recommend HCT125 undirectional push/pull driver (checkout AdaFruit), (4) Don't use GPIO to drive the tachometer/RPM speed fan output signal. might fry Rpi!
    – tlfong01
    Sep 8 '19 at 2:10
  • Hi @tlfong01, yeah I read I need 5V to drive PWM before. I have already ordered logic level converter, if it's not going to work it'll get used in another project. And I was not planning on connecting tachometer to GPIO, but thanks for warning.
    – Astra3
    Sep 8 '19 at 20:58
  • I'm using a noctua 4-pin-fan with a pwm at 3.3V which is supposed to work because the fan has an internal pullup (running by default). Thereforewheb controlling with pwm it's all about the low level which is at common ground. So I wonder why your fan doesn't turn when pwm input is not connected... does it keep turning when you remove the high pin?
    – Sim Son
    Sep 9 '19 at 15:07
  • @SimSon No, it does not.
    – Astra3
    Sep 10 '19 at 14:03

If you take a look at the spec sheet for that fan (the fan you linked is a 4-pin varient): enter image description here

You'll see that the PWM signal pin must be 5V. Now why it works with 3.3V (GPIO voltage) is likely because high on 5V is usually not exactly 5V, but that doesn't explain why it only works when the GPIO is held steady on and not PWM.

Anyways, you can use a simple step-up level shifter to convert your 3.3V PWM signal to 5V. Hackaday has a fantastic tutorial on this. However, if you'd rather just buy a pre-built solution instead of wiring your own circuit, SparkFun sells this bi-directional 5v to 3.3v logic converter, which I've used in the past with great results.

  • Ok, so in my case and in case of SparkFun's board, if I connect 5V to LV and GPIO to LV1, then set GPIO to high I should get 5V at HV1. Did I understood it correctly?
    – Astra3
    Sep 7 '19 at 19:03
  • 2
    @Astra3 Not quite, this snippet is from that product page: "The level converter is very easy to use. The board needs to be powered from the two voltages sources (high voltage and low voltage) that your system is using. High voltage (5V for example) to the 'HV' pin, low voltage (3.3V for example) to 'LV', and ground from the system to the 'GND' pin." I highly recommend reading their tutorial before doing anything if you are unsure: learn.sparkfun.com/tutorials/…. Sep 7 '19 at 19:09
  • Alright, I got the logic converter, hooked it up and still no good results. Fan spins only without PWM.
    – Astra3
    Sep 10 '19 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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