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
2 Answers 2
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:
Image by ElectroBOOM (watch his videos sometime, they're hilarious)
-
Can I merge multiple arduino unos together? for example hook up a screen on one arduino uno, and buttons, and use 2 - 3 arduinos to control fans, but display the info on the first arduino? Is it possible to use arduinos as extenders? If so how?dmxyler– dmxyler2018年02月26日 05:40:22 +00:00Commented Feb 26, 2018 at 5:40
-
@dmxyler Sure. You just need to get them to communicate with each other. I2C and Serial are common ways - there's plenty of online resources.Majenko– Majenko2018年02月26日 09:17:22 +00:00Commented Feb 26, 2018 at 9:17
-
ok thank you for your advice. WIll try. Have a great day :)dmxyler– dmxyler2018年02月26日 12:59:14 +00:00Commented Feb 26, 2018 at 12:59
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
Explore related questions
See similar questions with these tags.
can be achieved by using transistors
. Furthermore, I don't think PWM multiplexing is a good idea. See the answers on this arduino.stackexchange.com/questions/31099/…