Arduino rough sketch for forum.pdf (478 KB)
I am actually using an external 12 V power source to power the fans. The fans I am using is Delta 12 v dc fan
This has two pwm wires, white and green for the two fans in series.
Now you have included the kind of details you should have included in your original post. Because you didn't, when I read it, I assumed you were also a beginner at electronics and were making all kinds of really stupid mistakes. The most likely type of fan I thought you might be using was the 80mm fans found in PC cases.
- You said "One fan is too much for an Arduino pin! It is not working fine", this got me confused,
Even one fan is too much or you meant two fan is too much?
I imagined you were powering fans with current sourced from an Arduino pin. This is 5V and absolute max 40mA, which is not enough to drive a PC fan. In practice, you should take steps to limit the current sourced from an Arduino pin to 20~25mA.
2. If I use multiple fans, the total current to drive the fans needed will increase, but that is coming from an external power source. I have included a sketch to show my connections, for example, one fan (made of two smaller fans in series) connected to pwm pin 4 of arduino mega. Are you talking about current in pwm pins?
Now that you have revealed that these fans have a pwm control input, I agree that several fans can be connected to the same Arduino pin without risk of damage. The impedance of the fan's pwm wires will be pretty high, and only a small current will flow. I suggest you set up a single fan to run at maximum speed with analogWrite(pin, 255), and use a multimeter to measure the current flowing from the Arduino pwm pin. If this, for example, 5mA, then you could connect 4 or 5 fans to the same Arduino pwm pin. If it is only 1mA, you could connect 20 to 25 fans. If you need more than that, simply use an external transistor to boost the current. With a high-current transistor, you could probably connect hundreds of those fans to a single Arduino PWM pin.
3. Can you please elaborate on negative voltages part? Does it mean that the voltage at the pwm wire on the fan side is sometimes higher than the arduino side and current flows into arduino from fan through the pwm pins?
Again, because I was assuming that you were attempting to power fans with current sourced from an Arduino pin, I was pointing out that the reverse voltages induced when the fan stops would damage the Arduino. Your fans will have diodes built-in to prevent damage to its own control circuit.
4. If I use one fan per pwm pin, fans powered externally, do I still need the diodes and transistors?
No. But I thought your goal was to control many fans from a single Arduino pin. You can do this, how many depends on how much current each one draws. I suspect it is very little and you can run many fans from a single pwm pin.