+ All Categories
Home > Documents > GSM Based Patient Monitoring System

GSM Based Patient Monitoring System

Date post: 29-Jan-2023
Category:
Upload: independent
View: 0 times
Download: 0 times
Share this document with a friend
52
GSM BASED PATIENT MONITORING SYSTEM 5. BLOCK LEVEL EXPLANATION 5.1. SENSOR The sensor consists of a light source and photo detector. Light is shone through the tissues and variation in blood volume alters the amount of light falling on the detector. The source and detector are mounted side by side to look at changes in reflected light or on either side of a finger or earlobe to detect changes in transmitted light. The user places a fingertip or thumb over this window and the infrared sensor detects tiny changes in infrared due to the pulsing of the blood in the capillaries with each heartbeat. These have the disadvantage that motion will cause changes in the infrared signal detected. The infrared filter of the phototransistor reduces interference from fluorescent lights, which have a large AC component in their output. 5.2 GSM MODEM AND PHONE GSM means Global System for Mobile Communications. GSM is a cellular network. GSM operates in four different frequency ranges. Mostly GSM networks operate in the 900MHz or 1800MHz bands. A GSM modem is a wireless modem that works with a GSM wireless network. A wireless modem behaves like a dial-up modem. Wireless modems send and receive data through Page 1
Transcript

GSM BASED PATIENT MONITORING SYSTEM

5. BLOCK LEVEL

EXPLANATION

5.1. SENSOR

The sensor consists of a light source and photo

detector. Light is shone through the tissues and variation in

blood volume alters the amount of light falling on the

detector. The source and detector are mounted side by side to

look at changes in reflected light or on either side of a

finger or earlobe to detect changes in transmitted light. The

user places a fingertip or thumb over this window and the

infrared sensor detects tiny changes in infrared due to the

pulsing of the blood in the capillaries with each heartbeat.

These have the disadvantage that motion will cause changes in

the infrared signal detected. The infrared filter of the

phototransistor reduces interference from fluorescent lights,

which have a large AC component in their output.

5.2 GSM MODEM AND PHONE

GSM means Global System for Mobile Communications. GSM

is a cellular network. GSM operates in four different

frequency ranges. Mostly GSM networks operate in the 900MHz

or 1800MHz bands. A GSM modem is a wireless modem that works

with a GSM wireless network. A wireless modem behaves like a

dial-up modem. Wireless modems send and receive data through

Page 1

GSM BASED PATIENT MONITORING SYSTEM

radio waves. GSM uses circuit switched technology. A GSM modem

can be an external device. An external GSM modem is connected

to a computer through a serial cable. Here the GSM modem is

connected to a microcontroller through a MAX232 interface. The

GSM modem requires a SIM card from a wireless carrier in order

to operate. The number of SMS that can be processed by a GSM

modem is very low about 6-10 messages per minute. The GSM

modem supports a common set of standard AT commands. In

addition to the standard AT commands, GSM modem supports an

extended set of AT commands. These extended AT commands are

defined in the GSM standard.

5.3 MICROCONTROLER

The 89C51 is a low power, high performance CMOS 8-bit

microcomputer with 4Kbytes of Flash programmable and erasable

read only memory (PEROM). The device is manufactured using

high density non-volatile 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 non-volatile memory programmer.

By combining a versatile 8-bit CPU with flash on a monolithic

chip, the 89C51 is a powerful microcomputer which provides a

Page 2

GSM BASED PATIENT MONITORING SYSTEM

highly flexible and cost effective solution to many embedded

control applications.

5.4. POWER SUPPLY

Power supply is wired as shown in the figure.

6-0-6 from the transformer is rectified, filtered and

regulated using 7805 regulator to get accurate +5V supply

respectively.

5.5. LCD DISPLAY

LCD display used for displaying the message

that sent from remote location. LCD display has 16 pin (8-

data line 3- control line 2 power line and a contrast line).

Data line and control line are connected to micro controller.

Contrast line is connected to a voltage divider using a pre-

set. Contrast can be varied by this pre-set. This controls the

intensity of LCD display.

6. OVERALL CIRCUIT DIAGRAM

Page 3

GSM BASED PATIENT MONITORING SYSTEM

OVERALL CIRCUIT DIAGRAM

R 2910k

+5V

+5V

+5V

U 9LM 7812/TO

1

2

3V IN

GND

V O U T

+5V

U 2

A D C 0804

67

8

9

10

1112131415161718

19

20

4

5

1

2

3

+IN-IN

GND

V R E F /2

GND

D B 7D B 6D B 5D B 4D B 3D B 2D B 1D B 0

C LK R

VCC

C LK IN

INTR

C S

R D

WR

C 161uF

R 26

100k

C 8C

6M H Z

V R 10

10K1

3

2

R 27100k

1 3

2

+5V

C 510uf

C 141uF

R 14R

+

-

U 7A

LM 358

3

21

84R 28

1k

+5V

C 7C

R 1010K

31

2

C 9C

+5V

J4

C O N 2

