1.
Introduction
In the contemporary context of escalating energy demands and growing
environmental consciousness, the need for intelligent energy management systems
has become paramount. Lighting accounts for a substantial portion of total
electricity consumption in residential, commercial, and institutional
buildings. Conventional lighting systems rely heavily on manual operation,
which frequently results in lights being inadvertently left on in unoccupied
rooms, leading to considerable energy wastage and increased operational costs
[1], [2]. The integration of automation technologies into everyday
infrastructure offers a viable pathway toward mitigating such inefficiencies.
Automatic lighting control systems, which activate illumination only when human
presence is detected, represent a practical and impactful application of
sensor-based automation. Among various motion detection technologies, Passive
Infrared (PIR) sensors have emerged as a preferred choice due to their low
power consumption, affordability, ease of integration, and reliable performance
in detecting human movement within confined spaces [3].
This paper details the design, implementation, and evaluation of an
automatic room light controller based on a PIR sensor. The primary objectives
of this work are: (i) to develop a low-cost, reliable system that eliminates
manual light switching; (ii) to reduce unnecessary energy consumption by
ensuring lights are active only when a room is occupied; (iii) to provide a
scalable solution that can be deployed across diverse indoor settings; and (iv)
to demonstrate the practical application of fundamental electronic
components—including sensors, transistors, relays, and diodes—in addressing
real-world energy challenges.
The remainder of this paper is organized as follows: Section II
describes the system architecture and component specifications. Section III
presents the hardware implementation and prototype development. Section IV
discusses the results and performance evaluation. Section V concludes the paper
with recommendations for future enhancements.
2. System architecture and components
2.1. Overall System Design
The proposed automatic light control system employs a modular
architecture comprising four functional blocks: (1) motion sensing unit, (2)
signal conditioning and switching unit, (3) load control unit, and (4) power
supply unit. Figure 1 illustrates the block diagram of the system. The PIR
sensor serves as the input transducer, converting infrared radiation emitted by
the human body into an electrical signal. This signal is processed and used to
drive a transistor operating in switching mode. The transistor, in turn,
controls a relay module that isolates the low-voltage control circuitry from
the AC lighting load. A 5V charging module provides regulated power to the
sensor and control logic.
2.2. Component Specifications and Selection
1) PIR Motion Sensor
The PIR sensor is the core detection element of the proposed system. It
operates on the principle of passive infrared detection, sensing changes in
infrared radiation levels within its field of view. The sensor contains a
pyroelectric sensing element divided into two halves, configured in a
differential arrangement that cancels out ambient infrared levels while
responding to changes caused by moving heat sources—primarily human bodies. Key
advantages include low power consumption (typically 50–100 µA), low cost,
compact form factor, and absence of moving parts, ensuring long-term
reliability [4], [5].
Specifications:
Operating voltage: 5V DC; Detection range: up to 7 meters; Detection angle: up
to 110 degrees; Output: digital (HIGH when motion detected).
2) BC547 NPN Transistor
The BC547 is a general-purpose NPN bipolar junction transistor (BJT)
widely used for low-power switching and amplification applications. In this
design, the transistor operates in the cut-off and saturation regions,
functioning as an electronic switch. When the PIR sensor output goes HIGH, the
base-emitter junction becomes forward-biased, driving the transistor into
saturation and allowing collector current to flow, which energizes the relay
coil. The BC547 offers a maximum collector current of 100 mA, a
collector-emitter voltage rating of 45V, and a DC current gain (hFE) ranging
from 110 to 800, making it well-suited for this application [6].
Pin Configuration: Collector (C), Base (B), Emitter
(E).
3) Relay Module
A 5V active-high relay module is employed to interface the low-power
control circuitry with the AC lighting load (230V, 50Hz). The relay provides
electrical isolation between the two domains, protecting the sensitive
electronic components from high-voltage transients. The module includes an
optocoupler for additional isolation, a transistor driver, and a flyback diode
to suppress inductive kickback from the relay coil. The relay contacts are
rated for 10A at 250V AC, sufficient for standard lighting loads [7].
4) 5V Charging Module
A compact 5V DC-DC converter module provides regulated power to the PIR
sensor and transistor circuit. The module accepts input from a standard USB
power source or a rechargeable battery (3.7–5V) and delivers a stable 5V
output. It incorporates overcurrent and short-circuit protection features,
ensuring safe operation.
5) 1N4007 Diode
The 1N4007 is a general-purpose silicon rectifier diode with a peak
repetitive reverse voltage rating of 1000V and an average forward current
rating of 1A. In this circuit, it is used as a flyback diode connected in
parallel with the relay coil to suppress voltage spikes generated during coil
de-energization, thereby protecting the switching transistor from damage [8].
2.3. Circuit Operation Principle
The operational logic of the system is as follows:
1.
Standby
State: In the
absence of motion, the PIR sensor output remains LOW (0V). The BC547 transistor
is in cut-off mode, no current flows through the relay coil, and the relay
contacts remain open. The AC lighting load is disconnected from the mains
supply, and the light remains OFF.
2.
Motion
Detection: When a
person enters the detection zone, the PIR sensor detects the change in infrared
radiation and drives its output HIGH (approximately 5V). This HIGH signal is
applied to the base of the BC547 transistor through a current-limiting
resistor.
3.
Transistor
Switching: The base
current forward-biases the base-emitter junction, driving the transistor into
saturation. Collector current flows from the 5V supply through the relay coil
to ground, energizing the coil.
4.
Load
Activation: The
energized relay coil generates a magnetic field that pulls the relay contacts
closed, completing the AC circuit and turning ON the connected light.
5.
Time
Delay and Deactivation: After the
person leaves the detection zone, the PIR sensor output returns to LOW after a
preset delay (typically 5–30 seconds, adjustable via onboard potentiometer).
The transistor returns to cut-off, de-energizing the relay coil. The contacts
open, and the light turns OFF automatically.
2.4. Cost Analysis
Table 1 presents the detailed cost breakdown of the prototype
components. The total cost of ₹400 demonstrates the economic viability of the
proposed system, making it accessible for widespread deployment in
resource-constrained settings.
Table 1. Cost and specifications
|
SI. No.
|
Component
|
Qty.
|
Cost (INR)
|
|
01
|
PIR Sensor (HC-SR501)
|
1
|
150
|
|
02
|
5V Relay Module
|
1
|
100
|
|
03
|
BC547 Transistor
|
1
|
10
|
|
04
|
1N4007 Diode
|
1
|
10
|
|
05
|
5V Charging Module (TP4056)
|
1
|
100
|
|
06
|
LED Bulb (9W)
|
1
|
30
|
|
Total
|
|
₹400
|
3. Hardware implementation
3.1. Prototype Development
The complete hardware prototype was assembled on a breadboard for
initial testing and subsequently transferred to a perforated board (PCB) for
permanent implementation. Figure 2 shows the circuit schematic diagram, and
Figure 3 presents the complete hardware model.

