multimedia university of kenya

29
Multimedia University Of Kenya Faculty of Engineering Department of Electrical and Communication Project Proposal PATIENT MONITORING SYSTEM USING GSM AND ARDUINO ATMEGA Presented by: EUGENE ODHIAMBO ENG-211-007/2012 Supervisor: Mr. Henry Kiragu DATE: 4/04/2016

Upload: maged-alqubati

Post on 08-Jul-2016

229 views

Category:

Documents


8 download

DESCRIPTION

PROJECT

TRANSCRIPT

Page 1: Multimedia University of Kenya

Multimedia University Of Kenya

Faculty of Engineering

Department of Electrical and Communication

Project Proposal

PATIENT MONITORING SYSTEM USING GSM AND ARDUINO ATMEGAPresented by:

EUGENE ODHIAMBOENG-211-007/2012

Supervisor: Mr. Henry Kiragu

DATE: 4/04/2016

Page 2: Multimedia University of Kenya

ABSTRACT

We live in a generation where diseases have reached such an unprecedented level.

Diseases are so much that the greatest worry for many people should be their health. Lifestyle

diseases such as cardiovascular ailments and blood pressure are becoming more prevalent.

Cardiovascular diseases are some of the leading causes of deaths in world. Heart beat and blood

pressure readings are by far the best parameters that could promote early detection of cardiac

events. By using this system that I am proposing, we can measure ones heart rate through

fingertip. The number of patients is also increasing exponentially, bringing a tremendous

challenge to health resources in our very own country Kenya where they have never been

enough.

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. So my project

essentially entails connecting the temperature sensor and heartbeat sensor with the Arduino Uno

so that simultaneously one can monitor the patient’s condition and hence ruling out the use of the

thermometer and other devices to check the condition of the patient.

My project is therefore designed to ease the burden on doctors and nurses in terms of

watching and testing of some parameters such as such as body temperature and transmitting

wirelessly using GSM module. Equally it would be used to monitor the sick and the aged at

home especially in the absence of a guardian or a relative. My project will be specifically

designed to test heart rate and body temperature using appropriate sensors. These two parameters

are a great pointer to health status of a patient or a person.

Temperature abnormality can be a symptom of so many diseases such as malaria. Abnormality

in heart rate is equally a pointer to many complications

The function of this system is thus to monitor the temperature and Heart Beat of the Patient

and the data collected by the sensors are sent to the Arduino Uno. The Arduino processes then

transmits the data over the air via GSM shield to a doctor’s, nurse’s or a relative’s phone and

also displays the same information on a LCD.

Page 3: Multimedia University of Kenya

Table of Contents

PATIENT MONITORING SYSTEM USING GSM AND ARDUINO ATMEGA.......................1

CHAPTER ONE: INTRODUCTION..............................................................................................4

1.0 BACKGROUND INFORMATION......................................................................................4

1.1 PROBLEM STATEMENT....................................................................................................4

1.2 OBJECJECTIVES.................................................................................................................5

Main objective..........................................................................................................................5

Specific objectives....................................................................................................................5

1.3 JUSTIFICATION...................................................................................................................5

CHAPTER 2: LITERATURE REVIEW.........................................................................................5

1.1 Researches.........................................................................................................................5

CHAPTER 3: THEORETICAL BACKGROUND AND DESCRIPTION OF DESIGN COMPONENTS............................................................................................................................11

2.1 Temperature sensor..............................................................................................................11

2.2 Heart beat sensor..................................................................................................................11

2.3 Arduino Uno........................................................................................................................12

WHY ARDUINO...................................................................................................................12

2.4 LCD Display........................................................................................................................14

2.5 ARDUINO GSM SHIELD..................................................................................................14

2.5.1 GSM..............................................................................................................................15

2.5.2 GPRS.............................................................................................................................16

2.5.3 SIM cards......................................................................................................................16

2.5.4 GSM shield mounted onto a Arduino Uno....................................................................16

CHAPTER 4: METHODOLOGY.................................................................................................17

