You are on page 1of 49

CONTENTS

Chapter No.

TITLE

Page no.

List of Abbreviations

List of Figures

ii

List of Tables
1

INTRODUCTION
Introduction

1.2

Problem Definition

1.3

Market Survey

BLOCK DIAGRAM
Block Diagram

2.2

Block Diagram Description

HARDWARE DESIGN

3.1

Circuit Diagram

3.2

Circuit Description

3.3

Selection of components

SOFTWARE

4.1

Algorithm

4.2

Flow Chart

10

4.3

Code

11

SIMULATION

PCB DESIGN

2.1
3

1.1

iii

12
14

6.1

PCB Design Steps

15

6.2

PCB Layout

16

TESTING
APPLICATION & FUTURE SCOPE

17
18

BILL OF MATERIAL

19

BIBILOGRAPHY

20

CHAPTER 1

1.1 INTRODUCTION:
Specific objectives of the process control is to increased product throughput,
Increase yield of higher valued products, Decrease energy consumption, Decrease pollution,
Decrease off-spec product, Increase Safety, Extend life of equipment, Improve Operability,
Decrease production labor.
First task in the implementation of modern control is to obtain a model of the process to
be controlled. However, given that there are constraints on process operations; that all models
will contain some degree of error and that all models may not be invertible, perfect control is
very difficult to realize. These are the issues that modern control techniques aim to address,
either directly or indirectly.
In era of automation and control, we expect many things to be done automatically. For
this purpose there is desperate need of something that can store the data, process it and give the
output accordingly, as well as ease of handling, whatever environmental conditions of the
industry. It not only saves money but also time by reducing human errors.
It is also well known that any improvement in the performance of control strategies will
result in more consistent production, facilitating process optimization, hence less re-processing
of products and less waste.

1.2 Problem Definition


AIM
The main theme of the project is to build a generic interface device that can be used in
industries for a vast array of applications.
DOMAIN
Process Control
Industrial Automation
CONCEPT
Build a Visual c based software program that can interface with the GPID board no
matter what the environment (e.g. Chemical Plant, Paper Pulp Industries, Motor Control,
Robotics etc.)

CHAPTER 2
BLOCK DIAGRAM:

Micro
Controller
89V51

Computer

RS 232

DC
MOTOR
Stepper
Motor
CFL
TUBE

MAX 232

FAN

Power Supply Unit

Fig. 2.1 Block Diagram

2.1 Block Diagram Description:


The system consists of three sections. The first PCB contains power supply, The second
PCB contains RS 232 protocol. The third PCB contains microcontroller. The, fourth PCB
consists of Relay circuitry.
When the power is ON initially, all ICs & relays get resets.
Once any Button is pressed by user through pcc control device window(GUI), PC will send
command to Microcontroller with the help of standard serial communication protocol(RS 232).
And through microcontroller relay operation take place & according that home appliance works.

1) Computer: We have used computer in order to give commands to the system with
the help of RS 232 protocol commands will be given through special GUI (Graphical
User Interface)
2) RS 232 Protocol: It has been used in order to do serial communication with for
this we have used MAX 232 as level converter
3) MICRO-CONTROLLER (8051): This is the most important segment of the
project. The controller is responsible for detection and polling of the peripherals
status. It is responsible for making. It is responsible for prioritizing all the devices
attached to it.
WE have used the P89V51RD2 microcontroller. The P89V51RD2 is a low-power,
high-performance CMOS 4-bit microcontroller with 64K bytes of in-system
programmable Flash memory. It has got 32 I/O lines two data pointers, two 16-bit
timer/counters, six-vector two-level interrupt architecture, a full duplex serial port,
on-chip oscillator, and a clock circuitry
5) Light: We have used LED s in order to represent lamp in the normal day to day
life.

6) RELAY: We have used relay. It will perform the function of switch; it can be used
in various applications.
7) Power Supply: There are many types of power supply. Most are designed to
convert high voltage AC mains electricity to a suitable DC voltage supply for
electronics circuits and other devices. We have used 5 Volt power supply in this
system.

CHAPTER 3
HARDARE DESIGN
3.1 SELECTION OF COMPONENTS:
Specification of Components used:
Microcontroller P89V51RD2:
Features

