0% found this document useful (0 votes)
6 views56 pages

CPP Final

The document discusses the 'Lineman Safety Guard' project aimed at enhancing safety for linemen by using a GSM modem for remote control of electrical lines. It details the components, circuit design, and working principles of the project, which utilizes an ATMEL microcontroller and various electronic parts. The project emphasizes automation and security through advanced technology in everyday applications.

Uploaded by

Ganesh Ghumare
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views56 pages

CPP Final

The document discusses the 'Lineman Safety Guard' project aimed at enhancing safety for linemen by using a GSM modem for remote control of electrical lines. It details the components, circuit design, and working principles of the project, which utilizes an ATMEL microcontroller and various electronic parts. The project emphasizes automation and security through advanced technology in everyday applications.

Uploaded by

Ganesh Ghumare
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 56

ABSTRACT

Now a day‟s technology is running with time, it completely occupied


the life style of human beings. It is being used everywhere in our daily life to
fulfill our requirements. We are employing different sensors for different
applications sometimes we may even use same sensors differently for different
applications. We can not only increase the speed of life but also increase
security with good ideas by making use of advanced technology.

Automation is the most frequently spelled term in the field of


electronics. The hunger for automation brought many revolutions in the
existing technologies. One among the technologies which had greater
developments is GSM communications. The result of this is the GSM modem
which transmit designed systems SMS to user. After that user can control or
access further control.

1
CHAPTER PAGE
CHAPTER NAME
NO NO

1 INTRODUCTION OF ‘LINEMAN SAFETY GUARD’ 01

1.1 BLOCK DIAGRAM 02

1.2 DISCREPTION OF BLOCK DIAGRAM 03

2 CIRCUIT DIAGRAM 05

2.1 WORKING OF CIRCUIT DIAGRAM 06

3 LIST OF COMPONENT 08

4 COMPONENT AND IC DISCRIPTION 09

5 PCB DESIGNING 33

6 ADVANTAGES OF PROJECT 40

6.1 APPLICATION 41

7 RESULT 42

8 REFRANCE 43

2
 INTRODUCTION

The main aim of the project is safety for lineman (to reduce unwanted
ON-OFF of lights), as we provided switches for different lines, can be send
different code on lineman mobile number, for different operation after that
line man required to enter that code in system and system can operate the
device or line with ON- to off condition or OFF- on condition.

Project is designed with ATMEL microcontroller AT89C52 of (8051)


series, using Keil compiler software and proteus simulation software.

3
CHAPTER 1
In this chapter we are going to know about ‘LINEMAN SAFETY
GUARD’ block diagram and description of block diagram.

1. 1. BLOCK DIAGRAM

4
DESCRIPTION OF BLOCK DIAGRAM

 POWER SUPPLY :
Here microcontroller, LCD display, LED indicators, sensors and
buzzer circuit operates with DC 5V, RFID reader operates with DC12V
supply and this supply is provided by 12V step down transformer with
rectifiers and required to convert in to DC 5V by regulator.

 MICROCONTROLLER :
We used here 8051 series AT89C51 microcontroller in which, external
crystal required, reset required, it works on 3.5V to 5V it has 4-8 bit ports and
it has program memory up to 4Kb program memory and operating frequency
up to 20MHz clock frequency.

 RESET AND OSCILLATOR CIRCUIT :


Any microcontroller requires oscillation frequency for its operation it can be
internal for few microcontrollers has external also. This microcontroller
requires external oscillator frequency.
Reset circuit requires for the restart program from beginning it used when
microcontroller hangs or if we required to stop the running condition with
beginning process.

 GSM MODEM
A GSM modem is a specialized type of modem which accepts a SIM
card, and operates over a subscription to a mobile operator, just like a mobile
phone. From the mobile operator perspective, a GSM modem looks just like a
mobile phone.
GSM Modem comes in interfaces like USB, and Serial. GSM Modem
is However the main difference is that GSM Modem is wireless, while dial-
up modem is wired (telephone previously).

5
GSM is used here to interface with microcontroller and
microcontroller command to the GSM modem with AT (abbreviation of
ATtention) command set implimented in our program.

 LCD DISPLAY :
LCD stands for liquid crystal display. They come in many sizes 8x1 ,
8x2 , 10x2 , 16x1 , 16x2 , 16x4 , 20x2 , 20x4 ,24x2 , 30x2 , 32x2 , 40x2 etc.
Many multinational companies like Philips Hitachi Panasonic make their
own special kind of lcd's to be used in their products.

All the lcd's performs the same functions (display characters numbers special
characters ASCII characters etc). heir programming is also same and they all
have same 14 pins (0-13) or 16 pins (0 to 15).

6
CHAPTER 2

In this chapter we are going to study about the ‘LINEMAN SAFETY


GUARD’, ‘circuit diagram’ and ‘working of circuit diagram’

2.1. CIRCUIT DIAGRAM

7
2.2. WORKING
In this circuit microcontroller works with 11.0592MHz frequency hence
11.0592MHz xtal is used for (timer configuration), the unwanted frequency
produced is bypassed by the capacitor of 33pf capacitor. Reset pin is connected
to 10uf capacitor and resistor of 10K whenever reset requires the reset switch (2
lead push to ON switch/ micro push to switch) required to press.

