Chapter One

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 66

CHAPTER ONE

INTRODUCTION

CHAPTER 1
INTRODUCTION

This project creates a portable device implementing wireless technology and taking full advantage of the wide-spreading Internet to provide a convenient solution to monitor human health. The health information acquired on the portable side transmits to the server wirelessly and can be accessed all over the Internet in real-time. The end product turned out to be very portable and the wireless connection is responsive and solid. A significant number of possible further implementations can be developed with minor effort based on this project. Eventually, this project provides a low-price, easy-access human health monitor solution bridging the gaps between patients and doctors. Human health is an increasingly popular public concern. People spend tons of money on it because once get sick or dead, anything else becomes meaningless. Unfortunately, people always find that it is too late to receive serious medical care when things are already noninvertible. Lots of patients can be cured if early actions can be taken. However, the access to the medical equipment is inconvenient and expensive. Among the most important indexes of the human health, heart rate and body temperature are the most vital ones and they have the advantage of easy access. In addition, unlike the X-ray, the measurement of heart rate and temperature is extremely easy conduct and does no harm to human health itself. In the current market, there are some personal medical devices which patients can use to do some basic measurement themselves. However, on one hand, since patients generally have little medical background, they have a hard time interpreting the medical measurement into meaningful diagnosis. On the other hand, delivering the raw medical measurement data to the doctors is time-costing and troublesome. Time can never be wasted when emergencies happen, it is critical if information can be shared on large scale coverage within a short of time. Most of the products in the market have these major drawbacks with limitation in flexibility and portability.
2

1.1.Introduction to GSM and AT commands: GSM is a cellular network, which means that mobile phones connect to it by searching for cells in the immediate vicinity. GSM (Global System for Mobile communications) is the most popular standard for mobile phones in the world. GSM is used by over 3 billion people across more than 212 countries and territories. Its ubiquity makes international roaming very common between mobile phone operators, enabling subscribers to use their phones in many parts of the world. GSM differs from its predecessors in that both signaling and speech channels are digital, and thus is considered a second generation (2G) mobile phone system. This has also meant that data communication was easy to build into the system. The ubiquity of the GSM standard has been an advantage to both consumers (who benefit from the ability to roam and switch carriers without switching phones) and also to network operators (who can choose equipment from any of the many vendors implementing GSM). GSM also pioneered a low-cost (to the network carrier) alternative to voice calls, the Short message service (SMS, also called "text messaging"), which is now supported on other mobile standards as well. Another advantage is that the standard includes one worldwide Emergency telephone number, 112. This makes it easier for international travelers to connect to emergency services without knowing the local emergency number. Newer versions of the standard were backward-compatible with the original GSM phones. For example, Release '97 of the standard added packet data capabilities, by means of General Packet Radio Service (GPRS). Release '99 introduced higher speed data transmission using Enhanced Data Rates for GSM Evolution (EDGE). AT commands are instructions used to control a modem. AT is the abbreviation of ATtention. Every command line starts with "AT" or "at". That's why modem commands are called AT commands. Many of the commands that are used to control wired dial-up modems, such as ATD (Dial), ATA (Answer), ATH (Hook control) and ATO (Return to online data state), are also supported by GSM/GPRS modems and mobile phones. Besides this common AT command set, GSM/GPRS modems and mobile phones support an AT command set that is specific to the GSM technology, which includes SMS-related commands like AT+CMGS
3

(Send SMS message), AT+CMSS (Send SMS message from storage), AT+CMGL (List SMS messages) and AT+CMGR (Read SMS messages). The starting "AT" is the prefix that informs the modem about the start of a command line. It is not part of the AT command name. For example, D is the actual AT command name in ATD and +CMGS is the actual AT command name in AT+CMGS. However, some books and web sites use them interchangeably as the name of an AT command.

1.1.1. History of GSM: In 1982, the European Conference of Postal and Telecommunications Administrations (CEPT) created the GroupeSpcial Mobile (GSM) to develop a standard for a mobile telephone system that could be used across Europe. In 1987, a memorandum of understanding was signed by 13 countries to develop a common cellular telephone system across Europe. Finally the system created by SINTEF lead by TorleivMaseng was selected. In 1989, GSM responsibility was transferred to the European Telecommunications Standards Institute (ETSI) and phase I of the GSM specifications were published in 1990. The first GSM network was launched in 1991 by Radiolinja in Finland with joint technical infrastructure maintenance from Ericsson. By the end of 1993, over a million subscribers were using GSM phone networks being operated by 70 carriers across 48 countries.

1.1.2. GSM Frequencies: GSM networks operate in a number of different frequency ranges (separated into GSM frequency ranges for 2G and UMTS frequency bands for 3G). Most 2G GSM networks operate in the 900 MHz or 1800 MHz bands. Some countries in the Americas (including Canada and the United States) use the 850 MHz and 1900 MHz bands because the 900 and 1800 MHz frequency bands were already allocated. Most 3G GSM networks in Europe operate in the 2100 MHz frequency band. The rarer 400 and 450 MHz frequency bands are
4

assigned in some countries where these frequencies were previously used for first-generation systems. GSM-900 uses 890915 MHz to send information from the mobile station to the base station (uplink) and 935960 MHz for the other direction (downlink), providing 124 RF channels (channel numbers 1 to 124) spaced at 200 kHz. Duplex spacing of 45 MHz is used. In some countries the GSM-900 band has been extended to cover a larger frequency range. This 'extended GSM', E-GSM, uses 880915 MHz (uplink) and 925960 MHz (downlink), adding 50 channels (channel numbers 975 to 1023 and 0) to the original GSM-900 band. Time division multiplexing is used to allow eight full-rate or sixteen half-rate speech channels per radio frequency channel. There are eight radio timeslots (giving eight burst periods) grouped into what is called a TDMA frame. Half rate channels use alternate frames in the same timeslot. The channel data rate for all 8 channels is 270.833 kbit/s, and the frame duration is 4.615 ms.

1.1.3. GSM cell technology: There are five different cell sizes in a GSM networkmacro, micro, pico, femto and umbrella cells. The coverage area of each cell varies according to the implementation environment. Macro cells can be regarded as cells where the base station antenna is installed on a mast or a building above average roof top level. Micro cells are cells whose antenna height is under average roof top level; they are typically used in urban areas. Picocells are small cells whose coverage diameter is a few dozen meters; they are mainly used indoors. Femtocells are cells designed for use in residential or small business environments and connect to the service providers network via a broadband internet connection. Umbrella cells are used to cover shadowed regions of smaller cells and fill in gaps in coverage between those cells. Cell horizontal radius varies depending on antenna height, antenna gain and propagation conditions from a couple of hundred meters to several tens of kilometres. The longest distance the GSM specification supports in practical use is 35 kilometres (22 mi). There are also several implementations of the concept of an extended cell, where the cell radius could be
5

