Arduino Based PC Case Lighting/Cooling System


This circuit diagram explains how to build an Arduino based PC case lighting/cooling system.

The main objective is to change the lighting color(RGB) and fan speeds according to the inner temperature of the PC casing.

The temperature sensor detects the heat level continuously.If the temperature level is lower than 30°C,the operating temperature is considered as "COOL".

If the temperature level is in between 30°C-50°C,the operating temperature is considered as "WARM".

If the temperature level is higher than 50°C,the operating temperature is considered as "HOT".(These values can be changed from the Arduino code accordingly)

The fans are divided in to two parts as air inflow fans and air outflow fans.Both fan sets are identical(Speed/Size/Voltage-12V)

Two fans of inflow/outflow fan set are connected in parallel.

Inflow fans are used to suck the outside air into the PC casing.Outflow fans are used to blow the air inside the PC casing to outside.

When the system is in "COOL" condition, 1st relay module operates and powers the blue colored LED strip.Outflow fans are set to run at low speed.Inflow fans are turned off.

When the system is in "WARM" condition, 2nd relay module operates and powers the green colored LED strip.Inflow fans are set to run at low speed & outflow fans are set to run at medium speed.

When the system is in "HOT" condition, 3rd relay module operates and powers the red colored LED strip.Both inflow & outflow fans are set to run at high speed.

Apart from the stunning lighting effects,this configuration allows the user to not only cooloff the PC more efficiently, but also as an indication whether the PC is running cooler or hotter.Also in this way the depositing of dust particles inside the PC casing is considerably reduced.

For LED arrangement,either a RGB LED strip or separate red,green,blue LED strips can be used.
   

Tools & Components

1 X Arduino Nano

1 X L298N Motor Driver

1 X 3-way Relay Module

1 X RGB LED Strip (OR 1 X Red LED Strip/ 1 X Green LED Strip/ 1 X Blue LED Strip)

1 X DS18B20 Temperature Sensor

1 X 2.2K Ohm Resistor

4 X 12V High RPM PC Fan

1 X Breadboard

Jumper Wires

Connecting Components

L298N Module 01

IN1 Pin    - Arduino Pin D02
IN2 Pin    - Arduino Pin D04
IN3 Pin    - Arduino Pin D05
IN4 Pin    - Arduino Pin D07
ENA Pin  -Arduino Pin D03
ENB Pin  -Arduino Pin D06

DS18B20 Sig. Pin - Arduino Pin D09
2.2K Ohm Resistor is connected between DS18B20 Sig.Pin and Vcc Pin

Relay Channel 01 Pin - Arduino Pin D12
Relay Channel 02 Pin - Arduino Pin D11
Relay Channel 03 Pin - Arduino Pin D10

Common Terminal of all 3 Relays - (+)12VDC
Relay Module 01 NO(Normally Open) Terminal - Blue LED Strip (+)
Relay Module 02 NO Terminal - Green LED Strip (+)
Relay Module 03 NO Terminal - Red LED Strip (+)

Note : You can use PC ATX PSU to supply 12VDC to the system.

Arduino Code

//2020 CraftyBin
//Author : Chathura H.

#include <OneWire.h>
#include <DallasTemperature.h>
#define ONE_WIRE_BUS 9
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
float Celsius = 0;

const int ENA = 3;
const int ENB = 6;
const int IN1  = 2;
const int IN2  = 4;
const int IN3  = 5;
const int IN4  = 7;

void setup()
{ sensors.begin();
  pinMode(IN1, OUTPUT);
  pinMode(IN2, OUTPUT);
  pinMode(IN3, OUTPUT);
  pinMode(IN4, OUTPUT);
  pinMode(ENA, OUTPUT);
  pinMode(ENB, OUTPUT);
  pinMode(10,OUTPUT);
  pinMode(11,OUTPUT);
  pinMode(12,OUTPUT);
  Serial.begin(9600);
  delay(100);
}

void loop()
{ sensors.requestTemperatures();
  Celsius = sensors.getTempCByIndex(0);
  delay(1);
  Serial.print(Celsius);
  Serial.print(" C  ");
  delay(1);
 
  if(Celsius <= 30){
  analogWrite(ENA, 100);
  analogWrite(ENB, 0); 
  digitalWrite(IN1, HIGH);
  digitalWrite(IN2, LOW);
  digitalWrite(IN3, LOW);
  digitalWrite(IN4, LOW);
  digitalWrite(10, LOW);
  digitalWrite(11, LOW);
  digitalWrite(12, HIGH);
  }

  else if(Celsius > 30 && Celsius < 50 ){
  analogWrite(ENA, 180);
  analogWrite(ENB, 100); 
  digitalWrite(IN1, HIGH);
  digitalWrite(IN2, LOW);
  digitalWrite(IN3, HIGH);
  digitalWrite(IN4, LOW);
  digitalWrite(10, LOW);
  digitalWrite(11, HIGH);
  digitalWrite(12, LOW);
  }

  else if(Celsius > 50 ){
  analogWrite(ENA, 255);
  analogWrite(ENB, 180); 
  digitalWrite(IN1, HIGH);
  digitalWrite(IN2, LOW);
  digitalWrite(IN3, HIGH);
  digitalWrite(IN4, LOW);
  digitalWrite(10, HIGH);
  digitalWrite(11, LOW);
  digitalWrite(12, LOW); 
  }
}



Safety First !

Always Connect the power supply if you are absolutely sure that the components are connected correctly without changing polarity and short circuited the wiring.

Even if it seems nothing is wrong : DOUBLE CHECK EVERYTHING !!

Your Feedback is very important to us.

Please Leave a comment about how you feel about this project.


Post a Comment

Previous Post Next Post