• Tidak ada hasil yang ditemukan

Biomedical Signal Generator.

N/A
N/A
Protected

Academic year: 2017

Membagikan "Biomedical Signal Generator."

Copied!
24
0
0

Teks penuh

(1)

BIOMEDICAL SIGNAL GENERATOR

CHUN WEY TONG

This report is submitted in partial fulfillment of the requirements for the award of Bachelor of Electronic Engineering and Computer Engineering with Honors

Faculty of Electronic and Computer Engineering Universiti Teknikal Malaysia Melaka

(2)

UNIVERSTI TEKNIKAL MALAYSIA MELAKA

FAKULTI KEJURUTERAAN ELEKTRONIK DAN KEJURUTERAAN KOMPUTER

BORANG PENGESAHAN STATUS LAPORAN

PROJEK SARJANA MUDA II

Tajuk Projek : Biomedical Signal Generator

Sesi

Pengajian : 2008/2009

Saya CHUN WEY TONG

(HURUF BESAR)

mengaku membenarkan Laporan Projek Sarjana Muda ini disimpan di Perpustakaan dengan syarat-syarat kegunaan seperti berikut:

1. Laporan adalah hakmilik Universiti Teknikal Malaysia Melaka.

2. Perpustakaan dibenarkan membuat salinan untuk tujuan pengajian sahaja.

3. Perpustakaan dibenarkan membuat salinan laporan ini sebagai bahan pertukaran antara

institusi pengajian tinggi.

4. Sila tandakan ( ) :

SULIT*

(Mengandungi maklumat yang berdarjah keselamatan atau kepentingan Malaysia seperti yang termaktub di dalam AKTA RAHSIA RASMI 1972)

TERHAD* (Mengandungi maklumat terhad yang telah ditentukan oleh

organisasi/badan di mana penyelidikan dijalankan)

TIDAK TERHAD

Disahkan oleh:

__________________________ ___________________________________

(TANDATANGAN PENULIS) (COP DAN TANDATANGAN PENYELIA)

Alamat Tetap: 1178, Lorong Malinja, Jalan Sungai Nibong, 36000 Teluk Intan, Perak Darul Ridzuan.

(3)

“I hereby declare that this report is the result of my own work except for quotes as cited in the references.”

(4)

“I hereby declare that I have read this report and in my opinion this report is sufficient in terms of the scope and quality for the award of Bachelor of Electronic

Engineering and Computer Engineering with Honors.”

Signature : ………..

Supervisor’s Name : ………..

(5)
(6)

ACKNOWLEDGEMENT

First and foremost, I would like to convey my deepest appreciation to my supervisor Cik Noor Shahida Binti Mohd Kasim for her patience, concern, invaluable guidance and also encouragement throughout the preparation of this thesis.

Besides that, I would like to dedicated my deepest thank to my beloved parents and family members for their tolerance, financial and moral support while completing my tertiary education here. Thanks to all the lecturers, friends, fellow course mate for their pleasure opinion and encouragement.

(7)

ABSTRACT

In general, biomedical signals such as electrocardiogram (ECG) and heart sound signal play an extremely important role for doctors and other medical practitioners to forecast and determine a patient’s well-being and condition. Although biomedical signals are very important to predict patient’s condition but it is so hard to get the signals from human body for study and analysis purpose. Therefore, as a solution, a biomedical signal generator was developed in this final year project.

(8)

ABSTRAK

Secara amnya, isyarat bio-perubatan seperti isyarat jantung dan isyarat denyutan jantung memainkan peranan yang penting bagi doktor ataupun mana-mana staf perubatan untuk mengenal pasti dan meramalkan keadaan dan kesihatan pesakit. Walaupun isyarat bio-perubatan adalah sangat penting untuk meramalkan kesihatan pesakit, tetapi ia adalah susah untuk mendapatkan isyarat-isyarat terus daripada badan manusia untuk tujuan pembelajaran dan analisasi. Oleh itu, untuk menyelesaikan masalah ini, satu “Biomedical signal generator” telah dibina dalam projek sajana muda.