double or even more, depending on the antenna system, the type of terrain and the timing advance. Indoor coverage is also supported by GSM and may be achieved by using an indoor picocell base station, or an indoor repeater with distributed indoor antennas fed through power splitters, to deliver the radio signals from an antenna outdoors to the separate indoor distributed antenna system. These are typically deployed when a lot of call capacity is needed indoors, for example in shopping centers or airports. However, this is not a prerequisite, since indoor coverage is also provided by in-building penetration of the radio signals from nearby cells. The modulation used in GSM is Gaussian minimum-shift keying (GMSK), a kind of continuous-phase frequency shift keying. In GMSK, the signal to be modulated onto the carrier is first smoothed with a Gaussian low-pass filter prior to being fed to a frequency modulator, which greatly reduces the interference to neighboring channels (adjacent channel interference). The network behind the GSM seen by the customer is large and complicated in order to provide all of the services which are required. It is divided into a number of sections as shown in the figure.

The Base Station Subsystem (the base stations and their controllers). The Network and Switching Subsystem (the part of the network most similar to a fixed network). This is sometimes also just called the core network.

The GPRS Core Network (the optional part which allows packet based Internet connections).

All of the elements in the system combine to produce many GSM services such as voice calls and SMS.

Fig 1.1 Structure of GSM Network

1.1.4. Subscriber Identity Module: One of the key features of GSM is the Subscriber Identity Module (SIM), commonly known as a SIM card. The SIM is a detachable smart card containing the user's subscription information and phone book. This allows the user to retain his or her information after switching handsets. Alternatively, the user can also change operators while retaining the handset simply by changing the SIM. Some operators will block this by allowing the phone to
7

use only a single SIM, or only a SIM issued by them; this practice is known as SIM locking. The handset, identified by its International Mobile Equipment Identity (IMEI) and the number is identified by the SIM card.

1.1.5. Description of AT Commands There are two types of AT commands: Basic commands and Extended commands.Basic commands are AT commands that do not start with "+". For example, D (Dial), A (Answer), H (Hook control) and O (Return to online data state) are basic commands. Extended commands are AT commands that start with "+". All GSM AT commands are extended commands. For example, +CMGS (Send SMS message), +CMSS (Send SMS message from storage), +CMGL (List SMS messages) and +CMGR (Read SMS messages) are extended commands. Here are some of the tasks that can be done using AT commands with a GSM/GPRS modem or mobile phone:

Get basic information about the mobile phone or GSM/GPRS modem. Get basic information about the subscriber. Get the current status of the mobile phone or GSM/GPRS modem. Establish a data connection or voice connection to a remote modem (ATD, ATA, etc). Send and receive fax (ATD, ATA, AT+F*). Send (AT+CMGS, AT+CMSS), read (AT+CMGR, AT+CMGL), write (AT+CMGW) or delete (AT+CMGD) SMS messages and obtain notifications of newly received SMS messages (AT+CNMI).

Read, write or search phonebook entries. Perform security-related tasks, such as opening or closing facility locks, checking whether a facility is locked and changing passwords.

(Facility lock examples: SIM lock a password must be given to the SIM card every time the mobile phone is switched on] and PH-SIM lock [a certain SIM card is
8

associated with the mobile phone. To use other SIM cards with the mobile phone, a password must be entered.])

Control the presentation of result codes / error messages of AT commands. Get or change the configurations of the mobile phone or GSM/GPRS modem. Save and restore configurations of the mobile phone or GSM/GPRS modem.

1.2. Objective of the project The designing of the project in the final year is chiefly to gain the practical knowledge amid of this theoretical mess. Choosing the project is guided by nothing but a desire to build a system that has a larger scope and seem more easily applicable. The Wireless Human Health Monitor in our view is a project that could fulfil the above mention criterions with the larger desire to accomplish it. The following are the basic objectives of our project: To build a wireless human health monitor system based on GSM. Use of IR and Phototransistor for the detection of heart beat. Use of temperature sensor for measurement of body temperature.

Others goals of our project are as listed below: To gain knowledge regarding GSM. To gain knowledge regarding the working process and placement of various sensors. To be familiar with programming language. To understand the interfacing of mechanical, hardware and software sections.

1.3.Introduction to project Recently, the health care sensors are playing a vital role in hospitals. The patient monitoring systems is one of the major improvements because of its advanced technology. A wireless patient monitoring system to measure heartbeat and body temperature of the patient by using embedded technology is developed.
9

So we are here, just connecting the temperature sensor and heartbeat sensor so that simultaneously we can monitor the patients condition and hence ruling out the use of the thermometer and other devices to check the condition of the patient. This project describes the design of a simple, low-cost microcontroller based heart rate & body temperature measuring device with LCD output. Heart rate of the subject is measured from the index finger using IRD (Infra Red Device sensors and the rate is then averaged and displayed on a text based LCD). This information i.e. the Heart Rate & the Body Temperature is then transmitted wirelessly to the doctor which in not in the vicinity of the patient through GSM technique. The sensors measure the information and transmit it through GSM Modem on the same frequency as on which cell phones work.

1.4.Overall system overview The system consists of an 89S52 microcontroller unit, a GSM Modem and various sensors embedded into the system structure. When it is powered on, it continuously monitors various status of the sensors unit embedded in the system. When a patient places his thumb in the sensor, his heart beat count and body temperature is displayed on the LCD placed on his side. The same data is transmitted Via SMS to the doctor, distance apart. The doctor can view the heart beat count and the body temperature of the patient on the LCD placed on his side.

1.5.Team Member, Time Duration and Plan Followed

1.5.1. Team Members The project is definitely teamwork. The success of any project work can be achieved only with the efforts of all the team members. This Project is also outcome of the combined effort of our
10

group members, Shishir Dhakal, Amarendra Kaudagiya Yadav, Surendra Basnet. For this project, we worked under Group and Individual approach. The work of preliminary investigation, survey and feasibility study was developed in a group while later works like design concept, coding, deploying and documentation was divided upon each other.

1.5.2. Time Duration The task was not as simple as we thought. But with the combined effort of all team members, we tried to tackle all the obstacles we faced. Initially we searched in the internet to be acquainted with the components we use on the project. As the days passed on and the most of the time was taken on understanding the different technologies related with the GSM, the project was started on from the beginning of the 8th semester. The early survey and planning took a lot of time. That means the preliminary investigation became a time consuming task for us.

1.5.3. Plan Followed We have started our project from the 8th semester. We have planned to accomplish the task in given time period .And as far as possible we followed the plan. According to the plan we first studied the problem statement and later we analyzed the requirements for our task, later we designed the system concept, coding and documentation was a side by side process. Finding errors were also done after creating small part of project. Finally we implemented the project with some limitations on it.

11

CHAPTER TWO

HARDWARE ASPECT

12

CHAPTER 2
HARDWARE ASPECT

In this chapter the hardware components used in our project are described in detail. The detail description about how they are used in our project or system is discussed in later chapters.

2.1 GSM Modem A GSM modem is a wireless modem that works with a GSM wireless network. A wireless modem behaves like a dial-up modem. The main difference between them is that a dial-up modem sends and receives data through a fixed telephone line while a wireless modem sends and receives data through radio waves. A GSM modem can be an external device or a PC Card / PCMCIA Card. Typically, an external GSM modem is connected to a computer through a serial cable or a USB cable. A GSM modem in the form of a PC Card / PCMCIA Card is designed for use with a laptop computer. It should be inserted into one of the PC Card / PCMCIA Card slots of a laptop computer. Like a GSM mobile phone, a GSM modem requires a SIM card from a wireless carrier in order to operate. As mentioned earlier, computers use AT commands to control modems. Both GSM modems and dial-up modems support a common set of standard AT commands. We can use a GSM modem just like a dial-up modem.
13

