Sie sind auf Seite 1von 36

DC MOTOR SPEED & DIRECTION CONTROL

A Mini project report submitted in partial fulfillment of the requirements for the award of degree of

BACHELOR OF TECHNOLOGY in ELECTRONICS AND COMMUNICATION ENGINEERING


by B.JAYA SRI DIVYA (08331A0421) G.KANTHI REKHA (08331A0449) A.TEJITHA (08331A0402) Under the esteemed guidance of Smt. G.VIMALA KUMARI, M.Tech. Assistant Professor Department of Electronics and Communication Engineering M.V.G.R. College of Engineering B.ANUSHA (08331A0411)

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING MAHARAJ VIJAYARAM GAJAPATHIRAJ COLLEGE OF ENGINEERING (Approved by AICTE, New Delhi, Permanently Affiliated to Jawaharlal Nehru Technological University, Kakinada, Accredited by NBA & NAAC A grade by UGC) VIZIANAGARAM 2008-2012

DEPARTMENT OF ELECTRONICS AND COMUNICATION ENGINEERING

CERTIFICATE
This is to certify that mini project report entitled Heartbeat and Temperature Monitoring System being submitted by G.Harshini, G.KanthiRekha, B.Anusha, A.Tejitha bearing Regd. No.s 08331A0447, 08331A0449,

08331A0411, 08331A0402 in partial fulfillment for the award of the degree of Bachelor of Technology in Electronics and Communication Engineering is a record of bonafide work done by them under my supervision during the academic year 2011-2012.

(Project guide)

(Head of the Department)

Smt.G.VIMALA KUMARI
Assistant Professor ,
Dept. of E.C.E , M.V.G.R.College of Engineering , Vizianagaram.

Sri. R.RAMANA REDDY


Professor, Head of the Dept,
Dept. of E.C.E , M.V.G.R.College of Engineering, Vizianagaram.

ACKNOWLEDGEMENTS
We wish to express our deep sense of gratitude to Smt G.Vimala Kumari, M.Tech AssistantProfessor E.C.E Department for her wholehearted co-operation, unfailing inspiration and valuable guidance. Throughout the project work, her useful suggestions, constant encouragement has given a right direction and shape to our learning. Really, we are indebted to her for his excellent and enlightened guidance.

We consider it as privilege to express our deepest gratitude to Sri R.Ramana Reddy, Professor and Head of the Department for his valuable suggestions and constant motivation that greatly helped the seminar work to get successfully completed.

We sincerely thank all the members of the staff of the Department of Electronics & Communication Engineering for their sustained help in our pursuits.

We thank Dr.K.V.L.Raju, Principal, for extending his utmost support and cooperation in providing all the provisions for the successful completion of the project.

With great solemnity and sincerity, we offer our profuse thanks to our management, MANSAS for providing all the resources to complete our seminar successfully.

We thank all those who contributed directly or indirectly in successfully carrying out this work.

G.HARSHINI G.KANTHIREKHA B.ANUSHA A.TEJITHA

(08331A0447) (08331A0449) (08331A0411) (08331A0402)

ABSTRACT The diverse fields of electronics and communication have witnessed an unprecedented growth over the past three decades. The advancements that have been made during these years resulted in the application of electronics and communication in various walks of life. The usage of electronic instruments with advanced techniques yields accurate results. One such avenue where electronic instruments are extensively used is in biomedical instrumentation in hospitals. Various biomedical instruments are used in hospitals to monitor the health condition of patient regularly. The readings of instrument like ECG, blood pressure, pulse rate, respiratory system, sugar etc. should be monitored and when any abnormality occurs in these readings, it should immediately be taken to notice of the doctor. The quicker the problem of the patient is reported, the sooner the doctor will attend the patient. Any time lapse leads to graver situations. Though it sounds fairly simple, numerous drawbacks exist in this phenomenon. Firstly, a person should constantly monitor the readings. There are the situations where the person does not observe the readings crossing the safe limit or the threshold. But as soon as he finds that the readings are not normal or the reading crosses a certain safe limit, then he should report to the concerned doctor. Inevitably some delay will be there as some time is needed by the person to report the problem to the doctor. This puts the life of the patient in risk. It is noteworthy that this is normal procedure that we cross in our daily lives.