Objektif projek sajana muda ini adalah untuk membina “Biomedical signal generator” untuk membaca data isyarat bio-perubatan seperti isyarat jantung dan

isyarat bunyi jantung dengan mengunakan “PIC” sebagai “processor”. Di dalam projek sajana muda ini, “SD/MMC” akan digunakan sebagai media penyimpan luar untuk menyimpan data isyarat dalam bentuk “text file”. Selain itu, PIC18F452 akan digunakan sebagai “processor” untuk membaca data isyarat bio-perubatan. Untuk output, LCD atau PC (“HyperTerminal”) akan digunakan untuk mempaparkan data

(9)

TABLE OF CONTENTS

CHAPTER CONTENT PAGE

PROJECT TITLE i

REPORT STATUS ii

DECLARATION iii

DEDICATION iv

ACKNOWLEDGEMENT vi

ABSTRACT vii

ABSTRAK viii

TABLE OF CONTENTS ix

LIST OF TABLES xi

LIST OF FIGURES xii

LIST OF ABBREVIATIONS xiv

I INTRODUCTION

1.1 Background study 1

1.2 Objective 2

1.3 Problem Statement 2

1.4 Scope 3

1.5 Project Methodology 3

1.6 Thesis Overview 4

II LITERATURE REVIEW

2.1 Biomedical Signals 5

(10)

2.1.2 Hearts Sound Signals 7 2.1.3 Electroencephalography (EEG) 7

2.2 Microcontroller 8

2.2.1 Embedded Design 9

2.2.2 Peripheral Interface Controller (PIC) 10

2.3 External Memory 12

2.3.1 Memory Card 12

2.3.2 Contact Surface of MMC/SD 14 2.3.3 Serial Peripheral Interface (SPI) Mode 14

2.3.4 SPI Command Set 15

2.4 Recent Development in Biomedical

Signal Engineering 15

2.4.1 Interfacing Components 16

2.4.2 Findings 17

2.5 Recent Development of MMC and Microcontroller 17

2.5.1 Hyper Terminal Version 17

2.5.2 Microsoft Visual Basic (VB) Version 18 2.5.3 Schematic of the Experiments 19

2.5.4 Findings 20

III MICROCONTROLLER

3.1 Introduction to PIC18F452 21

3.2 PIC Programming 24

3.2.1 C Programming Language 25

3.3 Compiler 25

3.3.1 MikroC 26

IV METHODOLOGY

4.1 Introduction 27

(11)

4.3 PIC Circuit Design 30

4.4 Interfacing SD/MMC card to PIC 31

4.5 Circuit simulation using Proteus v7.2 32

4.5.1 LED Blinking Simulation 32

4.5.2 Simple Input Output Simulation 33 4.5.3 MMC-PIC Interfacing Circuit 35

4.6 MikroC Compiler 36

4.6.1 MikroC Compiler Syntax 36

4.6.2 Flowchart 39

V RESULT AND DISCUSSIONS

5.1 Introduction 40

5.2 Hardware Fabrication and Circuit Testing 41

5.2.1 Data Reading from MMC 43

5.3 Simulation Result using Proteus v7.2 45

5.3.1 Simulation Results 46

5.3.2 Data Reading from MMC in Simulation 47

5.4 Analysis and Discussions 50

5.4.1 Analysis 50

5.4.2 Discussions 53

VI CONCLUSION AND FUTURE DEVELOPMENT

6.1 Conclusion 54

6.2 Future Development 55

VII REFERENCES 56

(12)

LIST OF TABLE

NO TITLE PAGE

2.1 Data Table of selected Memory Card Formats 13

2.2 SPI Command Set for Read and Write 15

3.1 Key Features of PIC18F4x2 22

4.1 Input and Output of the System 34

5.1 Switch Button Indicator 42

(13)

LIST OF FIGURE

NO TITLE PAGE

1.1 Example of 12 Lead ECG of a 26 year old male 2

1.2 Methodology of Final Year Project 3