In addition to the standard AT commands, GSM modems support an extended set of AT commands. These extended AT commands are defined in the GSM standards. With the extended AT commands, we can do things like:

Reading, writing and deleting SMS messages. Sending SMS messages. Monitoring the signal strength. Monitoring the charging status and charge level of the battery. Reading, writing and searching phone book entries. The number of SMS messages that can be processed by a GSM modem per minute is very low -- only about six to ten SMS messages per minute. In general, a GSM/GPRS modem is used with a computer to send and receive messages. This is because some mobile phones have certain limitations comparing to GSM/GPRS modems. Some of the limitations are described below:

Some mobile phone models (example: Ericsson R380) cannot be used with a computer to receive What is concatenated a concatenated SMS SMS messages. message?

A concatenated SMS message is a message that contains more than 140 bytes. (A normal SMS message can only contain at most 140 bytes.) Concatenated SMS works like this: the sender's mobile device breaks a message longer than 140 bytes into smaller parts. Each of these parts are then fitted in a single SMS message and sent to the recipient. When these SMS messages reach the destination, the recipient's mobile device will combine them back to one message. What is the cause of the problem?

When the mobile phone receives the SMS messages that are parts of a concatenated SMS message, it combines them to one message automatically. The correct behavior should be: when the mobile phone receives the SMS messages that are parts of a concatenated SMS message, it forwards them to the computer without combining them.

Many mobile phone models cannot be used with a computer to receive MMS messages. Because when they receive a MMS notification, they handle it automatically instead of forwarding it to the computer.
14

A mobile phone may not support some AT commands, command parameters and parameter values. For example, some mobile phones do not support the sending and receiving of SMS messages in text mode. So, the AT command "AT+CMGF=1" (it instructs the mobile phone to use text mode) will cause an error message to be returned. Usually GSM/GPRS modems support a more complete set of AT commands than mobile phones.

Most SMS messaging applications have to be available 24 hours a day. (For example, an SMS messaging application that provides ringtone downloading service should be running all the time so that a user can download ringtones any time he/she wants.) If such SMS messaging applications use mobile phones to send and receive SMS messages, the mobile phones have to be switched on all the time. However, some mobile phone models cannot operate with the battery removed even when an AC adaptor is connected, which means the battery will be charged 24 hours a day.

Besides the above issues, mobile phones and GSM/GPRS modems are more or less the same for sending and receiving SMS messages from a computer. Actually, you can consider an ATcommand-enabled mobile phone as "GSM/GPRS modem + keypad + display + ...". There is not much difference between mobile phones and GSM/GPRS modems in terms of SMS transmission rate, since the determining factor for the SMS transmission rate is the wireless network. The WAVECOM GSM/GPRS Modem is brought under use in our major project for data communication through GSM service available. All GSM services available like NTC,NCELL, UTL SIM can be used for this purpose as this modem is compatible for all services of our nation.

15

Fig 2.1: WAVECOM GSM Modem

The GSM /GPRS used is designed for GPRS , data, fax, SMS and voice applications. It is basically a triband modem i.e. can operate under three different frequencies (EGSM 900/1800/1900Hz). However talking about specifications for SMS via GSM, it is a point to point data transfer and area of coverage includes SMS cell broadcast area. Also it supports both text and PDU mode of message transfer. The power supply to the modem uses AC-DC power adaptor with following ratings: i. Input AC voltage :230 Volts
16

ii. iii.

Output DC voltage :12 Volts Output DC current : 2 Amperes

The interfaces supporting this modem are: i. ii. iii. iv. v. vi. RS-232 through D-type 9 pin connector(DB9) Serial port baud rate of 1200 to 115200 bps RJ11 voice connector SMA antenna connector Toggle spring /Flap opening type SIM holder Led status of GSM/GPRS module

The modem uses standard AT commands for control. After each command successfully terminated to the modem, the modem answers the terminal by sending back OK. A SIM card properly inserted into the modem on the card holder responds as per the AT command sent to the modem. The data transfer and modem control lines via a D-type 15 pin (DB-15) connector, which includes a standard RS-232 port and a control port for data transfer and control signals transfer respectively. Pin 1 to pin 9 of DB-15 connector are connected to standard RS232 data port and pin 10 to pin 15 are connected to the control port. Pin assignments of the modem are tabulated here under: Signal DCD RXD TXD DTR Pin 1 2 3 4 Input/Output Output Input Output Output To standard RS232 Description

17

GND DSR RTS CTS RI DBGRX

5 6 7 8 9 10 Output Output Input Input Input

As Data lines

Debug receive(not for users)

DBGTX

11

Output

Debug send(not for users)

Powerkey-N

12

Input

Modem off\on ground

normal control

Powerkey-P

13

Input

Modem

normal

off\on control signal PowerEN-N 14 Input Modem supply ground PowerEN-P 15 Input Modem power power control

supply control signal

Table 2.1: Pin assignment of GSM modem


18

The RS232 data port is interface for application software and the connection to PC via RS232 cable. The application software communicates with modem using the standard AT commands. The LED display red indicate the operation state of the modem. PWR : a) Power off state with red LED off b) Power on state with red LED on c) working while red light is blinking

2.2 Microcontroller Microcontrollers are designed in a single chip, which typically includes a microprocessor, certain byte of R/W memory, from 1K to 2K bytes of ROM, and several signal lines to connect I/O lines. They are used in such functions as controlling appliances and traffic lights. We have used ATMEL 89S52 microcontroller in our project. Some features are summarized below: 8-Bit CPU Optimized for Control Applications Extensive Boolean Processing Capabilities (Single-Bit Logic) On-Chip Flash Program Memory On-Chip Data RAM Bidirectional and Individually Addressable I/O Lines Multiple 16-Bit Timer/Counters Full Duplex UART Multiple Source/Vector/Priority Interrupt Structure On-Chip Clock Oscillator On-chip EEPROM (AT89S series)
19

SPI Serial Bus Interface (AT89S Series) Watchdog Timer (AT89S Series) More detailed description of it is presented as below: The microcontroller is the device that can perform various operations and computations on the data. It consists of the arithmetic and the logic unit, I/O unit, control unit and other various components. The 8051 is the most popular microcontroller used today. Many derivative microcontrollers have been developed which are based on and compatible with the 8051.To program an 8051 requires an important skill for one who plans to develop product that will take advantage of microcontrollers. One of the 8051 based microcontrollers is the most popular and widely used chip named as AT89S52. The 8051 is an 8-bit machine. Its memory is organized in bytes and practically all its instructions deal with byte quantities. It uses an accumulator as the primary register for instruction results. Other operands can be accessed using one of the four different addressing modes available: Register implicit Direct Indirect or immediate

Operands reside in one of the five memory spaces of the 8051. The five memory spaces of the 8051 are: Program memory External Data Memory Internal data Memory Special Function Registers Bit Memory

20