For more versatile medical applications, this project can be improvised, by incorporating blood pressure monitoring systems, dental sensors and annunciation systems, thereby making it useful in hospitals as a very efficient and dedicated patient care system.

CONTENTS Chapter Description


CERTIFICATE ACKNOWLEDGEMENTS ABSTRACT
4

Pageno

i ii

CONTENTS LIST OF FIGURES LIST OF APPENDICES 1. 1.1 1.2 1.3 INTRODUCTION Measurement of Body Temperature Heart Beat Monitor system Block Diagram of Patient Monitoring System 1.3.1 Description 2. 2.1 2.2 2.3 2.4 2.5 3. 3.1 3.2 OVERVIEW OF MICRO CONTROLLER Features Description Pin Diagram and Pin Description Block Diagram Serial Programming Algorithm COMPONENTS USED LCD (HITACHI 16*2) Components for power supply circuit 3.2.1 3.3 LM7805

iv vii viii 1 1 1 1 1 3 3 3 4 6 9 10 11 11 11 12 12 13 13 14 19 19 20 20 20 21 21
5

Components for Heart Beat Monitor system 3.3.1 LDR (Light Dependent Resistor) 3.3.2 Differential amplifier (LM358)

3.4 4. 4.1

Components for temperature measuring system 3.4.1 DS1621 (temperature sensor) CIRCUITS AND DESCRIPTION Power Supply Circuit 4.1.1 4.1.2 Filtering Unit Voltage Regulators

4.2 4.3

Interfacing of LCD with ATMEL89C2051 Heart Beat measuring system 4.3.1 Circuit

4.3.2 4.4

Description

21 22 22 23

Temperature measuring system 4.4.1 4.4.2 Circuit Description

5. 5.1 5.2

SOFTWARE IMPLEMENTATION Algorithm Flow chart FUTURE SCOPE RESULTS CONCLUSION REFERENCES

25 25 26 27 28 29 30

LIST OF FIGURES
Fig no
1.1 2.1 2.2 3.1 3.2 3.3 3.4 3.5 4.1 4.2 4.3 4.4 5.1

Description
Basic block diagram Pin Diagram of AT89C2051 Block Diagram of AT89C2051 Pin diagram of LCD LM7805 pin assignment Light dependent resistor Structure of LDR Getting data from analog world Power supply circuit Interfacing microcontroller with LCD Heart beat sensor circuit Temperature measurement system Flow chart of entire system
6

pageno
4 6 8 12 12 13 13 16 19 21 21 23 27

LIST OF APPENDICES
Page
APPENDIX-I APPENDIX-II Software code Datasheets 32 54

Chapter-1

INTRODUCTION
1.1 Measurement of Body Temperature

Temperature of the patient can be measured using a normal temperature sensor like LM35. This sensor is a passive transducer and its resistance depends on the heat being applied on it. This sensor produces a temperature equivalent in analog form. As the microcontroller work only on digital data the analog data must be converted to digital data using an analog to digital converter (ADC).thus we can provide a particular threshold to the temperature by providing the digital equivalent of the temperature.

1.2 Heart Beat Monitor system


The patients heart beat rate is monitored using a heart beat monitoring circuitry which can sense the patients pulse rate. This circuitry mainly uses LM358 which is a dual differential amplifier and an LDR (Light Dependent Resister), whose resistance depends on the amount of light that is induced on it

1.3 Block Diagram of Patient Monitoring System 1.3.1 Description


The major blocks of the system comprises of: 1) Power Supply: The circuit gets energized through this power supply block 2) Sensors: These convert the real time parameters like temperature, humidity, ECG etc into electrical equivalent. 3) Micro Controller: This unit measures various parameters and sends required signals to LCD unit and Buzzer unit. 4) LCD: the LCD is used to display various messages and abnormality conditions, various parameters measured by the micro controller. 5) Buzzer: This is used to alert the user by a beep sound when ever any parameter crosses the safer limit.