64 KB of on-chip flash program memory with ISP (In-System Programming) &


IAP (In-Application Programming).

5V operating voltage from 0 to 40 MHz

SPI (Serial Peripheral interface) & Enhanced UART

1 KB RAM

32 I/O lines

Programmable counter array

Eight interrupt sources with four priority levels

Four 8-bit I/O ports

Low EMI mode (ALE inhibit)

In System Application Three 16-bit Timer/Counter Accumulator

ARCHITECTURE OF 89V51:
Accumulator:
ACC is the accumulator register. It is an 8 bit register. It is most versatile and holds sources
operand and receives the result of arithmetic operations including addition, subtraction, integer
multiplication, division and Boolean bit manipulations.
It is also used for data transfer between 8051 and any external memory. Several functions like
rotate, test etc. apply specifically on the accumulator.
B Register:
The B register is used with the A register for multiplication and division

operations. For other

instructions it is treated as a scratch pad register (i.e. it is has no other function other than as a
location where data can be stored.)
Arithmetic and Logic Unit (ALU):
The ALU can perform arithmetic and logic operations on eight bit data. It can
arithmetic operations like addition, subtraction, multiplication,

division

perform
and

logical

operations like AND, OR, EX OR, complement, rotate etc.


Program Status Word (PSW) and Flags:
Many instructions affect the status of flags. In order to address these flags conveniently they are
grouped to from the program status word.
PSW contain Carry flag ( CY) , Auxiliary carry flag ( AC ), User defined Flag 0

(F0 ) , register

bank selections flag (RS0,RS1) Overflow flag( OV ) Parity flag (p) .


Flags are 1 bit registers provided to store the results of some instructions. A Flag is a flip flop
that indicates some condition produced by the execution of an
Clock and Oscillator:

instruction.

The oscillator circuit that generates the clock pulses so that all the internal operations

are

synchronized is the heart of the microcontroller.


The pins XTAL 1 and XTAL 2 are provided to connect a resonating network comprising of a
crystal and capacitors to from an oscillator. Normally

quartz crystal

is

used.

The

capacitors are used in order to stabilize the network.4


RST:
Reset input. A high on his pin two machine cycles while the oscillator is running resets the
device. This pin drives high for 98 oscillator periods after the Watchdog times out. The
DISRTO bit in SFR AUXR (address 8 EH) can be used to disable this feature. In the default
state of bit DISRTO, the RESET HIGH out feature is enabled.

ALE / PROG:
Address Latch Enable ( ALE ) is an 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.
PSEN:
Program Store Enable (PSEN) is the read strobe to external Program memory.
Program Counter ( PC ):
It is a 16 bit register. It is used to hold the address of a byte in the memory.It keeps the track of
the execution of the program. The program instruction bytes are fetched from locations in
memory that are addressed by the Program counter.
Data Pointer ( DPTR ):
The data Pointer is a bit register. It is used to hold the address of a byte in the memory.

The DPTR register can be accessed separately as lower eight bits ( DPL ) and higher eight bits
( DPH ) . It can be used as a 16 bit data register or two independent 8 bit registers.
The Stack and Stack Pointer:
The stack is a reserved area of the memory in RAM where temporary information may be stored.
An 8 bit stack Pointer is used to hold the address of the most recent stack entry. This location
which has the most recent entry is called as the top of the stack.
Special Function Registers:
A map of the on-chip memory area called the Special Function Register (SFR) space is shown in
Table 5-1. Note that not all of the addresses are occupied, and unoccupied addresses may not be
implemented on the chip. Read accesses to these addresses will in general return random data,
and write accesses will have an indeterminate effect. User software should not write 1s to these
unlisted locations, since they may be used in future products to invoke new features. In that case,
the reset or inactive values of the new bits will always be 0.
Timer 2 Registers: Control and status bits are contained in registers T2CON (shown in Table 52) and T2MOD (shown in Table 10-2) for Timer 2. The register pair (RCAP2H, RCAP2L) is the
Capture/Reload registers for Timer 2 in 16-bit capture mode or 16-bit auto-reload mode.
Interrupt Registers: The individual interrupt enable bits are in the IE register. Two priorities can
be set for each of the six interrupt sources in the IP register.
Input and output Ports:
The i/o circuit of microcontroller is totally versatile. It connects the microcontroller to external
world. The microcontroller 89V51 has four i/o Ports i.e. 24 lines out of 32 Port lines are for one
of the two entirely different function so, although microcontroller is 40 pin chip, it appears to
have 64 pins.
As two functions are multiplexed, in order to decide which function is supported we need to see
how the circuit is connected and what software commands are used to program the pin.