The AT89S52 microcontroller includes 4k Bytes of In-System reprogrammable Flash memory. Also 128*8-bit Internal RAM with 32 programmable I/O Lines. It consists of two 16-bit Timer/Counters and six Interrupt Sources. The AT89S52 is a low power, high performance CMOS 8-bit micro-computer with 4K bytes of flash programmable and erasable read only memory. The on-chip Flash allows the program memory to be reprogrammed insystem or by conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with flash on a monolithic chip, the Atmel AT89S52 is a powerful microcontroller, which provides a highly flexible and cost effective solution to many embedded control applications. The AT89S52 provides the following standard features timer/counter, five vector two-level interrupt architecture, full duplex serial port, on-chip oscillator and clock circuitry. In addition, the AT89S52 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port and interrupt system to continue functioning. The Powerdown mode saves RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset.

2.2.1 Features of AT89S52

Compatible with MCS-51 Products 8K Bytes of In-System Reprogrammable Flash Memory Fully Static Operation: 0 Hz to 33 MHz Three-level Program Memory Lock 256 x 8-bit Internal RAM 32 Programmable I/O Lines Three 16-bit Timer/Counters Eight Interrupt Sources
21

Programmable Serial Channel Low-power Idle and Power-down Modes 4.0V to 5.5V Operating Range Full Duplex UART Serial Channel Interrupt Recovery from Power-down Mode Watchdog Timer Dual Data Pointer Power-off Flag Fast Programming Time Flexible ISP Programming (Byte and Page Mode)

2.2.2 Pin Description Vcc Supply voltage Gnd Ground Port 0 Port 0 is an 8-bit open-drain bi-directional I/O port. So, it requires external pull up resisters when used as simple I/O port. It is also designed as AD0-AD7 i.e. it can be used for both address and data bus. When ALE = 0, it acts as data bus D0 D7, but when ALE = 1, it acts as address bus A0-A7. In our system, we have used Port 0 as the data bus for the LCD.

22

Figure 2.2: AT89S52 IC pin description

Port 1 / Port 2 Port 1 / Port 2 both are an 8-bit bi-directional I/O port with internal pull-ups. Port 1 / Port 2 both acts as simple I/O when 8051 used with no external memory connection. But, with the system with external memory connection, Port 2 acts as higher order address bus along with the Port 0 to provide the 16-bits address for the external memory. Port 1 is dedicated for the LCD while in case of Port 2, pin 2.1 used to enable the 555 timer, pin 2.2 used to enable/disable the latch in the circuit, pin2.7, 2.6 & 2.5 used for the control signaling of the LCD.

23

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

P 3.0 P 3.1 P 3.2 P 3.3 P 3.4 P 3.5 P 3.6 P 3.7

RXD ( serial input port) TXD ( serial transmit port) INT0 ( external interrupt 0) INT1 (external interrupt 1) T0 ( timer 0 external input) T1 ( timer 1 external input) WR (external data memory write strobe) RD ( external data memory read strobe)

Table 2.2: Port 3 Alternate function table

24

ALE/PROG ALE (address latch enable) is an output pin and is active high, while connecting to an external memory. RST RESET pin (i.e. pin 9) is an input pin and active high (normally low).

Where the high pulse must last for minimum of the two machine cycles before it goes to low. Upon application of the high pulse, the MCU will be reset such that all the values of its register will reset and program counter will be set to 0s.Infact, it is also referred to as reset interrupt among the six interrupts available in 8051 MCU. PSEN Program store Enable is read strobe to external program memory. When the AT89S52 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory. EA/VPP External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. This pin also receives the 12-volt programming enable voltage during Flash programming for two 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.

25

2.3 LCD

2.3.1 Introduction to 16 x 2 LCD Display LCD stands for Liquid Crystal Display. The most commonly used LCDs found in market are 1 Line, 2 Line and 4 Line LCD The Pin description of 16 x 2 LCD is shown in the table below. Pin No. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Symbol Vss Vdd Vo RS R/W E DB0 DB1 DB2 DB3 DB4 DB5 DB6 DB7 A/Vee K Function GND +3 V or +5V Contrast adjustment H/L Register select signal H/L Read/Write Signal H L Enable Signal

H/L Data Bus Line H/L Data Bus Line H/L Data Bus Line H/L Data Bus Line H/L Data Bus Line H/L Data Bus Line H/L Data Bus Line H/L Data Bus Line +4.2 V for LED/ Negative voltage output Power supply for B/L (0V) Table 2.3: Pin description of LCD

2.3.2 Features 5x8 dots with cursor


26

Built in controller (KS 0066 or equivalent) +5 V power supply (Also available for +3 V) 1/16 duty cycle B/L to be driven by pin 1, pin 2 or pin 15, pin 16 or A.K (LED) N. V optional for +3 V power supply

2.4 Crystal Oscillator

Fig 2.3: Representation of crystal oscillator.

A crystal oscillator is an electronic 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, to provide a stable clock signal for digital integrated circuits, and to stabilize frequencies for radio transmitters. In 89S52 the circuitry that generates the clock pulses is very important in order to synchronize all internal operations. Pin XTAL1 and XTAL2 are provided for connection a resonant network to form an oscillator, typically, a quartz crystal and capacitors are employed. The crystal frequency is the basis internal clock frequency of the micro controller. The manufacturers make available 89S52 designs that can run at specified maximum and minimum frequencies, memories are dynamic and operate above minimum frequency or data will be lost. The clock frequency f establishes the smallest interval of time within the micro controller, called the pulse p time. The smallest interval of time to accomplish any simple instruction, or
27

part of a complex instruction, however, is the machine cycle. The machine cycle is itself made up of the micro controller such as fetching an op-code byte, decoding an op-code, executing an op-code, or writing a data byte. Two oscillator pulses define each state. Program instruction may require one, two or four machine cycles to be executed by the micro controller automatically, beginning with the instruction located at ROM memory addresses 0000H at the time the micro controller is first reset.

2.5 LM35 (temperature Sensor) The LM35 series are precision integrated-circuit temperature sensors, whose output voltage is linearly proportional to the Celsius (Centigrade) temperature. The LM35 thus has an advantage over linear temperature sensors calibrated in Kelvin, as the user is not required to subtract a large constant voltage from its output to obtain convenient Centigrade scaling. The LM35 does not require any external calibration or trimming to provide typical accuracies of 14C at room temperature and 34C over a full 55 to +150C temperature range. Low cost is assured by trimming and calibration at the wafer level. The LM35s low output impedance, linear output, and precise inherent calibration make interfacing to readout or control circuitry especially easy. It can be used with single power supplies, or with plus and minus supplies. As it draws only 60 A from its supply, it has very low self-heating, less than 0.1C in still air. The LM35 is rated to operate over a 55 to +150C temperature range, while the LM35C is rated for a 40 to +110C range (10 with improved accuracy).

2.5.1 Features Calibrated directly in Celsius (Centigrade) Linear + 10.0 mV/C scale factor 0.5C accuracy guaranteeable (at +25C) Rated for full 55 to +150C range Suitable for remote applications Low cost due to wafer-level trimming Operates from 4 to 30 volts
28

Less than 60 A current drain Low self-heating, 0.08C in still air Nonlinearity only 14C typical Low impedance output, 0.1 W for 1 mA load

Fig 2.4 : LM35 (Temperature Sensor)