2.1 Schematic Representation of Normal ECG 6

2.2 A Normal Adult 12-Lead ECG 6

2.3 A Heart Sound Signal for a Normal Heartbeat 7 2.4 Epileptic Spike and Wave Discharges Monitored with EEG 8

2.5 Examples of PICs 10

2.6 Examples of Programmers 11

2.7 Miniaturization is an Evident in Memory Card Creation 12

2.8 Contact Surface of MMC/SD 14

2.9 Block Diagram of the Pulse Detector Device 16

2.10 PIC16F877A Microcontroller Pinout 16

2.11 Hyper Terminal Screen Shot 18

2.12 Microsoft Visual Basic Screen Shot 19

2.13 Schematic of Interfacing MMC and PIC 19

3.1 Pin Diagram of PIC18F452 21

3.2 Program Memory Map and Stack for PIC18F452 23 3.3 special register function map for PIC18F452 24 3.4 Integrated Development Environments (IDE) of MikroC 26

4.1 Project Block Diagram 27

4.2 Overall Research Flows for Biomedical Signal

Generator Development 28

4.3 Two Examples of Data Saved in Text File 29

(14)

4.5 Another Example of ECG Signals 30 4.6 Circuit Diagram for the Boot Loader Hardware 30 4.7 SD MMC Interface with the PIC Circuit Schematic 31

4.8 Coding for LED Blinking System 32

4.9 LED Blinking System Output 32

4.10 Simple Input Output System Schematic 33

4.11 Coding of Simple Input Output System 34

4.12 Output of the System When Button “RD2” Was Pressed 35

4.13 MMC-PIC Interfacing Circuit 35

4.14 MMC-PIC Interfacing Circuit with MMC Initialized 36

4.15 Parameters Assignment 36

4.16 Parameter Definition 37

4.17 “Read” Function Created to Extract the Text File Data 37

4.18 Main Function of the Program 38

4.19 Biomedical Signal Generator Program’s Flowchart 39

5.1 Biomedical Signal Generator 40

5.2 LCD Display 41

5.3 Button Information Display on LCD 42

5.4 Button “RB0” Pressed to Select File “normal.txt” 43 5.5 “normal.txt” Data Extracted and Displayed on LCD 43 5.6 Button “RB7 Pressed to Select “premmf1.txt” 44 5.7 Data Extract from “premmf1.txt” and Displayed on LCD 44

5.8 Biomedical Signal Generator Circuit 45

5.9 LCD Display once the MMC was Detected 46

5.10 Switch Button Information Displayed on LCD in sequence 47

5.11 Button “RB0” Pressed 48

5.12 “normal.txt” data display on LCD 48

5.13 Button “RB4” Pressed 49

5.14 “condrbbb.txt” data Display on LCD 49

5.15 Biomedical Signal Generator Circuit with Virtual Terminal 50 5.16 Biomedical Signal Generator Displayed “normal.txt” Data 51 5.17 Biomedical Signal Generator Displayed “condlbbb.txt” Data 52

5.18 MMC-PIC Interfacing Circuit 53

(15)

LIST OF ABBREVIATIONS

ECG/EKG - Electrodiagram

EEG - Electroencephalography PIC - Peripheral Interface Controller PSM - Project Sajana Muda

SD - Secured Digital

USART - Universal Synchronous Asynchronous Receiver Transmitter

DSP - Digital Signal Processing ADC - Analog to Digital Convertor DAC - Digital to Analog Convertor

RAM - Random Access Memory

I/O - Input or Output

ISR - Interrupt Service Routine CPU - Central Processing Unit ICSP - In Circuit Serial Programming

LVP - Low Voltage Programming

IDE - Integrated Development Environment ANSI - American National Standards Institute DRM - Digital rights management

MMC - Multi-Media Card

SPI - Serial Peripheral Interface VB - Microsoft Visual Basic

CS - Chip Select

(16)

CHAPTER 1

INTRODUCTION

1.1 Background Study