Fig 1.1: Basic block diagram

Chapter-2

OVERVIEW OF MICRO CONTROLLER


2.1 Features:
2K bytes of Flash 128 bytes of RAM 15 I/O lines Two 16-bit timer/counters A five vector two-level interrupt A full duplex serial port A precision analog comparator On-chip oscillator and clock circuitry architecture

2.2 Description:
The AT89C2051 is a low-voltage, high-performance CMOS 8-bit microcomputer with 2K bytes of Flash programmable and erasable read-only memory (PEROM). The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industry-standard MCS-51 instruction set. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C2051 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications. The AT89C2051 provides the following standard features: 2K bytes of Flash, 128 bytes of RAM, 15 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full duplex serial port, a precision analog comparator, on-chip oscillator and clock circuitry. In addition, the AT89C2051 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 power-down mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset.

10

2.3 Pin Diagram and Pin Description

Fig 2.1: Pin Diagram of AT89C52 VCC : Supply voltage. GND: Ground. Port 1: The Port 1 is an 8-bit bi-directional I/O port. Port pins P1.2 to P1.7 provide internal pull-ups. P1.0 and P1.1 require external pull-ups. P1.0 and P1.1 also serve as the positive input (AIN0) and the negative input (AIN1), respectively, of the on-chip precision analog comparator. The Port 1 out-put buffers can sink 20 mA and can drive LED displays directly. When 1s are written to Port 1 pins, they can be used as inputs. When pins P1.2 to P1.7 are used as inputs and are externally pulled low, they will source current (IIL) because of the internal pull-ups. Port 1 also receives code data during Flash programming and verification. Port 3: Port 3 pins P3.0 to P3.5, P3.7 are seven bi-directional I/O pins with internal pullups. P3.6 is hard-wired as an input to the output of the on-chip comparator and is not accessible as a general-purpose I/O pin. The Port 3 output buffers can sink 20 mA. When 1s are written to Port 3 pins they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pull-ups. Port 3 also serves the functions of various special features of the AT89C2051 as listed below:
11

PORT PIN P 3.0 P 3.1 P 3.2 P 3.3 P 3.4 P 3.5

ALTERNATE FUNCTIONS RXD (serial input port) TXD (serial output port) INT0 (external interrupt 0) INT1 (external interrupt 1) T0 (timer 0 external input) T1 (timer 1 external input)

Port 3 also receives some control signals for Flash programming and verification. RST: Reset input. All I/O pins are reset to 1s as soon as RST goes high. Holding the RST pin high for two machine cycles while the oscillator is running resets the device. Each machine cycle takes 12 oscillator or clock cycles. XTAL1: Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL2: Output from the inverting oscillator amplifier.

Oscillator Connections:

Note: C1, C2 = 30 pF 10 pF for Crystals = 40 pF 10 pF for Ceramic Resonators

12

2.4 Block Diagram:

Fig 2.2: Block Diagram of AT89C2051

2.5 Serial Programming Algorithm:


To program the AT89C2051, the following sequence is recommended. 1 2 3 Power-up sequence: Apply power between VCC and GND pins Set RST and XTAL1 to GND Set pin RST to H Set pin P3.2 to H Apply the appropriate combination of H or L logic levels to pins P3.3, P3.4, P3.5, P3.7 to select one of the programming operations shown in the PEROM Programming Modes table. To Program and Verify the Array:
13

4 5 6

Apply data for Code byte at location 000H to P1.0 to P1.7. Raise RST to 12V to enable programming. Pulse P3.2 once to program a byte in the PEROM array or the lock bits. The byte-write cycle is self-timed and typically takes 1.2 ms. To verify the programmed data, lower RST from 12V to logic H level and set pins P3.3 to P3.7 to the appropriate levels. Output data can be read at the port P1 pins.

To program a byte at the next address location, pulse XTAL1 pin once to advance the internal address counter. Apply new data to the port P1 pins.

Repeat steps 6 through 8, changing data and advancing the address counter for the entire 2K bytes array or until the end of the object file is reached.

