Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino UNO Controlled Dual 12V PWM Fan System with Speed Adjustment

View and Edit Project In Cirkit DesignerImage of Arduino UNO Controlled Dual 12V PWM Fan System with Speed Adjustment

Circuit Documentation

Summary

This circuit is designed to control two 12V PWM fans using an Arduino UNO. The Arduino reads the tachometer signals from the fans and adjusts their speed using PWM signals. The speed of the fans is increased from 0% to 100% in 10% increments, with a 10-second delay between each increment. The circuit is powered through a USB connection and a power jack.

Component List

  1. Arduino UNO

    • Description: A microcontroller board based on the ATmega328P.
    • Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
  2. 12V PWM Fan (120mm)

    • Description: A 120mm fan with PWM control and tachometer output.
    • Pins: GND, +12V, TACH, PWM
  3. 12V PWM Fan (120mm)

    • Description: A 120mm fan with PWM control and tachometer output.
    • Pins: GND, +12V, TACH, PWM
  4. USB male 2 pin connection

    • Description: A USB male connector for power supply.
    • Pins: Negative -, Positive +
  5. Power Jack

    • Description: A power jack for connecting an external power source.
    • Pins: POSITIF, NEGATIF

Wiring Details

Arduino UNO

12V PWM Fan (120mm)

12V PWM Fan (120mm)

USB male 2 pin connection

Power Jack

Code Documentation

/*
 * This Arduino sketch controls two 12V PWM fans. It reads the tachometer
 * signals from the fans and adjusts their speed using PWM signals. The
 * speed of the fans is increased from 0% to 100% in 10% increments, with
 * a 10-second delay between each increment.
 */

const int fan1TachPin = 2; // Tachometer pin for Fan 1
const int fan1PwmPin = 9;  // PWM control pin for Fan 1
const int fan2TachPin = 4; // Tachometer pin for Fan 2
const int fan2PwmPin = 10; // PWM control pin for Fan 2

void setup() {
  // Initialize serial communication
  Serial.begin(9600);
  // Set pin modes
  pinMode(fan1TachPin, INPUT);
  pinMode(fan1PwmPin, OUTPUT);
  pinMode(fan2TachPin, INPUT);
  pinMode(fan2PwmPin, OUTPUT);
}

void loop() {
  for (int dutyCycle = 0; dutyCycle <= 255; dutyCycle += 26) {
    // Control fan speeds
    analogWrite(fan1PwmPin, dutyCycle);
    analogWrite(fan2PwmPin, dutyCycle);
    // Print current duty cycle to serial monitor
    Serial.print("Duty Cycle: ");
    Serial.println(dutyCycle);
    // Delay for 10 seconds
    delay(10000);
  }
}

This code initializes the pins for the tachometer and PWM control of the two fans. In the loop function, it gradually increases the duty cycle of the PWM signal from 0% to 100% in 10% increments, with a 10-second delay between each increment. The current duty cycle is printed to the serial monitor.