3.1 Introduction..........................................................................................................................17

CHAPTER 5: BUDGET................................................................................................................21

CHAPTER 5: WORK PLAN........................................................................................................21

References......................................................................................................................................23

Page 4: Multimedia University of Kenya

CHAPTER ONE: INTRODUCTION

1.0 BACKGROUND INFORMATION Telemedicine is a filled that did not begin yesterday. There has been a lot of development

behind this field. As with all other fields, technology plays a very big role as it eases the burden

on health officials, reduces the cost of treatment, surveillance and diagnosis of patients. Patient

monitoring systems are already being used in hospitals among other places. However, their costs

are prohibitive and hospitals in third world countries like Kenya can barely have them. This

means someone will always have to be there to watch over a patient whether in the hospital or at

home.

The proposed patient monitoring system would be beneficial for medical practitioners to do

proper and better treatment. It is also beneficial to relatives or guardians who have are taking

care of the sick. As I have stated, the signals are transferred from the Arduino to the health

personnel in the hospital or to a relative for a case of patient at home.

My project is thus to create an affordable prototype of heart beat and temperature monitor.

It will use Arduino Atmega256, GSM module, LCD display, temperature sensor and heart beat

sensor. The Arduino is programmed to know when there is an abnormality in the parameters and

also to send the signals as a SMS. The buzzer should go on whenever the parameters go below or

beyond acceptable limits.

I plan to both simulate and fabricate this project so that the end result becomes a

comprehensive system. Softwares that I will use are the Arduino Software, matlab and circuit

wizard. Bulk of simulation will be done with matlab while circuit wizard shall be majorly for

drawing.

1.1 PROBLEM STATEMENTAs we know

i. Having someone to watch a critically ill person is very expensive and takes a lot of manpower.

These valuable resources can be used elsewhere.

ii. The current systems for this monitoring are prohibitively expensive, they are only found in

certain hospitals, leave alone homes. This project will partly solve this problem.

Page 5: Multimedia University of Kenya

iii. Systems used in hospitals are also complex that only certain people can understand them. The

current systems also require one to be around to check the condition of the patient

1.2 OBJECJECTIVES

Main objectiveTo develop a cheap prototype of a system that can monitor the body temperature and heartbeat of

a patient at home and in the hospital.

Specific objectivesi. To use temperature sensor to measure body temperature

ii. To use heartbeat to measure rate of heartbeat

iii. Compute the two signals then display to a LCD and send to mobile phone as a SMS.

iv. To alert through text when there is an abnormal parameter

1.3 JUSTIFICATION

This project is made of cheap materials. A complete system that measures temperature and

heart beat is so far expensive. This system is fully automated system and does not require any

human attention.

Automatic alert system using enabled by Arduino gives intimation to user. GSM interfacing

provides a feature of remote monitoring of patient parameters. The system determines the heart

beat rate per minute and then sends short message service (SMS) alert to the mobile phone on

top of displaying it on a LCD. It is also cost effective and portable. It is easy to handle and

efficient. It is not as complex as the current systems

CHAPTER 2: LITERATURE REVIEWThis section outlines what has been so far done or researched by others on this project.

1.1 ResearchesMuch has been done in this field. Among the researches and proposals in this area include the following.

Wan seri bahiyah [3] does a project where he uses Zigbee, Arduino Uno, and ECG circuit and temperature sensor. He uses Lab View to process the signals. The problem is that this does not cover a wide are as compared to GSM.

Page 6: Multimedia University of Kenya

Lauren Akoth [4] introduces processing and simulation of ECG data using Matlab. This one is a good research on how to simulate heart rate.

Purnima, Puneet Singh [5], uses both Zigbee and GSM to transmit the data obtained from a patient. GSM is used for purpose of mobile phones while zigbee is for PCs where the transmitted signals are processed.

Bandana Mallick and Ajit Kumar [6] proposed the use of fingertip to measure the heart rate and process it using Arduino.