2.5.2 Pin Description Pin No. 1. 2. 3. Function Supply voltage; 5V (+35V to -2V) Output voltage (+6V to -1V) Ground (0V) Name Vcc Output Ground

Table 2.4: Pin Description of LM35

2.6 Line driver or Voltage translator (MAX232) RS-232 was created for one purpose, to interface between Data Terminal Equipment (DTE) and Data Communications Equipment (DCE) employing serial binary data interchange. So as stated the DTE is the terminal or computer and the DCE is the modem or other communications device.
29

As a Line driver IC we have used the MAX232 IC in our system. It operates with Single 5-V Power Supply. The MAX232 device is a dual driver/receiver that includes a capacitive voltage generator to supply EIA-232 voltage levels from a single 5-V supply. Each receiver converts EIA-232 inputs to 5-V TTL/CMOS levels. These receivers have a typical threshold of 1.3 V and a typical hysteresis of 0.5 V, GND and can accept 30-V inputs. Each driver converts TTL/CMOS input levels into EIA-232 levels. The MAX232 is characterized for operation from 0C to 70C. The MAX232I is characterized for operation from 40C to 85C.

Fig 2.5: Pin configuration of max232 Since both 8051 MCU and computer are DTE, the communication between them can be done with RS232 standard using MAX232 and null modem or virtual modem configuration. Each DTE acts as virtual modem to other DTE. The MAX232 requires four capacitors ranging from 1 to 22 micro-farad.

30

Fig 2.6: Typical operation circuit 2.7 DB9 (RS232) To allow compatibility among data communication equipment made by various manufactures, an interfacing standard called RS232 was set by the Electronics Industries association (EIA). It is a standard for serial data communication that is most commonly used. RS232 cable is used for communication between DTE (data terminal equipment) like computers that can send and receive data and DCE (data communication equipment) like modems that are responsible for transferring the data. The DB9, a 9 pin connector has the pin configuration as follows:

2.7.1 Pin Description PIN 1 2 Description Data Carrier Detect (DCD) Received Data (RxD)
31

3 4 5 6 7 8 9

Transmitted Data (TxD) Data Terminal Ready (DTR) Signal Ground (GND) Data Set Ready (DSR) Request to Send (RTS) Clear to Send (CTS) Ring Indicator (RI)

Table 2.5: Pin Description of DB9 DTR (data terminal ready) When a terminal (or a PC COM port) is turned on, after going to a self test, it sends out signal DTR to indicate that it is ready for communication. This is an active low-signal. This is an out pin from DTE (PC COM port) and an input to the modem. DSR (data set ready) When DCE (modem) is turned on and has gone through the self-test, it asserts DSR to indicate that it is ready to communicate. This is an active low signal. If for any reason the modem cannot make a connection to the telephone, this signal remains inactive, indicating to the PC (or terminal) that it cannot accept or send data. RTS (request to send): When the DTE device (such as a PC) has a byte to transmit, it asserts RTS to signal the modem that it has a byte of data to transmit. RTS is an active-low output from the DTE and an input to the modem. CTS (clear to send)
32

In response to RTS, when the modem has room for storing the data it is to receive, it sends out signal CTS to the DTE (PC) to indicate that it can receive the data now. This input signal to the DTE (PC) is used by the DTE to start transmission. DCD (data carrier detect) The modem asserts signal DCD to inform the DTE (PC) that a valid carrier has been detected and that contact between it and the other modem is established. Therefore, DCD is an output from the modem and an input to the PC (DTE). RI (ring indicator): An output from the modem (DCE) and an input to a PC (DTE) indicates that telephone is ringing. Of the six handshake signals, this is the least often used, due to the fact that modems take care of answering the phone. The communication between two DTE is established by establishing a configuration called Null Modem. In this configuration the Transmission side of one is connected to the receiving side of other and vice versa.

Fig 2.7: Null modem

33

2.8 Analog to Digital Converter (ADC0809) The ADC0809 data acquisition component is a monolithic CMOS device with an 8-bit analogto-digital converter, 8-channel multiplexer and microprocessor compatible control logic. The 8-bit A/D converter uses successive approximation as the conversion technique. The converter features a high impedance chopper stabilized comparator, a 256R voltage divider with analog switch tree and a successive approximation register. The 8-channel multiplexer can directly access any of 8-single-ended analog signals. The device eliminates the need for external zero and full-scale adjustments. Easy interfacing to microprocessors is provided by the latched and decoded multiplexer address inputs and latched TTL TRI-STATE outputs. The design of the ADC0808, ADC0809 has been optimized by incorporating the most desirable aspects of several A/D conversion techniques. The ADC0808, ADC0809 offers high speed, high accuracy, minimal temperature dependence, excellent long-term accuracy and repeatability, and consumes minimal power. These features make this device ideally suited to applications from process and machine control to consumer and automotive applications. For 16-channel multiplexer with common output (sample/hold port). 2.8.1 Features Easy interface to all microprocessors Operates ratiometrically or with 5 VDC or analog span adjusted voltage reference No zero or full-scale adjust required 8-channel multiplexer with address logic 0V to 5V input range with single 5V power supply Outputs meet TTL voltage level specifications Standard hermetic or molded 28-pin DIP package 28-pin molded chip carrier package equivalent to MM74C949-1

34

Fig 2.8: ADC0809 Pin Diagram

2.8.2 Pin Description Pin No. 1. 2. 3 4. 5. 6. 7. Start conversion; input pin; a low to high pulse is given End of conversion; output pin; goes low when the conversion is over Analog Input Pins Function Name IN3 IN4 IN5 IN6 IN7 SC EOC

35

8. 9.

Digital output bit 4 Input pin; a low to high pulse brings data to output pins from the internal registers at end of conversion

D3 Output enable

10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22.

Clock input; to provide external clock Supply voltage; 5V Positive reference voltage Ground (0V)

Clock Input Vcc Vref(+) GND D1

Digital output bit Negative reference voltage

D2 Vref(-) D0 D4

Digital output bits

D5 D6 D7

Address latch enable; Input pin; low to high pulse is required to latch in the address

ALE

23. 24. 25. 26. 27. 28. Table 2.6: Pin Description of ADC0809 Analog inputs Address lines

AddressC AddressB AddressA IN0 IN1 IN2

2.9 Regulator IC (7805) 7805 is a voltage regulator integrated circuit. It is a member of 78xx series of fixed linear voltage regulator ICs. The voltage source in a circuit may have fluctuations and would not
36

give the fixed voltage output. The voltage regulator IC maintains the output voltage at a constant value. The xx in 78xx indicates the fixed output voltage it is designed to provide. 7805 provides +5V regulated power supply. Capacitors of suitable values can be connected at input and output pins depending upon the respective voltage levels.

2.9.1 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

Fig 2.9: Voltage regulator IC (7805) Pin Diagram

2.9.2 Pin Description Pin No. Function 1. Input voltage (5V-18V) Name Input
37

2. 3.

Ground (0V) Regulated output; 5V (4.8V-5.2V)

Ground Output

Table 2.7: Pin Description of Voltage regulator IC (7805)

2.10

Capacitors

