Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

University of Management and Technology Lahore

School of Engineering
Electrical Engineering Department

Digital Electronics EE-445

-Assignment-

Submitted by
Name: Hammad Imran Mirza
ID: F2017019091
Sec: A
Submitted to: Dr.Shakeel
Contents
 Abstract
 Introduction
 Working & Analysis of Flowchart
 Circuit Designing
 Simple working of transistor
 Simple working of transistor
 Designing of light security system explained
 Calculations
 Results
Abstract
In this assignment we are making a system that works in night to detect if any miscellaneous
activity is going on within the territory, if something happens to do so system will respond
immediately. In order to achieve an efficient system we are using transistors and low powered
sensors for low power consumption. System will respond as by indicating an alarm.

Introduction

Nowadays, home security is getting important due to theft and expensive households that
people carry in them. People are keener about their items than ever before in order to do so
high tech efficient systems are involved for reliability and not consuming high power. In this
busy world where everyone rushes towards work in order to live a lavish lifestyle. House needs
its own protection that can be controlled automatically as people tends to forget things while
busy in their schedule. So under the brainstorming we proposed a light security system that will
prevent home, offices, banks, stores and lockers from theft where expensive and valuable items
are being stored, when someone unauthorized walks in territory alarms turn on. This is like plug
n play where no setting needs to be made. Such system will produce a healthy society; fewer
guards will be required and saves electricity as utility bills are inflating day after day. This
system works in a simple manner when there is motion detected between 5 and 10 meter by
motion sensor in dark which is sensed by LDR sensor light will turn On while LDR sensor can
detect difference between Bulb light and Day light.
Working & Analysis of Flowchart

Flowchart working

This is a highly efficient and sophisticated system as its flowchart is given above for better
understanding. When no one is present in front of motion sensor it will not send any sort of
signal and the led will remain off but when someone will walk in front of motion sensor in the
given range of between 5 and 10 meters it will send a high signal and then it will check whit the
help of LDR sensor that either it is day light or dark. When it is daylight light will still remain off
but in case of dark LDR sensor will send a signal which will turn on relay. After relay is turned on
Light will glow for 2 minutes with the help of capacitor and then light turns off. This system
works in loop as it checks on again and again so no loop holes are present in it. Therefore, the
designing of this system tends to occur much easier.
Circuit Designing

Figure 1 circuit diagram

Simple working of transistor

One of the most common and important characteristic of transistor is its switching speed at
which it turns on and off. When input is applied on the base terminal of transistor it turns on
and the voltage at output is Low that is equal to zero and when there is no input on base
terminal transistor is switched off and the output is High that is equal to VCC. Transistor does
not commence its switching rapidly there is on time which consists of rise time and delay time.
When transistor is switched off there is an off time which includes decay time and storage time.
The response is shown in figure 2. This makes our system much better as prevention takes
place for sensors.

Figure 2 relation between base current and collector current


Designing of Light security system Explained

Circuit mention above in the square box is a combination of direct coupled transistor with
normally off configuration. Input of transistor will be in form of pulse as motion sensor sends
the signal from pin A when there is a motion detected. Input pulse amplitude is sufficient to
drive the transistor into saturation and cutoff. When input is zero Vce will become short and
output voltage will be equal to VCC and when input is high output will result in zero.

LDR pin B connects to the base and emitter terminals, thus Vbe is equal to zero until a positive
input is applied from pin A. In dark LDR resistance is high up to 1M ohm so maximum voltage
drops across Rb and LDR and transistors goes into off state which results in switching on the
relay through pin C. Therefore, light turns on. On the other hand if there is light LDR resistance
is low and Transistor goes into cutoff region resulting in approximately VCC equal to Vce that
does not turn on relay.

In Dark when there is no pulse generated from motion sensor which means no motion is
detected, all the current flows from collector to emitter making transistor in cutoff which
means VCC equals to Vce due to no potential relay remains off. Lastly if it is daylight and no
pulse is generated from motion sensor towards base terminal Vce will be still equals to VCC.

For better switching speed and to reduce noise from the input signal so if a float input is there
system still works in correct manner thus capacitor is attached parallel to the base resistor and
for the protection of circuit diode is attached to the emitter terminal for prevention of large
reverse leakage current.

This whole explanation above can be represented in the form of a table as shown below

LDR Motion Relay


Light No motion Remains off
Light Motion Remains off
Dark No motion Remains off
Dark Motion Turns On
Table 1.0

The time for which light shall remain on and the distance at which motion should be detected is
controlled using Motion sensor internal circuit is the time needs be extended further for light to
remain on that can also be done using a capacitor attached parallel to LDR and base terminal.
Calculations

For calculations we made some assumptions to assure transistor is saturated

The RL resistor must be low than Rb resistor but it should be enough to keep collector current
to a minimum value. According to standard values RL was taken as 47Ω and collector current
was calculated.

RL=47Ω

Ic =

Relay was operated at 4v and input voltage supplied were 5V

Ic = = 17mA

Next base current was measure by assuming Rb resistance value which should be much larger
than collector resistance. In order to do so Rb was taken as 10KΩ. By applying loop equation of
base current is

Ib =

Ib = = 0.43mA

To ensure that transistor works properly BJT should be in saturation which can be checked by
the condition hfe(min) calculated < hfe(min) datasheet

hfe(min) =

hfe(min) = =39.5

hfe(min) from datasheet at Ic=10mA is 100 and at Ic=50mA it is 60. By applying gradient rule we
found that hfe(min) at IC=17mA is 93. With this it is justified that Bjt is saturated because

hfe(min) calculated < hfe(min) datasheet


39.5 < 93
As appliance works at 50-60Hz so value of capacitor is calculated for better switching

Resolving time tre =

= = 10ms

C(max) =

= = 0.43µF ≈ 0.47 µF (standard value)

Simulation Results

This is the result of Output wave form that was observed across the light when relay turns on
the light. This is also the input suppy of 220ac volts that were later converted to 5volts DC. With
this it is ensured that input voltage is observed at output as it should be when light is switched
on.

Following result shows that when motion is not detected or it is day time transistor comes in
cutoff region and VCC is approximately equal to Vce therefore in this case relay remains off and
so the the light. This is also the same voltage given to VCC of transistor and input voltage of
both LDR and Motion sensor.
In order to check that the designed system does not get fused or it works properly when output
is given to relay for operating light. We checked the response across Vce as it comes to be
approximately 0.7 volts. Ideally volts required are around 0.2v-0.3v but practically things tend
to react in a different manner. Hence the designed security system works.

Conclusion

Things cannot move backward so we must look forward and think deeper in it. With the simple
technique and using low power consumption devices we can bring more security. Automation
brings ease to life. With such security system installed in premises security can reach its next
step and it is proven through results.

You might also like