Shrenik Suresh Sarade et. al[9] proposed a project having a simple, microcontroller based heart beat rate & body temperature measuring device with display the information on LCD display. Heart rate of the subject/body is measured from the index finger using IRD (Infra-Red Device) sensors. Also Saline Level is measured continuously for different levels. The device alarms when the heart beat & the body temperature exceed the provided threshold value. This threshold value is defined by the programmer at the time of programming of microcontroller. The threshold value is as 20 to 120 pulses per minute for heart beat indication & 18°C to 38°C for temperature.This information transmitted wirelessly to the doctor which is not in the vicinity of the patient through GSM technique. The problem with the use of infrared Device is that the LED light must be very bright or it will not be sensed by the photodiode.

Analysis of LM35

Fig 1.1 internal circuit of LM35 temperature sensor

The circuit diagram is shown above. There are two transistors in the centre of this circuit. One has ten times the emitter area of the other. This means it has one tenth of the current density, since the same current is going through both transistors. This causes a voltage across the resistor

Page 7: Multimedia University of Kenya

R1 that is proportional to the absolute temperature, and is almost linear across the range we care about. A special circuit straightens out the slightly curved graph of voltage versus temperature. The amplifier at the top ensures that the voltage at the base of the left transistor (Q1) is proportional to absolute temperature (PTAT) by comparing the output of the two transistors.The amplifier at the right converts absolute temperature (measured in Kelvin) into Celsius. The little circle with the "i" in it is a constant current source circuit.The two resistors are calibrated in the factory to produce a highly accurate temperature sensor.The integrated circuit has many transistors in it -- two in the middle, some in each amplifier, some in the constant current source, and some in the curvature compensation circuit. All of that is fit into the tiny package with three leads.

Heart Beat Detector Circuit

A simple circuit made of two LM358 operational amplifiers, resistors, a photo diode and LEDs will be used. The purpose of this circuit is to detect and then amplify the heart beat signal before it is fed into Arduino.

i. Photodiode and IR LED

Fig 1.2 A simple heart beat detector

Source: circuitwiring.com

Page 8: Multimedia University of Kenya

Photodiode and LEDThe LED and the photo diode shall be connected as shown below.

Fig 1.2 Finger clip connections

AmplifierThe detector is then connected to the LM538 operational amplifier. Signal from photodiode gets into the first op-amp through pin 5. This signal is between 1.0 to 1.4 volts. After amplification, it comes out through pin 7 at 5 to 6 volts. This voltage carries the heart rate signal.

The output of the op-amp is regulated by resistor R5. Led D3 gives visual indication of voltage at pin 7.

R3 controls the gain of the first op-amp so that the gain is neither too high nor too low and to enable the LED go off and on.

Page 9: Multimedia University of Kenya

Fig 1.4 The signal from the photodiode (finger clip), is amplified.

ComparatorThe final op-amp acts as a comparator. Its gain is set to maximum, that is, open loop gain.

The open loop voltage gain of LM358N op-amp is 100, meaning the difference between pin 2 and pin 3 is automatically multiplied by 100. The output will however be limited by the voltage supply. The signal from pin 7 is short-lived or transient; hence DC signal is created to be used by the comparator as the reference point. When the heart signal is below the reference voltage, the comparator turns off the LED and if the opposite occurs, it turns on the LED.

With finger in the clip and first D3 barely on, potentiometer R6 is adjusted until LED D4 blinks.

Page 10: Multimedia University of Kenya

Fig 1.5 After the signal is amplified, a comparator configuration with a "flat" d.c. signal to make the L.E.D. flash

Fig 1.6 A LM 358

Page 11: Multimedia University of Kenya

CHAPTER 3: THEORETICAL BACKGROUND AND DESCRIPTION OF DESIGN COMPONENTS

2.1 Temperature sensor

The LM35 series are precision integrated-circuit temperature devices with an output voltage

linearly- proportional to the Centigrade temperature. The LM35 device has an advantage over