LCD data pins (AD0 to AD7) are connected to the port 2.0 to 2.7 to send
the data for the LCD display. The control pins of LCD display is connected to
port 0.0, 0.1, 0.2 respectively take action as RS, RW, E. resistor of 10K are used
as pull-ups resistor, due to port0 is active low port. variable resistor of 10K is
connected to the adjust contrast of 16X2 LCD display. 10uf capacitor is used to
cancel loading effect and 0.1uf is used to bypass the unwanted spikes produced
in the circuit.

Pin 10 RXD( 3.0) and 11 TXD (3.1) are serial communication pins used
to interface with GSM. GSM has TXD pin for transmit data or commands
serially. Microcontroller works with 5V DC and GSM works with different
supply, our used modem works with 4.7V, so this difference cannot
communicate serially. To solve this problem we used level shifter IC MAX232 it
shifts voltage levels and communicate between microcontroller and RFID.
MAX232A requires external capacitor for internal operations (voltage doublers
and inverter) C9 and C10 are part of the voltage inverter circuit that creates the
negative voltage. However, C11 is part of the voltage doublers circuit.

(the proper operation of MAX232 IC relies on the correct value


capacitors connected to it. There are many versions of this IC and they all have
different requirements for the external support capacitors.)

Output of microcontroller pin 12 to 14 (3.2, 3.3,3.3 are ) connected to the


relay driver IC ULN2003 to drive 12V relay (microcontroller has low current
output can not drive relay directly) with input switches connected with 3.5, 3.6,
3.7.

8
All capacitors of 0.1uf near analog/ digital/ microcontroller Ics are
connected to reduce spikes in the circuit, spikes produced by inductive load/
sparking contacts of loads and capacitor of 1000uf/25V at regulator output is
connected for the cancel loading effect in the circuit while driving the high
current source.

Here circuit requires 5V regulated DC supply. We used here 230V to


12V-0-12V step down transformer. The output AC of transformer 12V is
rectified by centertap rectifier. Rectified output is pulsating it is pure by the
capacitor filter of 1000uf 25V. Now the out of capacitor is DC 12V-15V
according to transformer ratings, which is required to convert in 5V
regulated for microcontroller and other devices, here we have used LM7805
regulator for getting 5V regulated DC. LED RED is provided to indication of
12V unregulated DC, LED BLUE for 5V regulated DC. Microcontroller Vcc
pin40 and Gnd pin 20 are connected to that 5V regulated DC and PIN 31
(AE/) External Access input is used to enable or disallow external memory
interfacing. If there is no external memory requirement, this pin is pulled
high by connecting it to Vcc.

9
CHAPTER 3

 LIST OF COMPONENT
SR NO COMPONENT NAME QUANTITY PRISE
1 Resistor 1.8K 1 01.00
2 Resistor 1K 3 03.00
3 Resistor 10K 2 02.00
4 Resistor 4.7K 1 01.00
5 0R resistor/ jumpers 5 05=00
6 Capacitor 1000uf/25V 2 30=00
7 Capacitor 10uf/25V 1 05=00
8 Capacitor 100nf 2 10=00
9 Capacitor 33pf 2 10=00
10 IC LM7805 1 25=00
11 IC AT89C51 1 180=00
12 IC base 40 pin 1 12=00
13 RFID reader module 1 750=00
14 LCD display 16x2 1 220=00
15 Keypad 1 180=00
16 Diode 1N4007 2 04=00
17 Diode 4148 1 05=00
18 LED RED 1 02=00
19 LED BLUE 1 02=00
20 Buzzer 1 25=00
21 Relay 3 105=00
22 2-PIN C-N 3 30=00
23 3-pin C-N 1 15=00
24 Printed Circuit Board 1 1200=00
25 Crystal 1 20=00
26 Burg strip - 25=00
27 Other hardware - 800=00
28 Heat sinks - 750=00
29 Mains cord 1 25=00

10
CHAPTER 4

 COMPONENT AND DATA-SHEET

The basic component used in this project its description and function is
given bellow.

٠ Resistor
٠ Diode
٠ Capacitor
٠ Transformer
٠Data-sheet

4.1 RESISTOR
 RESISTOR MEASURMENT

Using a multi-meter to check for resistance is a much simpler task. The test
leads will be kept plugged in the same sockets as for the voltage checks, but the
selector switch will need to be turned until it points to the "horseshoe" resistance
symbol.
Touching the probes across the device whose resistance is to be measured, the meter
should properly display the resistance in ohms:

11
One very important thing to remember about measuring resistance is that it must only
be done on de-energized components! When the meter is in "resistance" mode, it uses a
small internal battery to generate a tiny current through the component to be measured.
By sensing how difficult it is to move this current through the component, the
resistance of that component can be determined and displayed. If there is any
additional source of voltage in the meter-lead-component-lead-meter loop to either aid
or oppose the resistance-measuring current produced by the meter, faulty readings will
result. In a worse-case situation, the meter may even be damaged by the external
voltage.

‣ RESISTOR CALCULATION BY COLOR CODE

Carbon-composition and carbon film resistors are too small to have the
resistance value printed on their housings. Therefore, bands of color are used to
represent the resistance value.