A capacitor is an electrical device that can store energy in the electric field between a pair of closely spaced conductors (called plates). When voltage is applied to the capacitor, electric charges of equal magnitude, but opposite polarity, build up on each plate. Capacitors are used in electrical circuits as energy-storage devices. They can also be used to differentiate between high-frequency and low-frequency signals and this makes them useful in electronic filters. Basic Applications of the Capacitor: Energy storage

A capacitor can store electric energy when disconnected from its charging circuit, so it can be used as temporary battery. Filtering

Capacitors are used as a filter circuit. It smooth the AC ripples present in the DC power supply Other applications: Power factor correction Signal coupling Noise filters, motor starters, and scrubbers Tuned circuits Sensing

38

2.11

Resistors

Resistors are particularly used to limit current. In our system they are basically used to drop the voltage in series for the required output voltage. As an example, the output of the PIR sensor was around 12 volts and to drop it to required 5 volts we used resistors using voltage divider rule.

39

CHAPTER THREE

PROJECT DESCRIPTION

40

CHAPTER 3
PROJECT DESCRIPTION

3.1 Block diagram

Heart Beat Sensor Microcontroller AT89S52 LCD display

Temperature Sensor MAX232 1151

GSM MODEM

41

GSM MAX232 Microcontroller AT89S52 MODEM

LCD display

Fig 3.1 Overall System Block Diagram

3.2 Block Diagram Description The typical block diagram of the Wireless Human Health Monitor we designed includes various sensors for sensing the heart beat and body temperature as input to AT89S52 microcontroller which gives the output, in LCD, also SMS through GSM WAVECOM modem that weve used in our design. When a patient places his thumb in the sensor, his heart beat count and body temperature is displayed on the LCD placed on his side. The same data is transmitted Via SMS to the doctor, distance apart. The doctor can view the heart beat count and the body temperature of the patient on the LCD placed on his side.

42

3.2.1 Temperature Sensor The LM35 series are precision integrated-circuit temperature sensors, whose output voltage is linearly proportional to the Celsius (Centigrade) temperature. The LM35 thus has an advantage over linear temperature sensors calibrated in Kelvin, as the user is not required to subtract a large constant voltage from its output to obtain convenient Centigrade scaling. The LM35 does not require any external calibration or trimming to provide typical accuracies of C at room temperature and C over a full -55 to +150C temperature range. Low cost is assured by trimming and calibration at the wafer level. The LM35's low output impedance, linear output, and precise inherent calibration make interfacing to readout or control circuitry especially easy. It can be used with single power supplies, or with plus and minus supplies. As it draws only 60 A from its supply, it has very low self-heating, less than 0.1C in still air. The LM35 is rated to operate over a -55 to +150C temperature range, while the LM35C is rated for a -40 to +110C range (-10 with improved accuracy). The LM35 series is available packaged in hermetic TO-46 transistor packages, while the LM35C, LM35CA, and LM35D are also available in the plastic TO-92 transistor package. The LM35D is also available in an 8-lead surface mount small outline package and a plastic TO-220 package.

3.2.2 Heart beat sensor Medical heart sensors are capable of monitoring vascular tissue through the tip of the finger or the ear lobe. It is often used for health purposes, especially when monitoring the body after physical training. We have designed a heartbeat sensor for the purpose of measurement of heart rate. The sensor consists of Infrared led and phototransistor.

3.2.3 AT89S52 Microcontroller The AT89S52 microcontroller is used for controlling all the peripheral components. Microcontroller solely controls the resulting output for particular input condition. Hence this section is the control house of the system.
43

3.2.4 LCD (Liquid Crystal Display) LCDs can add a lot to your application in terms of providing an useful interface for the user, debugging an application or just giving it a "professional" look. The most common type of LCD controller is the JHD 162A that provides a relatively simple interface between a processor and an LCD. Inexperienced designers do often not attempt using this interface and programmers because it is difficult to find good documentation on the interface, initializing the interface can be a problem and the displays themselves are expensive. LCD has single

line display, Two-line display, four line display. Every line has 16 characters. In our system we have used 16x2 LCD. 3.3 Problems Faced Various genuine problems were faced during the course of completing this project. Those normal and genuine problems are not addressed in this section. Only the major problems we came across while completing our project are addressed in this section.

3.3.1 Problems faced on hardware To realize a system using real time electronic components was much more difficult than to derive their theoretical concept. The commercially available ICs and electronic components were not that reliable as we thought it would be. Hence, many errors and obstacle were faced during their use. After getting started with our project we realized the simplicity of the circuitry was just a myth. The synchronization of the hardware with the software succeeded after several serious attempts. With some modules the circuitry worked out on first attempt which we felt lucky. On the other hand, most of the modules did not work on several attempts and caused massive loss of our time even on days. However designing our complete circuitry system over Proteus 6 Professional software proved to be the best method to realize how our system works and it added to debugging the software
44

bugs as well. But Proteus doesnt include all the electronic components we used in our project. Though the basic circuitry was easy to deal with, however this software was a boon to us. Even after the simulation on Proteus we faced several problems on real time electronic circuitry. They were optimum contrast to each other. The real time circuit was very much like the simulation though. Voltage regulation and synchronization between the MCU and various peripheral components was the major problem we faced. To debug this problem we consulted our supervisor and senior teachers who helped us to deal with this problem.

3.3.2 Problems faced on software The major problem we faced in course of developing the software for our system was dealing with various interrupts and developing their respective ISR. We used C language for programming as developing subroutines and using interrupts is easy in C than in assembly language. But dealing with the software with C language of programming instead of the assembly language made our job more tedious. As our system uses large number of external components managing the external interrupt also proved to be an obstacle on the program development. Sensors were addressed using polling (i.e. they were kept under continuous scan).

45

CHAPTER FOUR

SOFTWARE DEVELOPMENT

46

CHAPTER 4 SOFTWARE DEVELOPMENT

The software controls the operation of the system and hence it is imperative that the software is developed in a flawless manner so as to attain the desired result. In our project, all but one desired coding is stored in the microcontroller. It is the software that controls the overall functioning of the system. The stored program in a microcontroller controls all the basic functionalities of the function and the operation of the devices used in the system. The inputs are taken from sensors and output of the program decides action to be taken by the system. Software, being a crucial part of our project, is going to be discussed in detail in this section.

6.1 Software Development Process Software engineering helps in the development of the project. It is important to go through a series of predictable steps to build a product or a system. Software process helps to get a series of steps. Software engineers and their managers adapt the process to their needs and follow on it. Software process is automated process that simplifies project management and, what is most important, enhances visibility of the project. It provides stability, control of the project. Software process requires a systematic and consistent approach to the project. Software engineer or a team of engineers must incorporate a development strategy that encompasses the process for solving the problem. This strategy is often referred to a process model. The development of mobile application systems is usually realized on the basic of iterative process models of which there are many different variants. The selection of an appropriate process is a crucial issue for the success of every system development project, particularly for systems in a highly volatile environment such as mobile application systems.
47