linear temperature sensors calibrated in Kelvin, as the user is not required to subtract a large

constant voltage from the output to obtain convenient Centigrade scaling. The LM35 device does

not require any external calibration or trimming to provide typical accuracies of ±¼°C at room

temperature and ±¾°C over a full −55°C to 150°C temperature range. Lower cost is assured by

trimming and calibration at the wafer level. The low-output impedance, linear output and precise

inherent calibration of the LM35 device makes interfacing to readout or control circuitry

especially easy. The device is used with single power supplies, or with plus and minus supplies.

As the LM35 device draws only 60 μA from the supply, it has very low self-heating of less than

0.1°C in still air. The LM35 device is rated to operate over a −55°C to 150°C temperature range

which is fine for measuring body temperature.

Fig 1.7 LM35

2.2 Heart beat sensor

Electrocardiograph is one of the most ubiquitous machines in the hospitals today. It keeps doctors and nurses updated on important status of patients. ECG collects and interprets electrical signals produced by the heart over time. Capturing these signals is done via electrodes.

A heart beat sensor shall be used to replace the ECG machine. My sensor shall use optical method to sense blood flow in the veins and convert that to heart beat.

Optical method uses the fact that blood vessels in any patch of skin such as fingertips furnished with a good blood supply, alternately expand and contract in time with the heartbeat. A LED and a photo resistor are used to sense this variation in skin contrast. This method uses both transmittance and reflectance principles. It is precise, cheap and non-invasive method due to lack of attachment on the body.

Page 12: Multimedia University of Kenya

2.3 Arduino UnoThe Uno is a microcontroller board based on the ATmega328P. It has 14 digital input/output pins

