You are on page 1of 61

1 INTRODUCTION

Industrial security system with auto-dialer, the aim of the project is to provide
high ended security system and control the process. In this project we are using various
sensors, control unit, display and tripping circuit.

However in this project work, the basic signal processing of various sensors
which are LDR, IR sensor and TEMPERATURE sensor are used for measuring various
parameter values, and the output of these sensors are converted to control the parameters.
The control circuit is designed using micro-controller. The output of all the sensors is fed
to micro-controller.

1.1 STATEMENT OF THE PROBLEM

The aim of the project is to provide a security system that can monitor an Industry
with three different types of sensors, controlling unit and tripping circuit. The main
design principles used in designing the industrial security system with auto-dialer are
flexible and easily enhanced for future use. In industry the main problem is to protect the
machines from unauthorized access, from damages like during excessive temperature,
fire accident etc. In industries at evening times the lights may not switch on due to
manual mistakes. These problems can be overcome by using sensors.

Power consumption is the major factor in industries that can be implemented by


using this system, for the purpose Light sensor is used. Security problems may arrive due
to absence of man power in the required places

1
BLOCK DIAGRAM

LCD DISPLAY

SENSOR
BOARD

DRIVER
CIRCUIT

ARM 89C51 MC
SWITCH
PANIC
SWITCH BUZZER
CRYSTAL
OSCILLATOR
RELAY
AUTO

RESET AUTO
CIRCUI RELAY DIALER
T DIAL

FIGURE 1: BLOCK DIAGRAM

2
1.2 Block Diagram Description:

The Block Diagram consists of different sensors, a Micro controller, auto dialer and a
power supply. These things are discussed briefly as follows:

There are some of sensors like Temperature sensor, Light intensity sensor, IR sensor.
Any of these sensors are placing in the project to measure any of these parameters at different
locations in an industry. The output of these sensors is in the form of analog values. These analog
values cannot directly give to the micro controller. For this we are using ADC converter. The
micro controller will accepts the input and also gives the output in the form of digital only. That
is why, we are giving the sensor values to the ADC, which converts the analog values into the
digital values and thereby these are given to the micro controller. According to the input given to
the micro controller the controller will performs action at the output.

For example, if we use the temperature sensor some of the threshold value is kept. If the
temperature is exceeds the threshold value what we have kept in the software, according to that
condition there should be an alert in the buzzer and a cal should be done as programmed. For the
circuit operation, the maximum power it requires is a 5v DC power supply.

3
1.3 SCHEMATIC DIAGRAM:

4
1.4 Schematic Description:

MICRO CONTROLLER CONNECTIONS:

Pins Connection

9TH RESET

20th GROUND

40th VCC (+5V DC) SUPPLY

14th BUZZER

P1.0-P1.2 THESE PINS ARE CONNECTED TO THE SENSORS.

1.4.1 SENSOR CONNECTIONS TO MICROCONTROLLER:

Sensors Connections

IR sensor this sensor is connected to pin P1.0 of the Microcontroller.

Temperature sensor this sensor is connected to pin P1.1 of the Microcontroller.

Light Intensity sensor this sensor is connected to pin P1.2 of the Microcontroller.

5
2 HARDWARE COMPONENTS

 MICRO CONTROLLER
 IR SENSOR

 TEMPERATURE SENSOR
 LDR

 LCD SCREEN
 BUZZER

 RELAY
 VOLTAGE REGULATOR
 PANIC SWITCH

 AUTO DIALER CIRCUIT

6
2.1 MICROCONTROLLER 89C51

2.1.1 INTRODUCTION

A Micro controller consists of a powerful CPU tightly coupled with memory,


various I/O interfaces such as serial port, parallel port timer or counter, interrupt
controller, data acquisition interfaces-Analog to Digital converter, Digital to Analog
converter, integrated on to a single silicon chip.
If a system is developed with a microprocessor, the designer has to go for external
memory such as RAM, ROM, EPROM and peripherals. But controller is provided with
all these facilities on a single chip. Development of a Micro controller reduces PCB size
and cost of design.

FIGURE 3: MICRO CONTROLLER

7
2.1.2 FEAUTRES

Compatible with MCS-51 product


4 Kbytes of on-System Reprogrammable Flash Memory
Fully Static Operation: 0 Hz to 24 MHz
Three-Level Program Memory Lock
128 x 8-Bit Internal RAM
Six Interrupt Sources
Programmable Serial Channel
Low Power Idle and Power Down Modes

2.1.3 Description

The AT89C51 is a low-power, high-performance CMOS 8-bit microcontroller


with 4 Kbytes of Flash Erasable and Programmable Read Only Memory (EPROM). The
device is manufactured using Atmel‟s high density nonvolatile memory technology and is
compatible with the industry standard MCS-51 instruction set and pin out. The on-chip
Flash allows the program memory to be reprogrammed in-system or by a conventional
nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a
monolithic chip, the Atmel AT89C51 is a powerful microcontroller which provides a
highly flexible and cost effective solution to many embedded control applications.

