pams
Posts: 15
Joined: Mon Jul 23, 2018 4:30 pm

5V 4-pin PWM Noctua A4X10 on Raspberry Pi

Sun Jun 30, 2019 5:40 pm

I want to connect a NOCTUA NF-A4X10 5V PWM 4-pin fan to a Raspberry Pi 3B. The below is the circuit I'm planning to use.
  • (EDIT: Flyback diode (such as a 1N4001) is not needed since Noctua already provides polarity protection, and a brushless fan typically already has it);
  • (EDIT: No need for voltage divider) From Noctua documentation (https://noctua.at/media/wysiwyg/Noctua_ ... _paper.pdf), the RPM output is an open collector output (see page 3 of Noctua Doc.). This means that if the Vcc is 3V3, and R=1k5 Ohm, we should be fine (current is then limited to ca. 2.2mA);
  • Resistence R2 (2K2) and transistor Q1 (2N2222A) are used to drive the PWM signal.

Wires connected to the Pi header:
Red: (+5V) Pin 2 (https://pinout.xyz/pinout/pin2_5v_power); (+3V3) Pin 1 (https://pinout.xyz/pinout/pin1_3v3_power)
Black: (GND) Pin 6 (https://pinout.xyz/pinout/ground)
Blue: (PWM Signal from Pi) Pin 32 (https://pinout.xyz/pinout/pin32_gpio12)
Green: (RPM Signal) Pin 36 (https://pinout.xyz/pinout/pin36_gpio16)

Image

In other words:

Image

Questions:
  • Is this circuit correct? Am I making any mistakes? I'm an engineer, but not an electrical one, so be kind... :)
  • Noctua does not seem to recommend an open collector design (see below)... What alternatives do I have?


Again, from Noctua doc.:

Image

Can you help?
Last edited by pams on Mon Nov 04, 2019 8:25 am, edited 9 times in total.

User avatar
HawaiianPi
Posts: 5240
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: 5V 4-pin Noctua A4X10 on Raspberry Pi

Sun Jun 30, 2019 5:48 pm

The Noctua fans are so quiet you don't really need the PWM speed control. Just leave it on all the time, or use a simpler circuit that turns it on or off as needed.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

drgeoff
Posts: 10319
Joined: Wed Jan 25, 2012 6:39 pm

Re: 5V 4-pin Noctua A4X10 on Raspberry Pi

Sun Jun 30, 2019 6:01 pm

The "flyback" diode in the position shown (across the 5 volt supply from RPi to fan) serves no purpose.

And a 2N2222A is a transistor not a diode. True you can wire a transistor as a diode but be aware that the base-emitter junction of a typical silicon transistor can only withstand about 6 volts reverse.

pcmanbob
Posts: 8295
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: 5V 4-pin Noctua A4X10 on Raspberry Pi

Sun Jun 30, 2019 6:17 pm

The 2N2222A is not a diode it's an npn transistor , instead use a 1N4001 diode

drgeoff if a diode was fitted as shown it should proved reverse voltage protection when power is removed from the fan , rather than it reaching the pi gpio.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

drgeoff
Posts: 10319
Joined: Wed Jan 25, 2012 6:39 pm

Re: 5V 4-pin Noctua A4X10 on Raspberry Pi

Sun Jun 30, 2019 6:28 pm

pcmanbob wrote:
Sun Jun 30, 2019 6:17 pm
The 2N2222A is not a diode it's an npn transistor , instead use a 1N4001 diode

drgeoff if a diode was fitted as shown it should proved reverse voltage protection when power is removed from the fan , rather than it reaching the pi gpio.
No,

1. The diode as shown is across the power rails. That does not protect a GPIO.

2. What reverse voltage is going to get through whatever circuitry is between the fan motor and the PWM control input?

pcmanbob
Posts: 8295
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: 5V 4-pin Noctua A4X10 on Raspberry Pi

Sun Jun 30, 2019 6:50 pm

OK should have said pi 5v power rail not the gpio.

point taken
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

pams
Posts: 15
Joined: Mon Jul 23, 2018 4:30 pm

Re: 5V 4-pin Noctua A4X10 on Raspberry Pi

Sun Jun 30, 2019 7:09 pm

So, taking into consideration what has been said, I've removed the diode from the picture. This is a brushless fan and Noctua also provides polarity protection (It's right on the box... :roll: ).

Do I need a transistor (2N2222A) to drive the PWM signal or can I simply use a resistence? Noctua says that an open collector is to be avoided (see page 8, second paragraph of https://noctua.at/media/wysiwyg/Noctua_ ... _paper.pdf).

And what about the voltage divider for the RPM signal? is that ok?

User avatar
RPIgoodSBC
Posts: 126
Joined: Tue Mar 20, 2018 11:37 am

Re: 5V 4-pin Noctua A4X10 on Raspberry Pi

Sun Jun 30, 2019 7:52 pm

I am using this on rpi3B+ and is working fine...

https://noctua.at/es/na-fc1

https://noctua.at/es/nf-a4x10-5v-pwm

Fan at 50% is totally silent.

pcmanbob
Posts: 8295
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: 5V 4-pin Noctua A4X10 on Raspberry Pi

Sun Jun 30, 2019 7:53 pm

Well the RPM output is specified in the document as an open collector output, so if you follow the diagram on page 3

Image

you should have a 3.3v signal at the gpio input, but as always I recommend you test with a digital meter before connecting to the gpio.

As for the speed control circuit , it states " External pull-up is not necessary as the signal is pulled up to 3,3V/5V inside the fan " if there is 5v on the wire then you will need a driver circuit between the gpio and the speed control input.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

pams
Posts: 15
Joined: Mon Jul 23, 2018 4:30 pm

Re: 5V 4-pin Noctua A4X10 on Raspberry Pi

Sun Jun 30, 2019 10:07 pm

RPIgoodSBC wrote:
Sun Jun 30, 2019 7:52 pm
I am using this on rpi3B+ and is working fine...

https://noctua.at/es/na-fc1

https://noctua.at/es/nf-a4x10-5v-pwm

Fan at 50% is totally silent.
Can you share how you are connecting it to the Pi?

pams
Posts: 15
Joined: Mon Jul 23, 2018 4:30 pm

Re: 5V 4-pin Noctua A4X10 on Raspberry Pi

Sun Jun 30, 2019 10:11 pm

pcmanbob wrote:
Sun Jun 30, 2019 7:53 pm
Well the RPM output is specified in the document as an open collector output, so if you follow the diagram on page 3

Image

you should have a 3.3v signal at the gpio input, but as always I recommend you test with a digital meter before connecting to the gpio.

As for the speed control circuit , it states " External pull-up is not necessary as the signal is pulled up to 3,3V/5V inside the fan " if there is 5v on the wire then you will need a driver circuit between the gpio and the speed control input.
That was really helpful!
I've updated my question to reflect that, although I've using a 1K5 resistor instead (slightly less current; more safety margin).

Regarding the PWM signal, I'm now using a 2N2222A transistor to drive the signal. However, Noctua does not seem to recommend an open collector design (see updated question). So the question is if I need something different than a 2N2222A...

User avatar
RPIgoodSBC
Posts: 126
Joined: Tue Mar 20, 2018 11:37 am

Re: 5V 4-pin Noctua A4X10 on Raspberry Pi

Sun Jun 30, 2019 10:15 pm

pams wrote:
Sun Jun 30, 2019 10:07 pm
RPIgoodSBC wrote:
Sun Jun 30, 2019 7:52 pm
I am using this on rpi3B+ and is working fine...

https://noctua.at/es/na-fc1

https://noctua.at/es/nf-a4x10-5v-pwm

Fan at 50% is totally silent.
Can you share how you are connecting it to the Pi?
With my fan NF-A4x10 5V PWM arrives a cable usb adaptor...

USB power adaptor cable
The fan includes a USB power adaptor cable that allows it to run on power banks, devices with USB host ports or USB power supplies such as those used for smartphones, giving you near endless possibilities for using the fan in your home, in your car or wherever a need for cooling occurs!

https://hardzone.es/app/uploads/2018/09 ... 99x332.jpg

https://noctua.at/en/nf-a4x10-5v-pwm?___from_store=en

Fan NF-A4x10 5V PWM ---> NA-FC1 fan controller ---> NA-AC7 power adaptor cable ---> USB-A port.
Last edited by RPIgoodSBC on Sun Jun 30, 2019 10:39 pm, edited 1 time in total.

pams
Posts: 15
Joined: Mon Jul 23, 2018 4:30 pm

Re: 5V 4-pin Noctua A4X10 on Raspberry Pi

Sun Jun 30, 2019 10:39 pm

RPIgoodSBC wrote:
Sun Jun 30, 2019 10:15 pm
pams wrote:
Sun Jun 30, 2019 10:07 pm
RPIgoodSBC wrote:
Sun Jun 30, 2019 7:52 pm
I am using this on rpi3B+ and is working fine...

https://noctua.at/es/na-fc1

https://noctua.at/es/nf-a4x10-5v-pwm

Fan at 50% is totally silent.
Can you share how you are connecting it to the Pi?
With my fan NF-A4x10 5V PWM arrives a cable usb adaptor...

USB power adaptor cable
The fan includes a USB power adaptor cable that allows it to run on power banks, devices with USB host ports or USB power supplies such as those used for smartphones, giving you near endless possibilities for using the fan in your home, in your car or wherever a need for cooling occurs!

https://hardzone.es/app/uploads/2018/09 ... 99x332.jpg

https://noctua.at/en/nf-a4x10-5v-pwm?___from_store=en
I also have such cable. Looking at it, you'll notice that it only has 2 pins (not 4) meaning that it will be able to power the fan, but not much else... or am I wrong? Connecting it with that cable the fan works full speed but you cannot use PWM with it. Perhaps I'm missing something.

User avatar
RPIgoodSBC
Posts: 126
Joined: Tue Mar 20, 2018 11:37 am

Re: 5V 4-pin Noctua A4X10 on Raspberry Pi

Sun Jun 30, 2019 10:46 pm

---> pams

My usb cable adaptor have 2 pins and I can control fully the fan speed with NA FC1 fan controller.

pams
Posts: 15
Joined: Mon Jul 23, 2018 4:30 pm

Re: 5V 4-pin Noctua A4X10 on Raspberry Pi

Sun Jun 30, 2019 10:48 pm

RPIgoodSBC wrote:
Sun Jun 30, 2019 10:46 pm
---> pams

My usb cable adaptor have 2 pins and I can control fully the fan speed with NA FC1 fan controller.
Ah... so that means you're using a dedicated Noctua NA FC1 fan controller...
In theory that should not be needed, i.e., we can accomplished the same via some circuitry, and that is my goal.
Last edited by pams on Sun Jun 30, 2019 10:54 pm, edited 1 time in total.

User avatar
RPIgoodSBC
Posts: 126
Joined: Tue Mar 20, 2018 11:37 am

Re: 5V 4-pin Noctua A4X10 on Raspberry Pi

Sun Jun 30, 2019 10:53 pm

pams wrote:
Sun Jun 30, 2019 10:48 pm
RPIgoodSBC wrote:
Sun Jun 30, 2019 10:46 pm
---> pams

My usb cable addaptor have 2 pins and can control fully the fan speed.
And how exactly are you doing that? Does the Pi recognize the fan via USB? How to set it to something like 30% or 40%, for example?
Do you have the NA FC1 fan controller?

You only need the fan, the cable adaptor and the fan controller.That's all.
The USB port of the adaptor cable is connected to another port USB-A hub not directly to the usb-A port on pi but I don't see any reason to not work conected to a usb port on pi.

Adjust the buttom wheel on NA FC1 fan controller to middle long.

User avatar
RPIgoodSBC
Posts: 126
Joined: Tue Mar 20, 2018 11:37 am

Re: 5V 4-pin Noctua A4X10 on Raspberry Pi

Sun Jun 30, 2019 10:57 pm

pams wrote:
Sun Jun 30, 2019 10:48 pm
RPIgoodSBC wrote:
Sun Jun 30, 2019 10:46 pm
---> pams

My usb cable adaptor have 2 pins and I can control fully the fan speed with NA FC1 fan controller.
Ah... so that means you're using a dedicated Noctua NA FC1 fan controller...
In theory that should not be needed, i.e., we can accomplished the same via some circuitry, and that is my goal.
Ahh! OK.
You want do yourself.

I did not know if you knew that the noctua adapter existed so you do not have to do it.
Last edited by RPIgoodSBC on Sun Jun 30, 2019 10:59 pm, edited 1 time in total.

pams
Posts: 15
Joined: Mon Jul 23, 2018 4:30 pm

Re: 5V 4-pin Noctua A4X10 on Raspberry Pi

Sun Jun 30, 2019 10:57 pm

RPIgoodSBC wrote:
Sun Jun 30, 2019 10:53 pm
pams wrote:
Sun Jun 30, 2019 10:48 pm
RPIgoodSBC wrote:
Sun Jun 30, 2019 10:46 pm
---> pams

My usb cable addaptor have 2 pins and can control fully the fan speed.
And how exactly are you doing that? Does the Pi recognize the fan via USB? How to set it to something like 30% or 40%, for example?
Do you have the NA FC1 fan controller?

You only need the fan the cable adptor and the fan controller.That's all.
The USB port of the adaptor cable is connected to another port USB-A hub not directly to the usb-A port on pi but I don't see any reason to not work conected to a usb port on pi.

Adjust the buttom wheel on NA FC1 fan controller to middle long.
So, you're using a gizmo to drive the fan (in this case the Noctua NA FC1 fan controller) :)
I believe that the same can be accomplished with some circuitry... Perhaps what your controller does is using PWM on the current/voltage.

Also, by using such controller, you're not able to get the reading from the tachometer (fan speed), I believe.
Last edited by pams on Sun Jun 30, 2019 11:00 pm, edited 1 time in total.

User avatar
RPIgoodSBC
Posts: 126
Joined: Tue Mar 20, 2018 11:37 am

Re: 5V 4-pin Noctua A4X10 on Raspberry Pi

Sun Jun 30, 2019 11:00 pm

pams wrote:
Sun Jun 30, 2019 10:57 pm
RPIgoodSBC wrote:
Sun Jun 30, 2019 10:53 pm
pams wrote:
Sun Jun 30, 2019 10:48 pm


And how exactly are you doing that? Does the Pi recognize the fan via USB? How to set it to something like 30% or 40%, for example?
Do you have the NA FC1 fan controller?

You only need the fan the cable adptor and the fan controller.That's all.
The USB port of the adaptor cable is connected to another port USB-A hub not directly to the usb-A port on pi but I don't see any reason to not work conected to a usb port on pi.

Adjust the buttom wheel on NA FC1 fan controller to middle long.
So, you're using a gizmo to drive the fan (in this case the Noctua NA FC1 fan controller) :)
I believe that the same can be accomplished with some circuitry... Perhaps what your controller does is using PWM on the current/voltage.
Yes.The Noctua NA FC1 fan controller is a PWM fan controller.You can adjust fan speed but not to see rpm.You can adjust a non shutdown fan below 300rpm turning on a buttom (green led) that the controller fan has.
Last edited by RPIgoodSBC on Sun Jun 30, 2019 11:06 pm, edited 2 times in total.

pams
Posts: 15
Joined: Mon Jul 23, 2018 4:30 pm

Re: 5V 4-pin Noctua A4X10 on Raspberry Pi

Sun Jun 30, 2019 11:04 pm

RPIgoodSBC wrote:
Sun Jun 30, 2019 11:00 pm
...

Yes.The Noctua NA FC1 fan controller is a PWM fan controller.
But given that the fan already has a controller inside it, having another one on top of it, seems kind of a waste :S
My only problem with that is that it does not allow speed reading, or speed control via software :)

User avatar
RPIgoodSBC
Posts: 126
Joined: Tue Mar 20, 2018 11:37 am

Re: 5V 4-pin Noctua A4X10 on Raspberry Pi

Sun Jun 30, 2019 11:09 pm

pams wrote:
Sun Jun 30, 2019 11:04 pm
RPIgoodSBC wrote:
Sun Jun 30, 2019 11:00 pm
...

Yes.The Noctua NA FC1 fan controller is a PWM fan controller.
But given that the fan already has a controller inside it, having another one on top of it, seems kind of a waste :S
My only problem with that is that it does not allow speed reading, or speed control via software :)
Yes.The Noctua NA FC1 fan controller is a manual fan controller on a Pi but If you connect it to a motherboard with PWM bios controller allows control via BIOS.Read noctua specs on web page.

User avatar
RPIgoodSBC
Posts: 126
Joined: Tue Mar 20, 2018 11:37 am

Re: 5V 4-pin Noctua A4X10 on Raspberry Pi

Mon Jul 01, 2019 7:38 am

I do not own the Fan SHIM for Raspberry Pi 4, I prefer the manual control of Noctua, but you might be interested in this product ...

https://shop.pimoroni.com/products/fan-shim

https://github.com/pimoroni/fanshim-python

pcmanbob
Posts: 8295
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: 5V 4-pin Noctua A4X10 on Raspberry Pi

Mon Jul 01, 2019 10:12 am

Regarding the PWM signal, I'm now using a 2N2222A transistor to drive the signal. However, Noctua does not seem to recommend an open collector design (see updated question). So the question is if I need something different than a 2N2222A...
There is a recommended circuit in the manual you linked to ,but if you just want to try using the 2N2222 then you need a current limiting resistor in your circuit.

Image

to limit current as per manual, " Absolute maximum current sourced: Imax=5mA (short circuit current) "

if you find this does not produce the results you want you could try this circuit

Image

it will produce a nice square wave output because the 10K resistor is acting as the load, but it will be inverted when compare to the input .
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

Pointlespi
Posts: 7
Joined: Sat Jun 29, 2019 7:23 am

Re: 5V 4-pin Noctua A4X10 on Raspberry Pi

Tue Jul 02, 2019 12:58 pm

I'm trying to learn so please don't bite my head off even if I am being extremely stoopid!

I have a similar fan. I see people using a 2 pin fan constantly. If the PWM is just a controlling line why is anything needed Inbetween it?

Would power pin to red
GND to black
GPIO 18 (PWM) to blue

Cause any issues with no resistors or anything Inbetween. Just strait wiring.

For comparison this is the fan https://imgur.com/gallery/Fnyw4Zr

I am extremely new, as in effectively a premature baby in the PI/Linux/python world. So much so that my pi has only just arrived and my bread board/wires have not yet.

Cheers

pcmanbob
Posts: 8295
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: 5V 4-pin Noctua A4X10 on Raspberry Pi

Tue Jul 02, 2019 1:06 pm

Because the fan being used in this tread has an internal pull up that may be 3.3v or 5v , you never want to connect 5v to the pi gpio or you will damage your pi.

So a transistor is used as a interface between the gpio and fan, also the fan used in the tread requires a current limiting resistor on the PWM to limit the max current to 5mA.

your fan may not have the same specifications you would need to find the specifications document for your fan and see what it says.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

Return to “General discussion”