Fig. 2. Circuit Schematic Diagram

Fig. 3. Complete Hardware Model
The assembly process involved the following steps:
1. The PIR sensor was positioned to
provide optimal coverage of the target area, with the sensitivity and time
delay potentiometers adjusted to desired settings.
2. The BC547 transistor was mounted
with proper orientation (collector, base, emitter identified).
3. A 1kΩ resistor was connected
between the PIR output and the transistor base to limit base current.
4. The relay module was interfaced
with the transistor collector, with the flyback diode (1N4007) connected across
the relay coil terminals (cathode to VCC, anode to collector).
5. The 5V charging module was connected
to provide regulated power to the PIR sensor and the relay coil supply.
6. The AC lighting load (9W LED
bulb) was connected to the normally open (NO) and common (COM) terminals of the
relay.
7. The complete assembly was
enclosed in a protective housing with appropriate ventilation.
3.2. Testing and Calibration
The system was tested under various conditions, including different
ambient temperatures, distances from the sensor, and movement speeds.
Calibration of the PIR sensor involved adjusting:
·
Sensitivity
Potentiometer: To set
the detection distance (3–7 meters).
·
Time
Delay Potentiometer: To set
the output HIGH duration after motion ceases (5–300 seconds).
Optimal performance was achieved with sensitivity set to approximately 5
meters and time delay set to 30 seconds.

