Four wire fan

Brushless DC (BLDC) fans are used extensively in IT equipment to provide cooling for the components within. PCs may have several: power supply, main processor, graphics card, etc. Network equipment that's intended to be mounted in a 19" rack often has a row of perhaps six small fans on one side drawing air in and a similar row on the other side blowing air out. These can be very noisy and are not something you would want in an open office environment. The fans in most modern equipment have speed control, either direct control from a management processor, or they use a built-in temperature sensor for automatic speed regulation.

There are three types of axial flow fans in common use:

  1. 2-wire fan that is either on of off; no speed control and no detection for when it fails.
  2. 3-wire fan with a speed detection circuit (tacho or tachometer) so its gradual or instant failure can be detected.
  3. 4-wire fan with speed detection and speed control. This type is used to minimise power consumption and noise and is managed so that its cooling effect matches the cooling demand.

You may find some 5-wire fans in certain situations but the purpose of the fifth wire can vary:

  1. static pressure detection (an alarm signal for poor air flow)
  2. to set the direction on bidirectional fans
  3. emit a coded PWM signal to reflect the remaining anticipated service life

There's some interesting information in the EBM Papst catalogue.


2-wire fans are typically equipped with Hall effect sensors to provide information about the orientation of the rotor relative to the stator. When the rotor and its permanent magnets move, the magnetic field detected by the Hall sensor changes. This can tell the controller circuitry when to activate which coil in the motor in order for it to turn. This switching of the DC supply to the coils is necessary otherwise the rotor would align itself to the energised stator coils and then remain stationary.


3-wire fans are an evolution of the 2-wire variety and utilise the existing Hall effect sensors to create a pulse whose frequency corresponds to that of the rotor. As there are two sensors, there are two pulses per revolution of the rotor. The speed calculation needs to divide the pulse count by two to obtain the speed in revolutions per second.

Note that some manufacturers' fans also use 3 or 6 pulses per revolution so you may need to check the specifications.


4-wire fans are an evolution of the 3-wire variety and their speed can be controlled by supplying a PWM signal from an external source such as a computer. The frequency of the PWM signal is not critical because the speed is related to the duty cycle (the amount of time the signal is high compared to when it is low) - this is a more flexible approach than most any other method.


DC fans are usually designed to run only on their designated voltage. Typically these are 5V, 12V, 24V and 48V. However, 12V fans may work at a slower speed on 5V and a 5V fan may work on 3.3V. However, the correct way to adjust the speed of a fan is to use a 4-wire fan and control its speed with a PWM input.


A program to measure fan speed is given here. For a microprocessor (ESP8266, ESP-32, Arduino, etc.) it uses an interrupt to count the number of pulses in the tacho signal over a given period. This can then be converted to RPM.