The first and second band represents the numerical value of the resistor, and the
color of the third band specifies the power-of-ten multiplier. The color bands are
always read from left to right starting with the side that has a band closer to the edge.
For carbon-composition and carbon film resistors, the common tolerances are 5%,
10%, and 20%, indicating that the actual value of the resistor can vary from the
nominal value by ±5%, ±10% and ±20%. If the band is gold, it specifies a 5%
tolerance; silver specifies a 10% tolerance; if no band is present, the tolerance is 20%.
12
Note that the

13
color-code system for capacitors is very similar to that of resistors except there is a
fifth band representing the temperature coefficient. This band is the first one closest to
one end of the capacitor. The other four fall into the same order as mentioned for
resistors. In this case, the second, third, and fourth bands are used to determine the
capacitance. The fifth band represents the tolerance of the capacitor. The table below
shows the color code and their associated value:

Second-band Third-band Fourth-band


Color First-band Digit Digit Multiplier Tolerance
Black 0 0 100 = 1
Brown 1 1 101 = 10 1%
Red 2 2 102 = 100 2%
Orange 3 3 103 = 3%
1000
Yellow 4 4 104 = 4%
10000
105
Green 5 5
=
10000
0
106
Blue 6 6
=
100000
0
107
Violet 7 7
=
1000000
0
108
Gray 8 8
=
10000000
0
109 =
White 9 9 10000000
00
Gold 5%
Silver 10%
None 20%

4.2 DIODE

14
There are many types of semiconductor diodes namely Selenium, Germanium
and Silicon types. Selenium type is commonly used in the early days in ac power

15
suppliers but in recent years it has been replaced by silicon type as it sometimes emit
toxic fumes when it burnt out. The characteristic is that it allows current to flow in one
direction as shown in the symbol below. It has a cathode and an anode which determine
the flow of the current. Current can only flow from anode to cathode.

Silicon V-I characteristics are shown in the figure below. The junction
barrier for silicon is about 0.7V and for Germanium is about 0.3V. It is also called
forward voltage drop. Most of the diode used today is of silicon type as they are
robust and reliable from DC to RF small signal applications.

The Peak Reverse Voltage (PIV) of silicon types is available up to 1000 volts or
more. They can also carry up to 100A DC current. In typical applications, it is
advisable to ensure that it operates within the maximum ratings specified by the
manufacturer and apply the Failure Mode and Effects Analysis to the device. The
temperature of the device is one of the more important parameter to consider. Heat
sinks may be used where they have to handle large amount of power.

16
When reverse voltage is applied, there will be a small leakage current usually
in the region of uA. Beyond this voltage, it will breakdown and will be damaged
permanently.

 TYPES OF COMMERCIAL AVAILABLE DIODE

Maximum
Maximum Reverse
Diode Current Voltage
1N4001 1A 50V
1N4007 1A 1000V
1N5401 3A 100V
1N5408 3A 1000V

4.3 ALUMINUM ELECTROLYTIC CAPACITOR


Compact but glossy, these are available in the range of <1 µF to 1 F with
working voltages up to several hundred volts DC. The dielectric is a thin layer of
aluminum oxide. They contain corrosive liquid and can burst if the device is connected
backwards. The oxide insulating layer will tend to deteriorate in the absence of a
sufficient rejuvenating voltage, and eventually the capacitor will lose its ability to
withstand voltage if voltage is not applied. A capacitor to which this has happened can
often be "reformed" by connecting it to a voltage source through a resistor and
allowing the resulting current to slowly restore the oxide layer. Bipolar electrolytic
(also called Non-Polarized or NP capacitors) contain two capacitors connected in series
opposition and are used when the DC bias voltage must occasionally reverse. Bad
frequency and temperature characteristics make them unsuited for high-frequency
applications.
Typical values are a few nf to fared.

17
A capacitor or condenser is a passive electronic component consisting of a pair
of condenser separated by a dielectric. When a voltage potential difference exists
between the conductors, an electric field is present in the dielectric. This field stores
energy and produces a mechanical force between the plates. The effect is greatest
between wide, flat, parallel, narrowly separated conductors.

The applications of capacitor are energy storage, power factor correction,


signal coupling, noise filters, and motor starters.

4.4 TRANSFORMER
 BASIC PRINCILE

The transformer is based on two principles: firstly, that an electric current can
produce a magnetic field (electromagnetism) and secondly that a changing magnetic
field within a coil of wire induces a voltage across the ends of the coil (electromagnetic
induction). Changing the current in the primary coil changes the magnetic flux that is
developed. The changing magnetic flux induces a voltage in the secondary coil.

 AN IDEAL TRANSFORMER

An ideal transformer is shown in the adjacent figure. Current passing through


the primary coil creates a magnetic field. The primary and secondary coils are
wrapped around a core of very high magnetic permeability, such as iron, so that most
of the magnetic flux passes through both primary and secondary coils.

 EFFECT OF FREQUENCY
The time-derivative term in Faraday's Law shows that the flux in the core is the
integral with respect to time of the applied voltage. Hypothetically an ideal
transformer would work with direct-current excitation, with the core flux increasing
linearly with time. In practice, the flux would rise to the point where magnetic
saturation of the core occurs, causing a huge increase in the magnetizing current and
overheating the