12

R 1110k

+

-

U 7BLM 358

5

67

84

U 1

A T89C 519

181920

3140

12345678

2122232425262728

3938373635343332

10

11

121314151617

R S T

XTAL2

XTAL1

GND

EA/VPPVCC

P 1.0P 1.1P 1.2P 1.3P 1.4P 1.5P 1.6P 1.7

P 2.0/A 8P 2.1/A 9

P 2.2/A 10P 2.3/A 11P 2.4/A 12P 2.5/A 13P 2.6/A 14P 2.7/A 15

P 0.0/A D 0P 0.1/A D 1P 0.2/A D 2P 0.3/A D 3P 0.4/A D 4P 0.5/A D 5P 0.6/A D 6P 0.7/A D 7

P 3.0/R XD

P 3.1/TXD

P 3.2/IN TOP 3.3/IN T1P 3.4/TOP 3.5/T1P 3.6/W RP 3.7/R D

C 122pfU 11

N E 555

2

5

37

6

4 8

1

TR

CV

QD IS

TH R

R

VCC

GND

+5V

R 110k

+5V

D 61N 4007

12

R 32R

+5V

J5G S M

32

5164

D 4

1N 4007

1 2

U 10

M A X232

1

34

5

16

15

2

6

910

13

8

7

12

C1+

C 1-C 2+

C 2-

VCC

GND

V +

V -

R 2O U TT2IN

R1IN

R 2IN

T2O U T

R 1O U TC 3C

C 222pfR 30

47k

R 1210k

C 60.47uf

C 10150pf

D 2LE D

16*2 LCD Module

U 3

456

2

13

791012 11 814 13

1516

RSR/WEN

V C C

G N DC O N

D0D2D3D5 D4 D1D7 D6

ledCledA

R 31220

R 1310k

C 151uF

R 25100k

1 3

2

C 42200uf

+5V

U 25

LM 35

1

2

3

G N D

V out

+V s

C 131uF

J2

C O N 3

123

R 2410k

+5V+5V

D 3

1N 4007

1 2

Page 4

GSM BASED PATIENT MONITORING SYSTEM

7. CIRCUIT DIAGRAM EXPLANATION

7.1 LCD MODULE

R910K

13

216*2 LCD Module

7 8 9 10 11 12 13 144 5 6

15

13

D0 D1 D2 D3 D4 D5 D6 D7RS R/W

EN

VCC

GNDCON

Fig.5: LCD Module

LCD display used for displaying the message that

sent from remote location. LCD display has 16 pin (8- data

line 3- control line 2 power line and a contrast line). Data

line and control line are connected to micro controller.

Contrast line is connected to a voltage divider using a pre-

set. Contrast can be varied by this pre-set. This controls the

intensity of LCD display.

Page 5

GSM BASED PATIENT MONITORING SYSTEM

Page 6

GSM BASED PATIENT MONITORING SYSTEM

7.2 MICROCONTOLLER(AT89C51)

C15

18pF

C25

18pF

12

U4

AT89C51

91819

20

31

401 2 3 4 5 6 7 8

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

39 38 37 36 35 34 33 32

RST

X2X1

GND

EA

VCCP1

.0P1

.1P1

.2P1

.3P1

.4P1

.5P1

.6P1

.7

P2.0

P2.1

P2.2

P2.3

P2.4

P2.5

P2.6

P2.7

P3.0

P3.1

P3.2

P3.3

P3.4

P3.5

P3.6

P3.7

P0.0

P0.1

P0.2

P0.3

P0.4

P0.5

P0.6

P0.7

R12

10K

C26

10MFD

D12

1N4148

Fig: MICROCONTROLLER (AT89C51)

Page 7

GSM BASED PATIENT MONITORING SYSTEM

Micro controller is a general purpose device, but one

that is meant to read data and controls its environment base

doing those calculations. The prime use of a micro controller

is to control the operation of a machine using fixed program

stored in ROM and that does not change in the lifetime of the

system.

The 89C51 is a low power, high performance CMOS 8-

bit microcomputer with 4Kbytes of Flash programmable and

erasable read only memory (PEROM). The device is manufactured

using high density non-volatile 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 non-volatile

memory programmer. By combining a versatile 8-bit CPU with

flash on a monolithic chip, the 89C51 is a powerful

microcomputer which provides a highly flexible and cost

effective solution to many embedded control applications.

Features

Compatible with MCS-51 products

Fully Static Operation: 0 Hz to 24 MHz

3-level program memory lock

128*8-bit internal RAM

32 Programmable I/O Lines

Two 16-bit Timer/Counters

Six Interrupt Sources

Page 8

GSM BASED PATIENT MONITORING SYSTEM

Programmable Serial Channel

Low-power Idle and Power-down Modes

89c51 microcontroller is used here for control all the

circuit. It has 40 pin configuration. X1 and X2 are connected

to crystal. An 18pFcapacitor is also connected across pins X1

and X2 to eliminate noise. Reset pin is connected to an RC