There are different types of process models in the software engineering. These are: - Linear sequential model, prototyping model, Evolutionary process model, incremental models, Spiral model. Between these models, the most common used model is sequential model. In our project we have followed these steps , i.e. project identification and selection, project initiation and planning ,analysis, design, Implementation, maintenance on the basics of these models. This model is also called the waterfall model because the process continues as water falling from the upper surface to the lower surface. It is generally accepted that classical, sequential process models are not appropriate for the development of modern, market oriented information systems. A temporal separation between phases of development and subsequent phases of operation and maintenance proves not to be useful. This is because an entirely new system is only comprehensible and realizable through repeated feedback loops. Alternative models for complex and dynamic systems in recent years were often captured under the term iterative process model.

6.2 Software language The software or any program used for the operation of any system can be written in any language considering various factors. The choice is made on the basis of following decisive factors. Memory available. Required execution speed. Accurate control of peripheral devices. Programming experience of team members. Time available.

Assembly language is considered to be the best for projects that need minimum memory, the highest execution speed, and precise control of peripheral devices but since writing in this language is a tedious task with more knowledge in C programming, we choose to write our
48

source code in the C language. Not only that C programming is used knowing us the more about it but it has also several advantages over assembly language. 6.2.1 Choosing C language C is a powerful, flexible language that provides fast program execution and imposes few constraints on the programmer. It allows low level access to information and commands while still retaining the portability and syntax of a high level language. These qualities make it a useful language for both system programming and general purpose programs. Cs power and fast program execution come from its ability to access low level commands, similar to assembly language, but with high level syntax. Its flexibility comes from the many ways the programmer has to accomplish the same tasks. C includes bitwise operators along with powerful pointer manipulation capabilities. C imposes few constraints on the programmer. The main area this shows up is in Cs lack of type checking. This can be a powerful advantage to an experienced programmer but a dangerous disadvantage to a beginner. Another strong point of C is its use of modularity. Section of code can be stored in libraries for re-use in future programs. This concept of modularity also helps with c portability and execution speed. The core C language leaves out many features included in the core of other languages. These functions are instead stored in the C standard Library where they can be called on when needed. An example of this concept would be Cs lack of built in I/O capabilities. I/O functions tend to slow down program execution and also be machine independent when running optimally. For these reasons, they are stored in a library separately from the C language and only included when necessary. The C programming language is used in many different areas of application, but the most prolific area is UNIX operating system applications. The C language is also used in computer games: UNIX operating system.

49

Computer games.

6.3 Program in system 6.3.1 Flowchart Flowchart is a diagrammatic representation for the solution of any predicament. The process of the program stored in the microcontroller can be described using either algorithm or flowchart. Since the flowchart gives the hawk eye view of the solution process we opted for it. The flowcharts included in this section are not the overall system flowchart. This section includes flowchart for different modules of the system. These flowchart modules give the overall idea of the system hence giving the idea to develop program for the designed Wireless Human Health Monitor.

6.3.2 Serial Communication The data I/O of the PC depend upon the Microprocessor Architecture. It can employ Memory Mapped I/O or I/O Mapped I/ O. In I/O Mapped I/O, the devices are identified with the separate I/O address. The maximum numbers of devices in this approach that can be well addressed depends upon the number of data bits in the Microprocessor Architecture Design. For example 8 bit architecture in 8085 can address up to 256 devices using this approach. The data transfer for this approach is faster than the Memory Mapped I/O because there is no need to go to memory address to fetch operands time and again. However, the number of devices that can be addressed is limited and small range than the Memory mapped I/O. The instructions such as IN and OUT are used. In Memory Mapped I/O, the devices are treated like the memory locations. The addressability of I/O devices is much high and is determined by the number of Bits in the Address Bus. The memory instructions such as LDA, STA, LDAX, STAX, are used for data I/O in such approach.
50

Data transfer can occur in either of the two ways: Serial and Parallel data transfer in synchronous and asynchronous mode. .Asynchronous mode is often used in data communication between PC and the peripherals because of higher speed of the processor than the peripheral devices in general. The asynchronous data transfer takes place bitwise or character wise. The start bit, stop bit, parity bit are used for baud rates that is fixed to be same at the both transmitting side and receiving side. UART such as Motorolas MC6850 is used for asynchronous data communication. Asynchronous mode is very useful for long distance communication. In synchronous mode there is provision of synchronization between the transmitter and the receiver. The receiver can respond to the varying clock rate of the transmitter and the data transfer takes place block wise rather than character wise. The start bit, stop bit and parity bits are also used. The USRT chips are used for synchronous mode of data communication. In Parallel data transfer a number of lines are used to transfer a word at a time. This technique is faster than the serial data communication technique however it is suitable for short distance communication only. The printers and such peripherals use parallel data transfer. In serial data transfer a single line is used to transfer a bit at a time. This technique is slower than parallel data transfer however highly economical. It is used for long distance communication such as in internet. Most of the time serial data communication is of interest. The signal high is indicated by MARK and the signal low level is called SPACE. There are different protocols to govern the serial data transfer such as RS 232 C (Now called as EIA232), RS 423A and RS 422A that was developed in 1960s.

51

Figure 4.1: Waveform of serial data unit

6.3.3 Serial data communication in MCU In Microcontroller there is one inbuilt chip called USART (Universal Synchronous Asynchronous Receiver and Transmitter) that facilitates both the synchronous and asynchronous data communication. The TXD (pin 11) and RXD (pin 10) of AT89S51/AT 89S52 microcontroller are used for the serial communication purpose. In this project we have implemented serial communication in polling mode rather than in interrupt mode since we dont need high speed of operation and we didn't have to mind for the CPU Utilization Factor. The PC side VB interface is used for fixing the data rate (asynchronous) half duplex communication. There is the provision of setting the values of auto mode and manual mode tracking. The data is wirelessly transmitted by the RF Transmitter at the site and Received at the monitoring system by the RF receiver and finally to the PC via serial Port.

6.3.4 RS232 Protocol The protocol governing the serial communication in our case is RS232C.Some Features of RS 232C Standard are listed below: EIA Standard 232 developed in early 1960s RS 232C in late 1960s.
52

.Named as EIA-232C later however most commonly called RS 232C. Describes the function of 25 signal and handshake pin for serial data transfer. Describes the voltage levels, impedance levels, rise and fall times, maximum bit rate and maximum capacitances for these signal lines. Connector should have 25 pins, the DTE should be Male and the DCE should be female. However IBM reduced these 25 pins to 9 pins that are often required for asynchronous communication. Those connectors are DB25 and DB9 connectors respectively.

Voltage levels:

+3V to +15V->logic "0" For logic Low -3V to -15V->logic "1" For logic High -3V to +3V->Transition region (often avoided).

Commonly used standard is: +12V for logic "0" -12V for logic "1"

6.3.5 Software &Equipment This section is intended to give some basic introduction and useful information about the software and tools that we employed in to develop our system.

4.3.5 (a) Proteus 6 Professional: Many CAD users dismiss schematic capture as a necessary evil in the process of creating PCB layout but Proteus 6 Professional has always disputed this point of view. With PCB layout now offering automation of both component placement and track routing, getting the design into the computer can often be the most time consuming element of the exercise. And if you use circuit simulation to develop your ideas, you are going to spend even more time working on the schematic.
53

