Home
blood glucose measurement through urine strip
Contents
1.
2. 5 RA4 TOCKI 16 RASIAN4 SSILVDIN 7 REO RD ANS s 0 8 RET AVRIANG 0 REZICSIANT 10 PIC18F442 PIC18F452 OSCT CLKI 5 13 OSCZICLKOJRAG 4 0 14 RCOTIOSO TICK 15 RCT TTOSI CCP2 16 RC2 CCP1 17 RC3 SCK SCL 18 RDOJPSPO 4 19 RD1 PSP1 20 Figure 3 7 Image and Pin Connections of PIC18F452 3 2 6 Photosensor Box A box with length of 24cm and width of 14cm was built to provide a dark environment for the photosensor so that accurate testing of samples can be assured Figure 3 8 shows the external look and internal look of photosensor box Besides that the photosensor was constructed as shown in Figure 3 9 so that it can stand still alone A distance of approximately 0 6cm was set and measured from below of the photosensor to the ground of the photosensor box as shown in Figure 3 10 34 Figure 3 9 Photosensor Construction Target distance 0 6cm Figure 3 10 Target Distance 3 3 Software Implementation For software implementation PIC Programmer was used to write and compile the program of the microcontroller Meanwhile PIC kit SK40C ENHANCED 40 PINS PIC START UP KIT was used to load the hex file from the PIC Programmer to the microcontroller and then transferred the data from PIC to PC through a UCOOA connection Other than that VB NET was used for programming the user interface and displayed the data which received
3. UC00A UART Transmit signal This is UC00A s transmitter pin SV TTL It should be connected to device s receiver pin UC00A UART This is UCOOA s receiver pin SV TTL It should Receive signal be connected to device s transmitter pin 53 Absolute Maximum Rating Symbol Parameter Min Max Unit Power output pin 5 0 5 0 V Operating voltage 0 0 V TX Transmitter pin of UC00A 0 5 5 V RX Receiver pin of UC00A 0 5 5 V Software Installation UCOOA used USB to UART chip and it require USB driver to be installed 1 time on computer Thus this section user may refer to document name Windows XP Installation Guide which provides users a simple procedure for installing drivers for this device driver under Windows XP Hardware Installation For interface with hardware or microcontroller user needs a cable to plug between UCOOA and hardware Below are the picture and method of making 4 ways cable For step 6 repeat step 1 to 5 for the other end of cable Please start with the same side done in step yellow on bottom and the iron pin is facing up For step 10 second side of cable nodes in pin 1 and 2 are switch with first side 54 APPENDIX B SK40C ENHANCED 40 PINS PIC START UP KIT 56 Features Industrial grade PCB Compact powerful flexible and robust startup platform Save development and soldering time No extra components re
4. button was used to automatically convert the output kHz received from PIC to blood glucose concentration value mmol L according to the set equation 37 ES Form1 DER 4 K Ad BLOOD GLUCOSE MEASUREMENT THROUGH URINE STRIPS USING COLOR SENSOR 1 Filter Er Frequency cy Blood Glucose Concentration Sk kHz mMol L ob Figure 3 13 Form 1 3 4 Hardware and Software Implementation Figure 3 14 illustrates the overall system for blood glucose measurement through urine strip using a photosensor The input of photosensor was selected according to desired filter by switching the two switches on the photosensor box Then the output kHz of the photosensor was transferred into PIC18F452 and the value of the output was digitalized by the microcontroller After that the output value was displayed by the GUI window through a UCOOA USB Converter These overall systems model implemented due to performance testing and in term of troubleshooting to improve the accuracy and quality of the measurement 38 GUI Shown on PC x PIC Kit with Photosensor Switches i PICI8F452 Box with ccu 5908809 Inside Figure 3 14 The Overall System CHAPTER 4 RESULT AND ANALYSIS 4 1 Introduction This chapter discussed the testing results and analysis of the system I tested the functionality of the photosensor first before I started the main testing on samples The
5. 260 Ls 11 63 E 458 27 43 1 1 080 OPB780 Target Range 0 225 inch 0 5715cm APPENDIX D Full Source Codes of PIC 18F452 Microcontroller 67 LIST P 18F452 directive to define processor include lt P18F452 INC gt processor specific variable definitions Oscillator Selection CONFIG OSC HS LP CONFIG BOR OFF CONFIG WDT OFF CONFIG LVP OFF CONFIG PWRT ON CONFIG OSCS OFF Variable definitions These variables are only needed if low priority interrupts are used More variables may be needed to store other special function registers used in the interrupt routines CBLOCK 0 080 WREG TEMP variable used for context saving STATUS TEMP variable used for context saving BSR TEMP variable used for context saving ENDC CBLOCK 0 000 EXAMPLE example of a variable in access RAM STORE3 VAR920US NumH NumL TenK Thou Hund Tens Ones ENDC EEPROM data Data to be programmed into the Data EEPROM is defined here ORG 0xf00000 DE Test Data 0 1 2 3 4 5 Reset vector This code will start executing when a reset occurs ORG 0 0000 goto Main go to start of main code High priority interrupt vector This code will start executing when a high priority interrupt occurs or when any interrupt occurs if interrupt priorities are not enabled ORG 0 0008 bra Highint go to high priority interrupt routine Low priority interrupt vector and routine This code will start exe
6. H202 Oxidized coloured chromogen H202 Chromogen peroxidase It is a dye that make variation of color on the urine strip tested If result gt no glucose concentration result gt got glucose concentration Figure 2 8 Chemical Reactions for Glucose Test inside a Urine Strip 2 5 Unit Used for Glucose Concentration In Human Body There are two main methods of describing concentrations by weight and by molecular count Weights are in grams molecular counts in moles a mole is 6 023x10 molecules In both cases the unit is usually modified by milli or micro or other prefix and is always per some volume often a liter Mmol l is millimoles liter and is the world standard unit for measuring glucose in blood Specifically it is the designated SI System International unit World standard of course means that mmol L is used everywhere in the world except in the US Mg dl milligrams deciliter is the traditional unit for measuring bG blood glucose All scientific journals are moving quickly toward using mmol L exclusively mg dl won t disappear soon and some journals now use mmol L as the primary unit but quote mg dl in parentheses reflecting the large base of health care providers and researchers not to mention patients who are already familiar with mg dl 17 To convert mmol l of glucose to mg dl multiply by 18 whereas to convert mg dl of glucose to mmol l divide by 1
7. iii iv vi vii xi xiii xiv DW A U U N N vii LITERATURE REVIEW 2 1 2 2 2 3 2 4 2 5 2 6 2 7 2 8 2 9 2 10 2 11 Formation of Urine Types of Diabetes Diagnostic Devices Used to Detect Glucose Level 2 3 1 Blood Glucose Meter 2 3 2 Urisys 1100 Urine Strips Unit Used for Glucose Concentration in Human Body Principles of Reflective Color Sensor Microcontroller Serial Port Interface UCOOA Method USB to UART Convertor SK40C Enchanced 40 Pins PIC Start Up Kit Toggle Switch Single Pole Double Throw SPDT Visual Basic NET VB NET DESIGN AND IMPLEMENTATION 3 1 3 2 Introduction Hardware Implementation 3 2 1 Photosensor used Reflective Color Sensor Assembly OPT780Z 3 2 2 Printed Circuits Board PCB Design for Photosensor 3 2 3 Switches 3 2 3 1 For 4 Variable Logical Inputs of Photosensor 3 2 3 2 For Portable Power Supply 3 2 4 Troubleshooting by Making a Portable Power Supply 3 2 5 Embedded ADC in PIC16F877A 10 11 11 13 14 16 17 21 22 24 24 26 27 27 28 28 29 30 31 31 32 32 viii Microcontroller 3 2 6 Photosensor Box 3 3 Software Implementation 3 3 1 Analog to Digital A D Converter ADC of PIC18F452 3 3 2 Graphical User Interface GUI 3 4 Hardware and Software Implementation 4 RESULT AND ANALYSIS 4 1 Introduction 4 2 Testing the Functionality of the Photosensor 4 2 1 Procedures 4 3 Samples Col
8. System EventArgs Handles Button 1 Click Dim mmol As String Dim freg As Double Dim yO As Double Dim rxdata 5 As Byte Dim dataSer As Byte Dim Total As Integer Dim c As String SerialPort1 DiscardInBuffer SerialPort1 Write A SerialPort 1 Read rxdata 0 5 dataSer SerialPort1 ReadByte TextBox3 Text ChrW dataSer dataSer SerialPort1 ReadByte TextBox 1 Text ChrW dataSer SerialPort 1 Read rxdata 0 5 dataSer SerialPort1 ReadByte dataSer rxdata 1 TextBox3 Text ChrW dataSer TextBox4 Text ChrW rxdata 2 SerialPort 1 Write A dataSer SerialPort1 ReadByte TextBox 1 Text ChrW dataSer SerialPort 1 Write A dataSer SerialPort1 ReadByte TextBox 1 Text ChrW dataSer SerialPort Write A dataSer SerialPort1 ReadByte TextBox 1 Text ChrW dataSer SerialPort 1 Write A dataSer SerialPort1 ReadByte TextBox 1 Text ChrW dataSer End Sub Private Sub Label3_Click ByVal sender As System Object ByVal e As System EventArgs Handles Label3 Click End Sub Private Sub TextBox2 TextChanged ByVal sender As System Object ByVal e As System EventArgs Handles TextBox2 TextChanged End Sub Private Sub Button3_Click ByVal sender As System Object ByVal e As System EventArgs SerialPort1 Close End Sub 75 Private Sub Button4_Click ByVal sender As System Object ByVal e As System EventArgs Handles Button4 Click Dim mmol As S
9. fixed input and its linear equation of y 0 2034 x 22 497 were used for software programming including PIC Programming and GUI using VB NET as well Table 4 1 Result Analysis Data Total Error Mean Error Absolute Max Absolute Min Analysis X Blood Total Error 42 Error Error glucose value Imean error Imean error from machine max error min error Blood glucose value from Input graph mmol L Selection Red Filter 29 1267 0 6935 1 5508 0 6883 Green Filter 30 9576 0 7371 1 9451 0 7262 Blue Filter 49 4749 1 1780 4 1440 1 1728 Clear Filter 31 8142 0 7575 1 1348 0 7508 CHAPTER 5 CONCLUSION AND RECOMMENDATION This chapter described the conclusion and the recommendation of this project 5 1 Conclusion An instrument used to measure blood glucose concentration value through urine strip using a photosensor has been developed This system consists of photosensor circuit analog to digital converter serial port interface and graphical user interface This measurement range for blood glucose concentration value in this system is from 0 to 22 mmol L 5 2 Recommendation Although this project is successfully developed and met the objective however it is found that this system can be further improved by integrating it into mobile medical system such as PDA 1 2 3 4 5 6 7 8 9 10 48 REFERENCES Christine Brooker Human s
10. from PIC through UCOOA into the screen of PC 35 3 3 1 Analog to Digital A D Converter ADC of PIC18F452 Figure 3 11 shows the flow chart of how to setup ADC and read the value of ADC from the PIC 18F452 Microcontroller The written code that compiled by PIC Programmer were loaded into PIC18F452 in hex file format Then the internal build in ADC digitalized the signal coming from output of the photosensor Explanations of source codes can be referred to Appendix D Setup ADC clock Set channels RB3 to Oscilloscope VDD to 5V and VSS to ground Read analog value in digital from the channel Figure 3 11 Flow Chart of A D Converter 36 3 3 2 Graphical Unit for User Interface GUI Graphical user interface for this project vvere developed in VB NET The purpose of this graphical user interface was to display the blood glucose concentration value mmol L The flow of this GUI was shown in Figure 3 12 All the detail on VB NET code been applied vvere elaborated in Appendix E Set equation for the chosen filter Click Get Data to get value from PIC Click Convert to get calculated blood glucose value Figure 3 12 Flow Chart of GUI Display Figure 3 13 illustrates the window where it contains of buttons text boxes and message box At Form 1 the function of Get Data button was to receive data from the output of photosensor to PIC and then to PC through UCOOA meanwhile the function of Convert
11. info Pren ww ne we ums esros _ tosis zm _ Po i aa as Poe Cree es Sensor Recommended Operating Conditions Pren Jun re max urs we veseve v Perawat 3 I Operating Free Air Temperature 70 Range Sensor Electrical Characteristics Ta 25 C Vpp 5 V unless otherwise noted ee Tam rr fu rs WW e vem asas oo cave on Do Jasa Tk jmeemom Ts D joue 5 SS e r sm mem Sa Temperature Coefficient of m ppmec AS 700 nm 25 Cs Ta 70 C 200 Output Frequency ppm C Typical Temperature Rise Time Typical Temperature Fall Time pl l DID 5 w Output Frequency Characteristics Ta 25 SG le Sm Target Surface Mini nun Maximum 65 Red Filter Selected EF LINE LIUM Red Green Blue Wi nite Green Filter Selected S2 H iS3 H Red Green Blue Units 13 hite Blue Filter Selected S2 L S3 H ome Lo E NNNM hite Clear Filter Selected Sa HISS L Red 71 EHZ Green Blue A1 White 5 2 5 72 SENSOR OPTICAL 102 E 404 70 24 2X D 159 40 4 19 _ 2x R 165 2 21 41 x 843 TARGET RANGE 2 41 095 6 50
12. 213 1415 1 Circuit implementation 2 Software implementation 3 Testing and optimization of Study week Exam week system 4 Presentation 5 Demo 6 Report writing 1 8 Thesis Outline This thesis is a report of a final year project of title Blood Glucose Concentration Measurement through Urine Strip Using a Photosensor There are five main chapters explained in detail within this thesis Chapter 1 explain in detail the information about the project background problem statement objectives scope work flow Gantt chart thesis content and work breakdown In this chapter the reader could find out the overview of this project and also the significant of this project Next in chapter 2 the related literature to this project is provided in detail The topic explained in this chapter included medical ultrasound therapeutic ultrasound thermal effect of ultrasound and basic of hardware involve Chapter 3 is about design and implementation In this chapter the design and implementation step is explained in detail Chapter 4 contains the information about the results and discussion and the last Chapter 5 summarizes this project and with recommendations CHAPTER 2 LITERATURE REVIEW This chapter presents the fundamental of photosensor and the principle used to construct the detection of glucose in urine using a photosensor T
13. 5 Sensor Spectral Overlaps With Reflected Light Captured By Sensor In a mathematical way sensor output is directly proportional to the overlapping area of the reflected signal and sensor spectral profile Figure 2 14 shows there are two non overlapping areas which mean the information in that region will not be captured by the sensor Figure 2 15 shows the information of the 21 reflected signal is properly captured by the sensor vvith an overlapping spectral response So light falling on each of the photodiodes is converted into a photocurrent the magnitude of which is dependent on both the brightness and due to the color filter vvavelength of the incident light In addition vvithout a color filter a typical silicon photodiode responds to vvavelengths ranging from the ultraviolet region through the visible with a peak response region between 800nm and 950nm in the near IR part of the spectrum The red green and blue transmissive color filters will reshape and optimize the photodiode s spectral response In reflective sensing the color sensor detects light reflected from a surface or object vvith both the light source and the color sensor placed close to the target surface Light from the light source bounces off the surface and is measured by the color sensor The color of the light reflected off the surface is a function of the color of the surface For instant white light incident onto a red surface is reflected as red The r
14. 8 or multiply by 0 055 8 2 6 Principle of Reflective Colorsensor Color produced is due to the result of interaction between a light source an object and an observer In the case of reflected light light falling on an object will be reflected or absorbed depending on surface characteristics such as reflectance and transmittance For example red paper will absorb most of the greenish and bluish part of the spectrum while reflecting the reddish part of the spectrum making it appear reddish to the observer For self illuminated objects the light will reach the human eye and will be processed by the eye s receptors and interpreted by the nervous system and brain There are three types of color sensors a light to photocurrent b light to analog voltage and c light to digital Reflective color sensing is typically realized through photodiodes with multiple illuminant or photodiodes coated with color filters with single illuminant Three important elements in reflective sensing i Detector It s a device that captures light reflected from an object H Target It s an object whose color is measured like colored paper or paint It is typically non emissive reflects and absorbs different amounts of light at different wavelengths iii Illuminant It s a light source whose spectrum covers the visible wavelengths like sunlight Figure 2 9 shows a light to analog voltage Colorsensor with an array of photodiodes behind color filters an
15. Assembly Language programming Besides that graphical unit interface GUI using Visual Basic was programmed to display the calculated blood glucose value on the personal computer 28 oe Serial Port GUI circuit Interface programming connection connection Figure 3 1 Block Diagram of the Design System 3 2 Hardware Implementation 3 2 1 Photosensor used Reflective Color Sensor Assembly OPT780Z Figure 3 2 shows the Reflective Color Sensor Assembly OPT780Z that used in this project The main reason that I chose this sensor for my project was because of its colormetry and chemical analyzers applications that suit my needs in my project It had selectable color output frequency with 2 digital inputs a p Figure 3 2 Reflective Color Sensor Assembly OPT780Z The output of this sensor is a square wave 5096 duty cycle with a frequency directly proportional to reflected light intensity irradiance In addition the output of the sensor can be connected to TTL or CMOS logic input as well as microcontroller This sensor can be used to detect the glucose concentration in the urine strip because it can detect the color change on the urine strip and a frequency output will be produced with a certain value measured in kHz In addition more details of this sensor can refer to the Appendix C 3 2 2 Printed Circuit Board PCB Design for Photosensor Since the photosensor is the main part of this system as it
16. BLOOD GLUCOSE MEASUREMENT THROUGH URINE STRIP USING A PHOTOSENSOR NG JIUN VVOEI UNIVERSITI TEKNOLOGI MALAYSIA PSZ 19 16 Pind 1 07 UNIVERSITI TEKNOLOGI MALAYSIA DECLARATION OF THESIS UNDERGRADUATE PROJECT PAPER AND COPYRIGHT Author s full name NG JIUN WOEI Date of birth 23 JUNE 1986 Title BLOOD GLUCOSE MEASUREMENT THROUGH URINE STRIP USING A PHOTOSENSOR Academic Session 2009 2010 declare that this thesis is classified as CONFIDENTIAL Contains confidential information under the Official Secret Act 1972 RESTRICTED Contains restricted information as specified by the organisation where research was done OPEN ACCESS I agree that my thesis to be published as online open access full text acknowledged that Universiti Teknologi Malaysia reserves the right as follows The thesis is the property of Universiti Teknologi Malaysia The Library of Universiti Teknologi Malaysia has the right to make copies for the purpose of research only The Library has the right to make copies of the thesis for academic exchange Certified by SIGNATURE SIGNATURE OF SUPERVISOR 860623 59 5267 En Wan Mohd Fatihil Kamal NEW IC NO PASSPORT NO NAME OF SUPERVISOR Date 25 APRIL 2010 Date 25 APRIL 2010 NOTES i If the thesis is CONFIDENTIAL or RESTRICTED please attach with the letter from the organisation with period and reasons for confidentiality or restriction We declare that w
17. Multisim software before it was implemented in real circuit The main reasons for implementing this circuit are regulating the 9V battery to 5V will be connected to pin 1 amp 2 and 2 7V will be connected to pin 5 respectively To Switch of Portable Power Supply lt Multimeter X LS 27 EUIS 2 7V Connected to pin 5 Figure 3 6 Schematic Diagram for Portable Power Supply 3 2 55 Embedded ADC in PIC16F877A Microcontroller In this project embedded ADC in PIC16F877A was used Figure 3 7 shows the image and the pin diagram of the microcontroller used RB3 pin was connected to pin 3 VDD pin was connected to pin 1 amp 2 and VSS pin was connected to pin 7 amp 8 of the photosensor pins respectively Output from the ADC was connected to personal computer through serial port interface 33 40 RB7 PGD 38 RB5 PGM 37 0 361 RB3 CCP 35 e9 RB2 INT2 34 a RB1 INT1 33 0 4 RBO INTO sh To Pin 1 amp 2 310 vss 30 RD7 PSP 29 1 RD6 PSP6 To Pin 7 amp 8 28 RDS PSP5 ee RD4 PSP4 26 l 4 RC7 RX DT 25 RCGTXICK 24 RCSISDO 23 4 RC4 SDI SDA 22 0 RD3PSP3 21 RD2 PSP2 MCLRVep 9 1 RAO ANO n 2 RAVAN 3 RAZIANZIVREF lt P FJ 4 RAZIANS VREF
18. The analyzer reads the reference pad followed by each of the test pad on the strip Figure 2 4 Urisys 1100 The reading head contains LEDs that emit light at various wavelengths Reading is done electro optically as shown in Figure 2 5 as follows 14 3 5 Ge ED lt 4 ul Figure 2 5 Flow System of Urisys 1100 The LED 1 emits light of a defined vvavelength on to the surface of the test pad 2 at an optimum angle The light hitting the test zone is reflected more or less intensely depending on the color produced on the test pad and is picked up by the detector a phototransistor 3 positioned directly above the test zone The phototransistor sends an analogue electrical signal to an A D converter 4 which changes it to digital form The microprocessor 5 then converts this digital reading to a relative reflectance value by referring it to a calibration standard Finally the system compares the reflectance value with the defined range limits reflectance values that are programmed into the analyzer for each parameter and outputs a semi quantitative result 6 Each test pad is read photo metrically after a lead incubation time of about 55 65 seconds In strongly alkaline urine samples Urisys 1100 automatically corrects the result of the Specific Gravity test 2 4 Urine Strips There is a vvide range of urine reagent strip tests available in the markets vvith many types of parameters can be
19. W 10 MOVWF STORE2 LP2 MOVLW 131 MOVWF STOREI LP DECFSZ STOREI F GOTO LP DECFSZ STORE2 F GOTO LP2 RETURN SUBROUTINE HEX to DECIMAL H2d Takes number in NumH NumL Returns decimal in TenK Thou Hund Tens Ones swapf NumH w iorlw B 11110000 movwf Thou addwf Thou f addiv OXE2 movwf Hund addlw 0X32 movwf Ones movf NumH w andlw OXOF addwf Hund f addwf Hund f addwf Ones f addiv OXE9 movwf Tens addwf Tens f addwf Tens f swapf NumL w andiv OXOF addwf Ones f ricf Tens f ricf Ones f comf Ones f ricf Ones f movf NumL w andlw addwf Ones f ricf Thou f movlw 0X07 movwf TenK At this point the original number is equal to TenK 10000 Thou 1000 Hund 100 Tens 10 Ones if those entities are regarded as two s complement binary To be precise all of them are negative except TenK Now the number needs to be normalized but this can all be done with simple byte arithmetic movlw Lbl decf addwf btfss goto Lb2 decf addwf btfss goto Lb3 decf addwf btfss goto Lb4 decf addwf btfss goto retlw END 0X0A Tens f Ones f STATUS C Lbl Hund f Tens f STATUS C Lb2 Thou f Hund f STATUS C Lb3 TenK f Thou f STATUS C Lb4 0x00 Ten END SUBROUTINE HEX to DECIMAL End of program 72 APPENDIX E Full Source Code of Graphical User Interface GUI in VB NET 74 FORM 1 Private Sub Buttonl Click ByVal sender As System Object ByVal e As
20. aken and put on test strip 2 e Strip is put into blood glucose meter A log book is a helpful aid in keeping track of blood glucose levels ADAM Figure 2 3 Flow of Blood Glucose Testing These are some examples of blood glucose meters as shown in Figure 2 2 There are many types of blood glucose meters available in the markets with different brand and specifications that will suit user s needs Figure 2 3 shows the flow of testing the glucose level in the blood using the test strips Patients can monitor their blood glucose level at home everyday so that they can be aware and know better of their blood glucose levels 13 2 3 2 Urysis 1100 Another apparatus that is commonly used to detect glucose level in our body is by using Urisys 1100 as shown in Figure 2 4 5 This is a different method compared to blood glucose meter as the sample used to detect glucose level in Urisys 1100 is urine but not blood It is a reflectance photometer designed to read and evaluate the urine test strips ComburlOTest UX Combur7Test and ComburSTest from Roche Diagnostics It reads the strips under standardized conditions saves the results to memory and outputs them via its own inbuilt printer and or serial interface This instrument is designed for In Vitro Diagnostic IVD used by qualified physicians and laboratory staffs The test strip is placed on a sliding tray and a stepping motor moves it under the reading head which remains stationary
21. bilities and features of Develop low cost USB to UART converter Easy to use USB to UART converter aiming development between computer and microcontroller 5V logic USB powered no external source is required to use this converter 5V from USB port is available for user Configurable for 5V UART interface Easy to use 4 pin interface Tx Rx Gnd and 5V CTS RTS DTR and DSR is pull out to standard 2x5 header pin solder able PCB pad Plug and Play Packing List 1 1x UCOOA 2 1 x 2510 4 ways connector 3 4 x 2510 iron pins 4 USB driver and User s Manual should be downloaded from Cytron Website 52 Function USB A type male USB to UART chip Two LED indicators for USB s transmitter and receiver status 4 ways header pin for interface to microcontroller Cautions on is 5V supply directly from USB port of computer it is advised not to use this power source to power application circuit or device Wrong connection such as wrong polarity wrong voltage shorted might permanently damage computer UCOOA is designed to ease communication between microcontroller and PC The specifications are as listed below Function 5 Power output SV supply from USB optional for user to power from UC00A external device maximum current 200mA Ground of power and signal This pin should be Ground or negative connected to device s GND pin
22. cuting when a low priority interrupt occurs This code can be removed if low priority interrupts are not used ORG 0 0018 movff STATUS STATUS TEMP save STATUS register movff WREG WREG TEMP save working register movff BSR BSR TEMP save BSR register low priority interrupt code goes here movff BSR_TEMP BSR srestore BSR register movff WREG_TEMP WREG estore working register movff STATUS TEMP STATUS restore STATUS register retfie High priority interrupt routine The high priority interrupt code is placed here to avoid conflicting with the low priority interrupt vector Highint shigh priority interrupt code goes here retfie FAST Start of main program The main program code is placed here Main main code goes here CLRF PORTE Initialize PORTB by clearing output bsf STATUS RPO data latches CLRF LATE Alternate method to clear output data latches MOVLW 0x08 Value used to initialize data direction MOVWFE TRISB Set RB lt 3 0 gt as inputs RB lt 5 4 gt as outputs RB lt 7 6 gt as inputs bef TRISC 6 bsf TRISC 7 cirf TenK cirf Thou cirf Hund cirf Tens cirf Ones goto testloc movlw 0x081 before send serial com init with this movwf SPBRG bsf RCSTA SPEN movlw 0x080 movwf RCSTA movlw Ox0A4 movwf TXSTA XYZ bsf RCSTA CREN btfss PIR1 RCIF goto XYZ sback1 movf RCREG w ABC clrf NumL cirf NumH 68 69 cntloopA btfsc PORTB 3 goto cntloopA da
23. d an integrated current to voltage conversion circuit Besides that Figure 2 10 shows the color of reflected light depends on the colors that a surface reflects and absorbs 18 RGB color filter Photodiode Current to voltage converter Eg TIA V Reflective or transmitted gt Vous color light Color sensor C gt gt Be k light Figure 2 9 A Light to Analog Voltage Colorsensor With An Array of Surface object Reflected light Photodiodes Behind Color Filters And An Integrated Current to Voltage Conversion Circuit Color sensor S x Light source Light source Figure 2 10 Color of Reflected Light Depends On the Colors that A Surface Color sensor Reflects And Absorbs The human visual system can detect the electromagnetic spectrum from about 400nm violet to about 700nm red In addition human visual system can adapt to widely varying illumination levels and amounts of color saturation the proportion of pure color to white There are three sets of cones with peak sensitivities at wavelengths that can be identified as red 580nm green 540nm and blue 450nm and light at any 19 vvavelength in the visual spectrum vvill excite one or more of these three types of cone cells to varying degrees vvith our perception of the color being that information as processed by our optic nerve and brain Generally colorimetric and photometric are two types of measur
24. developed to measure blood glucose concentration by just testing on urine using a photosensor 1 3 Objectives of Project The main objective of this project is to develop a system that can be used to measure blood glucose concentration using a photosensor Besides that the glucose concentration value will be displayed on the screen of personal computer in a quantitative way 14 Scope of Project In order to achieve the objective of the project there are several scope had been outlined The scope of this project includes i Search and buy a suitable photosensor urine strips microcontroller serial PC port and other materials needed in this project H Design circuit connestions for the photosensor and do testings on it ili Meanwhile do programming on microcontroller and GUI for the software pat at the same time iv After that do data collections after the testing and experiments and analysis the results obtained v Improving the results so that more accurate results can be obtained 1 5 Work Breakdown In order to achieve the objective of this project there are several tasks that need to be done as shown in Figure 1 1 below These tasks are divided into three main categories that are study design and implementation The related items that need to study in detail are the principle of the photosensor urine strips analog to digital converter microcontroller architecture programming for microcontroller and programmin
25. e changes make the body hard to keep up with the need of insulin It is temporary only as it will mostly go away after the baby is born by managing diet and exercise It is also called glucose intolerance in pregnancy 4 2 3 Diagnostic Devices Used To Detect Glucose Level 2 3 1 Blood Glucose Meter A glucose meter or glucometer is a portable medical device used to determine the approximate concentration of glucose in the blood wherever and whenever we are We can test for glucose by placing a small sample of blood on a disposable test strip and then place the strip in the meter The test strips are coated with chemicals like glucose oxidase dehydrogenase or hexokinase that will combine with glucose in blood The meter will read calculate and display the blood glucose level in mg dl or mmol dl Different meter will detect the glucose level in different ways Some of them measure the amount of electricity that can pass through the sample whereas others measure how much light reflects from the sample Most of the meter are able to measure and display the glucose level from a range of as low as 0 to as high as 600mg dl We can convert mmol dl of glucose to mg dl multiply by 18 or convert mg dl of glucose to mmol dl divide by 18 or 12 multiply by 0 055 Calibrations needed to be done for the glucose meter if there the readings are extremely low or high in value Figure 2 2 Blood Glucose Meter A blood sample is t
26. e have read this work and in our opinion this work is adequate in terms of scope and quality for the purpose of awarding a degree of Bachelor of Engineering Electrical Medical Electronics Signature Name of Supervisor 1 Date Signature Name of Supervisor 2 Date BLOOD GLUCOSE MEASUREMENT THROUGH URINE STRIP USING A PHOTOSENSOR NG WOEI Submitted to the Faculty of Electrical Engineering in partial fulfillment of the requirements for the avvard of the Bachelor of Engineering Electrical Medical Electronics Faculty of Electrical Engineering University of Technology Malaysia APRIL 2010 I declare that this thesis entitled Blood Glucose Measurement Through Urine Strip Using A Photosensor is the result of my own research except as cited in the references The thesis has not been accepted for any degree and is not concurrently submitted in candidature of any other degree Signature Author s Name NG JIUN WOEI Date 25 APRIL 2010 Dedicated in thankful appreciation for support encouragement and understandings to my beloved father mother brother sister lecturers and friends ACKNOWLEDGEMENTS First and foremost I would like to express my sincere appreciation to both of my Final Year Project supervisors Mr Wan Mohd Fatihil Kamal and Dr Eko Supriyanto for their continuous guidance encouragement and thought that has given to me through completing this project My appr
27. e real demo and presentation to the panel of the final year project Literature review and theoritical study Selection of hardware components Hardware Implementation Software Implementation Hardware and Software Integration Testing and Optimization Presentation and Demo Report Writing dh Figure 1 2 Work flow of This Project Meanwhile the project schedule or Gantt chart of this project is included in the section 1 7 Gantt chart of Figure 1 3 and Figure 1 4 shows the detail of the works done with the time spending on it for the duration of two semesters 1 7 Gantt Chart Implementation and works of the project are summarized as shown in Gantt charts as shown in Table 1 1 and Table 1 2 They show the detail of the works of the project that had been done in the first semester and implement action during second semester Table 1 1 Gantt Chart of the Project Schedule for Semester 1 Week Activities 1 2 3 4 5 6 7 8 9 1 0 1 1 1 2 1 3 1 4 16 17 1 Literature review 2 Study on microcontroller 3 Study on Photosensor 4 Experimental setup 5 Data analysis 6 Presentation 7 Report writing Study week Exam week Table 1 2 Gantt Chart of the Project Schedule for Semester 2 Week 11213141516 1718 19 11111111 1 1 16 17 Activities 0111
28. e silicon photodiodes on a 144 um centre and measuring 120 um x 120 um each with a white LED in a small lightweight package that makes it ideal for using in miniature applications The output is a square wave 50 duty cycle with a frequency directly proportional to reflected light intensity irradiance The light to frequency converter reads an 8 x 8 array of photodiodes that consists of four groups of 16 photodiodes each segregated by colour 16 photodiodes with red filters 16 photodiodes with green filters 16 photodiodes with blue filters and 16 clear photodiodes with no filters Each colour s group of 16 photodiodes is inter digitized to minimize the effect of non uniformity of the incident irradiance Each colour s group is also connected in parallel The type of photodiode used during operation is pin selectable The output of the device is designed to drive a standard TTL or CMOS logic input over short distances The internal photodiode used by the device is controlled by two logic inputs 2 and S3 Applications Photographic equipment Colormetry 62 Chemical analyzers Display contrast controls High resolution digital measurement of light intensity Block Diagram Current to Frequency Converter Out 3 Light Photodiode Array S2 S3 Ordering Information OPB780Z OPB780 with 10 Long Flat Flex Cable KA3128 10 Long Flat Flex Cable Absolute Maximum Ratings 25 C unless otherwi
29. each color paper with 4 different variable inputs were within the specifications of the photosensor as stated in datasheet there The photosensor can only be used for further urine samples testing after being tested successfully Figure 4 2 Output Signal kHz of the Photosensor 41 4 3 Samples Collection and Testing The whole samples testing process was taken at Pusat Kesihatan UTM as both the blood and urine sample were needed for every patient The blood sample collection was done by laboratory staff and the blood samples were tested using a Roche 902 blood analyzer as shown in figure 4 3 At the same time urine sample was taken for the same person and it was tested using the photosensor Figure 4 3 Roche 902 Blood Analyzer 4 4 Results Obtained From Samples Testing Total of 42 patients being tested and their urine and blood samples were collected and tested Results obtained from the blood analyzer and oscilloscope collected and then being put into Microsoft Excel for further analysis Graphs were plotted based on the results obtained for these four different inputs of the photosensor 42 4 4 1 For Red Filter Selected As Input of Photosensor Figure 4 4 shows the graph of blood glucose concentration values mmol L versus the outputs kHz from the photosensor with red filter selected as an input A linear relationship was obtained with an equation of y 0 6809x 19 616 Blood Glucose Value Versus Red Filter Val
30. ealth of a person 1 2 2 Types of Diabetes Diabetes is a chronic and life long disease due to high levels of glucose in the blood that caused by too little insulin a hormone produced by pancreas to control the blood glucose resistance to insulin or both In simple words when normal people eat the pancreas will automatically produce the right amount of insulin to move glucose from blood into the cells whereas in people with diabetes the pancreas will either produce little or no insulin or the cells do not respond appropriately to the insulin produced There are 3 major types of diabetes nowadays i Type 1 diabetes It is also called juvenile diabetes or insulin dependent diabetes The body can make little or no insulin and thus insulin injections are needed This type of diabetes occurs before age 30 mostly found in children but may occur at any age 2 11 H Type 2 diabetes Most common form of diabetes and most often associated vvith older age obesity family history previous history of gestational diabetes certain ethnicities and physical inactivity The body does not respond vvell to the insulin and the pancreas does not make enough insulin to keep the blood glucose level in normal range 3 ili Gestational diabetes It is found for the first time when a woman is pregnant who does not have diabetes before that and due to changing hormones and weight gain during pregnancy causing high blood glucose level Thes
31. eciation also goes to my beloved family for their understanding endless love and support emotionally and financially all these years I would also like to thank CLEANER LAB team staff and students for their co operations guidance help and invaluable assistance in this project Special thanks also goes to Mohd Najeb bin Jamaludin for his kindly help and supports And for those who give me support directly or indirectly to finish my final year project and throughout my 8 semesters in UTM thank you very much ABSTRACT There are nearly about 1 2 million people in Malaysia who have diabetes And it is known that diabetes can be diagnosed in human body with normally 2 ways which through blood and urine The measurement of glucose concentration in the blood is an invasive method whereas the measurement of urine glucose value is a non invasive method So the aim of this project is to develop another method of blood glucose concentration measurement by just using urine of a person only It is a non invasive method which only taking the urine sample instead of blood sample This method is done with finding the relationship between the outputs in kHz from the photosensor with the blood glucose values in mmol L obtained from the blood analyzer A linear relationship has successfully obtained and the blood glucose concentration value will be shown on the personal computer pc A system used for blood glucose measurement through urine strip usi
32. eflected red light collides on the color sensor producing red green and blue output voltages By interpreting the three voltages the color can be determined Since the three output voltages increase linearly with the intensity of the reflected light the color sensor also measures the reflectivity of the surface or object 9 2 7 Microcontroller A microcontroller is a small computer on a single integrated circuit consisting of a relatively simple CPU combined with support functions such as a crystal oscillator timers watchdog serial and analog I O Program memory in the form of NOR flash or OTP ROM is often also included on chip as well as a typically small read write memory It is design for small applications compare to microprocessors and are used in automatically controlled products and devices such as automobile engine control systems remote control and many other applications 22 Since embedded processors are usually used to control devices they sometimes need to accept input from the device they are controlling This is the purpose of the analog to digital converter Since processors are built to interpret and process digital data such as Is and Os they won t be able to do anything with the analog signals that may be being sent to it by a device So the analog to digital converter is used to convert the incoming data into a form that the processor can recognize There is also a digital to analog converter that allows
33. ethod vyhere in this case the sugar level for the pre meal blood sugar is in a range of 80 to 120 mg dl whereas the bedtime blood levels are in a range of 100 to 140 mg dl The method of this type of detection is by using blood glucose monitoring By using this method the person needs to prick a finger in order to get the blood so that testing can be done using the blood By the way the glucose concentration in the body can be checked by using non invasive method through urine A detection of glucose concentration is developed by using dipstick urinalysis where a test strip is dipped inside a container contained of a person s urine and then a detection of the glucose can be read on differ in color appear on the test strip The amount of concentration of glucose found in urine based on the color changes on urine strip The glucose concentration in urine for normal physiological range is below 30 mg dl whereas the abnormal range is above 40 mg dl So it s important for us to check our blood glucose level in our body in an easier and faster way without using any invasive method 1 2 Problem Statement It is found out that currently available market products of blood glucose meter cannot be connected to the online system through personal computer Moreover most of the measurements for blood glucose concentration tests are done manually by using the invasive method like blood drop and test So another approach with non invasive method is
34. g for graphical user interface Other than that for this system it is needed to design the system block diagram hardware circuit software algorithm and software programming Following the design is the implementation of the hardware software and system integration Main Process Dem Implementation Photosensor System Block Diagram Analog to Digital Hardware Circuit Software Coding Hardware Architecture Converter Hardware and Hardware S oftware d t t Microcontroller Circuit ntegration Architecture Software PIC Algorithm Programmming Software Visual Basics Coding Figure 1 1 Work Breakdowns for the Project 1 6 Work Flow The summary of work flow for this project is simplified into block diagram as shown in the Figure 1 2 below The starting point of this project is the literature review and theoretical study But these actions are continuous as new information must be gathered from time to time in order to proceed with this project After having an overview of the component to include in this project the suitable components were selected based on the scope and limitation of this project Hardware implementations begin after the components were available On the other hand software implementations begin with algorithm for the analog to digital converter and continue with the graphical user interface After that the whole system was integrated for testing and optimization before th
35. his chapter also describes the content of urine types of diabetes urine strips color sensor and other relevant fundamentals and components used in the project 2 1 Formation of Urine Figure 2 1 below shows the formation of urine on a human being The production of urine starts from the 2 kidneys by filtration process of blood After that it goes to urinary bladder following the 2 ureters When the volume exceeds the maximum the urine will be excreted out through urethra In urine there are 96 of water and 4 of solutes chemical that are dissolved in the water The solutes are composed of waste like urea uric acid and creatinine sodium potassium calcium magnesium phosphates sulphates nitrites chlorides and hydrogen carbonate organic acids ammonia as ammonium salts drugs and hormone metabolites Some of these solutes are produced as the results of normal biochemical activity within the cells of human body whereas the other solutes may be due to chemicals that come from outside of the body like pharmaceutical drugs The solutes inside the urine as ions or organic molecules can be classified 10 bladder urethra ureter opening Figure 2 1 Formation of Urine The urine produced by a normal adult is between 1 and 1 5 litres per day but infant has much greater volume in proportion to his her small body size The volume and composition of urine produced depending on age fluid intake diet climate activity and h
36. inals it can only be switched to the centre 25 terminal This means that one terminal will always be dead no connection to the power source Figure 2 21 shows the symbol of toggle switch and its example 11 k ES Ln paeem L 4 Insulating Material External Terminals Figure 2 20 Basic Toggle Switch Structure A 9 O B A COM B Figure 2 21 Symbols and Example of Toggle Switch SPDT 26 2 41 Visual Basic NET VB NET VB NET is an extension of Visual Basic VB programming language with many new features in it and the changes from VB to VB NET are huge ranging from the change in syntax of the language to the types of project we create now and the way we design applications VB NET was designed to take advantages of the NET Framework base classes and runtime environment It comes with power packed features that simplify application development The industry is focusing on critical distributed computing with web services capabilities At this moment VB NET is definitely a powerful tool to provide all these solutions in integrated environment of NET technology Below are the major problems with VB 6 0 which has been creating troubles for VB developers for a long time 12 Problems with VB 6 0 1 Poor error handling capabilities ii No capabilities for multithreading Lack of implementation inheritance and other object oriented features Iv No effective user in
37. ing instruments By using the colorimetric method the device measures light from an object using a sensor with three filters Normally the sensor profile is optimized so that it will closely resemble the human eye response The photometric method uses a multiplicity of sensors to measure color over a large number of narrow wavelength ranges The instrument s microcomputer then calculates the tristimulus values by integrating the resulting data Figure 2 11 shows the red green and blue ouputs of the sensor are determined by the color of light falling on the sensor Figure 2 11 The Red Green and Blue Outputs of Color Sensor Color sensor Color sensor The spectral response of the individual Red Green and Blue channel should be overlapping to ensure all vvavelength information is captured Figures 2 12 and 2 13 below show the overlapping and non overlapping spectral responses respectively gt E BLUE CHANNEL GREEN CHANNEL RED CHANNEL RESPONSE RESPONSE RESPONSE 2 a a 400 nm 700 nm Figure 2 12 Non overlapping Spectral Response 20 BLUE CHANNEL GREEN CHANNEL RED CHANNEL RESPONSE RESPONSE RESPONSE NORMALIZED SENSITIVITY Figure 2 13 Overlapping Spectral Rsponse NORMALIZED SENSITIVITY 700 nm 400 nm Figure 2 14 Sensor Spectral Overlaps With Reflected Light Not Captured By Sensor NORMALIZED SENSITIVITY 400 nm 700 nm Figure 2 1
38. is used to detect the color change on the urine strip so i need to choose appropriate materials and electronic components to connect this photosensor At first I connected the outputs of photosensor into a designed and made printed circuit board PCB Figure 3 3 shows the PCB design using software and the connections for photosensor output before the photosensor can be implemented by connecting it into the protoboard There were 8 outputs from the photosensor that need to be connected to different another outputs Pin5 To LED i p 2 7 V Pin4 To switch 1 Pin3 To RB3 of PIC Pin 1 amp 2 To 5V Pin6 To switch 2 Pin 7 amp 8 To Ground Figure 3 3 PCB Design And Connection for Photosensor Output The listings of components used to connect the whole photosensor circuit were shown in Table 3 1 The photosensor used is OPB780Z Table 3 1 Components that build up photosensor circuit 30 Number Components Description 1 2 Toggle Switches SPDT As digital inputs for the photosensor 2 1 Toggle Switch SPDT Used for battery switch 3 Battery 9V 4 Zener Diode 0 5W 2 7V 5 Resistor 1 4 Watt 5609 6 Voltage Regulator KA7805 d Microcontroller PIC18F452 8 USB to UART Convertor UCOOA 9 SK40C PIC START UP KIT ENHANCED 40 PINS 3 2 3 Switches Three switches were used in this project 2 for inputs of photosensor and 1 for portable power suppl
39. lection and Testing 4 4 Results Obtained From Samples Testing 4 4 1 For Red Filter Selected As Input of Phosensor 4 4 2 For Green Filter Selected As Input of Photosensor 4 4 3 For Blue Filter Selected As Input of Photosensor 4 4 4 For Clear Filter Selected As Input of Photosensor 45 Discussions 5 CONCLUSION 5 1 Conclusion 5 2 Recommendation REFERENCES Appendices A E 33 34 35 36 37 39 39 39 40 41 41 42 42 43 44 45 47 47 47 48 50 75 TABLE 1 1 1 2 3 1 3 2 41 LIST OF TABLES TITLE Gantt Chart of the project schedule for semester 1 Gantt Chart of the project schedule for semester 2 Components that Build Up Photosensor circuit Table of Variable Inputs of Photosensor Result Analysis PAGE 30 30 46 FIGURE NO 1 1 1 2 2 1 2 2 2 3 2 4 2 5 2 6 2 7 2 8 2 9 2 10 2 11 2 12 2 13 2 14 2 15 2 16 2 17 LIST OF FIGURES TITLE Work Breakdowns for the Project Work flow of This Project Formation of Urine Blood Glucose Meter Flow of Blood Glucose Testing Urisys 1100 Flow System of Urisys 1100 Examples of Urine Strips Examples of Reference Color Chart Chemical Reactions for Glucose Test inside a Urine Strip A Light to Analog Voltage Colorsensor with an Array of Photodiodes behind Color Filters and an Integrated Current to Voltage Conversion Circuit Color of Reflected Light Depends On the Colors that A Surface Reflects and Absorbs The Red Gree
40. light positive input voo 1 BI Backlight negative input Comet LCD Data bus pin Pin D1 of LCD LCD Data bus pin Pin D0 of LCD 57 58 Absolute Maximum Rating LL LAN Max Unit Ta Maximum input current do 1 INSTALLATION HARDWARE SK40C come with UICOOA USB programmer connector to offer simple way for downloading program UICOOA programmer is very easy and save plenty of development time Loading Program Using UIC00A Programmer Connect to PC using USB mini cable After plug in 40 pin PIC MCU make sure the orientation is correct SKAOC should be powered by DC adaptor Now the hex code is ready to be loaded to SK40C Extend the I O port to another board using jumper wire as below 59 For UART Interface Connections Connect to other microcontroller using cable connector Connect to computer laptop using UCOOA communication between SK40C and PC Connect to computer or laptop APPENDIX C DATA SHEET OF REFLECTIVE COLOR SENSOR ASSEMBLE OPB780Z 61 Features High resolution conversion of light intensity to frequency Selectable color output frequency Communicates directly with a microcontroller Sensor power supply operation 2 7 V to 5 5 V LED power separate input Includes LED Sensor and interface cable Description The OPB780Z colour sensor uses a light to frequency converter that combines 64 configurabl
41. n and Blue Output of Color Sensor Non overlapping Spectral Response Overlapping Spectral Response Sensor Spectral Overlaps With Reflected Light Not Captured By Sensor Sensor Spectral Overlaps With Reflected Light Captured By Sensor Traditional Method of Serial Port for PC Serial Port for PC Using USB xi PAGE 10 12 12 13 14 15 15 16 18 18 19 19 20 20 20 23 25 2 18 2 19 2 20 2 21 3 1 3 2 3 3 3 4 3 5 3 6 3 7 3 8 3 9 3 10 3 11 3 12 3 13 3 14 4 1 4 2 4 3 4 4 4 5 4 6 4 7 Serial Port for PC Using UC00A Method SK40C Enhanced 40 Pins PIC Start up Kit Basic Toggle Switch Structure Symbols and Example of Toggle Switch SPDT Block Diagram of the Design System Reflective Color Sensor Assembly OPT780Z PCB Design And Connection for Photosensor Output Switch I Left and Switch 2 Right Connections for Photosensor Inputs Switch Connections for Portable Power Supply Schematic Diagram for Portable Power Supply Image and Pin Connections of PIC18F452 External Left and Internal Right Look of Photosensor Box Photosensor Construction Target Distance Flow Chart of A D Converter Flow Chart of GUI Display Form 1 The Overall System Block Diagram to Test the Functionality of Photosensor Output Signal kHz of the Photosensor Roche 902 Blood Analyzer Graph of Blood Glucose Value mmol L versus Red Filter Output Value kHz Graph of Blood Glucose Value mmol L versus G
42. ng a photosensor has been successfully developed and the range of measurement is from 0 to 22mmol L vi ABSTRAK Di Malaysia terdapat hampir sebanyak 1 2 juta penduduk yang menghidapi diabetes Dua kaedah yang biasa digunakan untuk memantau kandungan glukosa di tubuh badan adalah melalui darah dan juga kandungan air kencing Pemantauan kandungan glukosa melalui darah adalah kaedah secara dalaman manakala melalui kencing adalah kaedah secara luaran Jadi satu kaedah yang lain telah ditemui dalam projek ini adalah memantau kandungan glukosa di dalam darah dengan hanya menggunakan sampel kencing seseorang sahaja Sementara itu satu hubungan terus antara kandungan glukosa dalam darah dengan hasil keluaran dalam kHz melalui photosensor telah ditemui Dan angka untuk setiap kandungan glukosa dalam darah yang didapati akan dipaparkan dalam sistem komputer Dengan itu satu sistem untuk mengukur glukosa darah melalui jalur air kencing dengan menggunakan satu photosensor telah berjaya diciptakan dan julat pengukuran sistem ini adalah bermula dari 0 hingga 22 mmol L CHAPTER TABLE OF CONTENTS TITLE DECLARATION DEDICATION ACKNOWLEDGEMENTS ABSTRACT ABSTRAK TABLE OF CONTENTS LIST OF TABLES LIST OF FIGURES LIST OF ABBREVIATIONS LIST OF APPENDICES INTRODUCTION 1 1 Background 1 2 Problem Statement 1 3 Objective of Project 1 4 Scope of Project 1 5 Work Breakdown 1 6 Work Flow 1 7 Gantt Chart 1 8 Thesis Outline PAGE ii
43. quired for the PIC to function All 33 I O pins are nicely labeled to avoid miss connection by users Connector for UICOOA low cost USB ICSP PIC Programmer simple and fast method to load program No more frustrated work plugging PIC out and back for reprogramming Perfectly fit for 40 pins 16F and PIC18F PIC With UICOOA program can be loaded in less than 5 seconds Maximum current is 1A Dimension 85mm x 55mm 2 x Programmable switch 2 x LED indicator Turn pin for crystal User may use others crystal provided LCD display optional JUART communication And all the necessities to eliminate users difficulty in using PIC PP KEK a 2 Tor an y Rem 5 wwe ee ric set Connector for UICOOA M JP9 for USB Programmer LED Indicator 40 pin IC socket for PIC MCU Y a 7 Header pin and turn pin Oo Turn pin for crystal UART Connector EN LCD Display Note Only power supply should be provided to SK40C Figure below shown pin connection for Label P 2x16 LCD Display Pin Name Pin function Connection JI 1 GND Ground GND 2 VDD PositvesupplyforLCD SV f Connected to a preset to adjust Select register select instruction or data Pin RS of LCD register G Pin Start data read or vvrite Pin E of LCD 15 VDD TJ Back
44. reen Filter Output Value kHz Graph of Blood Glucose Value mmol L versus Blue Filter Output Value kHz Graph of Blood Glucose Value mmol L versus Clear Filter Output Value kHz 23 24 25 25 28 28 29 31 31 32 33 33 34 34 35 36 37 38 39 40 41 42 43 44 45 xii xiii LIST OF ABBREVATION ADC Analog to Digital Converter GUI Graphical User Interface LC Integrated Circuit I O Input output PC Personal Computer VB Visual basic APPENDIX tm LIST OF APPENDICES TITLE UCOOA USB to UART Converter SK40C Enhanced 40 PINS PIC START UP KIT Data Sheet Of Reflective Color Sensor Assemble OPB780Z Full Source Codes of PIC 18F452 Microcontroller Full Source Code of Graphical User Interface GUI in VB NET xiv PAGE 50 55 60 66 73 CHAPTER 1 INTRODUCTION 1 1 Background Diabetes is a chronic disease in which the body does not produce or properly use insulin a hormone that is needed to convert starches and other food into energy needed for daily life In recent years the number of diabetic in Malaysia is increasing and vve should bevvare of this silent killer as it leads to many problems like blindness kidney disease amputations heart disease stroke and many other There are many vvays can be used to detect our glucose level in our body which using invasive method or non invasive method The diagnosis of diabetes is usually done by using invasive m
45. s of UCOOA will be shown in Appendix A there 24 2 9 SK40C ENHANCED 40 PINS PIC START UP KIT SK40C as shown in Figure 2 19 is another enhanced version of 40 pins PIC microcontroller start up kit It is designed to offer an easy to start board for PIC user However all interfaces and program should be developed by user This board comes with basic element for user to begin project development It offer plug and use features More features and specifications can refer to Appendix B Figure 2 19 SK40C Enhanced 40 Pins PIC Start up Kit 2 10 Toggle Switch Single Pole Double Throw SPDT Since there are four possible variable inputs for different filter need to be selected which are red filter green filter blue filter and clear filter so it s necessary to use switches for selecting wanted inputs I have chosen toggle switches SPDT as my input selector in my project The number of poles indicates how many completely independent circuits are controlled by the switch The number of throws indicates the number of positions that will result in an electrical connection Figure 2 20 shows the basic structure of toggle switch SPDT The green color line in Figure 2 20 shows the path that the current will follow and the power source can be connected to any of the terminals If the power source is connected to the centre terminal it can go to either of the other 2 terminals but if the power source is connected to either of the outside term
46. sample testing had taken a long time to be completed Then the data collected were plotted on graph for further analyzed After that analysis had been made based on the testing results 42 Testing the Functionality of the Photosensor Figure 4 1 shows block diagram to test the functionality of photosensor using different color papers Photosensor Color Papers Oscilloscope Square Ouput connection fortesting gt kHz Figure 4 1 Block Diagram to Test the Functionality of Photosensor 40 4 2 1 Procedures li lii iv vi vii The experiment vvas set up as Figure 4 1 The input supply voltage must set to less than 5 5V for the pin 1 and 2 of the photosensor The LED input voltage must set to less than 3 9V at pin 5 of photosensor A square wave form output signal of photosensor was obtained from the oscilloscope before testing Papers vvith different types of color vvere prepared for each testing The input from the switches was selected and each color paper with 4 different variable inputs was tested Outputs in kHz of photosensor can be taken from oscilloscope Steps 4 5 6 and 7 were repeated for different color paper with 4 different types of inputs from the photosensor Figure 4 2 shows the square wave output signal kHz of the photosensor taken from oscilloscope From the testing results obtained it can be concluded that the photosensor is functioning well and outputs obtained for
47. se noted Operating Temperature Topr 30 C to 85 C Storage Temperature Terg 30 C to 85 C LED Absolute Maximum Ratings T 25 C unless otherwise noted Reverse Voltage VRZ5V Forward Current lez 30 mA Power Dissipation Py 120 mW Peak Forward Current 100 mA Sensor Absolute Maximum Ratings over operating free air temperature range unless otherwise noted Input Voltage all inputs Vj 0 3 V to Vos 0 3 V Notes 1 Stresses beyond those linked under absolute maximum rating may cause permanent damage to device These are only stress ratings and functional operating of the device at these or any other conditions beyond those indicated in the 63 Recommended Operating Conditions table shown above may affect the device s reliability 2 All voltage values are with respect to GND 3 Full scale frequency is the maximum operating frequency of the device without saturation 4 Output interface of device is designed to drive a standard TTL or CMOS logic input over short distances If lines greater than 12 inches are used on output a buffer or line driver is recommended Description Supply voltage Output Frequency Fo 4 Photodiode type selection input LED Anode LED input 3 6 Photodiode type selection input GND 1 8 Power supply ground 64 LED Electro Optical Characteristics of LED T 25 C unless otherwise noted See OVLAW4CB7 for more
48. start kire kire semasa high cntloop btfss PORTB 3 goto cntloop da start kire kire semasa high cntloop1 incf NumL f 111 btfsc STATUS Z 211 incf NumH f 011 btfsc PORTB 3 looping 1 cycle exit loop 2 cycle goto cntloopl 2 cycle cntloop2 kire semasa low incf NumL f 1 1 btfsc STATUS Z 211 incf NumH f 011 btfss PORTB 3 jda stop kire goto cntloop2 moviw 0x081 before send serial com init with this movwf SPBRG bsf RCSTA SPEN movlw 0x080 movwf RCSTA movlw 0x0A4 movwf TXSTA backl movlw Ox80 movwf PORTB movf TenK w addlw 0x30 movwf TXREG movlw 0x40 movwf PORTB call DELAY back2 movf RCREG w movlw Ox80 movwf PORTB movf Thou w addiv 0x30 movwf TXREG movlw Ox40 movwf PORTB call DELAY back3 movf RCREG w movlw 0x80 movwf PORTB movf Hund w addiv 0x30 movwf TXREG movlw Ox40 movwf PORTB call DELAY back4 movf RCREG w moviw 0x80 movwf PORTB movf Tens w addlw 0x30 movwf TXREG movlw 0x40 movwf PORTB call DELAY back5 movf RCREG w moviw 0x80 movwf PORTB movf Ones w addlw 0x30 movwf TXREG movlw 0x40 movwf PORTB call DELAY goto XYZ Loop btfsc PORTB 1 goto ONN goto OFF ONN movlw 0 movwf PORTB goto Loop OFF movlw 0x00 movwf PORTB goto Loop DELAY movlw 1 movwf d3 LPD3 movlw 10 movwf d2 LPD2 movlw 57 movwf dl LPDI decfsz dl f goto LPD1 decfsz d2 f goto LPD2 decfsz d3 f 70 goto LPD3 return DELAY2 4ms selang atr beat MOVL
49. terface for Internet based applications Poor integration with other languages such as C Improvement found in VB NET 1 Full support for object oriented programming il Better database programming approach with ADO NET Access to Framevvork iv Powerful unified Integrated Development Environment IDE Inherent support for XML amp Web Services vi Better windows applications with Windows Forms vii Console capabilities of VB NET viii Web capabilities with Web Forms ix Structured error handling capabilities x Immense power of tools amp controls including Server Controls xi Interoperatibility with other NET compiled languages CHAPTER 3 DESIGN AND IMPLEMENTATION This chapter describes the design and implementation for the blood glucose measurement through urine strip using a photosensor 3 1 Introduction Figure 3 1 shovys the block diagram of main system design Basically there were hardware and software need to be implemented in this project Hardware part consists of photosensor circuit connection including PCB design photosensor box design and serial port interface connection like USB converter that connected from PIC to personal computer Meanwhile the software part includes microcontroller as analog to digital converter that read the analog urine glucose value measured by the photosensor and converts it to digital number has been developed in PIC using
50. tested Range of parameters that is available in the markets nowadays can be from 1 to 11 parameters These parameters are glucose ascorbic acid ketones protein pH value blood nitrite leukocytes specific gravity bilirubin and urobilinogen 15 The Roche and Bayer reagent strips that can be used to test glucose in urine are Clinistix Diabur Test 5000 Diastix Uristix Keto Diabur Test Combur 3 Test E Keto Diastix Combur 3 Test Combur 4 Test or vvith N Combur 5 Test or N Lobtix or vvith N Combur 6 Test Lobstix SG Combur 7 Test Multistix SG Combur 9 Test N Mustistix SG Combur 10 Test Multistix 8 SG and Multistix 10 SG 6 d yj E dj Lg Figure 2 6 Examples of Urine Strips Example Diastix urine glucose test strip Example Clinistix urine glucose test strip and color chart and color chart Urine glucose dipstick Urine glucose dipstick Negative 10 14 1 2 UA Negative Light Medium Dark mg dL 100 250 500 1000 2000 EXAMPLE Reference Color Chart or more EXAMPLE Reference Color Chart Figure 2 7 X Examples of Reference Color Chart These are some types of urine strips with different parameters found in the markets as shown in Figure 2 6 and Figure 2 7 shows some examples of reference color chart that can be used for visual test The chemical reactions involved in the urine strip for glucose test is shown in Figure 2 8 16 Glucose O2 glucose oxidase Gluconic Acid
51. the outputs KHz from the photosensor with clear filter selected as an input A linear relationship was obtained with an equation of y 0 2034 x 22 497 45 Blood Glucose Value Versus Clear Filter Value Linear Clear Filter alue y 0 2034x 22 497 Clear Filter Value kHz Figure 4 7 Graph of Blood Glucose Value mmol L versus Clear Filter Output Value kHz 4 5 Discussions The results obtained from a total of 42 patients were analyzed and summarized as shown in Table 4 1 Since there were four different types of inputs that can be selected from the photosensor and i determined and fixed the considered most accurate filter as our input for our future blood glucose measurement Clear filter was selected to be the fixed input for future blood glucose measurement as it had the least absolute maximum error which was only 1 1348 compared to other filters The smaller the value of absolute maximum error the smaller deviation of calculated blood glucose value from the output of photosensor with the value obtained from the blood glucose analyzer machine So the more accurate of the result obtained from the selected clear filter as input 46 Besides that it s only 0 064 difference of mean error betyveen the clear filter and red filter least mean error value It shovved that not much different for the mean error of clear filter with other filters These were the reasons why clear filter was selected as a
52. the processor to send data to the device it is controlling 2 8 Serial Port Interface UC00A Method USB to UART Convertor Serial communication is the most popular interface between device and this applies to microcontroller and computer UART Universal Asynchronous Receiver Transmitter is one of those serial interfaces Classically most serial interface from microcontroller to computer is done through serial port DB9 However since computer serial port used RS232 protocol and microcontroller used TTL UART a level shifter is needed between these interfaces Recently serial port of computer have been phase out it have been replaced with USB Of course most developers choose USB to serial converter to obtain virtual serial port The level shifter is still necessary for UART interface A USB to UART converter is developed which offers USB plug and play direct interface with microcontroller and is provided with low current 5V supply from USB port Figure 2 16 shows the traditional method of serial port interface for PC whereas Figure 2 17 shows serial port for PC by using a USB Now an easier cost saving and much convenient method of serial port is developed by using UCOOA method 10 23 Serial Port Figure 2 16 Traditional Method of Serial Port for PC 4 USB Serial Port Figure 2 17 Serial Port for PC Using USB e ome S es UCO0A Figure 2 18 Serial Port for PC Using UCOOA Method The features and specification
53. tring Dim freq As Double Dim yO As Double Dim rxdataq 5 As Byte Dim tenthou As Double Dim thou As Double Dim hund As Double Dim ten As Double Dim one As Double Dim HzValue As Double Dim HzStr As String Dim timeCount As Double SerialPort 1 Read rxdataq 0 5 TextBox3 Text ChrW rxdataq 0 TextBox4 Text ChrW rxdataq 1 TextBox5 Text ChrW rxdataq 2 TextBox6 Text ChrW rxdataq 3 TextBox7 Text ChrW rxdataq 4 tenthou Conversion Val TextBox3 Text thou Conversion Val TextBox4 Text hund Conversion Val TextBox5 Text ten Conversion Val TextBox6 Text one Conversion Val TextBox7 Text timeCount tenthou 10000 thou 1000 hund 100 ten 10 one HzValue 1 timeCount 0 0000011875 1000 HzStr Conversion Str Hz Value TextBox1 Text HzStr freq Conversion Val TextBox1 Text 1 0 2034 freq 22 497 yO 22 497 0 2034 freq mmol Conversion Str yO TextBox2 Text mmol End Sub Private Sub Forml Deactivate ByVal sender As Object ByVal e As System EventArgs Handles Me Deactivate End Sub Private Sub Forml Leave ByVal sender As Object ByVal e As System EventArgs Handles Me Leave SerialPort1 Close End Sub Private Sub Forml Load ByVal sender As Object ByVal e As System EventArgs Handles Me Load SerialPort1 Open End Sub Private Sub Forml Shown ByVal sender As Object ByVal e As System EventArgs Handles Me Shown End Sub End Class
54. tructure and function nursing applications in clinical practice 2 ed 1997 Ragnar Hanas Type I diabetes in children adolescents and young adults how to become an 3th ed Uddevalla Sweden 2007 Patrick English Gareth Williams Type 2 Diabetes London UK Martin Dunitz Ltd 2001 Helen Varney Jan M Kriebs Carolyn L Gegor Varney s midwifery Fourth ed America Jones and Bartlett 2004 Gebrauchsanweisung User Manual Urysis 1100 Roche Monica Cheesbrough District Laboratory Practice in Tropical Countries Volume 1 6th ed 2009 Kenneth D McClatchey Clinical Laboratory Medicine 2 ed Philadelphia Lippincott Williams amp Wilkins 2002 Globe Diagnostics Enzymatic colorimetric method for the quantitative determination of Glucose in serum plasma and urine Avago Avago Technologies 2007 Reflective Color Sensing with Avago Technologies RGB Color Sensor Unites States and other countries Cytron Technologies Sdn Bhd UICOOA User Manual Johore Malaysia 11 12 49 Dan O Sullivan and Tom Igoe Physical computing sensing and controlling the physical world with computers Thomson Course Technology PTR 2004 Jesse Liberty 2003 Learning Visual Basic NET United States of America O Reilly amp Associates Inc APPENDIX A UCOOA USB to UART Converter 51 Features This development offer low cost easy to use USB to UART converter to user It has been designed with capa
55. ue BG value mmol L Linear BG Versus RF y 0 6809x 19 616 Red filter value kHz Figure 4 4 Graph of Blood Glucose Value mmol L versus Red Filter Output Value kHz 4 4 2 For Green Filter Selected As Input Of Photosensor Figure 4 5 shows the graph of blood glucose concentration values mmol L versus the outputs kHz from the photosensor with green filter selected as an input A linear relationship was obtained with an equation of y 0 5739x 21 61 43 BG Value Blood Glucose Value Versus Green Filter Value n L Linear Green Filte alue y 0 5739x 21 61 Green Filter Value kHz Figure 4 5 Graph of Blood Glucose Value mmol L versus Green Filter Output Value kHz 4 4 3 For Blue Filter Selected As Input Of Photosensor Figure 4 6 shows the graph of blood glucose concentration values mmol L versus the outputs KHz from the photosensor with blue filter selected as an input A linear relationship was obtained with an equation of y 0 9301x 24 899 44 Blood Glucose Value Versus Blue Filter Value BG value mmol L 16 14 12 4 Linear Blue Filter Value y 0 9301x 24 899 Blue Filter Value kHz Figure 4 6 Graph of Blood Glucose Value mmol L versus Blue Filter Output Value kHz 4 4 4 For Clear Filter Selected As Input Of Photosensor Figure 4 7 shows the graph of blood glucose concentration values mmol L versus
56. y There were four variable logical inputs in the photosensor which red green blue and clear filters that shown in Table 3 2 Each filter or input of the photosensor controlled by two separately toggle twitches SPDT in Low L or High H conditions For instant a clear filter or input selected when switch 1 is set High H and switch 2 is set Low L High H means 5V and Low L means Ground GRD Table 3 2 Table of Variable Inputs of Photosensor Filter type Switch 1 Switch 2 Red L L Green H H Blue L H Clear H L 31 3 2 3 1 For 4 Variable Logical Inputs of Photosensor Figure 3 4 shows the switch 1 and switch 2 connections for input selecting from the four variable logical inputs of the photosensor Figure 3 4 Switch 1 Left and Switch 2 Right Connections for Photosensor Inputs 3 2 3 2 For Portable Power Supply The portable power supply 9V battery was controlled by switching on and off through a toggle switch SPDT and the switch connections shown in Figure 3 5 To Positive of To Positive of Portable Voltage Regulator Power Supply Figure 3 5 Switch Connections for Portable Power Supply 32 3 2 4 Troubleshooting by Making a Portable Power Supply A portable power supply was designed and implemented due to the conveniences on doing samples testing at Pusat Kesihatan UTM The schematic diagram of the portable power supply shown on Figure 3 6 and it was simulated using
Download Pdf Manuals
Related Search
Related Contents
Philips LCD wall mount SQM6485 Voyagez en toute liberté ! www.lignesdazur.com Copyright © All rights reserved.
Failed to retrieve file