I have a 4-pin PWM fan but it has no green wire! So, I checked the board beneath the fan to see what are the names of the wires. I found this:
red (P)
blue (F)
yellow (+)
black (probably -)
The code I use is
void setup()
{
}
void loop()
{
analogWrite(8,110); // I connect pin 8 to the red wire
}
The value below 100 doesn't turn on the motor and the value above that (say 140) to 255 actually doesn't change the speed. I think it is running at constant speed. The fan is small (12V, 110mA) and quiet so I have to put my ear near it but I think the fan speed doesn't change.
Do you have any idea on that? Did I made a mistake regarding the wires?
Connecting a PWM to the red wire (fan power) could fry the Arduino.
A 4-pin computer fan is designed for a ~25Khz PWM signal.
AFAIK wired like this.
Red wire to a 12volt supply.
Black wire to ground/negative of that supply, and to Arduino ground.
Yellow wire is RPM info/feedback. Needs pullup resisor.
Blue (or green) is the PWM input.
Try entering "4-pin fan" in the search box on top of this page.
Leo..
AFAIK a 4-pin fan does not run if you just connect power and ground.
It needs 5volt PWM (or DC) on the PWM pin to work.
I could be wrong, because 4-pin fans have intelligent startup.
Google "intel 4-pin fan pdf"
Leo..
Wawa:
AFAIK a 4-pin fan does not run if you just connect power and ground.
It needs 5volt PWM (or DC) on the PWM pin to work.
I could be wrong, because 4-pin fans have intelligent startup.
Google "intel 4-pin fan pdf"
Leo..
as per fan specs, if pwm pin is left open, fan will run at full speed.