Biomedical signal is or biopotential is an electric quantity (voltage or current or field strength), caused by chemical reactions of charged ions. Another use of the term lies in describing the transfer of information between and within cells, as in signal transduction. Example for biomedical signal is electrocardiogram, heart sound signal, lung sound signal, etc.

Biomedical signals such as electrocardiogram (ECG) indicates the overall rhythm of the heart and weaknesses in different parts of the heart muscle. It is the best way to measure and diagnose abnormal rhythms of the heart, particularly abnormal rhythms caused by damage to the conductive tissue that carries electrical signals, or abnormal rhythms caused by levels of dissolved salts (electrolytes), such as potassium, that are too high or low.In myocardial infarction (MI), the ECG can identify damaged heart muscle.

(17)
[image:17.612.135.515.67.218.2]

Figure 1.1 Example of 12 Lead ECG of a 26 year old male [1]

Since the biomedical signal are very important to predict patient’s condition, therefore, a biomedical signal generator which can store data and regenerate the signal similar with human signal for monitoring purpose was develop in this project.

1.2 Objectives

The objectives of the project are:

(I) To construct the signal generator using PIC (PIC was used as a simulator or processor)

(II) To read the signal data from MMC

(III) To display the signal data read from MMC at LCD

1.3 Problem Statement

(18)

Besides that, the signal generator was constructing for calibration purpose. These are because the ECG machine needs to calibrate every half year and for safety purpose, signal generator was use to replace human signal for calibration.

1.4 Scope

 A PIC18F452 will be used as a platform or simulator to read the biomedical signal data from MMC.

 The biomedical signal data was saved in external memory like SD/MMC memory card in a text file format.

 The project will concentrate on generating ECG and the heart sound signal first. For the further improvement, EEG signal and lung sound signal can be added into this signal generator.

 The data will be display on the LCD or on the PC using Hyper Terminal.

1.5 Project Methodology

Start

Literature Review Data Collection

PIC Design Function?

Improve

The PIC Design Function?

End

Function Function

Not function

[image:18.612.189.465.458.611.2]

Not function

Figure 1.2 Methodology of Final Year Project

(19)

was done. Besides that, experimental design will be planned and the design will be used to build the signal generator in PSM II. While in the PSM II, signal generator was designed and built.

1.6 Thesis Overview

Chapter 1: Introduction of the final year project. This chapter introduces the purpose of the signal generator and why I choose this project. Besides that, this chapter also includes objective, problem statement, scope, methodology of the project, and thesis overview.

Chapter 2: Literature review. This chapter mentioned the literature review that had been done before the project is started. This chapter includes background study, theory, research and data collections.

Chapter 3: Microcontroller. This chapter was mentioned functions, embedded system of the PIC18F452, the programming language use to develop the program and the compiler use to compile the program.

Chapter 4: Methodology. This chapter mentioned about method and approach used to do the project. Besides that, this chapter also mentioned method use to analyze the data, factors considered when choosing the method, advantages and disadvantages of the method.

Chapter 5: Results and Discussion. This chapter mentions about the results of the project and discussion of the projects.

(20)

CHAPTER 2

LITERATURE REVIEW

2.1 Biomedical Signals

There are many types of biomedical signals such like electrocardiogram (ECG), heart sound signals, electroencephalography (EEG), lung sound signals and etc.

2.1.1 Electrocardiogram (ECG)

An electrocardiogram is a recording of the electrical activity of the heart over time produced by an electrocardiograph, usually in a noninvasive recording via skin electrodes. [1]

(21)
[image:21.612.188.462.142.380.2]

damage to the conductive tissue that carries electrical signals, or abnormal rhythms caused by levels of dissolved salts (electrolytes), such as potassium, that are too high or low.

Figure 2.1 Schematic Representation of Normal ECG [1]

[image:21.612.159.495.442.683.2]
(22)

2.1.2 Heart Sound Signals

The heart sounds are the noises or sound that generated by the beating heart and the resultant flow of blood through it. This is also called a heartbeat. In cardiac auscultation, an examiner uses a stethoscope to listen for these sounds, which provide important information about the condition of the heart. [3]