18
transformer. All practical transformers must therefore operate with alternating
(or pulsed) current.

 VOLTAGE AND CURRENT MEASURMENT ON DMM

A millimeter or a multicenter, also known as a VOM (Volt-Ohm meter), is an


electronic measuring instrument that combines several measurement functions in one
unit. A typical millimeter would include basic features such as the ability to measure
voltage, current, and resistance. Analog millimeters use a micro ammeter whose pointer
moves over a scale calibrated for all the different measurements that can be made.
Digital millimeters (DMM, DVOM) display the measured value in numerals, and may
also display a bar of a length proportional to the quantity being measured. Digital
millimeters are now far more common than analog ones, but analog millimeters are still
preferable in some cases, for example when monitoring a rapidly-varying value.

A millimeter can be a hand-held device useful for basic fault finding and field
service work, or a bench instrument which can measure to a very high degree of
accuracy. They can be used to troubleshoot electrical problems in a wide array of
industrial and household devices such as electronic equipment, motor controls,
domestic appliances, power supplies, and wiring systems.

19
⁕LM78XX 3-TERMINAL 1A POSITIVE
VOLTAGE REGULATOR

 FEATURES

 Output Current up to 1A
 Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24V
 Thermal Overload Protection
 Short Circuit Protection
 Output Transistor Safe Operating Area Protection

 DESCRIPTION

The MC78XX/LM78XX/MC78XXA series of three terminal positive regulators


are available in the TO-220/D-PAK package and with several fixed output voltages,
making them useful in a wide range of applications. Each type employs internal current
limiting, thermal shut down and safe operating area protection, making it essentially
indestructible. If adequate heat sinking is provided, they can deliver over 1A output
current. Although designed primarily as fixed voltage regulators, these devices can be
used with external components to obtain adjustable voltages and currents.

Fig.voltage regulator IC

20
 INTERNAL BLOCK DIAGRAM

 ABSOLUTE MAXIMUM RATINGS

Parameter Symbol Value Unit


Input Voltage (for VO = 5V to 18V) 35
(for VO VI
40 VV
= 24V) VI

Thermal Resistance Junction-Cases (TO-220) 5 OC/W
X

Thermal Resistance Junction-Air (TO-220) 65 OC/W
A
TO 0~
Operating Temperature Range OC
PR +125

Storage Temperature Range TS -65


TG ~ +150 OC

21
 TYPICAL APPLICATIONS

 Notes:
1) To specify an output voltage. Substitute voltage value for "XX." A
common ground is required between the input and the Output voltage. The input
voltage must remain typically 2.0V above the output voltage even during the low
point on the input ripple voltage.

2) CI is required if regulator is located an appreciable distance from


power Supply filter.

3) CO improves stability and transient response.

 NEGATIVE OUT PUT VOLTAGE CIRCUIT

22
 AT89C51

AT89C51 is an 8-bit microcontroller and belongs to Atmel's 8051 family.


ATMEL 89C51 has 4KB of Flash programmable and erasable read only memory
(PEROM) and 128 bytes of RAM. It can be erased and program to a maximum of
1000 times.

AT89C51 from Atmel Corporation – Atmel fabricated the flash ROM version of
8051 which is popularly known as AT89C51 („C‟ in the part number indicates CMOS).
The flash memory can erase the contents within seconds which is best for fast growth.
Therefore, 8751 is replaced by AT89C51 to eradicate the waiting time required to erase
the contents and hence expedite the development time. To build up a microcontroller
based system using AT89C51, it is essential to have ROM burner that supports flash
memory. Note that in Flash memory, entire contents must be erased to program it again.
The contents are erased by the ROM burner. Atmel is working on a newer version of
AT89C51 that can be programmed using the serial COM port of IBM PC in order to get
rid of the ROM burner.

23
Part ROM RAM I/O Timer Interrupt Vcc Packaging
Number pins
AT89C51 4K 128 32 2 6 5V 40
AT89C52 8K 256 32 3 8 5V 40
AT89C1051 1K 64 15 1 3 3V 20
AT89C2051 2K 128 32 3 8 3V 20
AT89LV51 4K 128 32 2 6 3V 40
AT89LV52 8K 128 32 3 8 3V 40
Table 1.2 – Versions of 8951 from Atmel (All ROM Flash)

There are different versions of packaging and various speed of the products
mentioned in the above table.
Part Number Speed Pins Packaging Use
AT89C51- 12MHz 40 DIP Plastic Commercial
12PC
AT89C51- 16MHz 40 DIP Plastic Commercial
16PC
AT89C51- 20MHz 40 DIP Plastic Commercial
20PC
Table 1.3 – Various Speeds of 8051 from Atmel

In 40 pin AT89C51, there are four ports designated as P1, P2, P3 and P0. All

these ports are 8-bit bi-directional ports, i.e., they can be used as both input and output

ports. Except P0 which needs external pull-ups, rest of the ports have internal pull-ups.

When 1s are written to these port pins, they are pulled high by the internal pull-ups and

can be used as inputs. These ports are also bit addressable and so their bits can also be

accessed individually.

