1. Introduction
The
motivation for developing an automatic night light using a transistor lies in
its simplicity and educational value. This project allows engineering students
to apply fundamental concepts of electronics such as semiconductor devices,
voltage dividers, transistor biasing, and sensor interfacing. At the same time,
it addresses a real-world problem related to energy conservation and
automation. The proposed system demonstrates how basic electronic components
can be effectively utilized to design an intelligent and practical solution
without the complexity of microcontrollers or advanced digital systems [1-3].
In
recent years, the rapid growth of electrical and electronic systems has increased
the demand for energy-efficient, reliable, and automated solutions in everyday
applications. One such essential application is lighting, which plays a crucial
role in residential, commercial, and public infrastructure. Conventional
lighting systems rely heavily on manual operation, requiring human intervention
to switch lights ON and OFF according to environmental conditions. This
approach is often inefficient, as lights may remain ON unnecessarily during
daylight hours or remain OFF during darkness due to negligence or absence of
users, resulting in energy wastage and safety concerns. Automatic lighting
systems provide an effective solution to these challenges by intelligently
controlling illumination based on ambient light conditions. An automatic night
light is a simple yet practical electronic system that automatically turns a
light source ON when the surrounding light intensity falls below a certain
level and switches it OFF when sufficient light is available. Such systems are
widely used in street lighting, garden illumination, staircases, corridors, and
household night lamps. The automation not only enhances user convenience but
also significantly reduces energy consumption and operational costs [4-6].
The
core principle behind automatic night lighting systems is light sensing and
electronic switching. Light Dependent Resistors (LDRs) are commonly employed as
light sensors due to their simplicity, low cost, and high sensitivity to
changes in light intensity. An LDR exhibits high resistance in darkness and low
resistance under bright light conditions. By integrating an LDR with a transistor-based
switching circuit, the variation in ambient light can be effectively converted
into an electrical control signal that governs the operation of a lamp or LED. Transistors
play a vital role in electronic control systems, acting as switches or amplifiers
depending on the circuit configuration. In automatic night light applications,
a transistor operates as an electronic switch, enabling or disabling current
flow to the load based on the input signal from the LDR. The use of a
transistor eliminates the need for mechanical switches, improving system
reliability and response time. The transistor-based circuits are compact,
cost-effective, and easy to implement, making them ideal for educational and
small-scale automation projects [7-10].
This
work presents the design and experimental validation of a low-cost and
energy-efficient automatic night light using a transistor-based switching
circuit. The proposed system employs a Light Dependent Resistor (LDR) for
ambient light sensing and an NPN transistor operating in cut-off and saturation
regions to achieve reliable automatic ON–OFF control of a light source. The
design eliminates the need for microcontrollers or complex digital circuitry,
thereby reducing system complexity and cost. Experimental results confirm
stable and consistent switching performance under varying light conditions. In
addition to practical implementation, the work reinforces fundamental concepts
of sensor interfacing, transistor biasing, and electronic switching, making it
suitable for educational and small-scale automation applications. The proposed
approach demonstrates an effective analog solution for intelligent lighting
systems with potential for further enhancement.
2. Circuit
description and Mathematical Modelling
A basic automatic night light circuit
using an LDR and an NPN transistor (BC547), as shown in Figure 1(a). The
circuit operates from a 9 V DC supply. The LDR and resistor
(100 kΩ) form a voltage divider
network that provides a control voltage to the base of the transistor. The LED,
along with the current-limiting resistor
(470 Ω), is connected in the
collector circuit of the transistor. The resistance of the LDR decreases
significantly, pulling the base voltage of the transistor below the
base–emitter threshold voltage during bright light conditions. As a result, the
transistor remains in the cut-off region, and the LED remains OFF. In dark
conditions, the LDR resistance increases, raising the base voltage above the
threshold level, thereby driving the transistor into saturation. This allows
current to flow through the LED, turning it ON automatically.