circuit to be reset when switching on the supply. A diode is

used for fast discharging when power is off.

PIN DESCRIPTION

Vss

Circuit ground potential

Vcc

+5V power supply during operation, programming and

verification

Port ‘0’

Port’0’is an 8-bit open drain bidirectional I/O port. It

is also the multiplexed low order address and data bus

when using external memory. It is used for data output

and output during programming and verification. Port ‘0’

can sink / source two TTL loads.

Port 1

Page 9

GSM BASED PATIENT MONITORING SYSTEM

Port 1 is an 8-bit quasi-traditional I/O port. It also

emits the low order address byte during programming and

verification. Port 1 can sink / source one TTL load.

Port 2

Port 2 is an 8-bit quasi-bi-directional I/O port. It also

emits the high order address byte when accessing external

memory. It is used for the high order address and the

control signals during programming and verification. Port

2 can sink / source two TTL loads

Port 3

Port 3 is an 8-bit quasi-bi-directional I/O port. It also

contains the interrupt, timer, serial port and RD and WR

pins that are used by various options. The output batch

corresponding to a secondary function must be programmed

to a one (1) for that function to operate. Port 3 can

sink / source one TTL load. The secondary functions are

assigned to the pins of Port 3, as follows;

RXD/data (P3.0)-Serial port’s receiver data input

(asynchronous) or data input/output (synchronous).

TXD/Clock (P3.1)-Serial ports transmitters data output

(asynchronous) or clock output (synchronous).

Page 10

GSM BASED PATIENT MONITORING SYSTEM

INTO (P3.2)-Interrupt O input or gate control input for

counter 0.

INTI (P3.3)-Interrupt 1 input or gate control input for

counter 1.

TO (P3.4)-Input to counter 0.

T1 (P3.5)-Input to counter 1.

WR (P3.6)-The write control signal batches the data byte

from port 0 into the External Data Memory to port 0.

RST/VPD

A low to high transition on this pin (at approximately3V) resets the 8051.If VPD is held within its space(approximately +5V), while Vcc drops below space, VPDwill provide standby power to the RAM. When VPD is low,the RAM’s current is drawn from cc. A small internalresistor permits power on reset using only a capacitorconnected to Vcc.

ALE/PROG

Provides Address Latch Enable output used for latching

the address into external memory during normal operation.

Receives the program pulse input during EPROM

programming.

Page 11

GSM BASED PATIENT MONITORING SYSTEM

PSEN

The program store enable output is a control signal that

enables the external

program memory to the bus during normal fetch operations.

EA/VDD

When held at a TTL high level, the 8051 executes

instructions from the external ROM/EPROM when the PC is

less than 4096.When held at a TTL low level, the 8051

fetches all instructions from external program memory.

The pin also receives the 21V EPROM programming supply

voltage.

XTAL1

Input to the oscillators high gain amplifier. A crystal

or external source can be used. Here the micro controller

accepts a trigger from the triggering circuit and

produces an output corresponding to pulse rate. That is

the micro controller using the stored program converts

the electrical pulse into a proportional pulse rate.

COUNTERS & TIMERS

Many micro controller applications require the counting

of external events such as the frequency of a pulse train

or the generation of precise internal time delays between

Page 12

GSM BASED PATIENT MONITORING SYSTEM

computer actions. To relieve the processor of this burden

two 16-bit up counters named T0 & T1 are provided for the

general use of the programmer. Each counter may be

programmed to count internal clock pulses acting as a

timer or programmed to the external pulses as a counter.

7.3 POWER SUPPLY

Power supply is wired as shown in the figure. 6-0-6 from the

transformer is rectified, filtered and regulated using 7805

regulator to get accurate +5V supply respectively.

7.4 ADC 804

Page 13

GSM BASED PATIENT MONITORING SYSTEM

We use ADC 804 as the signal processing unit. This is used to

digitalize the analog value of the temperature to digital

format. This is given to the microcontroller to transmit to

the output units and to the GSM module. These are CMOS 8 bit

successive approximation A-D converter that uses a

differential potentiometric ladder. This A-D appear like

memory locations or i/o ports to the microprocessor & no

interfacing logic is needed.

Features

1. Compatible with 8080 MP derivatives- no interfacing logic

needed-access time 135 ns

2. Easy interface to all microprocessors, or operates stand

alone

3. Differential analog voltage inputs

4. Logic inputs and outputs meet both MOS & TTL Voltage

specifications

5. Works with 2.5V Voltage reference

6. On chip clock generator

7. 0V – 5V analog voltage range with single 5V supply

8. No zero adjust required

9. 0.3” standard width 20 pin dip pack

Page 14

GSM BASED PATIENT MONITORING SYSTEM

10. 20 pin needed molded chip carrier or small outline

package

7.5 GSM MODEM

GSM means Global System for Mobile Communications. GSM is

a cellular network. GSM operates in four different frequency

ranges. Mostly GSM networks operate in the 900MHz or 1800MHz

bands. A GSM modem is a wireless modem that works with a GSM

