0

I'm kind of new on the field of Arduino. Although I have a question concerning multiple fan connection on 1 arduino PWM pin. The goal is to connect around 8 to 16 fans on 1 arduino pwm header pin and control their speeds separately using a potentiometer. As I seen it can be achieved by using transistors. The question is are there any limitations on how many fans can I connect and control seperatly using tranzistors? Can I for example use 16 transistors and control 16 fans seperatly ?

Thank you for your answers in advance

dmxyler
  • 1
  • 1

2 Answers2

1

One PWM pin can control only one fan (or one group of fans). You can't have one PWM pin outputting different values to different fans, since one pin can only have one value. (Yes, there are ways of multiplexing it through time slicing but that is both hard and not a good idea).

You need one PWM per fan if you want individual control of each fan's speed. That means a maximum of 6 fans on an Arduino.

To get more you would either have to use software PWM (which can introduce jitter which may not be a problem with simple fans), or an external PWM controller. Or add more Arduinos.

If all you want is potentiometer control of the fans you can do it without using an Arduino. A pair of op-amps (it can be a single dual op-amp chip), one acting as a triangle wave oscillator, and the other as a comparator, will generate PWM for you. Here's an example:

enter image description here

Image by ElectroBOOM (watch his videos sometime, they're hilarious)

Majenko
  • 105,851
  • 5
  • 82
  • 139
1

One option for controlling multiple PWM output is to use a I2C PWM Driver (e.g. PCA9685). It has 16 PWM outputs and is controlled from the arduino with I2C which only requires 2 pins on the arduino.

Tutorial: https://learn.adafruit.com/16-channel-pwm-servo-driver

Craig
  • 2,120
  • 10
  • 11