10 Power-off sequence: set XTAL1 to L set RST to L Turn VCC power off Data Polling: The AT89C2051 features Data Polling to indicate the end of a write cycle. During a write cycle, an attempted read of the last byte written will result in the complement of the writ-ten data on P1.7. Once the write cycle has been completed, true data is valid on all outputs, and the next cycle may begin. Data Polling may begin any time after a write cycle has been initiated. Ready/Busy: The Progress of byte programming can also be monitored by the RDY/BSY output signal. Pin P3.1 is pulled low after P3.2 goes High during programming to indicate BUSY. P3.1 is pulled High again when programming is done to indicate READY. Program Verify: If lock bits LB1 and LB2 have not been programmed code data can be read back via the data lines for verification: 1 2 Reset the internal address counter to 000H by bringing RST from L to H. Apply the appropriate control signals for Read Code data and read the output data at the port P1 pins. 3 4 5 Pulse pin XTAL1 once to advance the internal address counter. Read the next code data byte at the port P1 pins. Repeat steps 3 and 4 until the entire array is read. The lock bits cannot be verified directly. Verification of the lock bits is achieved by observing that their features are enabled. Chip Erase: The entire PEROM array (2K bytes) and the two Lock Bits are erased electrically by using the proper combination of control signals and by holding P3.2 low for 10 ms. The code array is written with all 1s in the Chip Erase operation and must be executed before any non-blank memory byte can be re-programmed.

14

Reading the Signature Bytes: The signature bytes are read by the same procedure as a nor-mal verification of locations 000H, 001H, and 002H, except that P3.5 and P3.7 must be pulled to a logic low. The values returned are as follows. (000H) = 1EH indicates manufactured by Atmel (001H) = 21H indicates 89C2051

15

Chapter-3

COMPONENTS USED
3.1 LCD (HITACHI 16*2):
Frequently, an 8052 program must interact with the outside world using input and output devices that communicate directly with a human being. One of the most common devices attached to an 8052 is an LCD display. Some of the most common LCDs connected to the 8052 are 16x2 and 20x2 displays. This means 16 characters per line by 2 lines and 20 characters per line by 2 lines, respectively.

The 44780 standard requires 3 control lines as well as either 4 or 8 I/O lines for the data bus. The user may select whether the LCD is to operate with a 4-bit data bus or an 8-bit data bus. If a 4bit data bus is used the LCD will require a total of 7 data lines (3 control lines plus the 4 lines for the data bus). If an 8-bit data bus is used the LCD will require a total of 11 data lines (3 control lines plus the 8 lines for the data bus). The three control lines are referred to as EN, RS, and RW. The EN line is called "Enable." This control line is used to tell the LCD that you are sending it data. To send data to the LCD, your program should make sure this line is low (0) and then set the other two control lines and/or put data on the data bus. When the other lines are completely ready,
16

bring EN high (1) and wait for the minimum amount of time required by the LCD datasheet (this varies from LCD to LCD), and end by bringing it low (0) again. The RS line is the "Register Select" line. When RS is low (0), the data is to be treated as a command or special instruction (such as clear screen, position cursor, etc.). When RS is high (1), the data being sent is text data which should be displayed on the screen. For example, to display the letter "T" on the screen you would set RS high. The RW line is the "Read/Write" control line. When RW is low (0), the information on the data bus is being written to the LCD. When RW is high (1), the program is effectively querying (or reading) the LCD. Only one instruction ("Get LCD status") is a read command. All others are write commands--so RW will almost always be low. Finally, the data bus consists of 4 or 8 lines (depending on the mode of operation selected by the user). In the case of an 8-bit data bus, the lines are referred to as DB0, DB1, DB2, DB3, DB4, DB5, DB6, and DB7.

3.2 Components for power supply circuit:


The main component that is used in power supply circuit: LM7805

3.2.1 LM7805
The LM78XX series of three terminal positive regulators are available in the TO-220 package and with several fixed output voltages, making them useful in a wide range of applications. Each type employs internal current Limiting, thermal shut down and safe operating area protection, making it essentially indestructible. If adequate Heat sinking is provided; they can deliver over 1A output current. Some of the features are: Output Current up to 1A Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24 Thermal Overload Protection Short Circuit Protection
17