ISIS has been created with this in mind. It has evolved over twelve years research and development and has been proven by thousands of users worldwide. The strength of its architecture has allowed us to integrate first conventional graph based simulation and now with PROTEUS VSM - interactive circuit simulation into the design environment. For the first time ever it is possible to draw a complete circuit for a micro-controller based system and then test it interactively, all from within the same piece of software. Meanwhile, ISIS retains a host of features aimed at the PCB designer, so that the same design can be exported for production with ARES or other PCB layout software. The Proteus Professional v 6.9, Lab Center Electronics 1990-2005, has been used for the simulation and PCB layout designed purpose in our system. And this software proved to be the most comprehensive tool for testing many microcontroller based circuitry with MCU coding, of course and it has also helped to give professional look to our circuit.

4.3.5 (b) SDCC compiler SDCC (Small Device C Compiler) is free open source, retarget table; optimizing ANSI-C compiler by SandeepDutta designed for 8 bit Microprocessors. The current version targets Intel MCS51 based Microprocessors (8031, 8032, 8051, 8052, etc.), Dallas DS80C390 variants, Free scale (formerly Motorola) HC08 and Zilog Z80 based MCUs. It can be retargeted for other microprocessors, support for Microchip PIC, Atmel AVR is under development. SDCC has extensive language extensions suitable for utilizing various microcontrollers and underlying hardware effectively. The Supported data-types are: bool, char, short, int ,long, float etc.

54

CHAPTER FIVE

TOTAL COST ESTIMATION OF THE PROJECT

55

CHAPTER 5 TOTAL COST ESTIMATION OF THE PROJECT

The total cost of our project is basically the sum of mechanical, hardware and software cost. Mechanical aspect of our project is almost negligible and for the software part it was almost free. For the software part the expense would have increased if we would have used the genuine compilers and loader software buying them from their respective authorised personnal but in our context that does not happen. Downloading the free versions available in the internet and using them with various tricks was our basic ask as the project was only for the demonstration purpose and in small scale. So hardware is the major cost in our project. Being the security system the demonstration must be like, use it and see the output, so we need to buy some necessary sensors and modem which makes us work more with the budget. But the reusability of the components like GSM modem, LM35 sensor, comparators and their funtionalities overshadows the cost and the effort in buying them. So these increased the expenditure to a little extent. The table gives an idea about the components used in our project along with their quantity and cost. The extra expenditure required may be for the backup battery in time of application or the external protection or shield is not included in the table. The table only provides the total price of our system. After all the calculations, our system approximately costs around Rs. 26000.

SN.

COMPONENT NAME

QUANTITY

RATE (Rs.)

AMOUNT

1 2 3 4 5

GSM Modem(WAVECOM) Temperature Sensor (LM35) Max 232 Microcontroller- IC AT89S52 LCD Display

2 1 2 2 2

8000 95

16000 95

150 300

300 600
56

6 7 8 9 10 11 12 13 14 15

Crystal- 11.0592MHz Resistors (10K) A/D converter Photo transistor IR Regulator IC (7805) Capacitor (33pf) Capacitors (10uF) Connection wires Overhead Cost TOTAL COST (Rs.)

2 15 1 1 1 2 1 packets 5

40 2

80 30

25 10 15

50 10 75

1000

Table 5.1: Cost estimation of hardware section

10.1

Gantt Chart

TIME FRAME(2011) No Activities June July Aug Sept Oct Nov

Feasibility study

2 3 4 5 6 7

System Specification Requirement analysis Design Documentation Testing Implementation

Table 5.2 Gantt Chart


57

CHAPTER SIX

CONCLUSION AND FURTHER WORK

58

CHAPTER SIX

CONCLUSION AND FURTHER WORK

12.1

Applications

This project can be used on medical sectors like hospital, nursing homes and others. The doctors need not to be in the same room of the patient for the analysis of the heart beat and body temperature of the patient. Some more applications are listed as: Use in telemedicine Use for the diagnosis of the patient suffering from communicable disease. Distance medical examination.

12.2

Limitations

Any system with cent percent efficiency and zero error are almost impossible. An electronic project using these many chips and sophisticated sensors cannot be expected to perform with the accuracy we expect in ideal case. So the limitations are obvious but finding them and presenting them for future enhancement is the most important part. Working with various communication standards and depending upon any other system for the output of the system makes the system even more error prone. Some of the limitations are stated as below: As our system is a GSM based, the dependency to the network of the service provider leads to the errors while sending data using the GSM modem. The delay in delivery of an SMS to the desired destination may be sometimes costly in case The longer startup or initialization period for sensors is error prone in case of power cut.
59

The above mention limitations are only we could observe being a designer, so this could increase with the long term use and in different surroundings with different users.

12.3

Enhancement

The entire medical data acquisition could be made wireless and wearable. Such a package would contain the circuiting for inputs from ECG sensors, EEG sensors, pressure measurement and pulse rate transducers. This wearable module can transmit the data continuously over a fiber optic link or through an internet digital radio. The received data can be stored in separate memory and be processed by a microcontroller. This enhancement will enable monitoring of patients to be more flexible and strain-free.

In addition to above the following enhancement can also be made: A graphical LCD can be used to display a graph of the change of heart rate over time. Sound can be added to the device so that a sound is output each time a pulse is received. The maximum and minimum heart rates over a period of time can be displayed. Serial output can be attached to the device so that the heart rates can be sent to a PC for further online or offline analysis.

12.4

Conclusion

Upon the completion of the project we have almost fulfilled the objective of our project building a Wireless Human Health Monitor. Our system is applicable for measurement of heart beat and body temperature. It can be used in Hospital, Nursing homes, clinics and other medical institutions. We have made the project with the best of our abilities but with further enhancements we can definitely increase the potential of our system. Although it may appear to be stating the obvious, the project really proved to be very beneficial for us in all aspects. The project provided us with an opportunity of working in
60

different areas of engineering, namely, electronics and software. It also aided on the biomedical engineering. Our Project dont need that much of the mechanical aspect to be used but the construction of the small and handy device surely taught us some genuine mechanical considerations. To be more precise, the completion of the project has raised our confidence to a next level, where we feel more confident about our abilities as an engineer. Working in any office as an engineer with all those sophisticated machines or equipment was surely unthinkable before this project. So we conclude this project gaining a lot of experience and knowledge of our related field.

61

References

[1] Muhammad Ali Mazidi, Janice GillispieMazidi and Rolin D. McKinlay, The 8051 Microcontroller and Embedded Systems, Pearson Education, 5th edition, 2009 [2] Douglas V. Hall, Microprocessor and Interfacing, 2nd Edition, Tata McGraw Hill, 1996 [3] Sedra and Smith, Microelectronic Circuits, 4th edition, Oxford University Press, 1988. [4] B. L. Thereja and A. K. Thereja, A Textbook of Electrical Technology, Volume 1, S. Chand Group, 2005 [5] Ramesh Gaonkor, Microprocessor Architecture, Programming and Application with 8085, [6] Mehta, V.K.,Principles of Electronics8th Edition, S. Chand and Company [7] Referred Websites:

http://www.8051projects.net http://www.electronicdesign.com http://www.alldatasheets.com

62

Appendix A: Circuit Diagram

Pulse Measurement Circuit (Heart beat sensor)

63

Transmitting Circuit

64

Receiving Circuit

65

APPENDIX B: Datasheets

66

You might also like