(of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz quartz crystal, a USB

connection, a power jack, an ICSP header and a reset button. It contains everything needed to

support the microcontroller. It is simply connected to the computer using a USB cable or

powered with an AC-to-DC adapter or battery to get it started.

"Uno" means one in Italian and was chosen to mark the release of Arduino Software (IDE) 1.0.

The Uno board and version 1.0 of Arduino Software (IDE) were the reference versions of

Arduino, now evolved to newer releases. The Uno board is the first in a series of USB Arduino

boards, and the reference model for the Arduino platform.

WHY ARDUINO

Cheap - Arduino boards are inexpensive when compared to other microcontroller platforms.

Cross-platform - The Arduino Software runs on Windows, Macintosh OSX, and Linux operating

systems. Most microcontroller systems can only run on Windows.

Simple, clear programming environment - The Arduino Software (IDE) is easy-to-use for

beginners, yet flexible enough for advanced users to take advantage of as well.

Open source and extensible software - The Arduino software is published as open source tools,

available for extension by experienced programmers. The language can be expanded through C+

+ libraries.

Page 13: Multimedia University of Kenya

Open source and extensible hardware - The plans of the Arduino boards are published under a

Creative Commons license, so experienced circuit designers can make their own version of the

module, extending it and improving it. Even relatively inexperienced users can build the

breadboard version of the module in order to understand how it works and save money.

TECHNICAL SPECS OF ARDUINO UNO

Microcontroller ATmega328P

Operating Voltage 5V

Input Voltage (recommended) 7-12V

Input Voltage (limit) 6-20V

Digital I/O Pins 14 (of which 6 provide PWM output)

PWM Digital I/O Pins 6

Analog Input Pins 6

DC Current per I/O Pin 20 mA

DC Current for 3.3V Pin 50 Ma

Flash Memory32 KB (ATmega328P)

of which 0.5 KB used by boot loader

SRAM 2 KB (ATmega328P)

EEPROM 1 KB (ATmega328P)

Clock Speed 16 MHz

Length 68.6 mm

Width 53.4 mm

Weight 25 g

The ATmega328 on the Uno comes preprogrammed with a boot loader that allows one to upload

new code to it without the use of an external hardware programmer. The Uno can be

programmed with the Arduino Software (IDE).

2.4 LCD Display

Below is a typical LCD display

Page 14: Multimedia University of Kenya

Fig 1.8 LCD display

Source: https://www.arduino.cc/en/Tutorial/HelloWorld

The LCD will display the body temperature and hear rate

2.5 ARDUINO GSM SHIELD

The Arduino GSM shield allows an Arduino board to connect to the internet, send and receive

SMS, and make voice calls using the GSM library

fig 1.9 Arduino GSM Shield

Source: https://www.arduino.cc/en/Main/ArduinoGSMShield

The Arduino GSM Shield allows an Arduino board to connect to the internet, make and

receive voice calls and send and receive SMS messages. The shield uses a radio modem M10 by

Quectel. It is possible to communicate with the board using AT commands. The GSM library has

a large number of methods for communication with the shield.

Page 15: Multimedia University of Kenya

The shield uses digital pins 2 and 3 for software serial communication with the M10. Pin 2 is

connected to the M10’s TX pin and pin 3 to its RX pin. The M10 is a Quad-band GSM/GPRS

modem that works at frequencies GSM850MHz, GSM900MHz, DCS1800MHz and

PCS1900MHz. It supports TCP/UDP and HTTP protocols through a GPRS connection. GPRS

data downlink and uplink transfer speed maximum is 85.6 kbps.

Fig 2.0 Arduino GSM shield

To interface with the cellular network, the board requires a SIM card provided by a network operator.A SIM card is inserted into the holder

2.5.1 GSM

This is an international standard for mobile communication which in full is Global System for

Mobile communications. It also referred to as 2G, which is second generation cellular network.

GSM supports outgoing and incoming voice calls, Simple Message System, and data

communication via GPRS among others.

The Arduino GSM shield is actually a GSM modem. In the eyes of a mobile operator, the

Arduino GSM shield looks just like a mobile phone while from Arduino perspective, the

Arduino GSM shield looks just like a modem.

Page 16: Multimedia University of Kenya

2.5.2 GPRS

GPRS is a packet switching technology that stands for General Packet Radio Service. It can

provide data rates between 56-114 Kbit per second.

A number of technologies such as SMS rely on GPRS to function. With the GSM shield, it is

also possible to leverage the data communication to access the internet. Similar to the Ethernet

and Wi-Fi libraries, the GSM library allows the Arduino to act as a client or server, using http

calls to send and receive web pages.

2.5.3 SIM cards

In addition to the GSM shield and an Arduino, another needed thing is a SIM card. The SIM

represents a contract with a communications provider. The communications provider will

provide GSM coverage where I am, and or have a roaming agreement with a company providing

GSM coverage in my location.

2.5.4 GSM shield mounted onto a Arduino Uno

To upload sketches to the board, it is connected to my computer with a USB cable and uploads

my sketch with the Arduino IDE. Once the sketch has been uploaded, the board disconnected

from the computer and it is then powered on an external power supply.

This sketch will check the modem's IMEI number. This number is unique to each modem, and is

used to identify valid devices that can connect to a GSM network. Once the number has been

read from the modem, the Arduino will print out the network carrier it is connected to and the

signal strength of the network over the serial port.

Various codes are then used to enable the GSM capabilities such as calls, sms among others.

Page 17: Multimedia University of Kenya

CHAPTER 4: METHODOLOGY

3.1 Introduction This chapter describes the method which will be used to implement this project. This project

is divided into two main parts which are hardware design and software design. For the hardware

design, it is focus on the main controller hardware, Arduino Uno board which connects to the

heart rate sensor and temperature sensor (LM 35). Meanwhile, for the software design, Arduino

and Matlab are used.

Hardware design

Arduino Uno Board

Arduino Uno board is the main function system in this project because it reads and interprets the

data from the heart rate and the temperature sensor outputs. Arduino software is downloaded

directly through the internet from the Arduino main page in order to build a specific

programmed. Arduino needs a USB cable to power up the board in 5V. Excess power will cause

irreparable damage to the Arduino board.

Temperature Sensor Circuit

Body temperature circuit is to measure the body temperature of patient. The normal temperature for human is 37.0 degree Celsius. Temperature sensor contains three pins that are connected directly to the Arduino Uno board. They are 5V, GND and analog output pins. Other common sensors used for temperature measuring are thermistors, thermocouples and resistance thermometers but LM35 is used because it can measure temperature more accurately than the others and generates a higher output voltage than thermocouples. LM35 sensor may not require that the output voltage be amplified. The LM35 is an integrated circuit sensor. Its electrical output signal is proportional to the temperature in degree Celsius temperature.

GSM Module

This is interfaced with the Arduino Uno to transfer the processed signal to a doctor, a nurse or a

relative via GSM module.

Heart Beat sensor

This shall read the heart rate which is then processed by the processor and displayed on LCD

display and sent out through GSM module

Page 18: Multimedia University of Kenya

FLOW CHART OF THE SYSTEM

Body temperature display?

ECG Display?

End

Send data to phone

Read the output of ECG and

temp. sensor

start

yes

no

no

yes

Page 19: Multimedia University of Kenya

BLOCK DIAGRAM OF THE SYSTEM

sensor sensor

patient

Arduino Uno

doctor's/nurse's phone

gurdian's phone

LCD display

Arduino GSM shield

Page 20: Multimedia University of Kenya

CHAPTER 5: BUDGETIn this chapter, I give an approximation of how much I expect to spend in this project

ITEM QUANTITY PRICEArduino Uno(ATmega328P)

1 Ksh 2000

Arduino GSM Shield 1Ksh 3000

16×2 LCD Module for Arduino

1 Ksh 100

Temperature sensor(LM35) 1Ksh 200

Heart Beat sensor 1Ksh 300

Power Adaptor 1Ksh 400

LM358 Op-amp 1 Ksh 100L.E.Ds

6

Ksh 100

photodiode

2

Ksh 100

Resistors: 1 × 100 kΩ, 1 ×10 kΩ, 1 ×2.4 kΩ, 1 ×330 Ω, 1 × 100 Ω,

5

Ksh 100

2 × 10 kΩ Potentiometers 2 Ksh 200Total 22 Ksh 6800

CHAPTER 5: WORK PLANPROJECT SCHEDULE

SEMESTER 1 SEMESTER 2

Months Jan Feb Mar April May June July

Aug

Page 21: Multimedia University of Kenya

Project

Project Proposal

Background Research

Proposal Preparation

Proposal presentation

Implementation

Selection and ordering componentsDesign

Coding

Simulation and implementationWrite up

Submit Project

Presentation

References[1] www.ti.com “Texas instruments LM35 integrated temperature sensor data sheet” 2016.

[2] www.arduino.cc

[3] Wan Seri Bahiyah Binti w Sudin Patient monitoring system using wireless sensor network

Page 22: Multimedia University of Kenya

[4] Banja Wendy Lauren Akoth Home patient monitoring based on gprs

[5] Purnima, Puneet Singh “Zigbee and GSM Based Patient Health Monitoring System” 2014

International Conference on Electronics and Communication System (lCECS -2014)

[6] Bandana Mallick and Ajit Kumar Patro “Teart rate monitoring system using fingertip through Arduino and processing software” Journal of Theoretical and Applied Information Technology10th April 2014. Vol. 62 No.1[7] A. N. M. M Haque, G. Tangim, T. Ahammad and M. R. H Khonokar M. K Islam, "Study and analysis of ECG signal using MATLAB & LABVIEW as effective tools.," vol. IV, no. 3, June 2012.[8] Jaiee Sitaram Adivarekar et. al “Patient Monitoring System Using GSM Technology” International Journal Of Mathematics And Computer Research Volume 1 issue 2 March 2013 Page No.73-78 ISSN :2320-7167[9] Shrenik Suresh Sarade et. al “ patient monitoring and alerting system by using gsm” International Research Journal of Engineering and Technology (IRJET) Volume: 02 Issue: 03 |June-2015