The microcontroller has four Ports named as p0, p1, p2, p3. All these Ports are bi-directional.
RELAYS:
Function:
A relay is an electrically operated switch. Many relays use an electromagnet to operate a
switching mechanism mechanically, but other operating principles are also used. Relays are used
where it is necessary to control a circuit by a low-power signal (with complete electrical isolation
between control and controlled circuits), or where several circuits must be controlled by one
signal. The first relays were used in long distance telegraph circuits, repeating the signal coming
in from one circuit and re-transmitting it to another. Relays were used extensively in telephone
exchanges and early computers to perform logical operations.
Relay is an electromagnetic device which is used to isolate two circuits electrically and connect
them magnetically. They are very useful devices and allow one circuit to switch another one
while they are completely separate. They are often used to interface an electronic circuit
(working at a low voltage) to an electrical circuit which works at very high voltage. For example,
a relay can make a 5V DC battery circuit to switch a 230V AC mains circuit.

RELAYS
Relays are used throughout the automobile. Relays which come in assorted sizes, ratings, and
applications, are used as remote control switches. A typical vehicle can have 20 relays or more.

RELAY APPLICATIONS
Relays are remote control electrical switches that are controlled by another switch, such as a horn
switch or a computer as in a power train control module. Relays allow a small current flow
circuit to control a higher current circuit. Several designs of relays are in use today, 3-pin, 4-pin,
5-pin, and 6-pin, single switch or dual switches.

RELAY OPERATION
All relays operate using the same basic principle. Our example will use a commonly used 4 - pin
relay. Relays have two circuits: A control circuit (shown in GREEN) and a load circuit (shown in
RED). The control circuit has a small control coil while the load circuit has a switch. The coil
controls the operation of the switch.

RELAY ENERGIZED (ON)


Current flowing through the control circuit coil (pins 1 and 3) creates a small magnetic field
which causes the switch to close, pins 2 and 4. The switch, which is part of the load circuit, is
used to control an electrical circuit that may connect to it. Current now flows through pins 2 and
4 shown in RED, when the relay is energized.

RELAY DE-ENERGIZED (OFF)


When current stops flowing through the control circuit, pins 1 and 3, the relay becomes deenergized. Without the magnetic field, the switch opens and current is prevented from flowing
through pins 2 and 4. The relay is now OFF.

RELAY OPERATION
When no voltage is applied to pin 1, there is no current flow through the coil. No current means
no magnetic field is developed, and the switch is open. When voltage is supplied to pin 1, current
flow though the coil creates the magnetic field needed to close the switch allowing continuity
between pins 2 and 4.

NORMALLY DESIGN ID
Relays are either Normally Open or Normally Closed. Notice the position of the switches in the
two relays shown below. Normally open relays have a switch that remains open until energized
(ON) while normally closed relays are closed until energized. Relays are always shown in the deenergized position (no current flowing through the control circuit - OFF). Normally open relays
are the most common in vehicles; however either can be use in automotive applications.

Normally Open (NO)

Normally Closed (NC)

NORMALLY CLOSED RELAYS


The operation of a Normally Closed relay is the same to that of a Normally Open relay, except
backwards. In other words, when the relay control coil is NOT energized, the relay switch
contacts are closed, completing the circuit through pins 2 and 4. When the control coil is
energized, the relay switch contacts opens, which breaks the circuit open and no continuity exists
between pins 2 and 4.

DE - ENERGIZED (OFF)

ENERGIZED (ON)

ACTUAL RELAY DESIGN


Current flows through the control coil, which is wrapped around an iron core. The iron core
intensifies the magnetic field. The magnetic field attracts the upper contact arm and pulls it
down, closing the contacts and allowing power from the power source to go to the load.