wireless network. A wireless modem behaves like a dial-up

modem. Wireless modems send and receive data through radio

waves. GSM uses circuit switched technology. A GSM modem can

be an external device. An external GSM modem is connected to a

computer through a serial cable. Here the GSM modem is

connected to a microcontroller through MAX232 interface. The

GSM modem requires a SIM card from a wireless carrier in order

to operate. The number of SMS that can be processed by a GSM

modem is very low about 6-10 messages per minute. The GSM

modem supports a common set of standard AT commands. In

addition to the standard AT commands, GSM modem supports an

extended set of AT commands. These extended AT commands are

defined in the GSM standard.

7.6 MONOSTABLE MULTIVIBRATOR

Page 15

GSM BASED PATIENT MONITORING SYSTEM

The monostable multivibrator is used in the circuit to avoid

high frequency noise. It is designed for a pulse width of

0.11s.

Page 16

GSM BASED PATIENT MONITORING SYSTEM

7.7 MAX-232 DRIVERS/RECEIVERS

Page 17

GSM BASED PATIENT MONITORING SYSTEM

The MAX220-MAX249 family of line drivers/receivers is

intended for all REIA/TIA-232E & V0.28/V0.24 communication

interfaces, particularly applications where +/- 12 v is not

available.

These parts are especially useful in battery-powered systems,

since their low-power shutdown mode reduces power dissipation

to less than 5mp.The MAX225,MAX233,MAX235,and

MAX245/MAX246/MAX247 use no external components and are

recommended for application where printed circuit board space

is critical.

Features

Operate from Single +5V Power Supply.

Low-power Receive mode in shutdown.

Multiple Drivers and Receivers.

3-State drivers and receiver outputs.

Open-line

8. PCB

FABRICATION

Page 18

GSM BASED PATIENT MONITORING SYSTEM

PCB

FABRICATION

8.1 PRINTED CIRCUIT BOARD (PCB)

Now a days the printed circuit board here after

mention as PBC’s makes the electronic circuit manufacturing as

easy one. In olden days vast area was required to implement a

small circuit to connect the leads of the components and

separate connectors were needed. But PCBs connects the two by

copper coated lines on the PCB boards. In the single sided

PCBs the copper layer is on both sides. Some cases, middle

layer is also possible than the two sides.

8.1.1 BOARD TYPES

The most popular board types are

Page 19

GSM BASED PATIENT MONITORING SYSTEM

SINGLE-SIDED BOARDS: They are mainly used in

entertainment electronics where

manufacturing costs have to be kept at the minimum.

DOUBLE-SIDED BOARDS: Double sided PCBs can be made with

or without plated through holes. The production of boards

with plated through holes is fairly expensive.

8.1.2 MANUFACTURING PROCESS

First, the wanted circuit is drawn on paper and it

is modified or designed PCB layout is to be drawn on the

plain copper coated board. These boards are available in two

types:

Phenolic

Glass eproxy

Most computers PCBs are glass eproxy. To draw circuit

diagram we can use the black colour paints. Before that the

required size of the plane PCB board is determined from the

roughly drawn PCB layout. Using black paint the desired

circuit is drawn on the board.

8.1.3 LAYOUT APPROACHES

The first rule is to prepare each and every

PCB layout as viewed from the component side. Another

Page 20

GSM BASED PATIENT MONITORING SYSTEM

important rule is not to start the designing of a layout

unless an absolutely clear circuit diagram is available, if

necessary, with a component lists. Among the components the

larger ones are placed first and the space between is filled

with smaller ones. Components requiring input / output

connections come near the connectors. All components are

placed in such a manner that disordering of the components

is not necessary if they have to be replaced.

In the designing of a PCB layout it is

very important to divide the circuit into functional

subunits. Each of these subunits should be realized on a

defined portion of the board. In the designing the inter

connections which are usually done by pencil lines, actual

space requirements in the artwork must be considered. In

addition the layout can be rather roughly sketched and will

still be clear enough for artwork designer.

8.1.4 BOARD CLEANING

The cleaning of the copper

surface prior to resist applications in an essential step for

any types of PCB process using etch or plating resist.

Insufficient cleanings one of the reasons most often

encountered for difficulties in PCB fabrication although it

might not always be immediately recognized as this. But it is

Page 21

GSM BASED PATIENT MONITORING SYSTEM

quite often the reasons of poor-resist adhesion, uneven photo-

resist films, pinholes, poor plating adhesion, etc.

Where cleaning has to be done with simplest means or only

for a limited quantity of PCBs, manual-cleaning process is

mainly used. In the process we require just a sink with

running water, pumice powder, scrubbing brushes and suitable

tanks.

8.1.5 SCREEN PRINTING

This process is particularly suitable for large

production schemes. However the preparation of a screen can

also be economically attractive for series of 1000 PCBs.

Below, while photo printing is basically the non-

accurate method to transfer a pattern to a board surface. With

the screen-printing process one can produce PCBs with a