Output Transistor Safe Operating Area Protection

3.3 Components for Heart Beat Monitor system:


The main components that are used in heart beat monitoring system are: LDR(Light Dependent Resistor) Differential amplifier (LM358)

3.3.1 LDR (Light Dependent Resistor):


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

Fig3.3: Light Dependent Resistor

3.3.1.1 Features of the light sensor:


The Light Dependent Resistor (LDR) is made using the semiconductor Cadmium Sulphide (CdS). The light falling on the brown zigzag lines on the sensor causes the resistance of the device to fall. This is known as a negative co-efficient. There are some LDRs that
18

work in the opposite way i.e. their resistance increases with light (called positive coefficient). The resistance of the LDR decreases as the intensity of the light falling on it increases. Incident photons drive electrons from the valence band into the conduction band.

Fig3.4: Structure of Light Dependent Resistor.

3.3.1.2 Functional Description:


An LDR and a normal resistor are wired in series across a voltage. Depending on which is tied to the 5V and which to 0V, the voltage at the point between them, call it the sensor node, will either rise or fall with increasing light. If the LDR is the component tied directly to the 5V, the sensor node will increase in voltage with increasing light. The LDR's resistance can reach 10 k ohms in dark conditions and about 100 ohms in full brightness The circuit used for sensing light in our system uses a 10 k fixed resistor which is tied to +5V. Hence the voltage value in this case decreases with increase in light intensity.

3.3.2 Differential amplifier (LM358):


The LM358/LM358A, consists of two independent, high gain, internally frequency compensated operational amplifiers which were designed specifically to operate from a single power supply over a wide range of voltage. Operation from split power supplies is also possible and the low power supply current drain is independent of the magnitude of the power supply voltage. Application areas include transducer amplifier, DC gain blocks and all the conventional OP-AMP

19

circuits which now can be easily implemented in single power supply systems. Some of the features are: Internally Frequency Compensated for Unity Gain Large DC Voltage Gain: 100dB Wide Power Supply Range: LM258/LM258A, LM358/LM358A: 3V~32V (or 1.5V ~ 16V) Input Common Mode Voltage Range Includes Ground Large Output Voltage Swing: 0V DC to Vcc -1.5V DC Power Drain Suitable for Battery Operation.

3.4 Components for temperature measuring system:


The main component for temperature measuring system is: DS1621(temperature sensor)

3.4.1 DS1621 (temperature sensor) A) Features:


Temperature measurements require no external components Measures temperatures from -55C to +125C in 0.5C increments. Fahrenheit equivalent is -67F to 257F in 0.9F increments Temperature is read as a 9-bit value (2-byte transfer) Wide power supply range (2.7V to 5.5V) Converts temperature to digital word in 1 second Thermostatic settings are user definable and nonvolatile Data is read from/written via a 2-wire serial interface (open drain I/O lines) Applications include thermostatic controls, industrial systems, consumer products, thermometers, or any thermal sensitive system

8-pin DIP or SO package (150mil and 208mil)

20

B) Description:
The DS1621 Digital Thermometer and Thermostat provides 9-bit temperature readings, which indicate the temperature of the device. The thermal alarm output, TOUT, is active when the temperature of the device exceeds a user-defined temperature TH. The output remains active until the temperature drops below user defined temperature TL, allowing for any hysteresis necessary. User-defined temperature settings are stored in nonvolatile memory so parts may be programmed prior to insertion in a system. Temperature settings and temperature readings are all communicated to/from the DS1621 over a simple 2-wire serial interface.

C) Pin Diagram and Pin Description:

Fig 3.5: Pin Diagram of DS1621 SDA - 2-Wire Serial Data Input/Output SCL - 2-Wire Serial Clock GND - Ground TOUT - Thermostat Output Signal A0 - Chip Address Input A1 - Chip Address Input A2 - Chip Address Input VDD - Power Supply Voltage

21

Chapter-4

CIRCUITS AND DESCRIPTION


4.1Power Supply Circuit:

Fig 4.1: power supply circuit

4.1.1 Filtering Unit:


Filter circuits which usually capacitor is acting as a surge arrester always follow. This capacitor is also called as a decoupling capacitor or a bypassing capacitor, is used not only to short the ripple with frequency of 100Hz to ground but also to leave the frequency of the DC to appear at the output. A load resistor R1 is connected so that a reference to the ground is maintained. 1000f/25v: for the reduction of ripples from the pulsating. 10f/63v: for maintaining the stability of the voltage at the load side. O.01f: for bypassing the high frequency disturbances.

4.1.2 Voltage Regulators:


The primary purpose of a regulator is to aid the rectifier and filter circuit in providing a constant DC voltage to the device. Power supplies without regulators have an inherent problem of changing DC voltage values due to variations in the load or due to fluctuations in the AC liner voltage. With a regulator connected to the DC output, the voltage can be maintained within a close tolerant region of the desired output. IC7805 and IC7905 are used in this project for providing +5v and -5v DC supply.

22

4.2 Interfacing of LCD with ATMEL89C52:


This process of interfacing follows certain steps: resetting the LCD, initializing the LCD, sending commands to the LCD, sending data to the LCD, sending data as a string

4.3 Heart Beat measuring system: 4.3.1 Circuit:


HEART BEAT MONITOR +5v L1

C2 100n

R4 10k

7 LM 358 3

C1 470n

R5 220

6 1

R3 47k

R2 1k

R1 100k

LED1 CQX35A

Fig 4.2: heart beat sensor circuit

23

P1 100k

FIN GER

FR1

P2 100k

4.3.2Description:
In heart beat sensor circuit an operational amplifier is used for the amplification purpose, also we have an high power LED, which throws light on a LDR(light dependent resistor), used in this circuit. Initially, when the light falls on LDR it has low resistance value and when the light is not falling on LDR, it has high resistance value, when the finger is placed in between LED and LDR, we know our heart pumps the blood, when the blood is coming to the finger the density is high in the process and hence the light is effected but when the blood goes go back that time the density is very less and hence light falls clearly on LDR, this feature of light falling and not falling based on the blood flow every time is amplified by the operational amplifier. The heart beat is sensed with help of an LED and LDR arrangement. The LED is a high intensity type LED. Here the LDR is the sensor. As Sensor, a photo diode or a phototransistor can be used. The skin may be illuminated with visible (red) or infrared LEDs using transmitted or reflected light for detection. The very small changes in reflectivity or in transmittance caused by the varying blood content of human tissue are almost invisible. The various noise sources may produce disturbance signals with amplitudes equalor even higher than the amplitude of the pulse signal. Valid pulse measurement thereforerequires extensive preprocessing of the raw signal. The new signal processing approach presented here combines analog and digital signal processing in a way that, both parts can be kept simple but in combination, they are very effective in suppressing disturbance signals. The setup described here, uses a red LED for transmitted light illumination and aLDR as detector. With only slight changes in the preamplifier circuit the same hard- andsoftware could be used with other illumination and detection concepts. The detectors photo current (AC Part) is converted to voltage and amplified by an operational amplifier (LM358).

4.4 Temperature measuring system 4.4.1 Circuit:

24

16x2 LCD

+5v L1

1
C1 1u

11 12 13 14 15 16

R3 47k

19

R2 10k

R1 10k

3 C2 1u 1 8 12MHz 2 DS 1621 3 6 5 6 7 C3 1u 5 AT89C2051 4

18

17

16

15

14

13

12 11

10

Fig 4.3: temperature measurement system

4.4.2Description:
The major blocks of the temperature measuring system are: 1) Temperature sensor (DS1621) The microcontroller AT89C2051 is used to sense the heart beat and body temperature. The temperature was sensed by using a temperature sensor IC DS1621. It has an in-built temperature sensor circuitry and analog to digital converter. The micro controller also displays the heart beat and Body temperature on an LCD display. The Body temperature and heart beat was splitted into nibbles and fed to the encoder IC. The encoder IC will send the data to the transmitter. DS 1621 is the temperature sensor. It uses onboard proprietary temperature measurement technique for temperature measurement. When a patient holds his finger around DS1621, the temperature is sensed in 200 ms and that temperature is converted into its equivalent cuurent and fed to the microcontroller. Microcontroller uses program which