Interfacing the Serial / RS232 Port:

The Serial Port is harder to interface than the Parallel Port. In most cases, any device you connect to the serial po
need the serial transmission converted back to parallel so that it can be used. This can be done using a UART.

RS232 is the most known serial port used in transmitting the data in communication and interface. Even thou
port is harder to program than the parallel port, this is the most effective method in which the data transmission
less wires that yields to the less cost. The RS232 is the communication line which enables the data transmission
using three wire links. The three links provides transmit, receive and common ground...

Advantages of using serial data transfer rather over parallel


1. Serial Cables can be longer than Parallel cables.
2. You don't need as many wires than parallel transmission.
3. Infra Red devices have proven quite popular recently.

4. Serial Communication reduces the pin count of these MPU's. Only two pins are commonly used, Transmit D

(TXD) and Receive Data (RXD) compared with at least 8 pins if you use a 8 bit Parallel method (You may a
require a Strobe).
Hardware Properties:

Devices which use serial cables for their communication are split into two categories. These are DCE (Data

Communications Equipment) and DTE (Data Terminal Equipment.) Data Communications Equipment are d

such as your modem, TA adapter, plotter etc while Data Terminal Equipment is your Computer or Terminal.

The electrical specifications of the serial port is contained in the EIA (Electronics Industry Association) RS2
standard. It states many parameters such as 1.
2.
3.
4.

A "Space" (logic 0) will be between +3 and +25 Volts.


A "Mark" (Logic 1) will be between -3 and -25 Volts.
The region between +3 and -3 volts is undefined.
An open circuit voltage should never exceed 25 volts. (In Reference to GND)

Serial Ports come in two "sizes"


1. D-Type 25 pin connector
2.

D-Type 9 pin connector

Below is a table of pin connections for the 9 pin and 25 pin D-Type connectors.

Serial Pinouts (D25 and D9 Connectors)

D-Type-25 Pin No.

D-Type-9 Pin No.

Abbreviation

Full Name

Pin 2

Pin 3

TD

Transmit Data

Pin 3

Pin 2

RD

Receive Data

Pin 4

Pin 7

RTS

Request To Send

Pin 5

Pin 8

CTS

Clear To Send

Pin 6

Pin 6

DSR

Data Set Ready

Pin 7

Pin 5

SG

Signal Ground

Pin 8

Pin 1

CD

Carrier Detect

Pin 20

Pin 4

DTR

Data Terminal Ready

Pin 22

Pin 9
RI
Ring Indicator
Table 1 : D Type 9 Pin and D Type 25 Pin Connectors

Figure 1: Null Modem Wiring Diagram


Port Addresses & IRQ's

Name

Address

IRQ

COM 1

3F8

COM 2

2F8

COM 3

3E8

COM 4

2E8
Table 3: Standard Port Addresses

Introduction to RS-232:

RS232 is the most known serial port used in transmitting the data in communication and interface.
though serial port is harder to program than the parallel port, this is the most effective method in which th
transmission requires less wires that yields to the less cost. The RS232 is the communication line which e
the data transmission by only using three wire links. The three links provides transmit, receive and com

ground...

The transmit and receive line on this connecter send and receive data between the computers. As
indicates, the data is transmitted serially. The two pins are TXD & RXD. There are other lines on this port
CTS, DSR, DTR, and RTS, RI. The 1 and 0 are the data which defines a voltage level of 3V to 25V an
-25V respectively.

The electrical characteristics of the serial port as per the EIA (Electronics Industry Association) RS232C
specifies a maximum baud rate of 20,000bps, which is slow compared to todays standard speed. For this re
have chosen the new RS-232D Standard, which was recently released.

The RS-232D has existed in two types. i.e., D-TYPE 25 pin connector and D-TYPE 9 pin connecto
are male connectors on the back of the PC. You need a female connector on your communication from Host
Guest computer. The pin outs of both D-9 & D-25 are show below.
D-Type-9 pin D-Type-25 pin
no.
no.

Pin outs

Function

RD

Receive Data (Serial data input)

TD

Transmit Data (Serial data output)

RTS

CTS