conduction of as low as 0.5 + or – and a registration error of

0.1mm on an industrial scale with a high reliability. In its

basic form, a screen fabric with uniform meshes and opening is

stretched and fixed on a solid frame of metal or wood. The

circuit pattern is photographically transferred onto the

screen, leaving the meshes in the pattern open, while the

meshes in the rest of the area are closed. In the actual

printing step, ink forced by the moving squeegee through the

open meshes onto the surface of the material to be printed.

Page 22

GSM BASED PATIENT MONITORING SYSTEM

8.1.6 PLATING

From a practical stand port, printed circuit

boards may have to be stocked before being taken for assembly

of components. It is expected that the circuit board retain

its solder ability for long periods of several months so that

reliable solder joints can be produced during assembly.

Plating of a metal can be accomplished on a copper pattern by

three methods. They are:

Immersion plating

Electrolysis plating

Electroplating

Page 23

GSM BASED PATIENT MONITORING SYSTEM

8.1.7 ETCHING

This can be done both by manual and

mechanical ways by immersing the board onto a solution of

formic chloride and hydrochloric acid and finally cleaning the

board by soap.

In all subtractive PCB processes, etching is one of the

most important steps. The copper pattern is formed by

selective removal of all unwanted copper, which is not

protected by an etch resist. This looks very simple at first

glance but in practice there are factors like under etching

and overhang which complicate the matter especially in the

production of fine and highly precise PCBs. Etching of PCBs

as required in modern electronic equipment production, is

usually done in spray type etching machines.

8.1.8 COMPONENTS PLACING

The actual location of components in the layout is

responsible for the problems to be placed during routing of

the interconnections. In a highly sensitive circuit the

critical components are placed first and in such a manner as

to require minimum length for the critical conductors. In

less critical circuit the components are arranged exactly in

the order of signal flow. This will result in a minimum

overall conductor length. In a circuit where a few

components have considerably more connecting points than the

Page 24

GSM BASED PATIENT MONITORING SYSTEM

others. These key components are placed first and the

remaining ones are grouped around them.

The general result to be aimed at is always to get

shortest possible interconnections. The bending of the axial

component leads is done in a manner to guarantee an optimum

retention of the component of the PCB. The lead bending

radius should be approximately two times the lead diameter.

Horizontally mounted resistors must touch the board surface to

avoid lifting of solder joints along with the copper pattern

under pressure on the resistor body. Vertically mounted

resistors should not be flush to the board surface to avoid

strain on

the solder joints as well as on the component lead

junction due to different thermal expansion

coefficients of lead and board materials, where necessary

resilient spaces to be provided. Coated or sealed components

should to be mounted in such to provide a certain length along

the leads.

Especially when plated through holes where the solder

flows up in the hole, clean lead of at least 1 mm above the

board are recommended.

8.1.9 DRILLING

Page 25

GSM BASED PATIENT MONITORING SYSTEM

Drilling of component mounting holes into PCBs by

far the most important mechanical machining operation in PCB

production processes.

Holes are made by drilling wherever a

superior hole finish for plated-through hole processes

is required and where the tooling costs for a punching

tool cannot be justified. Therefore drilling is applied

for all the professional grade PCB manufacturers and generally

in smaller PCB production laboratories. The importance of

hole drilling into PCB has further gone up with electronic

component miniaturization and it needs smaller hole diameters

and higher package density where hole punching is practically

ruled out.

8.2 SOLDERING

Soldering is a process for the joining

of metal parts with the aid of a molten metal (solder), where

the melting temperature is suited below that of the material

joined, and whereby the surface of the parts are wetted,

without then becoming molten.

Soldering generally implied that the

joining process occurs at temperatures below 450-degree

centigrade. Solder wets and alloys with the base metals and

gets drawn, by capillary action, into the gap between them.

Page 26

GSM BASED PATIENT MONITORING SYSTEM

This process forms a metallurgical bond between the parts of

the joint. Therefore soldier acts by Wetting of base metal

surfaces forming joint flowing between these surfaces, which

result in a completely filled space between them.

Metallurgical bonding to these surfaces when soldered.

Soldering consists of the relative positioning of the

surfaces to be joined, wetting these surfaces with molten

solder and allowing the solder to cool down until it

has solidified. During these soldering operation, an

auxiliary medium is mostly used to increase the flow

properties of molten solder or to improve the degree of

wetting . Such a medium is called flux.

Flowing characteristics are required in a flux:

It should provide a liquid cover over the materials and

exclusive air up

to the soldering temperature.

It should dissolve any oxide on the metal surface or

on the solder and carry such unwanted elements away.

It should be readily displaced from the metal by the

molten soldering Operation.

Residues should be removable after completion of the

solder. To achieve a soldered joint the solder and the base

metal must be heated above the melting point of the solder

Page 27

GSM BASED PATIENT MONITORING SYSTEM

used. The method by which the necessary heat is applied,

among other things depends on:

Nature and type of the joint

Melting point of the solder

8.2.1 FLUX

Generally applied soldering methods are iron

