Hi,
I am working on a simple code, where I want to regulate the speed of 4x 5V DC fans ( 0.2A), such as the ones commonly found on 3d Printers, from one arduino pin. There have been no issues running one or two of them and controlling them, however the moment i add more, the fans stall. I am guessing the arduino can't supply enough current through the one pin?
Is there a way to support the arduino to run the fans and still keep it controllable?
Here is the code
const byte POTENTIOMETER = 0;
const byte CONTROL = 6;
int reading;
int value;
void setup()
{
pinMode(CONTROL, OUTPUT);
}
void loop()
{
reading = analogRead(POTENTIOMETER);
value = map(reading, 0, 1024, 0, 255);
analogWrite(CONTROL, value);
}
And this is the quick wiring sketch i made. I had to use dc motors instead of the fans though:
Each pin operates at 5V at HIGH and 0V at LOW. It can provide or receive a maximum current of 40mA, but only 20mA continuous, which is merely sufficient to drive a single-color LED @ 20mA for full brightness continuously.
Total current for the chipset shall not exceed 200mA, i.e., driving 10 single-color LEDs @ 20mA.
It's very possible you damaged the pin or even the whole chip as you tripled the total chipset current rating on a single pin when you attached 3 fans to it.
I am surprised it still works. Fans generally fry arduino pins. You can use a Logic Level avalanche rated MOSFET to drive the fans. shown is a classic circuit published many times. It works. You can eliminate D1 by using an avalanche rated MOSFET. When you do this the PWM signal will be inverted because of the inversion caused by the MOSFET.