Erker Gregory J 1987 Sec.Pdf (7.429Mb)
Total Page:16
File Type:pdf, Size:1020Kb
A MICROPROCESSOR BASED PORTABLE BIOMEDICAL DATA RECORDER A Thesis Submitted to the Faculty of Graduate Studies and Research in Partial Fulfilment of the Requirements for the Degree of Ma�ter of Science in the Department of Electrical Engineering University of Saskatchewan by Gregory J. Erker Saskatoon, Saskatchewan March 1987 The author claims copyright. Use shall not be made of the material contained herein without proper acknowledgement, as indicated on the following page. ii The author has agreed that the Library, University of Saskatchewan, may make this thesis freely available for inspection. Moreover, the author has agreed that permission for extensive copying of this thesis for scholarly purposes may be granted by the professor or professors who supervised the thesis work recorded herein or, in their absence, by the Head of the Department or the Dean of the College in which the thesis work was done. It is understood that due recognition will be given to the author of this thesis and to the University of Saskatchewan in any use of the material in this thesis. Copying or publication or any other use of the thesis for financial gain without approval by the University of Saskatchewan and the author's written permission is prohibited. Requests for permission to copy or to make any other use of material in this thesis in whole or in part should be addressed to: Head of the Department of Electrical Engineering University of Saskatchewan SASKATOON, Canada. iii UNIVERSITY OF SASKATCHEWAN Electrical Engineering Abstract 87A281 A MICROPROCESSOR BASED PORTABLE BIOMEDICAL DATA RECORDER Student: Gregory J. Erker Supervisor: Dr. H. C. Wood M.Sc. Thesis Presented to the College of Graduate Studies and Research March 1987 ABSTRACT Data recorders collect and store data for later analysis. Many recorders do som� processing of the raw data immediately to separate out the data of interest and use the storage space more efficiently. The portable biomedical data recorder described here stores data from a human subject and is self contained and light enough to be worn by the subject. The medical data of interest is the acidity of the lower part of the esophagus and the relationship of this acidity to chest pains in a patient. Diagnosis of this problem can be done by monitoring this acidity for a 24 hour period and looking for a correlation between an increase in acidity and the chest pains. In the past the equipment to do this test was non-portable and used a paper strip-chart recorder to plot the variations in acidity. A portable recorder as described in this thesis can replace this equipment while allowing the patient freednm of movement and eliminating the requirement for a hospital stay for the 24 hour period. The microprocessor in the recorder allows the recorder to be reconfigured to maximize the usable data collected. In this thesis features of the recorder and its design are explained. The desk top microcomputer which is used to analyze the biomedical data is also described. iv ACKNOWLEDGEMENTS The author expresses his appreciation to Professor H. Wood for his guidance and encouragement. His assistance and advice is gratefully acknowledged. The author would also like to thank Professor K. Takaya for his help in setting up the relationship between the author and the medical personnel at the University Hospital. Finally the author would like to thank Dr. P. C. Ganguli and Dr. L. Worobetz for their advice and patience and for their help in the clinical testing of the recorder. Financial assistance provided by the University of Saskatchewan Graduate Scholarship program, and the Saskatchewan Health Research Board for part of this work is thankfully acknowledged. v TABLE OF CONTENTS Page COPYRIGHT ii ABSTRACT iii ACKNOWLEDGEMENTS iv TABLE OF CONTENTS v LIST OF FIGURES viii LIST OF SYMBOLS AND DEFINITIONS x 1. INTRODUCTION 1 1.1 Data Recorders 1 1.2 Medical Use 2 1.3 Proposed Recorder and Analysis System 3 2. RECORDER REQUIREMENTS 5 2.1 Type of Recorder 5 2.2 Functional Requirements 5 3. THE PH RECORDER 8 3.1 The pH Meter 8 3.1.1 pH and pH Measurements 8 3.1.2 The pH Meter and Probe Used 12 3.2 Recorder to pH Meter Interface 14 3.2.1 The AID Circuit 17 3.3 Data Storage 19 3.3.1 Storage Requirements 19 3.3.2 Devices Considered 21 3.3.3 Non-volatile Ram 23 vi Page 3.4 The Microprocessor Section 25 3.4.1 Microprocessor Selection 25 3.4.2 ROM and Input/Output 28 3.5 Serial Link 31 3.5.1 Function of Link 31 3.5.2 Implementation of the Link 34 3.6 Power Supply 35 3.6.1 Battery Selection 36 3.6.2 The Battery Charger and Power Supply 40 3.7 Packaging 44 3.7.1 Case and Connectors 44 3.7.2 Operator Controls 47 4. RECORDER SOFTWARE 52 4.1 Functions Required 52 4.2 Recording Software 54 4.2.1 Data Storage Method 63 4.3 Communication Software 67 4.3.1 Software DART 68 4.3.2 Commands Implemented 71 4.3.3 Description 78 4.4 Standby 81 5. ANALYSIS SYSTEM DESCRIPTION 85 5.1 Preparing to Record 87 5.2 Load�ng and Saving Data 92 5.3 Analysis of Data 94 vii Page 6. ANALYSIS SYSTEM SOFTWARE 99 6.1 Interface with User 99 6.2 Functions Required 101 6.3 Communication with Recorder ·104 6.4 Storage of the Data 112 6.5 Analysis of the Data 115 7. POWER SWITCHING TEST 119 7.1 Testing of Recorder Circuit 119 7.2 Proposed General Testing Procedure 121 8. TESTING OF THE SYSTEM 125 8.1 pH Meter Testing 125 8.2 Testing AID Section of the Recorder 126 8.3 Testing with Human Subject 130 9. RESULTS AND CONCLUSIONS 136 10. REFERENCES 138 APPENDICES 139 Appendix A: Users Manual for Recorder 140 Appendix B: Computer Program Listings 157 Recurder SW General Routines 157 Recorder SW Record Mode Routines 163 Recorder SW Communication Routines 172 CBM-8032 SW Assembly Language Routines 181 CBM-8032 SW BASIC Program 186 viii LIST OF FIGURES Page Figure 3.1 Block diagram of pH recorder 9 Figure 3.2 Schematic of AID Converter section 18 Figure 3.3 Schematic of RAM section 24 Figure 3.4 Schematic of CPU Address and Data Buses 27 Figure 3.5 Schematic of EPROM section 29 Figure 3.6 Schematic of CPU Input/Output 30 Figure 3.7 Schematic of Real Time Clock 32 Figure 3.8 Schematic of Battery and Regulator section 37 Figure 3.9 Schematic of Battery Charger 41 Figure 3.10 Configuration of Recorder 45 Figure 3.11 Cross-section of Recorder 48 Figure 4.1 State diagram of Recorder Software 53 Figure 4.2 Sub-states of Record State 55 Figure 4.3 Flowchart of Two speed recording algorithm 58 Figure 4.4 Flowchart of ChangeSpeed algorithm 61 Figure 4.5 Recorder Data RAM Special codes summary 65 Figure 4.6 Communication link command summary 73 Figure 4.7 Communication link reply summary 77 Figure 5.1 Block Diagram of Analysis System 86 Figure 5.2 Analysis Program Main Menu 87 Figure 5.3 Sub-menu for setting time in recorder 88 Figure 5.4 Sub-menu to change recorder parameters 90 Figure 5.5 Read sub-menu 92 Figure 5.6 Sub-menu for display of data 95 ix Page Figure 5.7 Sample of Annotated data 96 Figure 6.1 Flowchart of Analysis Program 103 Figure 6.2 Flowchart of Subroutine to send commands to recorder 105 Figure 6.3 Flowchart of ML routine which sends commands 107 Figure 6.4 Example of subroutine nesting in analysis program 113 Figure 8.1 Sample Plot of All Data 133 Figure 8.2 Sample Plot of "Slow" Data Only 134 x LIST OF SYMBOLS AND DEFINITIONS AID abbreviation for Analog to Digital converter. Bit a single Binary digit, it can have a value of 0 or 1 only. Byte an eight bit number, can range from 0 to 255. CBM acronym for Commodore Business Machines. Also used to refer to the CBM 8032 microcomputer. CMOS acronym for Complementary Metal Oxide Semiconductor, a technology for producing low power ICs. CPU acronym for Central Processing Unit. DIP acronym for Dual In-line Pin, a type of IC package with two parallel rows of pins. EEPROM acronym' for Electrically Erasable Programmable Read Only Memory. A device that retains it contents when power is no longer applied. It can be erased during operation with proper elecrical signals. EPROM acronym for Erasable Programmable Read Only Memory. A device that retains its contents when power is no longer applied. It is erased with ultraviolet light. IC acrortym for Integrated Circuit. LCD acronym for Liquid Crystal Display. LED acronym for Light Emitting Diode. NMOS acronym for Negative Metal Oxide Semiconductor, a technology that produces higher power ICs than CMOS. pH unit of acidity measurement. 0 is extremely acid, 7 is neutral and 14 is extremely alkaline. RAM acronym for Random Access Memory. RAMs normally lose their contents when power is removed. RTC acronym for Real Time Clock, a device that keeps the time of day. TTL acronym for Transistor Transistor Logic. UART acronym for Universal Asynchronous Receiver Transmitter. UARTs take a character of data and transmit it in serial fashion, adding timing information. They also receive a serial data stream and reconvert it to a character. 1 1. INTRODUCTION In this section the concept of data recorders will be discussed and the medical use for a specific type will be described.