soldering, torch soldering, mass soldering, and electrical

soldering furnace soldering and other methods. Components are

basically

mounted only one side of the board. In double-sided PCBs, the

component side is usually opposite to the major conductor

pattern side, unless otherwise dictated by special design

requirements. The performance and reliability of solder joints

give best result covered with solder and herewith

contributing to the actual solder connections. However,

lead cutting after soldering is still common in particular

in smaller industries where hand soldering is used. With

the soldered PCB many contaminants can be found which may

produce difficulties with the functioning of the circuit. The

problems usually arise at a much later than during the final

functioning testing of the board in the factory. Among

the contaminants, we can typically find flux, chips of

plastics, metals and other constructional materials,

Page 28

GSM BASED PATIENT MONITORING SYSTEM

plating sails, oils greases environmental soil and other

processing materials.

The following performances are expected from the cleaning

procedure with the appropriate cleaning medium:

Dissolution or dissolving of organic liquids and

solids, e.g., oils, greases, resin flux.

Removal of plating salts and silicone oils.

Displacing of particulate and other insoluble matters,

e.g., chips, dust, and lint.

No severe attacks on boards and components to be

cleaned, no alteration of ink or paint notations and

last but not the least, compatibility with healthy

environmental working conditions.

9. PCB LAYOUT

9

.1 PCB LAYOUT

Page 29

GSM BASED PATIENT MONITORING SYSTEM

9.2 PCB COMPONENT LAYOUT

Page 30

GSM BASED PATIENT MONITORING SYSTEM

Page 31

GSM BASED PATIENT MONITORING SYSTEM

10. SOFTWARE

APPROACH

PROGRAM EXPLANATION

equ com,0fch ;defining com and giving

initial value 0fcH

equ dat,0fdh ;defining dat and giving

initial value 0fdH

equ eot,0feh ;defining eot and giving

initial value 0feH

equ frqflg,0fh ;defining frqflg and giving

initial value 0fH

org 0000h

mov sp,#30h ;moving 30H to stack

pointer

sjmp over ;simple jump to over

org 001bh

Page 32

GSM BASED PATIENT MONITORING SYSTEM

setb psw.3 ;set bit psw.3,register

bank selector 0

inc r0 ;increment r0

cjne r0,#00h ;checktime

;compare r0 and 00H and jump to

checktime if not equal

inc r1 ;increment r1

cjne r1,#00h ;checktime

;compare r0 and 00H and jump to

checktime if not equal

inc r2 ;increment r2

checktime: ;defining checktime

cjne r2,#11h,goback ; repeatit 11h times

cjne r1,#27h,goback ;repet it 27h times

cjne r0,#0c0h,goback ;repeat it c0h times

clr tr0 ;clear tr0,timer 0 run

control bit (OFF)

clr tr1 ;clear tr1,timer 1 run

control bit (OFF)

Page 33

GSM BASED PATIENT MONITORING SYSTEM

setb frqflg ;setbit frqflg

goback: ;defining goback

clr psw.3 ;clear psw.3

reti ;return interupt

over:

mov p1,#00h

mov dptr,#msg1 ;move msg1 to data pointer

lcall message ;long call message

mov r0,#00h ;move 00H to r0

over1: ;defining over1

mov r1,#00h ;move 00H to r1

mov r2,#00h ;move 00H to r2

mov r3,#00h ;move 00H to r3

mov r4,#00h

mov r5,#00h

mov r6,#00h

mov r7,#00h

Page 34

GSM BASED PATIENT MONITORING SYSTEM

mov tcon,#00h ;move 00H to TCON (clear

TCON)

setb psw.3

mov r0,#00h ;move 00H to r0

mov r1,#00h ;move 00H to r1

mov r2,#00h ;move 00H to r2

clr psw.3 ;clear psw.3

mov tmod,#25h ;timer 0 16 bit counter, timer 1

mode 2 auto reload timer

mov tl1,#4eh ;tl1=4eh,the low byte

mov th1,#0ceh ;th1=ceh, the high byte

mov tl0,#00h ;move 00H to tl1

mov th0,#00h ;move 00H to th1

clr frqflg ;clear frqflg

mov tcon,#50h ;tr1 and tr0 are set to

start timer1

and timer0

Page 35

GSM BASED PATIENT MONITORING SYSTEM

mov ie,#88h ;move 88H to IE, enabling the

interrupts

simulate:

jbc frqflg,getfrq ;stay until bit is set

sjmp simulate ;repeat for reloadin

counters

getfrq:

mov ie,#00h ;move 00H to IE,disabling all

interrupts

mov r1,tl0 ;move value in tl0 to r1

mov a,r1 ;move value in r1 to

accumulator,a

mov b,#0ah ;move 0aH to b

div ab ;div a by 10 and store quotient

in a and reminder in b

mov r4,b ;move the least significan bit t

to r4

mov b,#0ah ;move 0aH to b

Page 36

GSM BASED PATIENT MONITORING SYSTEM