Request to send (acknowledge to modem that UART i


ready to exchange data
Clear to send (i.e.; modem is ready to exchange data)

DSR

Data ready state (UART establishes a link)

SG

Signal ground

DCD

20

DTR

Data Carrier detect (This line is active when modem


detects a carrier
Data Terminal Ready.

22

RI

Ring Indicator (Becomes active when modem detects


ringing signal from PSTN

About DTE & DCE:

Devices, which use serial cables for their communication, are split into two categories. These are DCE
Communications Equipment) and DTE (Data Terminal Equipment.) Data Communications Equipments are
such as your modem, TA adapter, plotter etc while Data Terminal Equipment is your Computer or Terminal.
typical Data Terminal Device is a computer and a typical Data Communications Device is a Modem. Often
will talk about DTE to DCE or DCE to DCE speeds. DTE to DCE is the speed between your modem and co
sometimes referred to as your terminal speed. This should run at faster speeds than the DCE to DCE speed.
DCE is the link between modems, sometimes called the line speed.

Most people today will have 28.8K or 33.6K modems. Therefore, we should expect the DCE to DCE
to be either 28.8K or 33.6K. Considering the high speed of the modem we should expect the DTE to DCE s
be about 115,200 BPS. (Maximum Speed of the 16550a UART) . The communications program, which we
settings for DCE to DTE speeds. However, the speed is 9.6 KBPS, 144 KBPS etc and the modem speed.

If we were transferring that text file at 28.8K (DCE- DCE), then when the modem compresses it you
actually transferring 115.2 KBPS between computers and thus have a DCE- DTE speed of 115.2 KBPS. Thu
why the DCE- DTE should be much higher than the modem's connection speed. Therefore, if our DTE to D
speed is several times faster than our DCE to DCE speed the PC can send data to your modem at 115,200 B

active. At this point, the computer thinks the Virtual Modem to which it is connected is ready and has detect
carrier of the other modem.

All left to worry about now is the Request to Send and Clear To Send. As both computers commu
together at the same speed, flow control is not needed thus these two lines are also linked together on each
computer. When the computer wishes to send data, it asserts the Request to Send high and as it is hooked to
with the Clear to Send, It immediately gets a reply that it is ok to send and does so.

The Ring indicator line is only used to tell the computer that there is a ringing signal on the phone
we do not have, a modem connected to the phone line this is left disconnected

To know about the RS232 ports available in your computer, Right click on "My Computer", Goto 'Pro
Select tab 'Device Manager', go to Ports( COM & LPT ), In that you will find 'Communication Port(Com1)'

you right click on that and go to properties, you will get device status. Make sure that you have enabled the
port( Use this port is selected).

To check the port, If you have a single computer, you can use loop-back connection as follows. This i
commonly used method for developing communication programs. Here, data is transmitted to that port itsel
back plug connection is as follows.

Fig 2. Loop-back plug connection

If you run the above program with the connection as in this diagram, the character entered in the keyb
should be displayed on the screen. This method is helpful in writing serial port program with single comput
you can make changes in the port id if your computer has 2 rs232ports. You can connect the com1 port to co
the same computer and change the port id in the program. The data sent to the port com1 should come to po
then also whatever you type in the keyboard should appear on the screen.

The program given below is an example source code for serial communication programmers. It is a P
communication using RS232. Download the code, unzip and run to chat in dos mode between two compute
the program to get more idea about serial port programming.

MAX232:
Description:

The Max 232 is a dual driver/receiver that includes a capacitive voltage generator to supply TIA/EIA-232-F

levels from a single 5V supply. Each receiver converts TIA/EIA-232-F to 5V TTL/CMOS levels. These rece

have a typical threshold of 1.3V, a typical hysteresis of 0.5V and can accept 30V inputs. Each driver conve

TTL/CMOS to TIA/EIA-232-F levels. The 89C52 has a built in serial port that makes it very easy to commu
with the PC's serial port but the 89C52 outputs are 0 and 5 volts and we need +10 and -10 volts to meet the

serial port standard. The easiest way to get these values is to use the MAX232. The MAX232 acts as a buffe

for the processor. It accepts the standard digital logic values of 0 and 5 volts and converts them to the RS23

standard of +10 and -10 volts. It also helps protect the processor from possible damage from static that may

from people handling the serial port connectors. The MAX232 requires 5 external 1uF capacitors. These are
the internal charge pump to create +10 volts and -10 volts. It includes 2 receivers and 2 transmitters so two
ports can be used with a single chip.
RS-232

TTL

Logic

-15V -3V +2V +5V High


+3V +15V 0V +0.8V Low

Features:
? Meets or exceeds TIA/EIA-232-F and ITU recommendation V.28.
? Operates with a single 5V power supply with 1F Charge pump capacitors.
? Operates up to 120 kbits/s.
? Two drivers and two receivers.
? 30V input levels.
? Low supply current. Typically 8mA.

? ESD protection exceeds JESD 22 2000 V Human body model


? Upgrade with improved ESD (15-kV HBM) and 0.1F Charge pump capacitors are available.

3.2 CIRCUIT DIAGRAM :


A] Power Supply Section:

Fig 3.1.1

Fig 3.2.1 Power Supply

B] Microcontroller Section:

