Automatic Fan and Light Controller Using Arduino
Automatic Fan and Light Controller Using Arduino
Submitted To:
Course __________________ Lab Applied Lab
1
Introduction
In the modern era of smart automation and sustainable living, it has become
essential to design systems that can adapt dynamically to environmental
conditions. Manual control of fans and lights leads to unnecessary energy
consumption and discomfort. This project aims to solve that problem by
introducing an intelligent, microcontroller-based system that automatically adjusts
the speed of a fan and the brightness of a light source according to ambient
temperature and light intensity, respectively.
The system uses sensors (LM35 and LDR) to collect environmental data,
processes it using an Arduino Uno R3, and actuates the devices using transistors
and PWM (Pulse Width Modulation). A 16x2 LCD with I2C interface displays the
real-time status of temperature, light intensity, fan speed, and light brightness in
percentage.
Project Objectives
The main objectives of this project are:
2
Component List
2N2222 NPN Transistor 2 Acts as electronic switch for fan and LED
16x2 LCD with I2C Module 1 Displays temperature, light, fan %, LED %
3
System Diagram
4
Working Principle
● The transistor switches the fan connected between +9V and the collector of
2N2222.
● The emitter is grounded, allowing the fan to run based on duty cycle of
PWM (speed).
● Arduino reads this voltage and maps it inversely to a PWM signal (dark =
brighter light).
● The PWM is sent to pin D10, which controls a second 2N2222 transistor
switching the LED.
5
● As room brightness decreases, LED brightness increases automatically.
3 LCD Output
Circuit Explanation
● 2N2222 Transistor: Acts as an electronic switch.
6
○ Separate power supplies (e.g., one for Arduino, one for fan/light) —
only if GND is shared.
7
Physics Principles Used
Principle Application
Observed Results
8
Advantages
● Smart, real-time response to environmental changes
Limitations
● 9V battery may not provide sufficient current for fan
Applications
● Smart homes and energy-saving rooms
● Classroom/laboratory automation
9
Precautions
● Always connect GNDs together (Arduino, fan, LED)
Conclusion
This project successfully demonstrates an effective and low-cost method to automatically control
fan speed and light intensity based on environmental conditions. It integrates sensors, PWM
control, transistor switching, and real-time feedback using an LCD. This project combines multiple
electronics and physics principles in a hands-on way, making it ideal for learning and real-world
applications.
10