[image:22.612.163.491.357.538.2]

There are two major sounds heard in the normal heart sound like “lub dub”. The “lub” is the first heart sound, commonly termed S1, and is caused by turbulence caused by the closure of mitral and tricuspid valves at the start of systole. The second sound, “dub” or S2, is caused by the closure of aortic and pulmonic valves, marking the end of systole. Thus the time period elapsing between the first heart sound and second sound defines systole (ventricular ejection) and the time between the second sound and the following first sound defines diastole (ventricular filling).[4]

Figure 2.3 A Heart Sound Signal for a Normal Heartbeat

2.1.3 Electroencephalography (EEG)

(23)
[image:23.612.195.459.65.297.2]

Figure 2.4 Epileptic Spike and Wave Discharges Monitored with EEG [5]

2.2 Microcontroller [6]

Microcontroller is a functional computer system on a single chip or it also known as an integrated circuit was build where all the component of the microcomputer system was combined together. Microcontrollers include an integrated CPU, memory (a small amount of RAM, program memory, or both) and peripherals capable of input and output.

In addition to the usual arithmetic and logic elements of a general purpose microprocessor, the microcontroller integrates additional elements such as read-write memory for data storage, read-only memory for program storage, Flash memory for permanent data storage, peripherals, and input/output interfaces.

(24)

2.2.1 Embedded Design

The majority of computer systems in use today are embedded in other machinery, such as automobiles, telephones, appliances, and peripherals for computer systems. These are called embedded systems where an embedded system is a special-purpose computer system designed to perform one or a few dedicated functions often with real-time computing constraints. Some embedded systems are very sophisticated; many have minimal requirements for memory and program length, with no operating system, and low software complexity. Embedded systems usually have no keyboard, screen, disks, printers, or other recognizable I/O devices of a personal computer, and may lack human interaction devices of any kind. For example: embedded systems for microcontroller are interrupt and program.

Interrupts

Microcontroller has provided a real time response to events in the embedded system that is interrupt. When certain events occur during main program is running, an interrupt system can signal the processor to suspend processing the current program and begin an interrupt service routine (ISR). The ISR will perform any processing required before returning to the original instruction sequence. The interrupt are device dependent and often include events such as an internal timer overflow, data receive on a communication link and etc.

Program

Microcontroller program must fit in the available on-chip program memory, since it would be costly to provide a system with external memory. Compilers are use and assembly languages are used to turn high-level language programs into a compact machine code for storage in the microcontroller’s memory.

Gambar

Figure 1.1 Example of 12 Lead ECG of a 26 year old male [1]
Figure 1.2 Methodology of Final Year Project
Figure 2.1 Schematic Representation of Normal ECG [1]
Figure 2.3 A Heart Sound Signal for a Normal Heartbeat
+2

Referensi

Dokumen terkait

Hasil Uji Statistik F pada Tabel 4.9 diperoleh nilai signifikansi sebesar 0,000 lebih kecil dari 0,05, artinya secara simultan, profitabilitas dan kapitalisasi pasar

Banyak strategi pengajar- an membaca pemahaman teks bahasa Inggris yang dilakukan para Dosen untuk mahasiswa agar mereka sampai pada pemahaman yang baik terhadap teks

The principal leadership structure in Vocational School 2 Sragen, the principal is the highest leadership in school and organization that in.. charge of all forms of

Penelitian ini bertujuan untuk mendeskripsikan (1) karakteristik materi kegiatan sarapan pagi (membaca Al-Quran dan Asmaul Husna) di MTs Negeri Grabag Magelang; (2)

[r]

[r]

2 Pengetahuan umum responden mengenai karir bidang kehutanan 7 3 Instansi atau badan usaha yang menjadi pilihan mahasiswa 10 4 Faktor internal yang mempengaruhi pilihan pekerjaan

Dari hasil yang didapatkan tersebut, maka dapat disimpulkan bahwa penggunaan metode support vector machine (SVM) dapat diimplementasikan dalam memprediksi kemenangan atlet