Fan
Bulb
Tube
TV

39
38
37
36
35
34
33
32
1
2
3
4
5
6
7
8
19
18

0 .0 /A
0 .1 /A
0 .2 /A
0 .3 /A
0 .4 /A
0 .5 /A
0 .6 /A
0 .7 /A

P
P
P
P
P
P
P
P

1 .0
1 .1
1 .2
1 .3
1 .4
1 .5
1 .6
1 .7

P 3 .0 /R X D
P 3 .1 /T XD
P 3 .2 /IN T 0
P 3 .3 /IN T 1
P 3 .4 /T 0
P 3 .5 /T 1
P 3 .6 /W R
P 3 .7 /R D

XTA L1
XTA L2

A L E /P R O G
PSEN

0
1
2
3
4
5
6
7

P 2 .0 /A 8
P 2 .1 /A 9
P 2 .2 /A 1 0
P 2 .3 /A 1 1
P 2 .4 /A 1 2
P 2 .5 /A 1 3
P 2 .6 /A 1 4
P 2 .7 /A 1 5

VCC
GND

21
22
23
24
25
26
27
28
10
11
12
13
14
15
16
17

Tx
Rx

30
29

M C _ALE
M C _PSEN

M C _R ST

+5V

40
20
0 .1 U F

P89V51R D 2

C 22

+5V

0
+5V
SW 5
C 23
0 .1 U F

Y 1
W X T A L /1 1 .0 5 9 M H Z /T H

D
D
D
D
D
D
D
D

E A /V P P
RST

O SC _2

22 PF

O SC _1

C 26

O SC _2

31
9

P
P
P
P
P
P
P
P

C 24

S W P U S H B U T T O N -D P S T

C 25
1 0 u F /3 5 V

R 49
8K2

22 PF

Microcontroller

MC _R S

C] Relay Section:

+12 V

R 25 330E

Q 6
B C 547 / TO 92

U 9
N C
C O M
N O

M C _ L ig h t

J5

1
D 11
1N 4148

1
2
3

3
C O N 3

B
R e la y 1

+12 V

R 26 330E

Q 7
B C 547 / TO 92

U 10
5

M C _F an

J6

1
D 12
1N 4148

N C
C O M
N O
A

B
R e la y 1

Fig 3.2.3 Relay

1
2
3

3
C O N 4

3.3 CIRCUIT DIAGRAM DESCRIPTION:


The working of this project is divided in the following two modes
1. PC control section
2. Microcontroller section
1. PC control section:
In this section we have designed a special GUI (Graphical User Interface) on PC, For
this we have used Visual C language this GUI contains various Tabs for various
instruments connected in the system, for example the Button No 1 can be used to
control the device which is connected in the system at position 1. Once any Button
is pressed by user PC will send command to Microcontroller with the help of
standard serial communication protocol
The RS 232 standard is used in order to perform serial communication with
Microcontroller standard 9600 baud rate is used in order to perform the serial
communication
2. Microcontroller section:
Microcontroller will receive various commands form PC via serial communication
IC MAX 232 will act as level converter and will make the signals compatible with
Microcontroller. Once the data received flag is raised the controller will load the
command in to his memory decode it and accordingly Turn ON / OFF the peripherals
connected to its ports
In this way by using serial ammunition protocol any device can be turned ON / OFF
by simply instructing Microcontroller to change its port pins status and for this a pre