Port P0 and P2 are also used to provide low byte and high byte addresses,
respectively, when connected to an external memory. Port 3 has multiplexed pins for
special functions like serial communication, hardware interrupts, timer inputs and
read/write operation from external memory. AT89C51 has an inbuilt UART for serial

24
communication. It can be programmed to operate at different baud rates. Including
two timers & hardware interrupts, it has a total of six interrupts.

 Features

Compatible with MCS-51 Products

4 Kbytes of In-System Reprogrammable Flash Memory. Endurance 1,000


Write/Erase Cycles

Fully Static Operation: 0 Hz to 24 MHz, Three-Level Program Memory Lock

128 x 8-Bit Internal RAM

32 Programmable I/O Lines

Two 16-Bit Timer/Counters

Six Interrupt Sources

Programmable Serial

Channel

Low Power Idle and Power down Modes

25
 PIN DIAGRAM :

26
Pin No Function Name

1 P1.0
2 P1.1
3 P1.2
4 P1.3
5 8 bit input/output port (P1) pins P1.4
6 P1.5
7 P1.6
8 P1.7

9 Reset pin; Active high Reset


Input (receiver) for serial
10 RxD P3.0
communication
Output (transmitter) for serial
11 TxD P3.1
communication
12 External interrupt 1 Int0 8 bit P3.2
13 External interrupt 2 Int1 input/output P3.3
14 Timer1 external input T0 port (P3) pins P3.4
15 Timer2 external input T1 P3.5
16 Write to external data memory Write P3.6
17 Read from external data memory Read P3.7

18 Quartz crystal oscillator (up to 24 MHz) Crystal 2


19 Crystal 1

20 Ground (0V) Ground


21 P2.0/ A8
22 P2.1/ A9
23 8 bit input/output port (P2) pins P2.2/ A10
24 / P2.3/ A11
25 High-order address bits when interfacing with external P2.4/ A12
26 memory P2.5/ A13
27 P2.6/ A14
28 P2.7/ A15
29 Program store enable; Read from external program memory PSEN

30 Address Latch Enable ALE

27
Program pulse input during Flash programming Prog

External Access Enable; Vcc for internal program


EA
executions
31
Programming enable voltage; 12V (during Flash
Vpp
programming)

32 P0.7/ AD7
33 P0.6/ AD6
34 8 bit input/output port (P0) pins P0.5/ AD5
35 P0.4/ AD4
36 Low-order address bits when interfacing with P0.3/ AD3
37 external memory P0.2/ AD2
38 P0.1/ AD1
39 P0.0/ AD0

40 Supply voltage; 5V (up to 6.6V) Vcc

28
INTERNAL ARCHITECTURE

29
PIN DESCRIPTION
⁕VCC Supply voltage (3.5V to 5V).

⁕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. When 1s are written to port 0 pins, the pins can
be used as high-impedance 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 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 bidirectional 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 memory that uses 16-bit
addresses (MOVX @ DPTR). In this application it uses strong internal pull-ups when
emitting 1s. During accesses to external data memory that uses 8-bit addresses (MOVX

30
@ RI), Port 2 emits the contents of the P2 Special Function Register. Port 2 also
receives the high-order address bits and some control signals during Flash
programming and verification.

⁕Port 3: Port 3 is an 8-bit bidirectional I/O port with internal pullups. 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 pullups and can be used as inputs. As inputs,
Port 3 pins that are externally being pulled low will source current (IIL) because of the
pullups. 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.

 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,

31
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.

 PSEN

Program Store Enable is the read strobe to external program memory. When
the AT89C51 is executing code from external program memory, PSEN is ctivated
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 beinternally 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.

 XTAL1

Input to the inverting oscillator amplifier and input to the internal


clock operating circuit.

 XTAL2

Output from the inverting oscillator amplifier.

 Power Down Mode

In the power down mode the oscillator is stopped, and the instruction that
invokes power down is the last instruction executed. The on-chip RAM and Special
Function Registers retain their values until the power down mode is terminated. The

32
only exit from power down is a hardware reset. Reset redefines the SFRs but does not
change the on chip RAM. The reset should not be activated before VCC is restored to
its normal operating level and must be held active long enough to allow the oscillator to
restart and stabilize.

 CRYSTAL OSCILLATOR

A crystal oscillator is an electronic oscillator circuit that uses the


mechanical resonance of a vibrating crystal of piezoelectric material to create an
electrical signal with a very precise frequency. This frequency is commonly
used to keep track of time (as in quartz wristwatches), to provide a stable clock
signal for digital integrated circuits, and to stabilize frequencies for radio
transmitters and receivers. The most common type of piezoelectric resonator
used is the quartz crystal, so oscillator circuits incorporating them became
known as crystal oscillators, but other piezoelectric materials including
polycrystalline ceramics are used in similar circuits.

Quartz crystals are manufactured for frequencies from a few tens of


kilohertz to hundreds of megahertz. More than two billion crystals are
manufactured annually. Most are used for consumer devices such as
wristwatches, clocks, radios, computers, and cell-phones. Quartz crystals are
also found inside test and measurement equipment, such as counters, signal
generators, and oscilloscopes.

Ceramic caps with crystal act as loading capacitor for oscillator. Usually
they are used for adjusting the crystal frequency. Crystal oscillator vendors