8
2.1.4 ARCHITECTURE

The 89C51 architecture consists of these specific features:

Eight-bit CPU with registers A(the accumulator) and B


Sixteen-bit program counter(PC) and data pointer(DPTR)
Eight-bit stack pointer(SP)
Eight-bit processor status word(PSW)
Internal ROM or EPROM of 4K
Internal RAM of 128 bytes:
1. Four register banks, each combining eight registers
2. Sixteen bytes, which may be addressed at the bit level
3. Eight bytes of general-purpose data memory
Thirty two I/O pins arranged as four 8-bit ports: P0-P3
Two 16-bit Timer/counters: T0 and T1

Figure 4: Functional Block Diagram Of Micro Controller

9
2.1.5 MEMORY TYPES

Memory Type Features

FLASH Low cost, high density, high speed low power and
high reliability.

ROM
(Read only memory) Mature, high-density, reliable, low cost; time-
consuming mask required, suitable for high
production with stable code.
SRAM
(Static Random-Access Memory) Highest speed, high-power, low-density memory;
limited density drives up cost.
EPROM
(Electrically Programmable
Read-Only memory) High-density memory must be exposed to ultra-
violet light for erasure.
EEPROM
(Electrically Erasable P-ROM) Electrically byte-erasable; low reliability and
density, high cost.
DRAM
(Dynamic RAM) High-density, Speed, Power, Low-cost.

10
FIGURE 5: PIN DIAGRAM OF AT89C51

2.1.6 PIN DESCRIPTION:


VCC: Supply voltage.

GND: Ground

Port 0:

Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each pin can
sink eight TTL inputs. Port 0 may also be configured to be the multiplexed low order
address/data bus during accesses to external program and data memory. In this mode P0
has internal pull-ups. Port 0 also receives the code bytes during Flash programming, and

11
outputs the code bytes during program verification. External pull-ups are required during
program verification.

Port 1:
Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 1 output
buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins they are
pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins that
are externally being pulled low will source current (IIL) because of the internal pull-ups.
Port 1 also receives the low-order address bytes during Flash programming and program
verification.

Port 2:

Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 2 output
buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins they are
pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 2 pins that
are externally being pulled low will source current (IIL) because of the internal pull-ups.
Port 2 emits the high-order address byte during fetches from external program memory
and during accesses to external data memories that use 16-bit addresses (MOVX @
DPTR).

Port 3:

Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 3 output
buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins they are
pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that
are externally being pulled low will source current (IIL) because of the pull-ups. Port 3
also serves the functions of various special features of the AT89C51 as listed below. Port
3 also receives some control signals for Flash programming and Programming
verification.

12
TABLE 1: PORT PINS

RST:
Reset input. A high on this pin for two machine cycles while the oscillator is
running resets the device.

ALE/PROG:

Address Latch Enable output pulse for latching the low byte of the address during
accesses to external memory. This pin is also the program pulse input (PROG) during
Flash programming. In normal operation ALE is emitted at a constant rate of 1/6 the
oscillator frequency, and may be used for external timing or clocking purposes. Note,
however, that one ALE pulse is skipped during each access to external Data Memory. If
desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit
set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is
weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in
external execution mode.

13
PSEN:
Program Store Enable is the read strobe to external program memory. When the
AT89C51 is executing code from external program memory, PSEN is activated twice
each machine cycle, except that two PSEN activations are skipped during each access to
external data memory.

EA/ VPP:

External Access Enable, EA must be strapped to GND in order to enable the


device to fetch code from external program memory locations starting at 0000H up to
FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched
on reset. EA should be strapped to VCC for internal program executions. This pin also
receives the 12-volt programming enable voltage (VPP) during Flash programming, for
parts that require 12-volt VPP.

THE 89C51 OSCILLATOR AND CLOCK:

The heart of the 89C51 circuitry that generates the clock pulses by which all the
internal operations are synchronized are Pins XTAL1 and XTAL2 is provided for
connecting a resonant network to form an oscillator. Typically a quartz crystal and
capacitors are employed. The crystal frequency is the basic internal clock frequency of
the microcontroller. The manufacturers make 89C51 designs that run at specific
minimum and maximum frequency typically 1 to 16 MHz

XTAL1:

Input to the inverting oscillator amplifier and input to the internal clock operating
circuit.

XTAL2:

Output from the inverting oscillator amplifier

14
Oscillator Characteristics
XTAL1 and XTAL2 are the input and output, respectively, of an inverting
amplifier which can be configured for use as an on-chip oscillator, as shown in Figure 1.
Either a quartz crystal or ceramic resonator may be used. To drive the device from an
external clock source, XTAL2 should be left unconnected while XTAL1 is driven as
shown in Figure 2.