defined codes are stored in his memory in order to decode the various device
operation commands from PC

CHAPTER 4
SOFTWARE
1. Proteus 7 for simulation
2. Orcad 16.2 for Layout
3. Visual C
4.1 ALGORITHM:
1. START
2. Initialize Microcontroller for serial communication
3. If no button is pressed then it wait for command from user.
4. If any button press from user pc sends commands to 8051 by serial
communication.
5. 8051 receives command & according to it device get turn on or off.
6. STOP
4.2 FLOWCHART:

START

Initialize Microcontroller
for Serial Communication
mode

Any Tab
pressed
from PC
(GUI)

Send Commands to 8051


by
Serial Communication
mode
8051 receive commands
Device turned ON / OFF

STOP

CHAPTER 5
SIMULATION

5.1 SIMULATION OF POWER SUPPLY:

Fig.5.1simulation of power supply

SIMULATION OF MICROCONTROLLER:

Fig 5.2 Simulation of Microcontroller

5.3 BURNING PROGRAM INTO MICROCONTROLLER:

Fig5.3 Burning program into microcontroller

CHAPTER 6
PCB DESIGN
6.1 PCB DESIGN STEPS:

In the PCB design of electronics circuit, it is important that one plan and has a
checklist of the do's and don'ts before proceeding to do the printed circuit board
layout. The understanding of the circuit is critical to the design, for example one
needs to understand the maximum current and voltage that are carried by each
conductor in order to determine the track width of the conductor and the type of PCB
that will be used.
The voltage difference between each track will determine the clearance between each
conductor. If the clearance is not enough, chances are that the electrical potential
between each track will cause spark over and short circuit the PCB. This will cause
functional failure to the product and the safety of the users that are using the product
will be compromised. It is therefore critical for one to understand some of these
basics requirements before one proceed to design the PCB.
Conductor Thickness and Width:
The PCB conductor thickness and width will determine the current carrying capacity
of the track. The IPC standard for the conductor thickness and width of the common
1 oz/square-feet PCB is as shown below. However, it is always advisable to use a
bigger value due to the tolerance and variation of the PCB processes. If higher
current carrying capacity is required, a 2 oz/square-feet or 3 oz/square-feet type of
PCB is preferred. Many electronics hobbyist prefer to solder a thick cooper
conductor on the PCB track to increase the current carrying capacity of the track.

LAYERS OF PCB:
*.BOT - bottom copper
*.SMB - Solder mask bottom

*.SST - Silk screen top


*.ASY - Assembly top, contains the board outline
*.DS - drill sizes
Tracks Restricted Area
Tracks should not be located on the areas that can cause them to be peeled off easily.
One of the restricted areas is holes on the PCB which are used to mount screws or
PCB spacers. These holes are usually used to secure the PCB to a casing or to secure
it in a fixed place.
The edges of the PCB should not have any tracks as these areas are usually used to
transport the PCB from one process to another process by using a conveyor belt.
These edges are places where the possibility of scratches and cracking of the PCB
happens. The recommended areas that should not have any track is as shown in the
diagram below assuming a hole diameter of 4 mm which is used to mount a PCB
spacer.

Soldering:
How to Solder:
First a few safety precautions:
Never touch the element or tip of the soldering iron.
They are very hot (about 400C) and will give you a nasty burn.
Take great care to avoid touching the mains flex with the tip of the iron.
The iron should have a heatproof flex for extra protection. An ordinary plastic flex
will melt immediately if touched by a hot iron and there is a serious risk of burns and
electric shock.