33
specify the value of loading caps to be used along with oscillator to give the
perfect frequency. If we check a crystal alone on an oscilloscope you will find
that frequency is little higher than that of what is specified, so loading caps shift
this frequency to a lower value normally the required value.
 LCD 16 x 2 DISPLAY

LCD (Liquid Crystal Display) screen is an electronic display module


and find a wide range of applications. A 16x2 LCD display is very basic module
and is very commonly used in various devices and circuits. These modules are
preferred over seven segments and other multi segment LEDs. The reasons
being: LCDs are economical; easily programmable; have no limitation of
displaying special & even custom characters (unlike in seven segments),
animations and so on.

A 16x2 LCD means it can display 16 characters per line and there are 2
such lines. In this LCD each character is displayed in 5x7 pixel matrix. This
LCD has two registers, namely, Command and Data.

The command register stores the command instructions given to the


LCD. A command is an instruction given to LCD to do a predefined task like
initializing it, clearing its screen, setting the cursor position, controlling display
etc. The data register stores the data to be displayed on the LCD. The data is the
ASCII value of the character to be displayed on the LCD. Click to learn more
about internal structure of a LCD.
Pin Diagram:

34
 Pin Description:

Pin
Function Name
No
1 Ground (0V) Ground

2 Supply voltage; 5V (4.7V – 5.3V) Vcc

3 Contrast adjustment; through a variable resistor VEE

4 Selects command register when low; and data register when Register Select
high
5 Low to write to the register; High to read from the register Read/write

6 Sends data to data pins when a high to low pulse is given Enable

7 DB0

8 DB1

9 DB2

10 DB3

11 8-bit data pins DB4

12 DB5

13 DB6

14 DB7

15 Backlight VCC (5V) Led+

16 Backlight Ground (0V) Led-

35
4x3 KEYPAD

Keypads are collection of push switches however arranged in the form of a matrix. So
there are rows And columns of switches.The two connections of A switch are also
connected in the matrix, so that The row has common connection and column has A
common connection. Thus when a button is Pressed a row and a column,where the
button is Pressed gets connected internally . The keypads Are usually available as
telephone type 3X4 keypad . This one has three columns and 4rows,or a 4 x 4 keypad
having 4 rows and 4 columns.

36
 M95 QUAD BAND GSM/GPRS MODEM-RS232 INTERFACE

M95 module is one of the smallest Quad-band 850/900/1800/1900 GSM/GPRS


surface mounted modules in the world. With LCC package technology, M95 provides
the ultra tiny configuration of 19.9 × 23.6 × 2.6 mm and can be embedded in customer
applications, offering the highest reliability and robustness.

Featuring an industry-standard interface, M95 delivers GSM/GPRS


performance for Data, Voice, and SMS with extremely low power consumption,
extended temperature and compact profile. With extremely compact size and integrated
protocols, M95 can almost meet all the M2M requirements, including VTS, Personal
Tracking, Wireless POS, Smart Metering, Industrial PDA and many other M2M
applications.

 Quad-band GSM/GPRS module with a size of 19.9 × 23.6 × 2.6 mm


 SMD type suits for customer application
 Embedded powerful Internet service protocols, multiple Sockets & IP ad-
dresses
 Based on mature and field-proven platform, backed up by our support service,
from definition to design and pro-duction

 Interfaces
1. External P.S :9VDC/AC to 12VDC/AC Voltage with 2Ah current
2. UART Interface: 2 interfaces

37
3. Analog Audio Interface: 2 inputs, 2 ouputsEmbedded Class-AB
amplifier
4. RTC Backup
5. Antenna Pad

 General Features

1. Quad-Band:850/900/1800/1900 MHz
2. GPRS Multi-slot Class:12, 1~12 configurable
3. GPRS Mobile Station:Class B
4. Compliant with GSM Phase 2/2+:Class 4 (2W @850/900 MHz)Class
1 (1W @1800/1900MHz
5. Supply Voltage Range:3.3~4.6 V 4.0V nominal
6. Low Power Consumption:TBD
7. Operation Temperature:-40 °C ~ +85
°C 8. Dimensions:19.9×23.6×2.6mm
9. Weight:Approx 3g
10. Control via AT commands (GSM 07.07 ,07.05 and other enhanced
AT Commands)

 Specifications for Data

1. GPRS Class 12Max. 85.6 kbps (uplink & downlink)


2. PBCCH Support
3. Coding SchemesCS 1, 2, 3, 4
4. CSDUp to 14.4 kbps
5. USSD
6. Non Transparent Mode
7. ProtocolsPPP, TCP, UDP, FTP, HTTP, MUX

 Specifications for SMS

1. Point-to-point MO and MT
2. SMS Cell Broadcast
3. Text and PDU Mode

 Specifications for Voice

1. Speech Codec Modes:Half Rate (HR)Full Rate (FR)Enhanced Full


Rate (EFR)Adaptive Multi-Rate (AMR)
2. Echo Arithmetic:Echo CancellationEcho SuppressionNoise Reduction
3. Hands-free Operation

38
 HOW TO USE KEIL

Finally you have decided to write your own code for the 8051 microcontroller.
It doesn't matter whether you have chosen Assembly or C Language for yourself but
what matters now is that you need an environment specially designed for 8051.
Basically you are looking out for IDE (Integrated Development Environment) that will
help you build and compile programs. While there are many options out there, I
prefer KEIL uVision in this regard.

KEIL IDE is basically an assembler and a compiler or whatever you name


it. You can write either an Assembly or C language code and KEIL will take care of the
rest for you. Furthermore, it supports many of the 8051 variants that you will face. You
can download KEIL from their official website using the link below.

Here we go

39
Create a new folder for project to avoid getting mixed up with files

PROJECT > NEW uVISION PROJECT

40
Give some name and click SAVE

when prompted, select proper device that you're using ( i-e ATMEL >
AT89C51 )