Fig. 1 Basic LDR–transistor night light
circuit
An enhanced version of the automatic night light
circuit using an operational amplifier (LM358) configured as a comparator, as
shown in Figure 1(b). The LDR and resistor network generate a voltage
proportional to ambient light intensity, which is compared with a reference voltage
set by a potentiometer (RP1). The comparator output drives a BC547 transistor
through a base resistor, which in turn energizes a relay to control a
high-power AC bulb. A diode (1N4148) is connected across the relay coil for
protection against back electromotive force (EMF).

Fig. 1 Op-amp-assisted night light with relay output
The mathematical model of the system is based on the
behavior of the LDR, voltage divider action, and transistor switching
characteristics. The resistance of the LDR varies inversely with the ambient
light intensity and can be approximated by equation (1).
(1)
Where RLDR
is the
LDR resistance (Ω).
is the light intensity (lux),
and
are sensor-dependent constants. As
light intensity decreases,
increases sharply. The base voltage
of the transistor is determined by the voltage divider formed by
and
by equation (2).
(2)
Where
is the base voltage of the
transistor,
is the supply voltage. In darkness,
, resulting in a higher base voltage.
The transistor turns ON when the base voltage satisfies equation (3).
(3)
The base current is illustrated by
equation (4).
(4)
The collector current is given by
equation (5).
(5)
Where
is the current gain of the
transistor. When the transistor is in
saturation, the LED or relay current is given by equation (6).
(6)
Where
is the LED forward voltage or the
relay coil voltage. In bright light conditions,
decreases, causing
, which forces the transistor into
cut-off and switches the load OFF.
3. Methodology
The methodology followed in
this work focuses on the systematic design, implementation, and validation of
an automatic night light using a transistor-based switching circuit. The
approach integrates theoretical analysis with practical experimentation to
ensure reliable and energy-efficient operation, as shown in Figure 2.

Fig. 2 Experimental setup for an automatic
night light using a transistor
The proposed methodology begins with defining system
requirements for automatic ambient light detection and autonomous light
switching. An LDR was selected as the sensing element and combined with a fixed
resistor to form a voltage divider that produces a control signal proportional
to illumination. This signal drives an NPN transistor (BC547) configured as a
switch, operating in cut-off during daylight and saturation under low-light
conditions to control an LED load. To enhance threshold accuracy and load capability,
an advanced design employing an LM358 comparator with a potentiometer-defined
reference was implemented, enabling relay-based control of high-power loads.
Circuit behavior was verified through simulation before hardware
implementation, followed by experimental validation, which confirmed stable and
reliable automatic operation.

Fig. 3 Flow chart
The
flowchart describes the operation of an automatic night light system that
functions based on ambient light conditions. Once the power supply is switched
ON, the circuit becomes active and the Light Dependent Resistor (LDR)
continuously senses the surrounding light intensity. The sensed light level is
compared with a predefined threshold value. When the ambient light intensity
falls below or equals the threshold, indicating darkness, the resistance of the
LDR increases, providing sufficient base current to the transistor, which then
operates in the saturation region and turns the light ON. Conversely, when the
ambient light intensity exceeds the threshold under bright conditions, the LDR
resistance decreases, the transistor remains in the cut-off region, and the
light remains OFF. This process ensures automatic and energy-efficient lighting
without human intervention.
4. Conclusion
This work successfully demonstrates the design,
implementation, and validation of a low-cost automatic night light system using
simple analog components. By employing an LDR for ambient light sensing and a
transistor-based switching mechanism, the proposed circuit achieves reliable
automatic ON–OFF operation without the need for microcontrollers or complex
digital control. The system exhibits stable performance under varying light
conditions and effectively reinforces fundamental concepts such as sensor
interfacing, voltage divider operation, and transistor biasing. The enhanced
configuration using an operational amplifier and relay further extends the
applicability of the design to higher-power loads. Overall, the proposed
approach offers an energy-efficient, economical, and educational solution for
intelligent lighting applications, with potential for future improvements
through sensitivity tuning and integration with advanced control techniques.