Always return the soldering iron to its stand when not in use.
Never put it down on your workbench, even for a moment!
Work in a well-ventilated area.
The smoke formed as you melt solder is mostly from the flux and quite irritating.
Avoid breathing it by keeping you head to the side of, not above, your work.
Wash your hands after using solder.
Solder contains lead which is a poisonous metal.
Preparing the soldering iron:
Place the soldering iron in its stand and plug in.
The iron will take a few minutes to reach its operating temperature of about
400C.
Dampen the sponge in the stand.
The best way to do this is to lift it out the stand and hold it under a cold tap for a
moment, then squeeze to remove excess water. It should be damp, not dripping wet.
Wait a few minutes for the soldering iron to warm up.
You can check if it is ready by trying to melt a little solder on the tip.
Wipe the tip of the iron on the damp sponge.
This will clean the tip.
Melt a little solder on the tip of the iron.
This is called 'tinning' and it will help the heat to flow from the iron's tip to the joint.
It only needs to be done when you plug in the iron, and occasionally while soldering
if you need to wipe the tip clean on the sponge.

6.2 PCB DESIGN LAYOUT :

Fig 6.2.1 Power Supply

Fig 6.2.3 Ralay

Fig.6.2.2 Microcontroller

CHAPTER 7
TESTING

Fig 7.1 Testing of Project

CHAPTER 8
APPLICATION & FUTURE SCOPE
ADVANTAGES:

1. This project can be effectively and conveniently utilized for the control of different
appliances.
2. As this project could be extended to control about 4 devices, this could be used for
computerization of an office, home, or a firm. Though it is quiet costlier, the circuit is
simple and the working mechanism could be easily understood.
3. An added advantage of this project is that we are able to know the status of the device to
be controlled.
4. The program to control the appliances is written in C language which is more user
friendly and easy to understand than other programming languages
5. In todays world their is high a demand for PC based control system because of its
various advantages over manual control system.
6. PC based control systems are highly reliable , accurate and time saving systems, they
provide number of features like quick data storage , data transfer and data security which
help industries to work in efficient manner.

DISADVANTAGES:
1. It is inconvenience to carry personal computer.
2.There may be problem occurred during serial communication.

APPLICATION:Applications for the GPID

Industrial Automation: Robotic Arms, Conveyors, etc. can be controlled very well through GPID
rather than entire PC based systems.
Complex Machine Control
All complex machines like CNC, Lathe, etc. can be controlled easily through a single GPID
board rather than too many manual control panels.

Displaying Various Parameters in Industrial Environments


GPID can be used to display various parameters like
temperature, pressure, tank level, etc. in an industry.

Various Keypad Controls


Various types of reconfigurable keypads can be implemented using

GPID

since function of each key can be displayed dynamically over the 7-

Segment

displays.

Multipurpose Relay Board Control


A relay board that can be configured with GPID is provided.

This

board can be configured to work with GPID as well as software

logic.

Sample Prototype

Entertainment
GPID along with software can be used for wide range of entertainment based applications like
board games. e.g. Tic-Tac-Toe, Checkers, Chess, Merlin, etc.

Display vital information


GPID can be used as a general purpose display board to

display

parameters, messages, etc.

Graphically Display Current Status of a Process


GPID can be used to display animations, graphical patterns that can be used to display current
status of process, etc. E.g. a running grinder can be animated.
Display Digital Waveforms
GPID can be used to display digital waveforms. 64-bit data can be observed at a time over the
board.

FUTURE SCOPE:1. We can control appliances which are at home or at office using pc via Internet system.

CHAPTER 9
BILL OF MATERIAL
Sr. No.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
16
17

Description
P89V51RD2
Transformer 18 V, 0.5A
LM7812
LM7805
Diode 1N4007
Capacitor 1000 f
Disc Capacitor
IC Base 40 Pin
Relimate Base
Relimate Connector
Pull Up Resistance 10 K
PCB
Reset Switch
IC Base 8 Pin
12 V Relay
Fan 12 V

Quantity

Price
1
1
1
1
4
1
10
1
10
10
4
1
5
3
2
1
TOTAL

REFERENCE BOOKS:

The 8051 microcontroller :- Kenneth Ayala

The 8051 microcontroller and Embedded systems :- Muhammad Ali Mazidi

180
120
12
8
8
7
5
18
40
88
8
700
5
16
20
80
1327

WEB-SITES:

www.datasheetarchieve.com

www.alldatasheet.com/

www.nxp.com/-Philips

www.seminarproject.com

You might also like