Fig 6: Oscillator Connections Fig 6.1: External Clock Drive Configuration

15
2.2 IR SENSOR

IR sensor consists of two sensors. The first sensor presented is infrared based,
while the second one uses a red LED and a Cds photocell. The infrared based sensor
emits the infrared rays and the second sensor detects the rays which are reflected from the
obstacle. A line sensor in its simplest form is a sensor capable of detecting a contrast
between adjacent surfaces, such as difference in color, roughness, or magnetic properties,
for example. The simplest would be detecting a difference in color, for example black
and white surfaces. Using simple optoelectronics, such as infrared photo-transistors,
color contrast can easily be detected. Infrared emitter/detectors or photo-transistors are
inexpensive and are easy to interface to a microcontroller.

The theory of operation is simple and for brevity, only the basics will be
considered. When light shines on a white surface, most of the incoming light is reflected
away from the surface. In contrast, most of the incoming light is absorbed if the surface
is black. Therefore, by shining light on a surface and having a sensor to detect the
amount of light that is reflected, a contrast between black and white surfaces can be
detected. Below figure 1 shows an illustration of the basics just covered.

Figure 7: LIGHT REFLECTING ON A WHITE AND BLACK SURFACE

16
Using what we know about light and black and white surfaces, the objective of
tracking a line is simple can be achieved using the appropriate sensors. In this article, we
will consider the use of three pairs of emitter and detector as shown in figure below. The
drive configuration for the robot is assumed to be differential, i.e., like the tracks of an
army tank vehicle. From the figure, the three pairs of sensors are used to keep the robot
on the line as it moves. Each sensor output is monitored to determine the location of the
tape relative to the robot. The main objective of the robot is to position itself such that
the tape line falls between the two extreme sensors. If the tape line ever ventures past
these two extreme sensors, then the robot corrects by turning in the appropriate direction
to maintain tracking. Two different types of light sensors set up in the configuration
shown below will be used for line tracking.

The infrared emitter and detector sensors are shown below in Figure.

Figure 8: INFRARED EMITTER AND DETECTOR SENSORS

17
2.2.1 FEATURES:

High reliability
Light weight
Low cost
Long detection range
Small size
Wide spectral response
Low forward voltage

2.2.2 APPLICATIONS

Prevention from un authorized access


Burglar alarm system
Obstacle detection
Home and industrial automation
Infrared remote control units with high power requirements
Infrared source for optical counters and card readers
IR source for smoke detectors.

18
2.3 TRMPERATURE SENSOR

The word thermistor is an acronym for thermal resistor, i.e.., a temperature


sensitive resistor. It is used to detect very small changes in temperature. The variation in
temperature is reflected through appreciable variation of the resistance of the device.
Thermistor with both negative temperature co-efficient (NTC) and positive temperature
coefficient (PTC) is available, but NTC thermistors are more common. The negative-
temperature coefficient means that the resistance increases with the increase in
temperature.

Fig 9: NTC THERMISTOR PTC THERMISTOR

2.3.1 GENERAL DESCRIPTION OF LM35DT SENSOR

In this project we are using LM35 series type of temperature sensor which is an
NTC type. These are precision integrated-circuit temperature sensors, whose output
voltage is linearly proportional to the Celsius (Centigrade) temperature. The LM35 thus
has an advantage over linear temperature sensors calibrated in ° Kelvin. Low cost is
assured by trimming and calibration at the wafer level. The LM35‟s low output
impedance, linear output, and precise inherent calibration make interfacing to readout or

19
control circuitry especially easy. It can be used with single power supplies, or with plus
and minus supplies. The LM35 is rated to operate over a −55° to +150°C temperature
range, while the LM35C is rated for a −40° to +110°C range. The LM35 series is
available packaged in hermetic TO-46 transistor packages, while the LM35C, LM35CA,
and LM35D are also available in the plastic TO-92 transistor package. The LM35D is
also available in an 8-lead surface mount small outline package and a plastic TO-220
package.

Fig 10: LM35 SERIES TEMPERATURE SENSOR (LM35DT)

2.3.2 THERMISTOR CHARACTERSTICS:

Here is a graph of resistance as a function of temperature for a typical


thermistor. Not only is the resistance change in the opposite direction from what you
expect, but the magnitude of the percentage

20
START UP RESPONSE THERMAL RESISTANCE TO AIR

THERMAL TIME CONSTANT

FIGURE 11: THERMISTOR CHARACTERSTICS

21
Specifications Values

Supply Voltage +35V to −0.2V

Output Voltage +6V to −1.0V

Output Current 10 mA

Storage Temp.;

TO-46 Package −60°C to +180°C

TO-92 Package −60°C to +150°C

SO-8 Package −65°C to +150°C

TO-220 Package −65°C to +150°C

Lead Temp.:

TO-46 Package, (Soldering, 10 seconds) 300°C