div ab ;divide a by 10, store quotient

in a and remainder in b

mov r3,b ;move value in b to r3

mov r2,a ;move value in a to r2

lcall display ;long call display

cjne r1,#80D,l1 ;compare r1 and 80D and jmp

to l1 if not equal

l1: jc l8 ;jump if carry to l8

lcall send1 ;long call send1

l8: sub r0,60D ;defining l8

jc send1

ljmp over1 ;long jump to over1

display ;defining display

:mov dptr,#msg0 ;move msg0 to data pointer

lcall message ;long call message

mov a,r2 ;move r2 to accumulator

add a,#30h ;add

30H to a, ASCII conversion

Page 37

GSM BASED PATIENT MONITORING SYSTEM

lcall ready ;long call ready

lcall sendit1 ;long call sendit1

mov

a,r3

;move content in r3 to

accumator

add

a,#30h

;adding 30H to accumulator,

ASCII conversion

lcall ready ;long call ready

lcall sendit1 ;long call sendit1

mov a,r4 ;move content of r4 to

accumulator

add a,#30h ;adding 30H to accumulator,

ASCII conversion

lcall ready ;long call ready

lcall sendit1 ;long call sendit1

ret ;return

message: ;defining message

Page 38

GSM BASED PATIENT MONITORING SYSTEM

acall ready ;absolute call to ready

clr a ;clear accumulator

movc

a,@a+dptr

;move code byte relative to

data pointer to accumulator

inc dptr ;increment data pointer

cjne a,#eot,comd ;compare

a and eot and jump to comd

if not equal

ret ;return

comd: ;defining comd

cjne a,#com,data ;compare

Acc content and com and

jump to data if not equal

clr p0.0 ;compliment p0.0

sjmp message ;simple jump to message

data: ;defining data

Page 39

GSM BASED PATIENT MONITORING SYSTEM

cjne

a,#dat,sendit

;compare Acc contents to

dat and jump to send it if

not equal

setb p0.0 ;set bit p0.0

sjmp message ;simple jump message

sendit: ;define sendit

mov p2,a ;move Acc contents to port 2

clr p0.1 ;clear p0.1

setb p0.2 ;set bit p0.2

clr p0.2 ;clear p0.2

sjmp message ;simple jump message

ready: ;defining ready

mov r7,p0 ;move p0 to r7

clr p0.2 ;clear p0.2

mov p2,#0ffh ;move 0ffH to port2 for

transmission

Page 40

GSM BASED PATIENT MONITORING SYSTEM

clr p0.0 ;clear p0.0,RS=0,select command

register

setb p0.1 ;set bit p0.1, R/W=1 for read

wait: ;defining wait

clr p0.2 ;clear p0.2

setb p0.2 ;set bit p0.2

jb p2.7,wait ;jump to wait if bit in

p2.7

clr p0.2 ;clear p0.2

mov p0,r7 ;move content in r7 to p0

ret ;return

msg1: ;defining msg1

.db com,3ch,06h,0eh,01h,81h,dat,"000",com,0c0h,dat,"heart

beat",eot

;data heart beat and 000 defined

to display at specific location

on lcd

msg0: ;defining msg0

.db com,3ch,06h,0eh,01h,81h,eot

Page 41

GSM BASED PATIENT MONITORING SYSTEM

delay2: ;defining delay2

setb p1.0 ;set bit p1.0

mov r6,#01h ;move 01H to r6

cont2: ;define cont2

mov r2,#0ffh ;move 0ffH to r2

s2: ;define s2

mov r3,#0ffh ;move 0ffH to r3

s1: ;define s1

djnz r3,s1 ;decrement r3 and

jump to s1 if r3 is non-

zero

djnz

r2,s2

;decrement r2 and jump to

s2 if r2 non zero

djnz

r6,cont2

;decrement r6 and jump to

cont2 if r6 non zero

Page 42

GSM BASED PATIENT MONITORING SYSTEM

cpl p1.0 ;compliment p1.0

ret ;return

sendit1: ;defining sendit1

setb p0.0 ;set bit p0.0

mov p2,a ;move accumulator

contents to p2

clr p0.1 ;clear p0.1

setb p0.2 ;set bit p0.2

clr p0.2 ;clear bit p0.2

ret ;return

delay: ;dfining delay

setb p1.0 ;set bit p1.0

mov r6,#50h ;move 50H to r6

c2: ;defining c2

mov r2,#61h ;move 61H to r2

s20: ;defining s20

mov r3,#0ffh ;move offH to r3

Page 43

GSM BASED PATIENT MONITORING SYSTEM

s10: ;defining s10

djnz r3,s10 ;decrement r3 and

jump to s10 if r3 non zero

djnz r2,s20 ;decrement

r2 and jump to s20 if r2 non

zero

djnz r6,c2 ;decrement r6 and jump to c2if

r6 non zero

cpl p1.0 ;compliment p1.0

ret ;return

send1: ;defining send1

mov dptr,#msg2 ;move msg2 to data pointer