41
When prompted, select YES

Click NEW button and write your code (Assembly or C language)

42
SAVE the file with proper extension as above

The code you have written gets highlighted

43
Right click SOURCE GROUP 1 as shown

Add the code you have written into the Project workspace

44
Go to options for the project

Enable HEX file generation

45
Build the project

Notice successful build. Ignore the warnings

46
Use this HEX file to program your IC

These are the simple steps for a successful compilation and generation of HEX
file. Now I hope you have created your first HEX file and ready to program it to the
8051. And you know how to do that, right? If your answer is no then please check this
out.

47
CHAPTER 5

In this chapter we are going to study about PCB (printed circuit board). To
making PCB following procedure should know.

 Bottom layout of the circuit


 Top layout of the circuit
 PCB designing procedure

5.1 PCB DESIGNING


 THERE ARE TWO TYPES OF PCB MAKING
1) Photo printing.
2) Screen printing.

 SCREEN PRINTING

PCB production by photo printing method is expensive, through accurate. The


screen process uses a resist ink applied through a stencil or mask to the surface of the
blank circuit board. The stencil is produced and attached to a fine mesh, metal, nylon,
polyester or silk screen. The resist ink is forced through openings in the stencil onto the
surface of the blank board. This process produces a positive of the circuit on the copper
foil. When dry the board is ready for etching.

 PREPARATION OF SCREEN
A light rectangular wooden frame is used for this purpose. A piece of screen
fabric material is stretched tightly over the frame. Commercial screens are often made
of a fine wire mesh. Special frames are available in the market to hold this screen. The
frame is hinged on one end of the base of printing board. This base of the printing
board is larger in area than the frame. The following equipments are used for screen
printing process.

48
1. Photosensitive film.
2. Developer.
3. Blackout solution.
4. A rubber squeeze.
5. The resist paint or ink.

A pre-sensitized film is used to make the screen stencil. A major source of this
material and relater screen process suppliers is the Ulano Company (USA) and wood
peck industries (Bombay‟ India).

The exposure process is very similar to that used to make photographic


negative. A black sheet of paper is placed on the exposure board. A piece of film larger
than the circuit board is placed film-side down (plastic backing side up) on the top of
the paper. The art work is placed on the top of film. They are all held in place with a
piece of untainted glass. Exposure is about 8 minutes using a number two photoflood
lamp. The lamp should be about 18 inch above the film and glass. After exposure, the
film is put in a tray of developing solution for about 90 seconds. Only the developer
available from the above companies should be used. Screen preparation chemicals are
also available from lunar caustic Pvt. Ltd., pune; Raman industries, Bombay. It is sold
in two packages identified as Hi-Fi A and B developer. The direction states that the
temperature of the developing solution should be between 40ºC and 46 ºC, but the film
in the tray emulsion-side up. The developing solution is not light sensitive as it is
prepared from light. The developer life is 24 hours. After that, it becomes useless, fresh
developer is required. The tray holding the film and developer must be oriented during
development.

After the required time, the film is removed from the tray of developing
solution. It is washed in running warm water. Placing the soft side down on the bath
may run the work. The purpose of this process is to wash out the film and remove areas
which will permute the ink to be printed on to the blank circuit board. The wash out
water should flow over the stencil. This will wash away the unexposed emulation on
the film. Use gentle water flow; otherwise it will damage the film. This process requires
several minutes to complete. After the wash out is finished, the film has to cooled. This
will firm the screen stencil. Return the film to flat surface. The glass used to hold the

49
film during the rinse process is convenient, but any solid flat surface can be used. The
stencil film is attached to the screen. In order to archives good adhesion, the film stencil
must be held on the flat surface and must be raised up higher than the surface you are
working on. Use a hard build up of about 1/2”. Gently lower the screen and frame onto
the film. The weight of frame is sufficient to press the screen material onto the soft film
emulsion.

Place a pad of unused newsprint on top of the screen. Gently wipe the newsprint
with a soft cloth. This will make the soft emulsion work up onto the screen. Don‟t
apply pressure; change the newsprint until it no longer shows any green film color. Do
not use printed paper for the pad. Only clean newsprint will work successfully. Once
the moisture is removed by this method, the screen is set aside to dry. This required
about one hour of time. When the emulsion is dry, the backing material is carefully
peeled off the film. The result is negative mask, attached to the screen. Check the
screen again for leaks in areas which should be protected. Hold it under a strong light.
Tough up with a small paint brush and block out material thinned with water.

 PRINTING BASE PREPARATION