TO-92& TO-220 Package, 260°C

SO Package Vapor Phase (60 seconds) 215°C

Infrared (15 seconds) 220°C

ESD Susceptibility 2500V

Specified Operating Temperature Range:

(TMIN to T MAX)

LM35, LM35A −55°C to +150°C

LM35C, LM35CA −40°C to +110°C

LM35D 0°C to +100°C

TABLE 2: ABSOLUTE MAXIMUM RATINGS OF LM35 TEMPERATURE


SENSOR

22
2.3.3 FEAUTRES:

0.5°C accuracy guarantee able (at +25°C)


Rated for full −55° to +150°C range
Suitable for remote applications
Operates from 4 to 30 volts
Calibrated directly in ° Celsius (Centigrade)
Linear + 10.0 mV/°C scale factor
Low cost due to wafer-level trimming

2.3.4 APPLICATIONS:

Temperature measurement and control


Liquid level measurement
Home and industrial automation
Temperature compensation in electronic circuits
Time delay measurement

23
2.4 LIBHT DEPENDENT RESISTOR(LDR)

LDRs or Light Dependent Resistors are very useful especially in light/dark sensor
circuits. Normally the resistance of an LDR is very high, sometimes as high as 1000 000
ohms, but when they are illuminated with light resistance drops dramatically.LDR is
shown in the figure

FIGURE 12: LIGHT DEPENDENT RESISTOR

Electronic opts sensors are the devices that alter their electrical characteristics, in
the presence of visible or invisible light. The best known devices of these types are the
light dependent resistor (LDR), the photo diode and the phototransistors.
Light dependent resistor as the name suggests depends on light for the variation
of resistance.

LDR are made by depositing a film of cadmium sulphide or cadmium solenoid on a


substrate of ceramic containing no or very few free electrons when not illuminated.
The film is deposited in a zigzag fashion in the form of a strip. The longer the strip
the more the value of resistance.

24
When light falls on the strip, the resistance decreases. In the absence of light the
resistance can be in the order of 10 K ohm to 15 K ohm and is called the dark
resistance.
Depending on the exposure of light the resistance can fall down to value of
500ohms.The power ratings are usually smaller and are in the range 50mw to 0.5w.
Though very sensitive to light, the switching time is very high and hence can not be
used for high frequency applications. They are used in chopper amplifiers. Light
dependent resistors are available as discs 0.5cm to 2.5cm. The resistance rises to
several mega ohms under dark conditions.
The Figure 6.2(b) shows that when the torch is turned on, the resistance of the LDR
falls, allowing current to pass through it is shown in figure

25
Figure 13: LDR Basic Structure and Symbol

The basic construction and symbol for LDR are shown in fig (a) and (b)
respectively. The device consists of a pair of metal film contacts separated by a snake-
like track of cadmium sulphide film, designed to provide the maximum possible contact
area with the two metal films. The structure is housed in a clear plastic or resin case, to
provide free access to external light. Practical LDrs are available in a variety of sizes and
packages styles, the most popular size having a face diameter of roughly 10mm.practical
LDR is shown in figure (c).

Figure c

26
2.4.1 EXAMPLE OF A LIGHT SENSOR CIRCUIT:

When the light level is low the resistance of the LDR is high. This prevents
current from flowing to the base of the transistors. Consequently the LED does not light.
However, when light shines onto the LDR its resistance falls and current flows into the
base of the first transistor and then the second transistor. The LED lights.

The preset resistor can be turned up or down to increase or decrease resistance, in this
way it can make the circuit more or less sensitive shown in fig.

Figure 14: LDR Working

2.4.2 FEATURES:

High reliability
Light weight
Low cost
Wide spectral response
Wide ambient temperature range

27
2.4.3 APPLICATIONS:

Smoke detection
Automatic lighting control
Burglar alarm systems
Camera (electronic shutter)
Strobe (color temperature reading)

28
2.5 LIQUID CRYSTAL DISPLAY(LCD)

The LCD or Liquid character display is a circuit which is used for displaying
characters at output side. In this project we are using a 16*2 Liquid crystal character
display which is shown in figure below. The 16*2 refers to the 16 characters with 2 lines
on the display. The figure is shown below which consists of 16 pins each having its own
function

Figure 15: 16*2 CHARACTER LCD DISPLAY

29
2.5.1 PIN DESCRIPTION:

Table 3: Pin Description Of LCD Display


2.5.2 FEATURES:

5*8 dots with cursor


Built in controller(KS 0066 or Equivalent)
+5V Power supply
1/16 Duty cycle
B/L to be driven by pin 1, pin2 or pin 15, pin 16 or A,K(LED)
N.V optional for +3V power supply

30
2.6 BUZZER

The “Piezoelectric sound components” introduced herein operate on an innovative


