









| Pin Number | Pin Name | Description |
|---|---|---|
| 1 | VCC (+) | Positive power supply input. Connect to the rated voltage (e.g., 12V DC). |
| 2 | GND (-) | Ground connection. Connect to the circuit's ground. |
| 3 | Tachometer (T) | Optional. Outputs a pulse signal proportional to the fan's speed (RPM). |
| 4 | PWM (optional) | Optional. Used for speed control via Pulse Width Modulation (PWM) signal. |
Note: Some fans may only have two pins (VCC and GND) or three pins (VCC, GND, and Tachometer). Check your specific model for details.
Connecting the Fan:
Controlling Fan Speed with PWM:
Arduino Example Code:
// Example code to control a 4-pin fan with PWM using Arduino UNO
const int pwmPin = 9; // PWM pin connected to the fan's PWM input
void setup() {
pinMode(pwmPin, OUTPUT); // Set the PWM pin as an output
}
void loop() {
analogWrite(pwmPin, 128); // Set fan speed to 50% (128 out of 255)
delay(5000); // Run at 50% speed for 5 seconds
analogWrite(pwmPin, 255); // Set fan speed to 100% (255 out of 255)
delay(5000); // Run at full speed for 5 seconds
}
Important Considerations:
Fan Does Not Spin:
Fan Spins Slowly:
Fan is Noisy:
PWM Control Not Working:
Can I use a 12V fan with a 5V power supply?
What is the purpose of the Tachometer pin?
How do I reduce fan noise?
Can I connect a 2-pin fan to an Arduino?
By following this documentation, you can effectively integrate and troubleshoot a fan or ventilator in your electronic projects.