AIR CONDITIONER OR FAN SWITCH WITH TEMPERATURE DETECTOR

In homes, offices, and classrooms, temperature control is typically handled manually, which can lead to energy wastage and inconvenience. Devices like fans and air conditioners are often left running unnecessarily or not adjusted according to changing environmental conditions.

As part of Advanced Smart Home Robotic Projects, the Temperature-Based Automatic Fan/AC Control System offers an intelligent and energy-efficient solution. This system automatically decides whether to operate a fan or an air conditioner based on real-time temperature readings.

The project uses:
  • Temperature Sensor to measure the ambient temperature
  • Microcontroller to process and analyze temperature data
  • Relay Module to automatically switch the fan or AC ON/OFF

When the temperature crosses predefined thresholds, the system activates the appropriate device—ensuring comfort while minimizing energy consumption.

Key Features :

  • Automatically turns ON fan at a moderate temperature
  • Automatically switches to AC at higher temperatures
  • Prevents both the fan andthe  AC from running simultaneously
  • Reduces power consumption and improves comfort

( This system demonstrates the application of embedded systems in smart home automation. )

Advanced Smart Home Robotic Projects
Advanced Smart Home Robotic Projects

CIRCUIT DIAGRAM

Connection Description (Wiring Map)

Main Components :
  1. Microcontroller: Arduino Uno / ESP32
  2. Temperature Sensor: LM35 / DHT11 / DHT22
  3. Relay Module (2-Channel): Controls Fan and AC
  4. Fan & AC Load: Connected through relays
  5. Power Supply: 5V regulated supply
    6. LCD DISPLAY

Wiring Summary :

Component

Arduino Pin

Description

Temperature Sensor (LM35)

A0

Analog temperature input

Relay 1 (Fan)

D8

Turns the fan ON/OFF

Relay 2 (AC)

D9

Turns AC ON/OFF

Relay VCC

5V

Relay power supply

Relay GND

GND

Common ground

Load Connection:

  • Fan connected to Relay-1 COM & NO
  • AC connected to Relay-2 COM & NO

Working Principle :

  1. The temperature sensor continuously measures room temperature.
  2. Arduino reads the temperature value and compares it with predefined limits.
  3. Based on temperature:
    • Below 28°C: All devices OFF
    • 28°C – 34°C: Fan ON, AC OFF
    • Above 34°C: AC ON, Fan OFF

( Relays isolate high-voltage appliances from low-voltage electronics. )

Applications :

  • Smart homes
  • Offices and classrooms
  • Server rooms
  • Energy-saving automation systems

Testing the Hardware :

  1. Temperature Sensor Test

     

    • Display temperature values in Serial Monitor

       

    • Verify accuracy using a thermometer

       

  2. Relay Test

     

    • Manually trigger relays using Arduino code

       

    • Check if the fan and AC switch correctly

       

  3. Load Test

     

    • Connect the fan and the AC to the relays

       

    • Observe correct switching at set temperature limits

       

  4. Full System Test

     

    • Heat the sensor slightly

       

    • Verify automatic switching between the fan and the AC

Troubleshooting :

Issue

Possible Cause

Solution

Fan or AC not switching

Wrong relay wiring

Check COM & NO connections

Incorrect temperature reading

Sensor calibration issue

Recalibrate or replace the sensor

Relay clicking but load OFF

Loose AC connection

Tighten wiring securely

Arduino resets

Relay power issue

Use a separate relay power

Both Fan & AC ON

Code logic error

Add a mutual exclusion condition

( The Air Conditioner or Fan Switcher with Temperature Detection is an intelligent automation system designed to maintain a comfortable indoor environment by automatically switching between a fan and an air conditioner based on ambient temperature conditions. This system minimizes manual effort while optimizing energy usage.

The system uses a temperature sensor such as the DHT11 or similar sensors to continuously monitor the room temperature. The sensor sends real-time data to a microcontroller (like Arduino or ESP32), which processes the readings and compares them with predefined temperature thresholds.

When the temperature rises above a certain level, the system automatically turns on the air conditioner. Conversely, when the temperature is moderate or lower, it switches to a fan, ensuring efficient energy consumption. This working principle is based on temperature-based control system, where decisions are made dynamically based on environmental conditions.

Relay modules are used to control the switching of high-power appliances like fans and air conditioners safely. The system can also include an LCD or OLED display to show real-time temperature readings and system status.

Additional features may include IoT integration for remote monitoring and control via smartphone apps, customizable temperature settings, and scheduling options. This makes the system suitable for smart homes and energy-efficient building management.

This project is highly useful in homes, offices, and commercial spaces, helping maintain comfort while reducing electricity consumption and operational costs.

With further enhancements, the system can incorporate AI-based climate prediction, voice control, and integration with smart home ecosystems for a fully automated environment. )

Scroll to Top