principle utilizing natural oscillation of piezoelectric elements. These buzzers are offered
in light weight compact sizes from the smallest diameter of 12mm to large Piezo electric
sounders. Today piezoelectric sound components are used in many ways such as home
appliances, OA equipment, Audio equipment telephones etc. And they are widely applied
for example in alarms, speakers, telephone ringers, receivers, beep sounds etc.

FIGURE 16.1: PIEZO ELECTRIC BUZZER TYPES OF BUZZER

FIGURE 16.2: PIEZOELECTRIC BUZZER CIRCUIT

31
2.6.1 OSCILLATING SYSTEM:

Basically the sound source of a piezoelectric sound component is a


piezoelectric diaphragm. A piezoelectric diaphragm consists of a piezoelectric ceramic
plate which has electrodes on both sides and a metal plate (Brass or stainless steel). A
piezoelectric ceramic plate is attached to a metal plate with adhesives. Figure shows the
oscillating system of a piezoelectric diaphragm. Applying D.C voltage between
electrodes of a piezoelectric diaphragm causes mechanical distortion due to piezoelectric
effect. For a misshaped piezoelectric element, the distortion of the piezoelectric element
expands in a radial direction. And the piezoelectric diaphragm bends toward the direction
shown in figure2

FIGURE 17: STRUCTURE OF PIEZOELECTRIC DIAPHRAGM

32
2.7 RELAYS

A relay is an electrical switch that opens and closes under the control of
another electrical circuit. In the original form, the switch is operated by an electromagnet
to open or close one or many sets of contacts.
The first relay was invented by Joseph Henry in 1835. The name relay derives
from the French noun „relais‟ that indicates the horse exchange place of the postman.
Generally a relay is an electrical hardware device having an input and output gate. The
output gate consists in one or more electrical contacts that switch when the input gate is
electrically excited. It can implement a decouple, a router or breaker for the electrical
power, a negation, and, on the base of the wiring, complicated logical functions
containing and, or, and flip-flop. In the past relays had a wide use, for instance the
telephone switching or the railway routing and crossing systems. In spite of electronic
progresses (as programmable devices), relays are still used in applications where
ruggedness, simplicity, long life and high reliability are important factors (for instance in
safety applications).

FIGURE 18: RELAYS

33
2.7.1 OPERATION:

When a current flows through the coil, the resulting magnetic field attracts an
armature that is mechanically linked to a moving contact. The movement either makes or
breaks a connection with a fixed contact. When the current to the coil is switched off, the
armature is returned by a force approximately half as strong as the magnetic force to its
relaxed position. Usually this is a spring, but gravity is also used commonly in industrial
motor starters. Most relays are manufactured to operate quickly. In a low voltage
application, this is to reduce noise. In a high voltage or high current application, this is to
reduce arcing.

2.7.2 ELECTROMECHANICAL RELAY:


It consists in a fixed coil (a) and a moving armature (b) mechanically
linked (c) to a moving contact (d). Feeding the coil by means of electrical current a
magnetic field rises. Then the moving armature is attracted to the coil and,
consequentially, the contact can be moved. The movement of the contact either makes or
breaks an electrical connection with a fixed contact

Figure 18.1: electromechanical relay Figure 18.2: Circuit diagram of a


Relay

(e). When the feeding current of the coil is removed, the armature and the
feed contact return to their relaxed position by means of a spring. Since relays are
switches, the terminology applied to switches is also applied to relays. A relay will switch
one or more poles, each of whose contacts can be thrown by energizing the coil in one of
three ways:

34
Normally-open (NO) contacts connect the circuit when the relay is activated; the
circuit is disconnected when the relay is inactive. It is also called a Form A
contact or "make" contact.
Normally-closed (NC) contacts disconnect the circuit when the relay is
activated; the circuit is connected when the relay is inactive. It is also called a
Form B contact or "break" contact.
Change-over (CO) or double-throw (DT) contacts control two circuits: one
normally-open contact and one normally-closed contact with a common
terminal. It is also called a Form C contact or "transfer" contact ("break before
make"). If this type of contact utilizes “make before break” functionality, then it
is called a Form D contact.

2.7.3 ADVANTAGES OF RELAYS:


Relays can switch AC and DC, transistors can only switch DC.
Relays can switch higher voltages than standard transistors.
Relays are often a better choice for switching large currents (> 5A).
Relays can switch many contacts at once.

2.7.4 DISADVANTAGES OF RELAYS:


Relays are bulkier than transistors for switching small currents.
Relays cannot switch rapidly (except reed relays), transistors can switch many
times per second.
Relays use more power due to the current flowing through their coil.
2.7.5 APPLICATIONS:

Control a high-voltage circuit with a low-voltage signal, as in some types of


modems or audio amplifiers,
Control a high-current circuit with a low-current signal, as in the starter
solenoid of an automobile,
Detect and isolate faults on transmission and distribution lines by opening and
closing circuit breakers (protection relays),

35
2.8 REGULATOR POWER SUPPLY

2.8.1 POWER SUPPLY:

The power supply is designed to convert high voltage AC mains electricity to a


suitable low voltage supply for electronic circuits and other devices. A power supply can
by broken down into a series of blocks, each of which performs a particular function. A
D.C power supply which maintains the output voltage constant irrespective of A.C mains
fluctuations or load variations is known as “Regulated D.C Power Supply.

For example a 5V regulated power supply system is as shown below:

FIGURE 19: FUNCTIONAL BLOCK DIAGRAM OF POWER SUPPLY

2.8.2 TRANSFORMER:

A transformer is an electrical device which is used to convert electrical power


from one Voltage to another voltage without change in frequency

36
Transformers convert AC electricity from one voltage to another with little loss of
power. Transformers work only with AC and this is one of the reasons why mains
electricity is AC. Step-up transformers increase in output voltage, step-down transformers
decrease in output voltage. Most power supplies use a step-down transformer to reduce
the dangerously high mains voltage to a safer low voltage. The input coil is called the
primary and the output coil is called the secondary. There is no electrical connection
between the two coils; instead they are linked by an alternating magnetic field created in
the soft-iron core of the transformer. The two lines in the middle of the circuit symbol
represent the core. Transformers waste very little power so the power out is (almost)
equal to the power in. Note that as voltage is stepped down current is stepped up. The
ratio of the number of turns on each coil, called the turn‟s ratio, determines the ratio of
the voltages. A step-down transformer has a large number of turns on its primary (input)
coil which is connected to the high voltage mains supply, and a small number of turns on
its secondary (output) coil to give a low output voltage.

FIGURE 20: AN ELECTRICAL TRANSFORMER

Turns ratio = Vp/ VS = Np/NS

Power Out= Power In

VS X IS=VP X IP
Vp= primary (input) voltage
Np= number of turns on primary coil
Ip= primary (input) current

37
2.8.3 RECTIFIER:

A circuit, which is used to convert A.C to D.C, is known as RECTIFIER. The


process of conversion A.C to D.C is called “rectification

TYPES OF RECTIFIERS:

Half wave Rectifier


Full wave rectifier
Bridge rectifier

2.8.3.1 FULL-WAVE RECTIFIER:

From the above comparisons we came to know that full wave bridge rectifier as
more advantages than the other two rectifiers. So, in our project we are using full wave
bridge rectifier circuit.

2.8.3.2 BRIDGE RECTIFIER:

A bridge rectifier makes use of four diodes in a bridge arrangement to achieve


full-wave rectification. This is a widely used configuration, both with individual diodes
wired as shown and with single component bridges where the diode bridge is wired
internally. A bridge rectifier makes use of four diodes in a bridge arrangement as shown
in fig(a) to achieve full-wave rectification. This is a widely used configuration, both with
individual diodes wired as shown and with single component bridges where the diode
bridge is wired internally.

38
FIGURE 21: BRIDGE RECTIFIER

2.8.4 FILTER:
A Filter is a device, which removes the A.C component of rectifier output but
allows the D.C component to reach the load

2.8.5 VOLTAGE REGULATOR:


Voltage regulator ICs is available with fixed (typically 5, 12 and 15V) or variable
output voltages. The maximum current they can pass also rates them. Negative voltage
regulators are available, mainly for use in dual supplies. Most regulators include some
automatic protection from excessive current ('overload protection') and overheating
('thermal protection'). Many of the fixed voltage regulator ICs have 3 leads and look like
power transistors, such as the 7805 +5V 1A regulator shown on the right. The LM7805 is
simple to use. You simply connect the positive lead of your unregulated DC power
supply (anything from 9VDC to 24VDC) to the Input pin, connect the negative lead to
the Common pin and then when you turn on the power, you get a 5 volt supply from the
output pin.

FIGURE 22: A THREE TERMINAL VOLTAGE REGULATOR

39
2.8.6 FEATURES:

Output Current of 1.5A


Output Voltage Tolerance of 5%
Internal thermal overload protection
Internal Short-Circuit Limited
No External Component
Output Voltage 5.0V, 6V, 8V, 9V, 10V, 12V, 15V, 18V, 24V
Offer in plastic TO-252, TO-220 & TO-263
Direct Replacement for LM78XX

40
2.9 SWITCHES AND PUSHBUTTONS:

There is nothing simpler than this! This is the simplest way of controlling
appearance of some voltage on microcontroller‟s input pin. There is also no need for
additional explanation of how these components operate.

FIGURE 23: SWITCH AND PUSH BUTTON

Nevertheless, it is not so simple in practice... This is about something commonly


unnoticeable when using these components in everyday life. It is about contact bounce- a
common problem with m e c h a n i c a l switches. If contact switching does not happen
so quickly, several consecutive bounces can be noticed prior to maintain stable state. The
reasons for this are: vibrations, slight rough spots and dirt. Anyway, whole this process
does not last long (a few micro- or milliseconds), but long enough to be registered by the
microcontroller. Concerning pulse counter, error occurs in almost 100% of cases!

41
The simplest solution is to connect simple RC circuit which will “suppress” each
quick voltage change. Since the bouncing time is not defined, the values of elements are
not strictly determined. In the most cases, the values shown on figure are sufficient. If
complete safety is needed, radical measures should be taken. The circuit shown on the
figure (RS flip-flop) changes logic state on its output with the first pulse triggered by
contact bounce. Even though this is more expensive solution (SPDT switch), the problem
is definitely resolved! Besides, since the condensate is not used, very short pulses can be
also registered in this way. In addition to these hardware solutions, a simple software
solution is commonly applied too: when a program tests the state of some input pin and
finds changes, the check should be done one more time after certain time delay. If the
change is confirmed it means that switch (or pushbutton) has changed its position. The
advantages of such solution are obvious: it is free of charge, effects of disturbances are
eliminated too and it can be adjusted to the worst-quality contacts.

42
2.10 AUTO-DIALER CIRCUIT

2.9.1 Introduction:
The very simplest working telephone would look like this inside.

FIGURE 24: A SIMPLE TELEPHONE HOLDER WITH A SWITCH OR RELAY

As you can see, it only contains three parts and they are all simple:
A switch - to connect and disconnect the phone from the network - This switch is
generally called the hook switch. It connects when you lift the handset.
A speaker - This is generally a little 50-cent, 8-ohm speaker of some sort.
A microphone - In the past, telephone microphones have been as simple as
carbon granules compressed between two thin metal plates. Sound waves from
your voice compress and decompress the granules, changing the resistance of the
granules and modulating the current flowing through the microphone.

43
Most people find that annoying, so any "real" phone contains a device
called a duplex coil or something functionally equivalent to block the sound of
your own voice from reaching your ear. A modern telephone also includes a bell
so it can ring and a touch-tone keypad and frequency generator. A "real" phone
looks like this.

FIGURE 25: AUTO-DIALER CIRCUIT WITH AN ALARM

FIGURE 26: BLOCK DIAGRAM OF AUTO-DIALER

44
2.9.2 REDIAL:
The telephone stores in memory the last number you called. The number will
remain in the Redial memory until you dial another number.
To dial the same number again

Lift the handset or press your telephone's Hands free button.


Listen for the dial tone, and press Redial.
This is done manually but as we want all this to be done automatically we will be
replacing the redial button with another RELAY. Here we are using two relays for
controlling the ON and OFF of the phone and for redialing. So now everything is
automatic as the relays are being controlled by the microcontroller itself. When an
attempt is made to enter into the restricted area then the sensor will activate and a call is
made to the number which is programmed into the software. The alarm will be on
position till there is a manual interference of the switch sw1.we can change the number
by just dialing that number in the telephone and at the next time that number will be
dialed when an alert is activated. Thus the Auto- Dialer system works as per the
requirement.

45
3 SOFTWARE DESCRIPTION

1. Click on the Keil uVision Icon on Desktop


2. The following fig will appear

3. Click on the Project menu from the title bar


4. Then Click on New Project

46
5. Save the Project by typing suitable project name with no extension in your
own folder sited in either C:\ or D:\

6. Then Click on Save button above.


7. Select the component for u r project. i.e. Atmel……
8. Click on the + Symbol beside of Atmel

47
9. Select AT89C51 as shown below

10. Then Click on “OK”


11. The Following fig will appear

48
12. Then Click either YES or NO………mostly “NO”
13. Now your project is ready to USE
14. Now double click on the Target1, you would get another option “Source
group 1” as shown in next page.

15. Click on the file option from menu bar and select “new”

49
16. The next screen will be as shown in next page, and just maximize it by double
clicking on its blue boarder.

17. Now start writing program in either in “C” or “ASM”


18. For a program written in Assembly, then save it with extension “. asm” and
for “C” based program save it with extension “ .C”

50
19. Now right click on Source group 1 and click on “Add files to Group Source”

20. Now you will get another window, on which by default “C” files will appear .

21. Now select as per your file extension given while saving the file

51
22. Click only one time on option “ADD”
23. Now Press function key F7 to compile. Any error will appear if so happen.

24. If the file contains no error, then press Control+F5 simultaneously.


25. The new window is as follows

26. Then Click “OK”

52
27. Now Click on the Peripherals from menu bar, and check your required port as
shown in fig below

28. Drag the port a side and click in the program file.

29. Now keep Pressing function key “F11” slowly and observe.
30. You are running your program successfully.

53
APPENDIX 1
SOURCE CODE

;*************************************************************

;***** INDUSTRIAL SECURITY SYSTEM WITH AUTO DIALER*****

;*************************************************************

; SECURITY SYSTEM

; p1 to sensors (normally closed)

; p2 LCD DISPLAY

; p3.6 for entry delay

; p3.7 for exit delay

; p3.4 for buzzer

; p0.0 for MAIN DOOR (NORMALLY OPEN)

; p2.6 for phone hook up RELAY

; p2.7 for redial RELAY

ORG 00H

MOV P1,#3CH

SETB P3.5 ;KEY

BEGIN: MOV P0,#0FFH

SETB P3.7 ;EXIT DELAY LCD OFF

54
SETB P3.6 ;ENTRY DELAY LCD OFF

CLR P3.4 ;BUZZER OFF

CLR P2.6 ;PHONE HOOK UP OFF

CLR P2.7 ;REDIAL OFF

STAY: JB P3.5,STAY ;KEY

; MOV P0,#0FFH

; SETB P3.7 ;EXIT DELAY LCD OFF

; SETB P3.6 ;ENTRY DELAY LCD OFF

; CLR P3.4 ;BUZZER OFF

; CLR P2.6 ;PHONE HOOK UP OFF

; CLR P2.7 ;REDIAL OFF

; TEST FOR SENSOR OPEN

SENSOR1: JB P1.0,EXIT

JB P1.0,LCD ON

JNB P1.1,LCD ON

JNB P1.2,LCD ON

SJMP SENSOR1

55
EXIT: MOV R4,#50

BLINK1: CPL P3.7 ;EXIT DELAY LCD


DISPLAYING

CLR P0.0

ACALL DELAY

ACALL DELAY

DJNZ R4,BLINK1

CLR P3.7 ;EXIT DELAY


LCD DISPLAY ON

; MOV P0,#0FEH

SETB P0.0

SENSOR2:JB P1.0,ENTRY

JB P1.0,LCD ON

JNB P1.1,LCD ON

JNB P1.2,LCD ON

SJMP SENSOR2

LCD DISPLAY: CLR P0.1

ACALL SIREN

LCD DISPLAY: CLR P0.2

ACALL SIREN

LCD DISPLAY: CLR P0.3

56
ACALL SIREN

ENTRY : MOV R5,#50

LCD DISPLAYING: CPL P3.6

CLR P0.0

ACALL DELAY

ACALL DELAY

DJNZ R5,BLINK2

CLR P3.6 ;ENTRY DELAY LCD DISPLAY ON

SETB P0.0

JB P3.5,REPEATE

SIREN : SETB P3.4 ;BUZZER ON

SETB P2.6 ;PHONE HOOK ON

ACALL DELAY

ACALL DELAY

ACALL DELAY

ACALL DELAY

ACALL DELAY

ACALL DELAY

ACALL DELAY

SETB P2.7 ;REDIAL ON


57
ACALL DELAY

ACALL DELAY

ACALL DELAY

ACALL DELAY

ACALL DELAY

CLR P2.7 ;REDIAL OFF

KEY : JNB P3.5,KEY

; MOV P1,#0FFH

; SETB P3.0 ;ENTRY DELAY LCD DISPLAY OFF

; SETB P3.1 ;EXIT DELAY LCD DISPLAY OFF

; SETB P3.2 ;BUZZER OFF

; SETB P3.4 ;PHONE HOOK OFF

REPEATE: LJMP BEGIN

DELAY: MOV R2, #255

HERE2: MOV R3, #255

HERE: DJNZ R3, HERE

DJNZ R2, HERE2

RET

END
58
CONCLUSION

The project “EMBEDDED INDUSTRIAL SECURITY SYSTEM WITH


AUTO-DIALER USING 89C51 MICROCONTROLLER” has been successfully
designed and tested.

It has been developed by integrating features of all the hardware components


used. Presence of every module has been reasoned out and placed carefully thus
contributing to the best working of the unit.

Secondly, using highly advanced IC’s and with the help of growing technology the
project has been successfully implemented.

59
FUTURE ENHANCEMENT

In this project, we are monitoring an industry by providing security with the help
of the sensors and whenever there is an attempt to break the security in the industry then
buzzer will be alarmed and there will be a call made to the concerned number
programmed in the software In order to extend this project in the future, we can add some
more different sensors and simultaneously a cal is processed to security officials to
intimate them. We can also provide a secret cam so that it can be recorded.

60
BIBLIOGRAPHY

The 8051 Micro Controller and Embedded


Systems

-Muhammad Ali Mazidi


Janice Gillispie Mazidi

The 8051 Micro Controller Architecture,


Programming & Applications

-Kenneth J. Ayala

Fundamentals Of Micro Processor and


Micro Computer
-B. Ram

Electronic Components
-D.V. Prasad

Mobile Tele Communications


- William C.Y. Lee

References on the Web:

www.national.com
www.atmel.com
www.microsoftsearch.com
www.geocities.com

61

You might also like