25

P1 10k

20

helps to display the heart beat and temperature over an LCD. LCD displays both temperature and heart beat in 2 lines. Resistor P1 is used for brightness control of LCD. Microcontroller uses capacitor C1 and resistor R3 for resetting the microcontroller. The crystal oscillator used here is of 11.0952 MHZ. Microcontroller also checks for data with the range heart beat(65 to 85) and temperature(25 to 40C). if the condition is not satisfied the buzzer of 12v is switched ON using a driver transistor.

26

Chapter-5

SOFTWARE IMPLEMENTATION
5.1 Algorithm
STEP 1: Reset the LCD using the subroutine RESETLCD4. STEP 2: Initialize the LCD using the subroutine LCD_INIT STEP 3: Now measure the temperature STEP 4:The measured temperature is in hexa decimal format. Convert that hexa decimal to BCD format STEP 5: Now if the temperature is not in between 27 and 40 degrees then alert the system. STEP 6: If the temperature is within the range then measure the heart beat STEP 7: If the heart beat is not in between 67 and 80 then alert the system STEP 8: Now display the heart beat and temperature on LCD

5.2 FLOW CHART

27

28

FUTURE SCOPE
In spite of the improvement of communication link and despite all progress in advanced communication technologies, There is still very few functioning commercial Wireless Monitoring Systems, which are most off-line, and there are still a number of issues to deal with. Therefore, there is a strong need for investigating the possibility of design and implementation of an interactive real-time wireless communication system. In our project, a generic real-time wireless communication system was designed and developed for short and long term remote patient-monitoring applying wireless protocol. The primary function of this system is to monitor the temperature and Heart Beat of the Patient and the Data collected by the sensors are sent to the Microcontroller. The Microcontroller transmits the data over the air and it is decoded and fed to Microcontroller, which is then displayed over the LCD display. If there is a dangerous change in patient's status an alarm is also sounded. In this project, only two parameters are monitored and this project can be enhanced to monitor more parameters with additional changes in hardware and software. Higher end micro controllers like PIC with some DSPs can be used to improve the processing capabilities, signal handling capabilities etc. Other physiological parameters can be measured with an addition of sensors to the microcontroller.

29

RESULTS

FIG: Showing the Output of Heart Beat Sensor and Input of Microcontroller

30

CONCLUSION

The present trend in automation of every part of life has brought great boom in field of embedded system .This is our small and sincere attempt to implement our knowledge in electronics and communication field in embedded system .We had successfully utilized the concepts of digital communication, linear Integrated chip application, microcontroller in building a Patient Body Temperature and Heart Beat Monitoring System. In this system we had successfully embedded the task of acquiring the data from the sensors and converted them into digital format. This digital data has been sent to he corresponding micro controller. The required source code had been implemented in assembly language and KIEL compiler was used for compiling, debugging and generating required machine code in HEX format, which was used for the operation of microcontroller. The system is designed to continuously sense the temperature, heart beat rate and saline bottle level of a patient and deliver the data for continuous monitoring. In the earlier tests the system worked well in real time with small errors which are further rectified and the performance of the system was satisfactory. The results obtained were as per design and the power consumption level was optimum which made this system portable and handy.

31

REFERENCES
A. TEXT BOOKS
1. BIO-MEDICAL INSTRUMENTATION AND MEASUREMENTS By L.Cromwell and F.J. Weibell, E.A.Pfeiffer. 2. LINEAR INTEGRATED CIRCUITS By D.Roy Chowdary. 3. THE 8051 MICROCONTROLLER AND EMBEDDED SYSTEMS By Mazidi & Mazidi.

B. WEBSITES
1. www.8051forum.com 2. www.efy.com 3. www.alldatasheet.com

32

LIST OF APPENDICES
APPENDIX-I

Software Code

APPENDIX-II
33

34

35

36

Das könnte Ihnen auch gefallen