lcall out ;long call out

mov dptr,#msg9 ;move msg9 to data pointer

lcall out ;long call out

mov dptr,#msg10 ;move msg10 to data pointer

lcall out ;long call out

mov a,r2 ;move content of r2 to a

Page 44

GSM BASED PATIENT MONITORING SYSTEM

add a,#30h ;add 30H to accumulator

lcall out1 ;long call out1

mov a,r3 ;move content of r3 to Acc

add a,#30h ;add 30H to aontent of Acc

lcall out1 ;long call out1

mov a,r4 ;move r4 contents to Acc

add a,#30h ;add 30H to Acc contents

lcall out ;long call out1

mov dptr,#msg13 ;move msg13 to data pointer

lcall out ;long call out

mov dptr,#msg14 ;move msg14 to data

pointerr

lcall out ;long call out

ret ;return

out: ;defining out

lcall delay1 ;long call delay1

trans: ;defining trans

Page 45

GSM BASED PATIENT MONITORING SYSTEM

mov pcon,#00h ;move 00H to PCON

mov tmod,#20h ;move 20H to TMOD

mov th1,#0fDh ;move 0fdH to th1

setb tr1 ;set bit tr1,T1 run

control bit

mov scon,#40h ;move 40H to SCON

clr a ;clear accmulator

movc a,@a+dptr ;move code

byte relative to data

pointer to accumulator

inc dptr

;increment data pointer

cjne a,#eot,comd1 ;compare

accumulator and eot and

jump to comd1 if not equal

ret ;return

comd1: ;defining comd1

mov sbuf,a ;move

accumulator contents to

SBUF

Page 46

GSM BASED PATIENT MONITORING SYSTEM

wait1: ;defining mait1

jbc ti,fin ;jump bit carry ti to fin

ljmp wait1 ;long jmp to wait1

fin: ;defining fin

ljmp trans ;long jump to trans

out1: ;defining out1

lcall delay1 ;jong call delay1

trans1: ;defining trans1

mov pcon,#00h ;move 00H to PCON

mov tmod,#20h ;move 20H to TMOD

mov th1,#0fDh ;move 0fdH to th1

setb tr1 set bit tr1,T1 run control

bit

mov scon,#40h ;move 40H to SCON

mov sbuf,a ;move

accumulator contents to

SBUF

wait2: ;define wait2

Page 47

GSM BASED PATIENT MONITORING SYSTEM

jbc ti,fin1 ;jump bit carry ti to fin1

sjmp wait2 ;simple jump wait2

fin1: ;defining fin1

ret ;return

delay1: ;defining delay1

setb psw.3 ;set bit psw.3

mov r7,#08h ;move 08H to r7

d3: ;defining d3

mov r6,#0ffh ;move 0ffH to r6

d2: ;defining d2

mov r5,#0ffh ;move 0ffH to r5

d1: ;defining d1

djnz

r5,d1

;decrement r5 and jump

to d1 if r5 non zero

Page 48

GSM BASED PATIENT MONITORING SYSTEM

djnz

r6,d2

;decrement r6 and jump

to d2 if r6 non zero

djnz

r7,d

;decrement r7 and jump

to d3 if r7 non zero

clr psw.3 ;clear psw.3

ret ;returnJ

msg2: .db "AT+CMGF=1",0dh,eot

msg9: .db

"AT+CMGS=",22h,"9633444713",22h,0dh,22h,”ATA9447700861”,22h,0d

h,eot

msg10: .db "heart beat is "

msg13: .db 0dh,eot

msg14: .db 1Ah,eot

Page 49

GSM BASED PATIENT MONITORING SYSTEM

11. COMPONENTS REQUIRED

COMPONENTS QUANTITY PRICE(Rs)Microcontroller-

AT89C511 50

MAX 232 1 25LM 358 1 7LM 7805 1 12ADC 1 13010KΩ 5 51 KΩ 1 15.6KΩ 1 110KΩ Pot 2 4100KΩ pot 2 418pF 2 210µF 1 11 µF 4 4GSM Module 1 3000LCD display 1 -JHD

162A (16*2 LINE

DISPLAY)

1 130

Crystal Oscillator

2 -11.059MHz &

3.58MHz

1 6

Page 50

GSM BASED PATIENT MONITORING SYSTEM

Diodes

1N40073 3

LM35 1 10TOTAL 30 3387

13. RESULT

The GSM based patient monitoring system was made and tested.

This circuitry is functioning properly and output is

satisfactory.

14.

BIBLIOGRAPHY

ELECTRONIC DEVICES AND CIRCUITS -J.B

GUPTA

UNDERSTANDING TELEPHONE ELECTRONICS -STEPHEN BCELOW

Page 51

GSM BASED PATIENT MONITORING SYSTEM

JOSEPH CARR

STEVE WINDER

MICROELECTRONICS CIRCUITS

-SEDRA AND SMITH

15.

WEBLIOGRAPHY

www.alldatasheets.com

www.electronicsforu.com

Page 52


Recommended