Fig. 4. Replica of Final Hardware Model
4. Results and discussion
4.1. Functional Performance
The prototype was subjected to 100 test cycles under controlled
conditions. The system successfully detected human presence and activated the
light in 98% of trials. The two failure instances were attributed to the user
moving outside the sensor's detection angle. Once motion ceased, the light
automatically turned off after the preset 30-second delay in all cases. The
response time from motion detection to light activation was consistently below
1 second.
4.2. Energy Savings Estimation
To quantify the energy-saving potential, consider a typical classroom
(10 hours of daily usage) where lights are inadvertently left on for 2 hours
per day when unoccupied. A standard 40W fluorescent tube consumes 0.08 kWh
during this period. Over 200 working days annually, this amounts to 16 kWh
wasted per classroom. At an electricity tariff of ₹7 per kWh, this represents
an annual saving of ₹112 per classroom. For an institution with 50 classrooms,
the annual saving exceeds ₹5,600, while the implementation cost per room is only
₹400—yielding a payback period of less than 9 months.
4.3. Comparison with Existing Systems
Table II compares the proposed system with conventional lighting and
other automated solutions.
Table 2. Comparative analysis
|
Parameter
|
Conventional Switch
|
Commercial Motion Sensor
|
Proposed System
|
|
Cost (INR)
|
~50
|
1,500–3,000
|
400
|
|
Manual Operation Required
|
Yes
|
No
|
No
|
|
Energy Wastage Prevention
|
No
|
Yes
|
Yes
|
|
Installation Complexity
|
Low
|
Moderate
|
Low
|
|
Maintenance Requirement
|
Low
|
Low
|
Low
|
|
Scalability
|
High
|
High
|
High
|
The proposed system offers comparable functionality to commercial motion
sensors at approximately 15–25% of the cost, making it particularly attractive
for budget-constrained applications.
4.4. Limitations
The following limitations were identified during testing:
1. Limited Detection Zone: The PIR sensor cannot detect
stationary individuals, as it responds only to changes in infrared radiation. A
person remaining perfectly still may not maintain the light in the ON state.
2. False Triggers: Rapid temperature fluctuations
or moving non-human heat sources (e.g., pets, direct sunlight) occasionally
caused false activations.
3. No Ambient Light Sensing: The system activates lights
regardless of ambient illumination levels, which may be inefficient during
daylight hours.
5. Conclusion and future scope
5.1. Future Enhancements
The following enhancements are recommended for future iterations of the
system:
1. Integration of Photoresistor
(LDR):
Incorporating a light-dependent resistor (LDR) would enable the system to
activate lights only when both motion is detected AND ambient light falls below
a threshold, further improving energy efficiency during daylight hours.
2. Bluetooth/Wi-Fi Connectivity: Adding a Bluetooth module (e.g.,
HC-05) or Wi-Fi module (e.g., ESP8266) would enable remote monitoring and
control via smartphone applications, allowing users to override automatic
operation or receive notifications.
3. Microcontroller-based Control: Replacing the discrete
transistor switch with an Arduino or similar microcontroller would enable
programmable timing, multiple sensor inputs, and data logging capabilities.
4. Multi-Sensor Integration: Deploying multiple PIR sensors
in a network could extend coverage to larger areas and reduce false negatives.
5. Solar Power Integration: Coupling the system with a small
solar panel and battery storage would enable off-grid operation, particularly
beneficial for rural or remote installations.
5.2. Applications
The proposed system is well-suited for the following applications:
·
Educational Institutions: Classrooms, laboratories, libraries, and
corridors.
·
Residential Spaces: Bathrooms, staircases, basements, and storage
rooms.
·
Commercial Buildings: Conference rooms, washrooms, and break rooms.
·
Healthcare Facilities: Patient rooms and corridors (with appropriate
isolation).
·
Hospitality Sector: Hotel corridors and guest bathrooms.
5.3. Conclusion
This paper has presented the successful design, implementation, and
testing of a low-cost automatic light control system using a PIR sensor. The
system effectively eliminates manual switching, reduces energy wastage by
ensuring lights are active only when human presence is detected, and offers a
practical solution for diverse indoor applications. With a total component cost
of ₹400, the system is economically viable and can be deployed in educational
institutions, residential buildings, bathrooms, staircases, and other spaces
where manual lighting control often leads to inefficiency. The prototype
demonstrated reliable performance with a 98% detection success rate and
sub-second response time.
Acknowledgment:
The authors express their sincere gratitude to Prof. (Dr.) Pankaj Jha,
Head of the Department of Electronics and Communication Engineering, IIMT
College of Engineering, Greater Noida, for his invaluable guidance,
encouragement, and support throughout this project. The authors also thank all
faculty members and technical staff who provided assistance during the design
and testing phases. Finally, the authors acknowledge their B.Tech. batchmates for their constructive feedback and
collaborative spirit.