

A fan is an electromechanical device designed to create airflow, which is essential for cooling or ventilating an area. In electronics, fans are commonly used to dissipate heat generated by components, ensuring optimal performance and preventing overheating. Fans are often integrated into enclosures, power supplies, and other systems where thermal management is critical.








Below are the general technical specifications for a standard 5V DC fan compatible with Arduino Nano:
| Parameter | Value |
|---|---|
| Operating Voltage | 5V DC |
| Operating Current | 100-200 mA (typical) |
| Power Consumption | 0.5W - 1W |
| Speed | 3000-5000 RPM (varies by model) |
| Airflow | 10-20 CFM (Cubic Feet per Minute) |
| Dimensions | 40mm x 40mm x 10mm (example size) |
| Connector Type | 2-pin or 3-pin (VCC, GND, optional PWM) |
| Noise Level | 20-30 dBA |
The fan typically comes with a 2-pin or 3-pin connector. Below is the pin configuration:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Positive power supply (5V DC) |
| 2 | GND | Ground connection |
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Positive power supply (5V DC) |
| 2 | GND | Ground connection |
| 3 | PWM | Pulse Width Modulation input for speed control |
Below is an example of controlling a 3-pin fan's speed using PWM on an Arduino Nano:
// Define the PWM pin connected to the fan's PWM input
const int fanPWMPin = 9; // Use a PWM-capable pin on the Arduino Nano
void setup() {
pinMode(fanPWMPin, OUTPUT); // Set the PWM pin as an output
}
void loop() {
// Set fan speed to 50% (128 out of 255)
analogWrite(fanPWMPin, 128);
delay(5000); // Run at 50% speed for 5 seconds
// Set fan speed to 100% (255 out of 255)
analogWrite(fanPWMPin, 255);
delay(5000); // Run at full speed for 5 seconds
// Set fan speed to 0% (fan off)
analogWrite(fanPWMPin, 0);
delay(5000); // Turn off the fan for 5 seconds
}
Note: Ensure the fan supports PWM control before using the above code. If using a 2-pin fan, speed control is not possible.
Fan Not Spinning
Fan is Noisy
Fan Speed Not Changing (3-Pin Fan)
Overheating Despite Fan Operation
Can I use a 12V fan with the Arduino Nano? No, the Arduino Nano provides a 5V output. Using a 12V fan requires an external power source.
How do I know the airflow direction of the fan? Most fans have arrows on the housing indicating the airflow direction and blade rotation.
Can I control a 2-pin fan's speed? No, 2-pin fans do not support speed control. Use a 3-pin or 4-pin fan for PWM-based speed control.
What is the maximum current the Arduino Nano can supply to the fan? The Arduino Nano's 5V pin can supply up to 500 mA. Ensure the fan's current draw does not exceed this limit.