Skip to content

YoussefAdel170/Fan-Controller-System-with-ATmega32

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🌬 Fan Controller System - ATmega32

📖 Overview

This project implements a temperature-controlled fan system using the ATmega32 microcontroller.
The fan automatically adjusts its speed based on temperature readings from an LM35 sensor. The system uses an LCD to display real-time temperature and fan status, while PWM controls the fan speed efficiently.


⚙️ Features

  • Temperature Sensing:

    • LM35 sensor provides analog output converted to digital via ADC.
  • Fan Control:
    Fan speed changes according to temperature thresholds:

    • < 30°C → Fan OFF
    • ≥ 30°C → Fan at 25% speed
    • ≥ 60°C → Fan at 50% speed
    • ≥ 90°C → Fan at 75% speed
    • ≥ 120°C → Fan at 100% speed
  • PWM Fan Speed Control:

    • Fan speed is regulated using PWM signals generated by Timer0.
  • LCD Display:

    • Shows the current temperature and fan status in real-time.

🏗 System Architecture

The system is designed in a layered architecture and includes the following drivers:

  • ADC Driver: Converts analog temperature readings to digital values
  • GPIO Driver: Controls input/output pins for LCD and fan
  • LCD Driver: Manages communication with the LCD display
  • Temperature Sensor Driver: Reads values from the LM35 sensor
  • DC Motor Driver: Controls the fan rotation and speed
  • PWM Driver: Adjusts fan motor speed using PWM

🛠 How It Works

  1. Temperature Reading: LM35 continuously outputs temperature readings.
  2. Data Processing: ATmega32 reads the ADC values, converts them to temperature, and determines fan speed.
  3. Fan Control: Motor speed is adjusted using PWM according to predefined temperature thresholds.
  4. Display Output: LCD shows the current temperature and fan state.

📸 Screenshots

  • Fan OFF (< 30°C)
    Fan OFF

  • Fan ON - 25% speed (≥ 30°C)
    Fan 25%

  • Fan ON - 50% speed (≥ 60°C)
    Fan 50%

  • Fan ON - 75% speed (≥ 90°C)
    Fan 75%

  • Fan ON - 100% speed (≥ 120°C)
    Fan 100%


🎥 Simulation Video

Watch the full simulation video on LinkedIn:
Fan Controller System Simulation Video


📁 Components & Requirements

  • ATmega32 Microcontroller
  • LM35 Temperature Sensor
  • LCD 16x2 Display
  • DC Motor
  • PWM Driver
  • C Compiler (e.g., AVR-GCC)