Description
Abstract – Classroom Automation and Auto Energy Saver
The Classroom Automation and Auto Energy Saver project is a microcontroller-based system designed to monitor the number of people inside a room and automatically control electrical appliances such as lights and fans to reduce energy wastage. The system uses the AT89S52 microcontroller to continuously count the number of people entering and leaving the room through a sensor system installed at the doorway. Based on the count of people present inside, the system automatically switches appliances ON or OFF.
Whenever a person enters the room, the count is incremented and displayed on a 16×2 LCD module. When someone leaves, the count is decremented. If the count reaches zero (room is empty), the system automatically turns OFF the connected load using a relay. When there is at least one person in the room, the system switches ON the load again.
This automation ensures that electrical energy is not wasted when rooms are unoccupied. The design is simple, cost-effective, and highly suitable for classrooms, offices, auditoriums, libraries, and other public or private spaces.
1. Introduction
Energy wastage in classrooms, offices, and public spaces often happens because appliances such as lights and fans are left running even when no one is present. Manual monitoring is not always reliable and requires human effort, which may fail due to negligence or oversight.
The Classroom Automation and Auto Energy Saver system solves this problem by introducing an automatic room occupancy detection mechanism. By detecting the number of people inside and controlling appliances accordingly, this project reduces unnecessary energy consumption without requiring human intervention.
This technology is practical for both small and large spaces and can be implemented in educational institutions, offices, and auditoriums where energy efficiency is a priority.
2. Working Principle
The system is based on incremental and decremental counting logic for tracking the number of occupants in a room. It uses two sensors at the doorway to detect movement direction:
- Entry:
- When the first sensor is triggered before the second sensor, the microcontroller recognizes it as an entry event and increases the person count by one.
- Exit:
- When the second sensor is triggered before the first, it is recognized as an exit event and decreases the count by one.
- Automatic Appliance Control:
- If count > 0, the system activates the relay, switching ON the connected appliances.
- If count = 0, the relay is deactivated, switching OFF the appliances.
- Display Output:
- The 16×2 LCD module shows the current number of people in the room in real-time.
3. Hardware Components
3.1 Microcontroller
- AT89S52 (8051 family) is the main controller of the system.
- Features:
- 8-bit CPU architecture
- 8 KB Flash memory
- 256 bytes RAM
- 32 programmable I/O pins
- Three 16-bit timers
- Controls the counting logic, LCD display, and relay switching.
3.2 Sensors
- Infrared (IR) Transmitter and Receiver Pairs are used at the doorway.
- Arranged in two sets to detect movement direction and trigger entry/exit events.
3.3 Display
- 16×2 LCD module is used to display the number of people inside the room.
- Operates in 4-bit or 8-bit mode depending on circuit design.
3.4 Relay Driver Circuit
- Relay used to control AC appliances.
- Operated via a transistor driver to handle the current required by the relay coil.
3.5 Power Supply
- Regulated 5V DC supply for the microcontroller and sensors.
- Relay section is powered separately to handle higher voltage loads.
4. Circuit Overview
The circuit connects:
- Two IR sensor pairs to the microcontroller input pins.
- The LCD display to output pins for real-time status updates.
- A relay module via a transistor driver circuit to control electrical appliances.
- The power supply circuit provides the necessary voltage regulation for smooth operation.
5. Software Logic
The firmware for the AT89S52 microcontroller follows these steps:
- Initialize sensors, LCD display, and relay.
- Continuously monitor both IR sensors.
- If sensor sequence indicates entry, increment the count.
- If sensor sequence indicates exit, decrement the count.
- Update the LCD with the new count.
- If count > 0 ? turn relay ON.
If count = 0 ? turn relay OFF. - Repeat continuously.
6. Applications
- Classrooms: Automatically control lights and fans when students enter or leave.
- Offices: Prevent unnecessary power consumption in meeting or work rooms.
- Libraries: Maintain quiet, automated energy control.
- Auditoriums: Handle crowd-based appliance operation.
- Laboratories: Automatically switch equipment ON/OFF.
7. Advantages
- Cost-effective: Uses basic microcontroller and IR sensors.
- Fully automatic: No manual intervention required.
- Energy saving: Appliances operate only when needed.
- Simple to use: Easy to install and operate.
- Real-time display: Shows occupancy status instantly.
8. Limitations
- If multiple people enter and exit simultaneously in opposite directions, counting errors may occur.
- Requires precise sensor alignment for accurate operation.
- Designed for single-door entry/exit.
9. Future Scope
- Can be enhanced with wireless communication for remote monitoring.
- Integration with centralized building management systems.
- Can be modified to track time-based usage for better facility management.
- Add automatic door control for fully automated rooms.
10. Conclusion
The Classroom Automation and Auto Energy Saver project is a reliable, low-cost, and efficient way to reduce power wastage. Using an AT89S52 microcontroller and entry/exit detection, it automatically controls room appliances based on occupancy. The project is simple to build, easy to maintain, and highly practical for educational and professional environments where energy saving is a priority.
By eliminating human error in switching appliances ON or OFF, this system ensures both cost savings and environmental benefits.















Reviews
There are no reviews yet.