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.
-
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.
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
- Temperature Reading: LM35 continuously outputs temperature readings.
- Data Processing: ATmega32 reads the ADC values, converts them to temperature, and determines fan speed.
- Fan Control: Motor speed is adjusted using PWM according to predefined temperature thresholds.
- Display Output: LCD shows the current temperature and fan state.
Watch the full simulation video on LinkedIn:
Fan Controller System Simulation Video
- ATmega32 Microcontroller
- LM35 Temperature Sensor
- LCD 16x2 Display
- DC Motor
- PWM Driver
- C Compiler (e.g., AVR-GCC)