We have now a screen to which a stencil is attached. Areas, which are to appear
on the board as conductor or pads are clear. There is no blackout on the screen in these
places. The next step is to prepare printing base.

The blank board is placed on the printing frame in exactly the same place each
time. The registration guides are used to ensure good registration. Pieces of cardboard
or scrap circuit board are tacked in place on the base board. The registration guides are
placed on three sides of the area, surrounding the blank board. Sometimes a small piece
of double sided tape is placed in the center to hold the board in place.
The screen frame is held to the printing board base with two hinges. Using a
hinge with a removable pin will make cleaning easier.

Now, for actually printing, the resist on PC board, place a clean blank board,
copper side up in the registration area of the base. Lower the screen and frame so that
the screen resets firmly on the copper foil. Pour some of the resist ink or paint on the
screen in one of the blocked out areas. Take a rubber squeeze, preferably the kind used

50
for screen printing, and pull the ink over the negative part of the screen. A piece of stiff
cardboard may be substituted for the squeeze. Continue pass over the negative in to a
block out area. One pass of the ink over the negative part of the screen should do if you
have used enough ink. Gently lift the screen frame. The board with resist pattern on the
circuit should be seen in all its glory. Carefully left the board from the registration area
on the base. Set it aside to dry, the board is ready for etching when the ink on it is dry.
There are several different kinds of ink resists available. Some use a water based ink,
and other use a lacquer or oil base. Oil base ink is much slow drying than lacquer based
ink. This means that the clean up may be delayed with oil based products. On the other
hand, lacquer based ink dries faster and thus speed up the overall processing time of the
board. The next step is to clean the board and send it for etching.

 ETCHING THE BOARD


All the work done so far has been to prepare a blank copper board for etching.
Thematically, any one of the following solution is used to etch a board.

1. Ammonium parasulphite.
2. Chromic acid.
3. Cupric chloride.
4. Ferric chloride.

The most common etchant used in industry is ferric chloride (Fecl3). It is cheap
chemical and lest dangerous and easily available in market. Never use kitchen utensils
for holding etching solution. Etching is the process of attacking and removing the
unprotected copper from the PC board to yield the desired conductor pattern.

Methods of etching include tray rocking, tank etching and spray etching. Out of
these, tray rocking is the simplest one. This consists of a tray of pirex glass, attached to
a powered rocking table. If powered rocking table is not available, then the PC board is
kept on the glass marbles which are kept in the tray along with the etchant solution. Dry
etchants are available liquid etchants are available. Ferric chloride crystals of 500gm
are mixed in water to make total solution of 1 liter. During the etching process, the
concentration weakens because the soluble cupric and ferric ions precipitate out of the
solution, in the form of sludge that tends to settle on the bottom of the etching vat.

51
Ideal etching condition requires that the etchant be heated to a temperature of
between 60º to 70 º C. with the temperature maintained reasonably constant, the length
of time required for etching will be consistent.

 DRILLING OPERATION

The PCB gives the holes to take the various components that will be mounted
on it. With greatest precision, these holes must be drilled.

In industry, depending on production volumes, manual, semi – automatic or


pneumatically – controlled drilling equipments are used.

A whole stack of boards can be drilled using various jigs and bushes. The speed
of drill is an important consideration with maintaining the size and location of holes
with required tolerances and minimizing deformity at their edges.

For paper laminates, high speed steel can be used at 8000rpm or less.
For epoxy – glass laminates, it uses tungsten carbide bit at about 15,000 rpm.
For high precision, the drill is at 1, 00,000 rpm.
If accuracy is not important, jigs are used to punch all holes in PCB.
When holes are drilled in a PCB, the laminate is uncovered in PTH.

To provide a conducting layer within the holes, electrode less copper platting is
used. The plate is coated with palladium and immersed in an electrolyte containing
copper ions.

52
5.2 TOP SIDED LAYOUT

5.2 BOTTOM SIDED LAYOUT

53
CHAPTER 6

In this chapter we are going to indicate the advantages and application of


‘LINEMAN SAFETY GUARD’.

6.1 ADVNTAGES

 The circuit required power supply is very less. (12V, 500mAh)

 The component required for this hard ware is easily available in

market, and well in rate.

 The circuit is compact in size, so small space is required.

 The circuit works with real time application also for forming to

control different lines and supply.

6.2 APPLICTIONS
 Main application of the circuit is as safety guard for lineman.

 Used in security system also to control secured access.

 It can be used in automation systems also with


messaging system.

54
CHAPTER 7
 RESULT

Thus our group actively coupled with project, and we develop this
project named as “LINEMAN SAFETY GUARD”.

In this project we used switch panel to operate line with SMS, as we


can press switch-1 system send code to linemans mobile no, lineman
required to enter password and line is operate, no one can on/off the line
without code.

55
CHAPTER 8

 REFRANCE

1]. Basic electrical engineering by Kothari and nagrath.

2]. Basic electronics engineering by R.S.shedha.

3]. Basic Electrical and Electronics Engineering by R.K. rajput.

4]. Electronic for you by magazine.

5]. www.alldatasheet.com by For Components Data sheet.

6]. Switchgear and protection and power system, BySunil S.Rao,

Khanna Publisher,New Delhi,2008

7].

56

You might also like