1. Introduction
With the rapid growth of urbanization and the increasing complexity of
city life, ensuring public safety has become a critical concern for governments
and urban planners. Traditional security measures, such as manual patrolling
and basic CCTV systems, often fall short in detecting and responding to
real-time threats efficiently. To address these challenges, Intelligent Urban
Security Systems (IUSS) have emerged as a promising solution, leveraging modern
technologies like the Internet of Things (IoT), artificial intelligence (AI),
machine learning, and advanced sensors.
These systems enable continuous monitoring of
streets, public spaces, and critical infrastructure, providing real-time alerts
for unusual activities, traffic violations, or potential criminal incidents. By
integrating predictive analytics and automated decision-making, IUSS not only
improves response times but also enhances resource allocation for law
enforcement and emergency services. Moreover, these systems contribute to the
development of smart cities, where technology plays a central role in
maintaining safety, reducing crime, and ensuring a higher quality of urban
life. In essence, Intelligent Urban Security Systems represent a shift from
reactive to proactive urban safety, offering scalable, efficient, and
data-driven solutions for modern cities.
Implementing Intelligent Urban
Security Systems faces several challenges despite their potential benefits. One
of the major issues is the high cost associated with installing advanced
sensors, IoT devices, AI-based analytics, and integrated surveillance
infrastructure, which can be a significant barrier for many cities. Data
privacy and security also pose serious concerns, as continuous monitoring
involves collecting sensitive information that must be stored and transmitted
securely to prevent misuse. Integrating multiple technologies into a seamless
system is technically complex, and AI-based detection systems may produce false
alarms or fail to recognize certain threats, affecting reliability. Additionally,
maintaining these systems requires skilled personnel and regular updates, which
may not always be available. Scalability is another challenge, as urban
environments continuously grow and evolve, requiring adaptable systems that can
handle increasing demands. Finally, legal and ethical considerations must be
addressed to ensure that public safety measures do not infringe on citizens’
rights.
The motivation behind developing Intelligent
Urban Security Systems stems from the growing need for safer and smarter
cities. With urban populations rising rapidly, traditional security measures
such as manual patrolling and basic CCTV surveillance are often insufficient to
handle real-time threats, traffic management, and crime prevention effectively.
By leveraging advanced technologies like IoT, artificial intelligence, and data
analytics, these systems can monitor public spaces continuously, detect
suspicious activities, and provide timely alerts to authorities. The adoption
of such intelligent solutions not only enhances public safety but also
optimizes the allocation of resources, reduces response times during
emergencies, and contributes to the creation of sustainable, technologically
advanced urban environments. Ultimately, the goal is to shift from reactive security
measures to proactive, data-driven strategies that make cities safer and more
resilient.
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. 2
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 3.

Fig. 3
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.