Home

Future Work

image

Contents

1. 3 50 Il S 0 d m 50 SP 0 5 1 1 5 2 2 5 X 10 Echo after fixed gain 500 3 0 d Z 500 0 0 5 1 1 5 2 2 5 X 10 Echo after TGC O3 2 A ke La EN of IM D d l a ww Tp m 50 0 0 5 1 1 5 2 2 5 X 10 Echo after fixed gain amp TGC 500 o4 i m y i T Q d Z 500 0 0 5 1 1 5 2 2 5 X 10 Enveloping 400 200 o h K fs E 0 1 4 ES d A h 0 0 5 1 1 5 2 2 5 X io Extracted Spikes 4000 3 2000 E 0 S 0 0 5 1 1 5 2 2 5 No of Samples T d Figure 3 5 1 MatLab Siumlation Signal Output File Edi Debug Desktop Window Help Du X MBO ce RS P curent irectory CMATLAB7worklAscan Shortcuts Z Howto Add 2 What s New cm aja All Files i Holladay m withautodetection asv Ei withautodetection m Com Current Directory CEWATL 7 x PODIA Command History v TT amp 7 4 09 5 42 PM B 7 4 09 8 14 PM load D XAcademic E 7 5 09 3 15 PM load C XMATLAB7X m 7 8 09 2 17 PM close all B gt 7 9 09 3 06 PM B 7 9 09 5 45 PM close all E 7 11 09 4 44 Fg d xi 17 0779 14 6058 Lab Command Win MATLAB Y Edtor C Figure 1 A dow AL ACD VD TL and IOL are calculated Chapter Future Work Introduction Resulting Model Signal Processing Hardware Data and Values Collec
2. When the probe is aligned along the visual axis center of the macula five tall spikes are clearly visible in the scan representing echoes from the cornea anterior lens posterior lens retina and sclera with the retinal spike rising steeply from baseline The corneal spike is separate from the probe spike and has a double peak representing the epithelial and endothelial layers of the cornea Figure 1 4 2 San results Figure 1 4 3 A scan examination and resulting spikes Although the immersion technique yields consistent and reproducible measurements we preferred to apply the contact technique as it much more comfortable for patients 1 4 3 Eye Modes There are several patient eye modes each is discussed below e Phakic is the presence of the natural crystalline lens e Aphakic o Nolens is the absence of the natural crystalline lens either from natural causes or because it has been removed o Intact where only the anterior lens is absent e Pseudo phakic When measuring eyes that have previously undergone cataract surgery where the natural crystalline lens is substituted by a synthetic lens The tissue velocity must be corrected for the implanted IOL i e for PMMA IOL is 2718 m s for Acrylic IOL is 2120 m s and for Silicon IOL is 1049 m s If the user is not sure what kind of IOL was implanted an observation of the retinal echo distance may help e Dense Cataracts In a dense cataract additional low echoes
3. At pin 1 gt 25 volts e Output At pin 3 5 volts e Calculations no need for calculation 4 Input 2 GND 3 Output 3 2 volt e Our micro kit operate on range of voltage from 2 7 3 6 volt e Maximum current that kit Borne is 800mA e Analog supply current is 1 7mA e Digital supply current is 10mA e Forsafety we use 20mA We didn t find a regulator that yields 3 2 V so we had to design one to function as desired The design consists of two resistors to apply voltage division across them Input 25 volt Output 3 2 volt Calculations Vout R2 1500 R1 1KQ Vin R2 R1 R2 5 8 Printed Circuit Board We designed the PCBs using OrCAD 10 5 compatible with windows XP We have undergone the following steps to implement the PCB designs 1 2 3 NED Un d 95 Designed the circuit Confirmed availability of all values of the components Verification e Level I Checked the design using simulation program e Level Il Checked the design on the breadboard Drew the circuit schematic using OrCAD Capture Pin connections verification in schematic Created the layout of the circuit using the appropriate footprint for every component The option of creating our own library and constructing its footprint is provided in case of not finding the appropriate footprints for the components among the standard libraries Added created libraries to the built in ones Constructed a footprint for each component by using its dimensions described
4. Silicon 1000 PMMA 2760 Acrylic 2120 4 Vitreous 19 5 min 18 23 max 21 99 1520 or 1532 5 Retina 1 85 1540 6 Sclera 0 55 min 0 4 max 0 6 1613 1622 Table 4 6 1 Summarized Table of values The human eye has a minimum axial length of 21 mm and a maximum of 29 88mm giving an average of 24 05mm Thus the maximum length to be measured by the A probe is 29 88 mm 4 7 Time Gain Compensation TGC Calculation It is known that the ultrasound signal strength is attenuated by0 1 dB cm using 1MHZ 3 4 By applying this fact on our system frequency which is 9MHz the attenuation coefficients of the ultrasound signal in the different interfaces of the eye were calculated as shown in the table below Interface Cornea Aqueous Lens Vitreous Retina Sclera Attenuation coefficient 0 234 0 091 1 82 0 091 0 364 dB mm at 9MHz Table 4 7 1 attenuation values for interfaces of the human eye To know how much the signal is attenuated we need to obtain the distance between the spike of each interface and the spike of the next interface But in order to calculate the distance the times need to be calculated first Using the indices acquired from the microcode and dividing by the sampling delta which is 4 55MHz the time was calculated as shown in the table below Peak Anterior Posterior Anterior Posterior Lens Retina Sclera Cornea
5. branching into software and hardware paths This branching is demonstrated in this Part of the document and is further detailed into firmware and interfacing in addition to the software and hardware branches This chapter will focus on the hardware module Figure 5 1 illustrating the schematic circuit and function of each operational block and verifying it with test snapshots L Microcontroller 5 2 Transducer Schematic Picture Figure 5 2 1 Transducer Schematic Figure 5 2 2 Transducer Function A typical A scan biometry probe is a single piezoelectric crystal the size of a pen that produces ultrasound waves when a voltage is applied trough the piezoelectric effect Verification To determine the resonance frequency the following steps were performed 1 1K resistor connected in series with the ultrasound crystal 2 Applied a voltage on the crystal and measured the output voltage on the other terminal of the resistor 3 While changing the frequency of the applied voltage waveform we noticed variation of the output amplitude 4 The amplitude was maximum at a frequency of 9MHz resonance as shown on the digital oscilloscope Figure 5 2 3 Transducer Test Result 5 3 Pulser Circ
6. dependent on multiple users of the system and moreover on the grasp and fine control of each individually Abolishing this inconsistency will be in benefit of precise results Proposed refinement to the currently known Contact technique rendering it to be more accurate to the eye measurements will act as the ultimate solution for more appreciated system 5 The patient is examined in the seated position with the chin correctly positioned on a free standing chin rest The ultrasound probe is attached to a zero weight balance glide to prevent any pressure on the eye during examination consequently eliminating the corneal compression error The probe s movements are controlled through a joystick handle as in the figure below The probe is then brought forward to gently touch the cornea This technique can only be applied using contact techniques as immersion techniques would contradict with the positioning of the patient Figure 1 4 1 A Scan examination 1 4 2 2 Immersion Technique The ultrasound probe does not come into direct contact with the cornea but instead uses a coupling fluid between it and the probe preventing compression The patient reclines and a small scleral shell is placed on the anesthetized limbus Theses shells are placed between the eyelids and centered over the cornea The probe is either hand held within the fluid or locked into position in an infusion shell The contact lens saline fluid is infused into the shell 3 4
7. overcome all the problems and drawbacks of currently used A scan Biometry systems to cope with the rapid rate of development in worldwide medical devices industry The intended use of the A scan biometry system is to measure the axial length corneal radii anterior chamber length ACD and the calculation of the IOL power required for the preoperative lens implant In order to motivate the local market and adapt to changes in the global industry we will follow a progressive approach to reach our prospective goal We hope our project acts as the corner stone of A scan Biometry systems industry here in Egypt which supported by its simplified concept and component requirements abides well to the current National Economic and Technological conditions Part Ground Work Chapter Introduction Introduction Output Spikes Statement of Need Market Survey Biology of the Eye Work Sequence and Design Flow A Scan System References Techniques Eye Modes 1 1 Introduction Sonography is now firmly established as one of the most useful diagnostic tests because it provides reliable structural functional and hemodynamic information about the different systems of the human body Ophthalmic Sonogrpahy continue to evolve and the development of new modalities improves its diagnostic capability The A Scan examination is continuously being refined through better display of ocular anatomy more reliable quantitation and more
8. 1 length allpulses if allpulses n gt thr Putting above threshold peaks in new array thresh thresh allpulses n time time stecho n else Resestting value of below threshold peak in original array allpulses n 0 end end Generating Correct thresholded signal in final array final for n 1 length allpulses if n length allpulses Concatinates the final array with zeros between each peak and the peak themselves final final allpulses n zeros 1 stecho n 1 1 stecho n else Special concatination to final array as no more peaks are available at the end of the signal final final allpulses n zeros 1 length y stecho n end end subplot 616 plot t1 1 length final final grid on 3 4 6 Module 6 Spikes Validation 3 4 6 1 Algorithm Algorithm Validation Input s array of spikes thresh Output s names of spikes results of corneal compression and misalignment check Label each spike with its name using function naming Calculate thickness of cornea If lt pre defined thickness Give alarm and reset scan Check misalignment using functions checklensper amp checkretper return void 3 4 6 2 MatLab Code Excerpt 1 S KKKKKKKKKKK Check Validation Module KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK Determining number of above threshold pulses pulseno length thresh For correct no of spikes if pulseno actualpno Calculating Corneal thick
9. 16MHz 044 0 64 0 84 4 8 76 8 96 9 16 Figure 5 6 2 Illustration of sampling frequency effect 5 6 2 Bandpass filter design For more accurate measurements we choose four order filtering 1 Once selecting Bessel as our BPF type particular parameter values K1 K are set according to the number of poles used By using these set values of Ki K we assigned the most suitable values for R Be and C that best fit our corner frequency f by utilizing the relations below K1 efe Rf R1K2 Stage K1 K2 1 0 1111 0 084 2 0 0991 0 759 Stage HPF LPF 1 C 47Pf C 22Pf R 2700 R 5510 Rf 8402 Rf 8402 R1 10KQ R1 10KQ 2 C 22Pf C 47Pf R 5140 R 2300 Rf 15KQ Rf 15KQ R1 20KQ R1 20KQ 5 7 System Power Supply Schematic Figure 5 7 1 Power Supply Schematic Function Supply the system with 5V 15V 3 3V and 25V Verification Required Obtained Required Obtained 1 25V 2 15V 4 5V 3 15V 5 3 3V 5 7 1 Power Supply Design In the main supplied electronic system the AC input voltage Vac must be converted into a DC voltage with the right value and degree of stabilization This is achieved using a rectifier circuit in a bridge configuration Figure 5 7 1 In this basic configuration the peak voltage across the load is equal to the peak value of the AC voltage supplied by the transformer s secondary wi
10. 2 MatLab Code Excerpt KKKKKKKKKKK Lead Edge Detection Module KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK A loop to detect starting and ending points of envelopes while ok if y m lt 10 amp y m 1 gt 10 stecho stecho m 1 end if y m gt 10 amp y m 1 lt 10 ndecho endecho m end m m 1 if m length hil ok 0 end amp ki k Spike detection ck cC ck Ck C00 Ck Ck Ck Ck Ck Ck Sk ko ko kx Gk ko ko ko ko kockock ok for n 1 length stecho 1 mx max y stecho n endecho n find max value of entire array r c find y 2mx find max position Stecho n c 1 end I 3 4 5 Module 5 Thresholding 3 4 5 1Algorithm Algorithm Thresholding Input s arrays of starts and ends of envelops stecho endecho Output s array of spikes thresh Calculate area of envelops using function trapz Create array with values of areas If area threshold Keep it in array thresh Else Set to zero Create array final consisting of all kept spikes return thresh 3 4 5 2MatLab Code Excerpt KKKKKKKKKKK Thresholding KKKKKKK KKK KKK KKK KKK KKK KKK KK KKK KKK KK KK ko ko ko ko ko kc kk Xk Calculating area under envelopes by Trapz function allpulses for n 1 length stecho allpulses allpulses trapz y stecho n endecho n end thresh time A loop to extract pulses above thresholds and there LOCATIONS in the array time for n
11. 3 21 A few spikes having low amplitude produced by the dispersed asteroid bodies signifying Mild Asteroid Hvalosls RR 45 Figure 2 3 22 Another A scan of Mild Asteroid Hyalosis showing multiple moderately reflective spikes produced by the dispersed asteroid bodies sessi nennen nennen nnn n nnns sss n aan 46 Figure 2 3 23 Severe Asteroid Hyalosis demonstrating multiple highly reflective spikes produced by the dispersed Asteroid bodies oooconnncnnnnncncnnnnonncnnnnnnnonnnnnnnnnnnnnnn nono nnnnnnnnnnnn nnn ensis sss sa ga asses siis sias aaa i tetris s ssa again 46 Figure 2 3 24 Multiple spikes of medium to high amplitude produced by the dispersed Asteroid bodies Severe HE OQ 46 Figure 2 3 25 Extremely low amplitude spikes produced by Endophthalmitis infection followed by inflammation The disease is termed Uveitis cocccccnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnononnnnnnnnnnnnnnnnnnnnnnnnnnnnnninonss 47 Figure 2 3 26 Normal Vitreous Notice that the vitreous space doesn t produce any spikes as the other eye Interfaces eeh 47 Figure 2 3 27 Very low reflective spikes from the vitreous opacities V and a double peaked highly reflective from the shilom detachment C rtr e ERE RE ERE EN a Ea aa 47 Figure 2 3 28 Multiple moderately reflective spikes produced by a single dense Vitreous Opacity 48 Figure 2 3 29 Coat s Disease the arrow represents a few spikes of s
12. 74 5 3 Beer a roi eE testes 75 5 4 MAIS ttnt tntto tten n ttt ten AEAEE EEES PAREEEEEEEESARAEEEEEEERSRAREEEEEEERREREEEEEEEER REEE EE Ennen 76 5 5 IS Lal TE 77 5 6 Bandpass IER 78 5 6 1 Mathematical Deriva A a 79 5 6 2 Bandpass filter design 81 5 7 System Power Supply e beret tbe dd cd a 82 5 7 1 Power SUppIy Desig Nire teen ace enean Ie 83 5 8 Printed Circuit El WEE 85 5 8 1 Schematic cous deen ena CE CE eee ep Pep tte eH e eee Eo Ete DEES PERS CELL ETE TREE PERRO ELE ETE LER ee PERRO ELE CHE TEE EE AR TENE EE seers 86 Boll Main Circuit cnc EE 86 58 12 Pulsar Droe amp TR SWH egenen vere varo eve vtov adie EEN 87 5 8 1 3 FT232BQ EPROM amp USbconnector eene eene ness n atris ese rss reser is 87 gt e A gt plo Pass Elter Zeus EEN ee eet ve ok se eine oa we evene eee ge ok nee ea dE vas town ve va EE dE 88 5815 POWEr SUPPIy EEN 89 5 8 2 LU E E EE EE geeeege E 90 5 8 2 1 MAII gl 90 58 2 2 PowerSupply see eer eerte eet reete siepe E Eesbech 91 5 9 References sor rr e m e eee e hee tee te e v edem eerte 92 Chapter 6 6 1 l gee S ze To ira Saree earns Sar T do e de ed n ae oe e eee IRE E inno a nie er 94 6 2 Description ac 2488 SASS SARE BARA SARA AAR e e e AA 94 6 3 Implermientation s re soca daca ainsi IR 98 6 3 1 Pr gram EE d te d DI 98 6 3 2 Methods and Variables RR ERR e e PE 100 6 4 Validation ee ree er edere 108 6 4 1 Serial COMMUNICATION zsevecercrccecs va cove ee tee t en EN
13. 9 3 1 3 AphakicinoTens Echo ot tette estet vest e se RE TRISTE TEUER 145 Bach Coats Disease ECHO ce Rer e e eve APER 145 9 3 1 5 Expulsive Hemorrage Disease Echo 146 9 3 1 6 Retinal Detachment Echo 146 9 3 1 7 gt Uveitis amp mild Ateroid EChO 2 n TT PARES 147 9 3 1 8 Severe Asteroid Echo 147 9 3 1 9 Ocular Melanoma ECHO ee tete eee n ee ee A eT E Eee 148 9 3 1310 MisalignmentEchoO entren AA 148 9 31 11 Spikes Naming e eere II 149 9 3 2 Software Hardware COMMUNICATION esses eene nennen eene nnnnnnmenss enne nnne nnns 150 9 3 2 1 From Java Platform to MCU eene REE AS ET REEE AE sse 150 9 3 2 T ge une DEER E et LEE 152 9 3 3 S01 EE 155 9 4 Testing with analog audio slenal nennen nennen nnne nensis ssa a aaa n nnn essi sana ganan 159 94 1 ADC furictionality MCU res ults ie ii 159 Eck RETEFENGES ss eh eege ee maman EE 160 LOTS A ett stare tesctesedosotanncneetensenstenn ER A ERN ER E ERRR RE Le RN ERE RE RRR REL UTR S Tuo PENNE RR LO ERN Ro R ERRRRL DDR E NAE NATO 162 10 2 Sig al GeNeEratiO Nae n e o e 162 VOZ OU 162 A E P 162 10 3 2 P lser Circuit soe Be ee RR Rete ee eter eerte n eee er oa eee a eee 162 10 33 TRIS EE 164 10 3 4 Bandpass filter 164 TT 1 Introduction 25asasaeone non OOo one f m t nnn 166 TILA ROO nta 167 Cl UE 168 Discussion achievements accomplished problems eseseeeeeeneeeennnnnnn nnns 169 Introduction E 170 Wireless Probe err Aa 170
14. Differentiate between local header files and complier library header files by inclosing file name in or with include directive eg include Ascan h Local File in Prject Directory include lt stdio h gt Public Library Header file 4 Must use same memory model in all c files 1 line of each file or else will give a warning of incompatible memory model 7 11 2 Variables 1 For Global constants that are not changed and used in multiple files use define directive in the header file that is to be included in all c files 2 For Global variables that are used in multiple files but are changed in different code segments use extern instead of sending to the function as a pointer Note Extern Variables are defined in 1 file and when externed must be same data type and memory model Eg Char data pulseno gt extern char data pulseno 3 sbit data type cannot be externed can be defined in the Kit header file c8051f020 h which is also included in all c files But make sure to include this local header file not the public one in the compler library 4 Ensure exact definition of variables in functions and other files as it affects value stored in variable Eg Do not exchange a char for unsigned char 5 All flags or control signals are to be defined as bit Variables that act as counters are defined to char or int according to max value they can hold 6 Do not use float data type as it acquired a huge space instead use integer and
15. a eue voved eue e esu vie deo eege vcra e ud eo vd ve ee vr ven 21 AENA 22 Figure 1 4 3 A scan examination and resulting spikes nsnsssssnennnnesssrnrrnrrnsssssrrrrrrnsssssrrrrrnnssssrnrrrrnsssssnnens 22 Figure 1 4 4 Spikes resulting from interfaces inside the human eye oooocccnnncccccnononncnnnnnnnonnnancnnnnnnnnononannnannnnnns 24 Figure 1 5 1 Statistical Results for scanning techniques nennen nenne nnn nnne ness 25 Figure 1 5 2 Statistical Results for A Scan system types nennen nnne nnns n narras n aan 26 Figure 1 5 3 Statistical Results preferred system desen 26 Figure 1 6 1 Design A 27 Figure 2 3 1 High Level Block Diagram of e DIOLA scan nnne nennen nnn nnns nnns nina 33 Figure 2 3 2 Low Level Block Diagram of e DIOLA scan nennen enne nsn n nnns nsns 35 Figure 2 3 3 Signal Acquisition Module 36 Figure 2 34 TGC eftectill stration 2 ecco toon tease td 36 Figure 2 3 5 Types o f TGC controls Top Type 1 Bottom Type 37 Figure 2 3 6 Thresholding Module 37 Figure 2 3 7 Thresholding illustration ssssesssseeseseeeeeee nennen enne nnne nennen nnn nnns sn ka aan n nnn risa nan 37 Figure 2 3 8 Autodetection Module 38 Figure 2 3 9 A scan display of the same eye with an on axis measurement of 23 33 mm 38 Figure 2 3 10 Slight Off axis measurement of 23 19 mm Note the presence of the small posterior lens surface Le Eed 39 Figure 2 3 11 Large Off axis measurement of 21 87 mm Note the presence o
16. a fixed number of bytes in temparray then calls Definecommand function to identify what was received by UART 7 6 3Main Operating Functions void trigger void Action 1 Controls TR switch On Off switching Sends trigger to Pulser circuit to trigger probe Enables ADC and its interrupt void TGC unsigned char fullscan const unsigned char a const unsigned char b const unsigned char c const unsigned char d unsigned int amplified1 1 P fullscan array of aquired samples per scan TGC coiffeincents a b c amp d received through UART Action Compensate attenuation due to depth reached by Ultrasound beam by increasing gain in a linear fashion as calculated earlier in Chapter 4 The fullscan array is divided into 3 regions Region 1 is of fixed gain C Region 2 is of linear gain d c a b Region 3 is of gain d O P amplified1 array of Time Gain compensated signal void FIXED unsigned int amplified1 unsigned int amplified2 char dcataract 1 P ampified1 array from TGC Dcataract option used to increase gain in case of dense cataract observed by user and received through UART Action Amplifies whole signal by a fixed gain of 10 and in case of dense cataract of 15 O P amplified2 array of fully amplified signal void getpeaks unsigned int amplified2 unsigned int allpeakstime unsigned int allpeaksamp 1 P ampified2 array from FIXED Action Performs Peak detection by Definig peak position at index of max amplitude by cal
17. a niensis sanas ains esses nana 56 3 4 3 ERAN a el 57 St Algorithmes EE Oe re e e erase egt a e TEs 57 3 4 32 Matlab Code id ds EI 57 3 4 4 Module 4 Spikes Detecton enne nennen nennen nsnnnnnir nnne sensns aser nnns sss snas gans 57 3454 T TALS OMEN eg EENEG 57 3 4 4 2 Matlab Code Excerpt e eer ERE RE ER E RA ERE dd EDS 57 3 4 5 Module 5 Thresholding enne nennen nennen nnn nnns snis Tirsa ness inagis 58 SEET E 58 3 4 5 2 Matlab Code Excerpt eo EE nnn e EE 58 3 4 6 Module 6 Spikes Validation ao 59 3 4 6 1 Algorithm ecco Ee t rc Et Eee t v Et Ee een en Ea aee ae vein eva Et Eee OR Es ten hene tu 59 3 4 6 2 MatLab Code Ewcerpt tnetetne tree trees teens EnEn EnEn sns rnane 59 3 4 7 Module 7 Calculations Drehen 60 3 4 7 1 Algorithm een 60 3 2 7 2 MatLab Code Excerpt 1 s s sssesesesereseerererersrstststststs tnts tnks inib En ENEN ANE NANENANE NANANA ASES En EnEn ESen esen na rnane 60 3 5 Marttabrzmm lattggDIDUEseniegeeggeegdregeeeedeegdeeggeete kee a 61 Chapter 4 4 1 lge TL EE 64 4 2 Signal Processing Hardwakte z s ua ert ergeet et ee idc adem TE 64 4 3 Kiel 65 4 4 UTR CT 66 4 5 Resulting Model zz RR ERR re dE dE oa Sts Pa O EE Met oe a es 67 4 6 Data and Values Collection esssssssesseeeeseeeeeeeeeeennnnee eene nennen nennen nnn nete snnt nennen nens 68 4 7 Time Gain Compensation TGC Calculation eene 68 4 8 erte HE Ee 71 Chapter 5 5 1 Ingo euo ee 74 5 2 A A EH E He i Ae en ena t
18. a region of the memory called memory pool where all the dynamic allocated pointers will be defined To reserve memory pool use init mempool address of start of memory pool sizeof mempool function 3500B memory pool init mempool amp calloc mempool sizeof calloc_mempool When pointer is not needed anymore in the current run of the program free function is called to free the space it reserved in the memory to be used by other pointers Make sure never to free a pointer without finishing with it Never to free a pointer twice Never to leave pointers hanging without being freed or else will eat up the memory memory leak If pointer is being reallocated inside a loop first time use calloc then use realloc donot use realloc directly 4 Array of pointers is defined as ftime 10 where this is an array of 10 pointers Each pointer is to be allocated independently using a for loop and also freed inddependently os ES m eem Ee iilud eue d e mul Cart m TE imd E us Ee NES Hem a a e Ce mel e amd qe i EE Pointer to a pointer b is used when a pointer is to be allocated inside a function and its contents are to be seen outside the function as previously mentioned variables declared inside a function are lost after its execution eg Final peaks will be allocated inside threshold function and needs to maintain that in main unsigned int tempfinaltime finaltime Define pointer and pointer to pointer Void main
19. and the anterior lens surface e The lens thickness is measured between the anterior lens surface and the posterior lens surface e The Vitreous Cavity s Depth VCD is measured between the posterior lens surface and the anterior surface of the retina e IOL An intraocular lens is an implanted lens in the eye usually replacing the existing crystalline lens because it has been clouded over by a cataract or as a form of refractive surgery to change the eye s optical refractive power based on the readings of the axial length the program automatically suggests the choice for intraocular lens strengths The IOL power is adjusted according to the desired postoperative refraction 1 4 2 Scanning Techniques A problem of selecting the appropriate scanning technique involves a trade off between accuracy of measurements and patient comfort There are two main techniques 1 4 2 1 Applanation Contact Biometry e Typical contact biometry Ultrasound probe is placed directly on the cornea which slightly indents the surface generating the first echospike 3 4 The five basic limitations of applanation A scan biometry are o Variable corneal compression o Broad sound beam without precise localization o Limited resolution o Incorrect assumptions regarding sound velocity o Potential for incorrect measurement distance e Developed Contact biometry Handheld probes cause a wide variance in measurements and impose random errors highly
20. are included here Amplification module Amplification c Includes functions used to amplify signal as a first step after aquizition Classification Classification c Includes peak detection and peak amplitude definition functions Checking module CheckForNormality c Performs checks on detected spikes including corenal compression probe misalignment It gathers 10 valid scans and performs average and standard deviation calculations on them It also sends final arrays of data to the Software via UART Serial modules Serial c Includes array formulation functions and byte by byte trasfere through UART 7 5 Algorithm Flowchart stet bog culating the obtained for displaying Figure 7 5 1 Firmware Algorithm 7 6 Algorithm Functions 7 6 1Initialization Functions These functions have a default set of instruction used to adjust MCU to required state void init Clock void System clock initialisation void init Port void General system ports initialization void init ADC1 void intialization of ADC void TIMER3 Init int counts to set sampling frequency void init UART1 void initialization of UART void set Timer1 void used for setting boud rate of UART 7 6 2Interrupt Service Routines void ADC1_ISR void ADC ISR Action Collects a predefined number of samples in array Fullscan and Raises a flag finished sampling when done void UART1_ISR void UART ISR Action Collects
21. by the ophthalmologists guided by Input e Output identified peaks Time Gates to identify the main eye spikes 2 3 2 4 Eye Calculations Module e Input Time amp Amplitude Arrays from Manual or Automatic modes e Operation Many A scan instruments do not measure each individual segment in the eye Instead they use an average velocity of sound Many use 1550 for a phakic eye natural lens and 1532 for an aphakic eye e Scan Capture o Capturing at least 6 10 measurements scans o Selecting at least 3 4 good scans with an Axial Length standard deviation SDAL of 0 1 or lower should be saved and used for IOL calculations The variation of the axial length from the highest to the lowest of the scans should be not more than 0 1 0 2mm Type sub velocities Thickness ignore value 5 amp 6 Calc AVG time amp Thickness thickness to Intensity Correction Factor add factor Figure 2 3 16 Eye Calculations Module e Axial length AL The variation of the axial length from the highest to the lowest of the scans should be not more than 0 1 0 2 mm Lens thickness LT when measured use a velocity of 1641 m s The sound velocity varies in cataractous eyes with a slower velocity average 1590 m s Anterior Chamber Depth ACD when measured use a velocity of 1532 m s The operator should save the measurements with longest ACD These are usually the measurements where there was minimum corneal compression Large variati
22. cornea spike to venture above the threshold line T Spike B is ignored because it is below the threshold line e Output Thresholded signal Figure 2 3 7 Thresholding illustration 2 3 2 3Mode Selection Module A Autodetection amp Signal Validation e Input Spikes from eye Interfaces Intensity Autodiagnosis Figure 2 3 8 Autodetection Module e Operation Auto detection Selecting the Best Scans Rreviewing each scan and verifying the position of the 6 markers Storing multiple measurements and calculating their average Calculating other statistical data such as the standard deviation Corneal compression recognition monitoring anterior chamber depth by automatically rejecting measurements less than the appropriate axial length in automatic mode Check Validation Probe Misalignment PM and Corneal Compression CC are two common errors due to the manual handling of the probe during scans The DIOLA software system tends to alert the ophthalmologist when these errors occur to begin a new scan Misalignment If either the AL or Retinal echo is too low it is an indication that the probe is off the visual axis The axial length may be either too short or too long Figure 2 3 9 A scan display of the same eye with an on axis measurement of 23 33 mm Figure 2 3 11 Large Off axis measurement of 21 87 mm Note the presence of the small lens spikes L1 amp L2 and the jagged retinal spike R Corneal compressio
23. data that will be sent to microcontroller to byte by returning one byte equivalent to the combination of some inputs 2 FRC public byte FRC boolean F boolean R boolean S Converts Freeze Reset and Continue signals that will be sent to microcontroller to byte by returning one byte equivalent to the combination of them 3 TGC public byte TGC float a float b float c float d Takes the float values of a b c and d of the TGC and casting the them to array of bytes to be read when send to microcontroller 6 3 2 11 Class IOL Calculation 1 AutolOL public float AutolOL float AL float K1 float K2 float Ref AscanUl A Applies the algorithm of calculating IOL automatically by choosing the best formula of IOL due to type of eye and axial length 2 Manual IOL public float Manual IOL float AL float K1 float K2 float Ref java lang String formula Applies the algorithm of calculating IOL manually from the chosen formula by the user 3 Compare public float Compare float AL float K1 float K2 float Ref java lang String formulas Applys the algorithm of Comparing between two or more IOL formulas results 6 3 2 12 Class IOL_Compare_UI main public static void main java lang String args Parameters args the command line arguments Creates new form from IOL Compare Ul 6 3 2 13 Class IOL Formulas Calc 1 SKR public float SKR float AL float K1 float K2 Calculates the IOL using SKR for
24. eye e Ribbon display of all valid scans in automatic mode and their average e Processing based on 3 different modes fully automated manual and semi manual manual labeling e Peak detection implementing 2 techniques peak position at maximum and calc area under envelope for peak amplitude e System controlled by various user controls sent via UART e Calculation of avg and standard diviation of all peaks e Compact 2 2 2 Specifications 2 2 2 1Physical description a Dimensions i 165 x 93 x 188 mm ii weight 0 8kg b Materials i Biometry Probe body GE Noryl EN265 ii Housing ABS UL 94 VO c Power Supply i Input Voltage range ii Output Voltage 25 15 15 5 3 2 iii Frequency 50 60Hz iv AC power consumption 10VA 120V v DC power consumption 4 2W d Operating conditions i Temperature ii Operating 19 degrees to 35 degrees C 32 to 95 F iii Storage 40 to 65 C 40 to 149 F iv Relative humidity v Operating 10 to 90 non condensing vi Storage 5 to 95 non condensing e 3D reconstruction i Scan time 26 70 ms ii Angular resolution lt 20 iii Capture depth 44mm iv Display resolution 0 1mm on each axis 2 2 2 2 Measurement Accuracy a b Measurement accuracy is limited by the technique employed Maximum 0 12mm assuming no errors in technique 2 2 2 3 A Scan Cp D Oo E D Reference US PRO B Frequency 9MHz Operating mode Pulsed Active diameter 7
25. for divers Platforms More features and details can be seen by following the URL to the datasheet in Appendix VIII This way we have selected the components of our system and assured compatibility and harmony among them It is now time to select the most suitable model for the design and this is done in the next section 4 5 Resulting Model Knowing the nature and type of each component it is required to divide roles in a manner that guarantees efficiency and performance of e DIOLA scan According to the Market survey results demonstrated in section 1 5 it was clear that the stand alone model is dominant among all A scan biometry systems while the PC based and Laptop USB based models were less frequent to occur Consequently we brainstormed and debated the pros and cons of each model Standalone system Microcontroller PC based Software Advantages 1 No compatibility issue 2 Independent on electrical problems 1 Friendly UI 2 Independent processing 1 Friendly UI 2 Faster processing 3 No interfacing problems 4 More acquired knowledge e g power supply 3 Extended data storage 4 More compact 3 Extended data storage 4 More features 5 More acceptable 5 More Features by software 5 More compact probe CD 6 Needs little training 6 Portable battery 6 Inexpensive 7 Inexpensive Disadvantages 1 Difficult to implement 1 Dependent on PC or laptop 1 Specific requirements
26. image of spikes or deflections of varying amplitude along a baseline because of the amplification design differentiation of tissue is possible based on the reflectivity height of spikes and structure distribution of spikes produced by the cells of various tissue 2 The height of the vertical reflection corresponds to the intensity of the returning impulse size of the echo while the position of the spike along the horizontal axis indicates the time of receiving the echo The distance between these spikes can be measured accurately by dividing the speed of sound in different tissues by half the sound travel time Each reflected echo represents a return transit through the material so that the acoustic path length is equal to twice the thickness of the sample The sound wave is transmitted and received by the same transducer through a probe that is placed directly on the eye reflected signals are returned to the probe mechanical energy is converted to electrical energy and signals or echoes are recorded on an oscilloscope The height of the spike indicates the size of the echo 1 4 1 A Scan Uses The most common use of the A scan is to determine the eye length for calculation of IOL where data on the length of the eye is a major determinant in common sight disorders A typical A scan system measures the following e Biometry Axial Length Measurements e The anterior chamber depth ACD is measured between the anterior corneal surface
27. in the datasheet or measuring it manually knowing that surface mounted ICs need Special type of pads in footprints 10 Routed the circuit with single layer tracks using automatic routing 11 Fixed some tracks using manual routing 5 8 1 Schematic 5 8 1 1Main Circuit H 1 pum T 1 H I H H i H 1 H H H H 1 i H i H H H H H 1 i g 1 H i H i H H H 1 H H i H 1 H H 1 H H i H H H 1 H qum i I i H 1 I i i H 1 i I H i I 4 I d i H i I H i H 1 Figure 5 8 1 Overall Schematic of System 5 8 1 2Pulser Probe amp TR Switch R44 5k TR SWITCH PERES EE EI J4 3 CONI CONI 1 1 rat a i IRF3710 T0 IRF 54pNTO dk l H 1 d Locos 03 04 l i a 1 2 a Ree e Bi Eeer conz Figure 5 8 2 Schematic of probe pulser circuit and T R switch 5 8 1 3FT232BQ EPROM amp USB connector ci c12 C13 i ba uf gp uf i le uf FT232B0 RXLED amp PWREN amp SLEEP Figure 5 8 3 FT232BQ schematic 5 8 1 4 Band Pass Filter 4 Bandpass filter schematic Figure 5 8 Dee y i i oly Ab 10d 118 y i WEN NA PA l La wx es e mm ve vm e AL 10d uu ES ely futygoomg ATABTIBA 2A I Wslsds ANS TW 35113 10 up oo MEC rr ri uor3e
28. l l l l IS Multiplying original signal by fixed gain l l l l l l I I l l l l l I I L oppsig attd fixed subplot 612 plot t1 oppsig grid on Multiplying original signal by TGC function opsig attd TGC subplot 613 plot t1 opsig grid on Multiplying original signal by BOTH TGC fixed function Plotting utsig oppsig TGC o subplot 614 plot t1 outsig grid on 3 4 3 Module 3 Enveloping 3 4 3 1 Algorithm Algorithm Generate Envelops for returning echoes Input s amplified amp TGCed signal outsig Output s train of envelops y Apply function hilbert on outsig return y 3 4 3 2 MatLab Code Excerpt EA KKKKKKKKKKK Generating Signal Envelope KKKKKKKKKKKKKKK KKK ckckck ck ckck ck ckck k ck kk kk I l I l l hil hilbert outsig y abs hil i l L l L l L subplot 615 3 4 4 Module 4 Spikes Detection 3 4 4 1 Algorithm Algorithm Detect and locate spikes Input s train of envelops y Output s arrays of starts and ends of envelops stecho endecho If difference between successive points 10 Start of envelop found Add this point to stecho array If difference between successive points End of envelop found Add this point to endecho array For length of stecho Find max value of y between start and end of each envelop Locate start of envelop at max value 10 return stecho endecho 3 4 4
29. might appear between the Anterior Lens and the Posterior Lens echoes Some reverberations of the Anterior and or posterior Lens echoes might be present in the vitreous when the cataract is very dense especially when higher Gain is needed in order to capture the retinal echo In a very dense cataract the user may need to increase the gain setting in order to achieve good retinal echo This is due to the higher absorption of sound in the dense lens 1 4 4 Output Spikes When the probe is aligned along the visual axis center of the macula six tall spikes are clearly visible in the scan representing echoes from the anterior cornea posterior cornea anterior lens posterior lens retina and sclera with the retinal spike rising steeply from baseline When using the contact mode the anterior corneal spike bonds with the spike from the probe producing a single spike representing the epithelial and endothelial layers of the cornea Perpendicularity is achieved when all spikes are of high amplitude and the retinal spike is steeply rising from the baseline The figure below is an Ultrasound display of the different echo spikes during contact biometry AC Anterior Cornea PC Posterior Cornea AL Anterior Lens PL Posterior Lens R Retina amplitude A Scan display time of receiving echo Figure 1 4 4 Spikes resulting from interfaces inside the human eye The Retinal echo should be sharp 90 degree from the bas
30. of eye 6 3 2 7 Class Edit TGC 1 draw public void draw Draws the TGC graph with the values a b c and d got from the sliders 2 main public static void main java lang String args Parameters args the command line arguments Creates new form from Edit TGC 6 3 2 8 Class Final Scan 6 3 2 9 Class Gate 1 Gate public void Gate java awt Point P int Peak No int Sacn No Consists of the two functions Get Position Of Peak and Insert Peak Into array Manual which will be discussed next 2 Get Position Of Peak public float Get Position Of Peak java awt Point P Selects one peak from the array which is the nearest one to that the user clicked on the screen by searching in the array of peaks with some ranges 3 Insert Peak Into array Manual public void Insert Peak Into array Manual float XY int Peak NO int Sacn No Inserts the selected peak into the two dimensional array of rows indicate number of scans and columns indicate number of peaks 4 Saving public void Saving Saves the names of peaks in array with putting name x to the unselected peaks which will be used in the autodiagnosis 5 Set ToolTip public java lang String Set ToolTip java lang String Symbol Sets a tooltip with the name of peak that the user should select it next 6 3 2 10 Class Inputs To Micro 1 Inputes public byte Inputes boolean D C int A M java lang String Lens Type java lang String Material Converts inputs
31. perform scaling of results to reach required accuracy 7 To send an integer variable through UART must convert to bytes Use Union which defines a region in a memory in two different ways eg union int in char c 2 Ji2c This definition defines the variable i2c as both an int and a char array of size 2 To access it as int use i2c i and to access it as char use i2c c 0 or i2c c 1 7 11 3 Functions 1 Variables delcatered inside a function are lost after and cannot be return or seen outside unless they were sent as pointers 2 When sending a pointer in a function only the pointer name is sent while the function prototype is defined as apointer eg Call FIXED amplified1 amplified2 dcataract Prototype void FIXED unsigned int amplified1 unsigned int amplified2 char dcataract 7 11 4 Pointers 1 Use pointers when needing a variable sized array and when wanting a function to return more than one variable 2 Any pointer needs to be initialized before being used Initialization is either to a static variable indicating that the pointer points to it or b to a dynamically located space in the memory during run time 3 Dynamic Allocation a g eg unsigned char xdata calloc mempool OxODAC _at_ 0x0000 Uses malloc reserve region in memory but does not initialize Calloc reserves region in memory but initializes to zero Realloc reallocates region pointed at by a pointer to another Requres reserving
32. processing of a Expulsive Hemorrage SCAN nennen nnne nnns 146 Figure 9 3 6 Signal processing of a Retinal detached ecan sss nnne nennen nnns 146 Figure 9 3 7 Signal Processing of a Uveitis diseased signal same applies to mild asteroid 147 Figure 9 3 8 Signal processing of a sever asteroid echo enne nns 147 Figure 9 3 9 signal processing of an ocular melanoma signal ccccccccoccnncccnnnnncnonnnannnnnnnnnnnonnnanncnnnnnnnnonnananenos 148 Figure 9 3 10 Misalignment detected by checking the lens peaksS ooooocccccnccccnnnnonncnnnnnnnnnnonanocnnnnnnnononananenos Figure 9 3 11 Misalignment detected by checking the retina peaks oocccccncccccnoonnncnnnnnnnononanncnnnnnnnnnnnnananenos Figure 9 3 12 Misalignment notification sent over UART nennen nnn nnne nnne a arre s Preface Ophthalmologic Sonography aids in the insertion of prosthetic lenses by allowing accurate measurement of the eyes and in diagnosis and tracking of orbital cavity tumors separated retinas retinal detachments and other ailments of the eye and its surrounding tissue High frequency transducers of 5 15 MHz are made exclusively to study the eyes A scan Biometry systems are Ultrasound based dimension measurement devices and i a basic item of any ophthalmology clinic or hospital As biomedical engineers we emphasized on enhancing the local medical devices industry by proposing new designs and developing the technological algorithms to
33. sampling frequency is suitable The latest returning echo comes from the sclera of an aphakic eye silicon at time 47 08 seconds The largest array size is then tmax useconds tsampling useconds ndex max 47 08 ES 0 219 Accounting for worst case conditions we set the maximum array size to 260 indices Thus the second factor is well considered 7 3 3 System clock Is adjusted to maximum possible clock frequency 22118400 external oscillator to ensure real time acquisition and processing 7 3 4 Baud rate Is adjusted to 115200 as maximum of UART on kit to ensure fast transmission of scans to Software to be displayed 7 4 Alogrithm Structure 7 4 1Header Files Initialization Specific Initialization h Includes Function Prototypes of microcontroller initialization including UART ADC ports and system clock Program Specific Ascan h Includes 1 Global Defined Variables 2 Function Prototypes of all processing functions Kit Specific C8051F020 h Includes SFR and sbit definitions for the MCU kit some sbits were added to be accessed by name through the code 7 4 2Modules Our project is divided to 5 modules each specific to performing a certain processing functionality Main module Main c Includes main running loop and all inirialization functions It acts as the central ground between all other modules where data can only exchanged between them passing through it Inretturpt service routines of UART and ADC
34. suitable for reliable real time data transfer between the MCU and the Java Platform The schematic symbol of the QFN32 Package of the FTDI chip FT232BQ is shown is Figure 8 2 You may refer to Appendix VIII to check out the datasheet and view more details about the FT232BOQ Refer to Appendix VII Figure 8 2 1 S 8 2 2 1 Power Configuration The FT232BQ offers multiple choices of Power Configurations each suitable for a certain type of application In case of interfacing MCU based designs to USB the most suitable power configuration is the Self Powered configuration with 3 3V logic drive shown in Figure8 3 Refer to Appendix VII VCC3V RSTOUT RESET vccsv 0 1uF 0 tuF 10uF 9 Im Decoupling Capacitors Figure 8 2 2 Power Configuration of FT232BQ VCCIO is supplied by an external 3 3V supply in order to make the device IO pins drive out at 3 3V logic level thus allowing it to be connected to a 3 3V MCU or other external logic We drived the VCCIO pin directly from the MCU Vcc pin to ensure same voltage levels during operation A USB self powered design uses its own power supplies and does not draw any of its power from the USB bus In such cases no special care need be taken to meet the USB suspend current 0 5 mA as the device does not get its power from the USB port 8 2 2 2 USB transfer mode and connection to EEPROM The FTDI chip FT232BQ features bulk as well as isochronous transfer While t
35. tempfinaltime amp finaltime threshold tempfinaltime Let pointer to pointer point to pointer address pointer finaltime tempfinaltime When return let pointer point to the allocated pointer free tempallpeakstime Free only one of the 2 pointers void Threshold Se unsigned int tempfinaltime tempfinaltime unsigned int calloc pulseno 1 sizeof unsigned int Allocating pointer inside function which affect the original one in main Call function sending pointer to 7 12 References 1 www cplusplus com 2 www keil com 3 https community ti com 4 http www cprogramming com 5 http www embedded com 6 http msdn microsoft com 7 https www ibm com 8 Application Notes SiliconLabs Application note an219 Using Microcontrollers in Digital Signal Processing Applications 9 Richard G Lyons Understanding Digital Signal Processing Prentice Hall 2001 Chapter Interfacing INTRODUCTION HIGHJ LEVEL PROTOCOL LOW LEVEL PROTOCOL Java to MCU Protocol C8051F020 Micro Controller MCU to Java Protocol FT232BQ References USB Verification 8 1 Introduction USB Serial USB Connector FT232BQ USBDM USBDP Figure 8 1 1 Overall Block diagram Figure 8 1 depicts the Interface between the acquired signal and the Laptop The digitized returning echo is transmitted serially after being processed by the micro controller This sig
36. the fixed labels for main peaks in a valid scan actualnames Action In normal case where peak number is coinciding with selected eye type peaks take the actual names directly In case of undeifind peaks they take the label x to be sent to Software for autodiagnosis In case of 2 peaks detected in same range auto labeling cannot be performed and thus would be sent to Software through UART for manual labeling of peaks O P names array with a label for each peak bit checklensper char actualpno unsigned int finalpeaks 1 P array of peaks amplitude finalpeaks and actual peak number actualpno Action performs misalginemt check by comparing amplitude of 2 lens peaks to the anterior cornea peak O P returns bit p1 indicating misalignment fasle or true bit checkretper unsigned int finalpeaks char actualpno char names 1 P array of peaks amplitude finalpeaks and actual peak number actualpno Action performs misalginemt check by comparing retina peak to the anterior cornea peak O P returns bit p2 indicating misalignment fasle or true void Avg unsigned int ftime unsigned int fpeaks unsigned int Avgtime unsigned int Avgpeaks I P two2 dimentional arrays including times and amplitudes of 10 valid peaks ftime amp fpeaks Action calculates average postion and amplitude of detected peaks O P arrays of averge time and amplitude Avgtime amp Avgpeaks void Std unsigned int fpeaks unsigned int Avgpeaks unsigned i
37. track of when and where to dynamically allocate the array and when to free its memory Type Name From To Size Main c Unsigned fullscan ADC TGC SamplesPerScan char Unsigned amplified1 TGC FIXED SamplesPerScan int Unsigned amplified2 FIXED Getpeaks SamplesPerScan int Unsigned allpeaksamp Getpeaks Thresholding Numberofdpeaks int peakvalue Unsigned allpeakstime Getpeaks Thresholding Numberofdpeaks int peakdetection Unsigned finalpeaks Thresholding Check pulseno int Unsigned finaltime Thresholding Check pulseno int Unsigned UARTtempm manual UART UARTloop numberofdpeaks 2 3 char Classification c Unsigned stenv getpeaks peakdetection amp peakamp numberofdpeaks int Unsigned endenv getpeaks peakdetection amp peakamp Numberofdpeaks int CheckForNormality c char names naming Check pulseno Unsigned ftime 10 Check Avg Pulseno 10 int Unsigned fpeaks 10 Check Avg Pulseno 10 int Unsigned Avgtime Avg Check pulseno int Unsigned Avgpeaks Avg Check pulseno int Unsigned StdDev Std Check pulseno int Unsigned UARTtempl manual UART UARTloop Pulseno 2 3 char Serial c Unsigned UARTtemp manual UART UARTloop Pulseno 2 3 char Table 7 7 1 Summary of storage arrays 7 8 Main Controlling Flags Finishedsampling Indicates ADC finished collecting one scan s samples Startpacket Indicates Header B
38. 0x02 NSA P Fe N SEX MG Y MG 8 3 2 Micro to Java Protocol 8 3 2 1Sites of Usage oN mud UNE Sending data for manual mode Sending each scan in auto mode Sending average scan in auto mode Sending auto diagnosis data Retinal Detachment Other diseases Sending unlabeled spikes for manual labeling Sending indication of misalignment amp corneal compression 8 3 2 2 Packet Format Of Bytes A variable number of bytes are used based on number of detected peaks Header Byte Auto mode OxAA Auto diagnosis OxAA For Manual Labeling OxAA Manual mode OxBB Misalignment or Corneal OxCC compression Of Spikes Byte A value indicating number of spikes to be sent This Byte is omitted when sending Misalignment or Corneal Compression Error Signal Status Byte Used to differentiate the type of data to be sent and the site of usage sent at For Header Byte OxAA 0x00 Time of spikes 0x01 ae Amplitude of Spikes 0x02 Std of amplitude of spikes 0x03 Spike Labels 0x10 Auto diagnosis Time of spikes 0x11 Amplitude of Spikes 0x13 Spike Labels 0x20 Time of spikes M Labeli 0x21 ud Amplitude of Spikes Std Standard Deviation is only sent after calculation of average of 10 valid scans For Header Byte OxBB 0x00 Niente Time of spikes 0x01 Amplitude of Spikes For Header Byte OxCC 0x00 Error Signa
39. 1 88 0 13 wsig zeros 1 558 oe ct E ckckckckck ck ck kk For testing check validation KAKXKKKKKKAKXKKKKXKKKKAKKKKKKKXX kk Noise to be added to signal for testing tamrad zeros 1 408 wsig zeros 1 374 wsig zeros 1 62 Mixed correct Noise signals scanamrad rscan tamrad noise scan rscantnoise ckckck ck ck ck k ck kk Generating attenuation function RRERREKREKRERERREEKRRKRERERERRRERE y 1 1 1568 x where x is a trail of 1 sfollowed by a ramp atten ones 1 99 1 0 1 1568 0 5 p WObkoekg ccr Multiplying attenuation signal by real One SAX X KO SOROR eee Kee ee attd scan atten subplot 611 plot t1 attd g rid on 3 4 2 Module 2 Amplification 3 4 2 1 Algorithm Algorithm Amplifying returning echo amp compensating for attenuation Input s returning echo attd Output s amplified amp TGCed signal outsig Generate TGC array Generate fixed gain array Apply fixed gain amp TGC on returning echo Generate attenuating function Apply attenuation function on train of echoes return outsig 3 4 2 2 MatLab Code Excerpt E KKKKKKKKKKK Amplification KKEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK Generating TGC function of 4 variables with a constant region then a ramp d c d a b TGC c ones 1 a c d c b a d d ones 1 length attd b 1 Generating Fixed gain amplifier function fixed f ones 1 length attd 9 l l l l l l I I l
40. C MN Ascansimfinal AMPLIFICATION FIXED BENE Ascansimfinal CLASSIFICATION getpeaks MM WAscansimfinal CLASSIFICATION peakdetection Ascansimfinal CLASSIFICATION peakvalue YWAscansimfinai CLASSIFICATION trapz B Ascansimfinal CLASSIFICATION max Bi Ascansimfinal CLASSIFICATION threshold li Ascansimfinal CHECKFORNORMALITY Check D Ascansimfinal CHE CKFORNORMALIT yY checklensper Ascansimfinal CHECKFORNORMALIT y checkretper Ascansimfinal CHECKFORNORMALIT Y naming Ascansimfinal CHE CKFORNORMALITY Avg Ascansimfinal CHECKFORNORMALITY Std Ascansimfinal MAIN trigger Ascansimfinal MAIN ADC1_ISR EN calloc E malloc Bi realloc MN min time max time avgtime total time count 0 000478 2 1 Figure 7 10 1 7 10 2Memory Distribution Code Space 14138 Bytes RAM space Internal 65 Bytes External 3509 Bytes 7 11 Coding Guidelines amp Pitfalls This section is a summery of the obstacles errors and problems we were subjected to during programming and required research and multiple resource reading to solve It s goal us to act as a supporting guide for later programming or for other programmers to not repeat the same errors 7 11 1 Linking Project Files 1 For multiple c file project put all function prototypes in one header file and include in all c files 2 Use Header files guard ifndef Ascan H and define directives to prevent redeifintion of header files each time it is included 3
41. Calculation Spikes Validation According to Area of envelop Eye Dimensions Count of spikes AL ACDVD LT e Naming IOL e Corneal Compression Check Misalignment Check Retinal Detachment Check Figure 3 3 1 MatLab Algorithm Block Diagram 3 4 MatLab Modules 3 4 1 Module 1 Simulating returning echo 3 4 1 1Algorithm Algorithm Simulate returning echo Input s sampling time ts Output s Signal imitating returning echoes attd Generate exponentially decaying sine wave with f 1 t Create train of echoes Generate attenuating function Apply attenuation function on train of echoes return attd 3 4 1 2 MatLab Code Excerpt ER kk Generating initial signal exp decay sin Rw EE KK E 4 samples per cycle and a total of 100 samples gt Sampling freq is 4MHz 0 samplingdelta 2 5 10 6 ig 5 exp 2 pi 30 10 4 t sin 2 pi 10 10 6 t Selecting only 20 samples of signal to simulate transducer pulse wsig sig 1 20 oe DD ct oe Ak kk ck ck k kk Generating 1 scan signal multiple echos kWkkk kk kh ke Time axis of 884 sample for 7 echos always multiply by the size minus 1 120 0 025 10 6 22 075 10 6 correct scan 7 echos rscan 10 wsig zeros 1 79 3 wsig zeros 1 13 wsig zeros 1 92 wsig zeros 1 84 wsig zeros 1 404 wsig zeros 1 52 wsig zeros 1 20 Noise to be added to signal for testing noise zeros 1 198 0 05 wsig zeros
42. Class Avg StdDev 1 Avg public float Avg float time int n int No Of peak throws java lang Exception Throws java lang Exception Returns one dimensional array of the average value of each column in two dimensional array of values 2 Std public float Std float time int n int No Of peak throws java lang Exception Throws java lang Exception Returns one dimensional array of the standard deviation value of each column in two dimensional array of values 6 3 2 6 Class Calculations 1 Axial Lens public float Axial Lens java lang String Technique int PNo float Time java lang String Eye Type Returns axial length of the eye according to the type of eye And special calculations done on pseudophakic Lens type Thickness or Correction factor 2 Type Technique public float Type Technique Returns the thickness of the lens due to the type of it 3 Thickness Technique public float Thickness Technique Returns the thickness of the lens that inserted 4 ACD public float ACD java lang String Lens Type float Time java lang String Technique int PNo Returns the Anterior Chamber Depth only for phakic and pesudophakic eye BUT public float LT java lang String Lens Type java lang String Technique Returns the length thickness only for phakic and pesudophakic eye 6 VD public float VD java lang String Lens Type java lang String Technique int PNo Returns the vitrous depth only for all types
43. Cornea Lens Max Index 0 1 14 27 128 139 Time 0 1 0989E 7 1 5384E 6 2 96703E 6 1 4065E 5 1 527E 5 Min Index 0 5 33 66 198 210 Time 0 5 4945E 7 3 62637E 6 7 25274E 6 2 1758E 5 2 307E 5 Table 4 7 2 Time of echo returning from each interface Thus we were able to calculate the distances as shown in the table below Region Cornea Aqueous Lens Vitreous Retina Sclera Min distance mm 0 17802198 2 142857 2 3285713 16 925825 1 8615385 Max distance mm 0 89010984 4 6153846 5 9109893 22 12088 2 03077 Table 4 7 3 Distance of each interface Multiplying the attenuation Coefficients dB mm given in Table 4 7 1 and the max distance for each interface of the eye given in Table 4 7 3 we can calculate the attenuation in dB as shown in the table below Region Cornea Aqueous Lens Vitreous Retina Sclera Attenuation at 9MHz 0 234 0 091 1 82 0 091 0 364 Max Distance mm 0 8901098 4 6153846 5 9109893 22 12088 2 03077 Attenuation dB 0 208285 0 419999 10 75800 2 013000 0 739200 Table 4 7 4 Attenuation of each interface in dB Now we have the attenuation for each interface separately but we need to know by how much the received ultrasound signal will be amplified so we must calculate the amplification value for each received echo using the rule dB 20 log A AO There are 5 echoes returning from the eye Posterior Cornea echo Anterior Lens echo Posterior Lens echo Retin
44. ER ROESER n Ene E Y Eee n Rene tee eden ge deeg tetas 108 6 4 2 Plotting Data enr e hee 108 6 4 3 IO and Axial length Measurement enne ree a ai 109 CARACAS ecce EECHER 111 Chapter 7 7 1 Introduction a tet cent eet ee E E ae 113 7 2 MENA oTo I PEP E E E 113 7 3 System Setup e E E E A E Ee 113 7 3 1 Sampling Frequency zoe et mee 113 7 3 2 A A 113 7 3 3 System e EP 114 7 3 4 BUG ate BP 114 7 4 Alogrithm Structure RRRRRRRRRRRRRRRRRREMEEEEEEEEEEEEEEEEMM 114 7 4 1 Header C C 114 7 4 2 Qufecprc D E 114 7 5 Algorithm Flowchart EEEEEEEEEEEEEEEEEMM 116 7 6 Alger Heng geseet te trieste reete teet ree eee restet em re t tates 117 7 6 1 Initialization FUNCTIONS MM 117 7 6 2 Int rr pt Service ROUTINES RE 117 7 6 3 Main Operating FUNCTIONS Ge nn E E 117 7 7 Main Data Storage Variables rt ii tene ret Vae a ea ea a en ea eaa Tana Teu TEETE 120 7 8 Main Controlling ET 121 7 9 Deb gglng retten nen 121 7 10 Performance Analysis eene enne enne sssnnnia arn n ensis sss asa aiiis sisse ssa g aaa nsns sss asas 122 7 10 1 Time REES 122 7 10 2 Memory Distributi n eene een 123 7 11 Coding Guidelines amp PitfallS ooocccccnncccooonnncnnnnnnnonononnnnnnnnnnnonononnnnnnnnnnnnonnnnnnnnnnnnnnnnnnannnnnnnnnnnnnnn 123 PLT ol E E ERR E ERE YER r ERE E ERR SE ESEE ERR PER RR ERR ERE e teens 123 pS Bee Aan gf E 123 7 11 3 F
45. Medium Medium Signal type Mixed signal Analog and digital Mixed signal Availability of a full set of C compiler linker logic analyzer development All available with the kit development tools and supports assistance real time debugging tool Table 4 2 2 Criteria of Selection 4 3 Software Among the many available and emerging Software we had to make the right choice concerning the programming language that will be used in e DIOLA scan product Comparing Java of Sun Microsystems with its counterparts Java showed the following advantages 2 Java is simple Java was designed to be easy to use and is therefore easy to write compile debug and learn than other programming languages The reason that why Java is much simpler than C is because Java uses automatic memory allocation and garbage collection where else C requires the programmer to allocate memory and to collect garbage Java is object oriented Java is object oriented because programming in Java is centered on creating objects manipulating objects and making objects work together This allows you to create modular programs and reusable code Java is platform independent One of the most significant advantages of Java is its ability to move easily from one computer system to another Java is distributed Distributed computing involves several computers on a network working together Java is designed to make distributed computing easy with the networking capabili
46. Overall Block BIET CI EHE 170 Defining Modules ee ene ecce s 170 Eye Phantom ee 170 RefTererices IT 170 TAT ate oro 6 old TEE 171 14 2 Wireless Probe RP P e e P ERE 171 14 2 1 Overall Block Diagram enne nennen nnns sss i aa nnne ness saa EE 171 14 222 Defining Modules ERNEUT NI UE dre EU 171 12 2 3 Schematic CIC iii a ab 174 12 2 3 a 178 KE Bu IC e 182 The manufactured PCB size of the design will prevent it from being placed inside the probe 182 12 3 References E ech edle ec need EE eed enean anh emer ne EEN Ee Frane ree ENEE ere dep en 182 Conclusion t E e EU ace eehiceti 183 Time Plan Gen chart A 184 Our Tithe EI EE 184 For any well set goal certain steps are to be taken to reach in order to reach it Identically to 184 Lifecycles 6 are to be surpassed Initially Mission and Need are to be determined this was 184 Concept Exploration and Definition were reached through our study of Anatomy amp Physiology of 184 Milestone 2 Our search and survey for a 10 MHz US probe took place during this Milestone also and 184 Milestones 3 to 6 all are under Engineering and Manufacture Development covering Algorithm 184 Integrating Results of all previous Milestones defines the deliverables product of our project as a whole 184 List of Figures and Tables Figure 1 3 1 Anatomy of CC 17 Figure 1 4 1 A Scani examlinatlOL u irte iode eie eer
47. Table of Contents Table Ree Ce 1 A M 12 Chapter 1 1 1 webs PEERS 15 EE EE 15 1 3 Biology of bheeve nennen nsnnnnun nnne nis ssssksa aiiis siis nasa aaa i sisi sss s asa aas s esses sana an 17 1 4 A Scan SYSTEMS EE 20 1 4 1 A Scan lee 20 1 4 2 Scanning Technigoues nennen nennen nnns n sss skaaa ain ns iiis s saaas sisi s isis essa assa sss esas anna 21 1 4 2 1 Applanation Contact Biometry enne nee nnne nnne tenente ness nennt ern nennen 21 1 4 2 2 Immersion TECHNIQUE nennen nnne nnns ness ssnaaa annis essi ss sa aa ains sessi sina ganan 22 1 4 3 Ee lee eege 23 1 4 4 Output Spikes eeeeeseiisssssseeseeeee nennen nnn nnnnnni rnnt enisi saskis aiiis siiis ssa agas isses sias naianei 24 1 5 Market Survey Statistical Results 25 1 5 1 A Scan Systems Market Survey eite A de vade dne roe 25 1 5 2 Ophthalmologists Survey 25 1 5 2 1 Commonly used A Scan Systems ccccccccccccseeesseeccceceesaeeeeeseeceeeesseaeeeeeeeeesessaeaaseeeeeeeeessaaaaess 26 1 5 2 2 Preferred A Scan Systems Design eode eese vede ee ede deseo 26 1 6 Work Sequence and Design Flow eeeeessssssseeee nnne enne nennen nnn nnne snis inna iier n nnn riis s sain 27 1 7 ai inse MM HR O 28 Chapter 2 2 1 a e e WisuToro P 30 2 2 System Features amp Spechlcations eene eene nennen nennen en
48. USB cable 8 3 High Level Protocol In order to exchange data between the microcontroller and the Java PLatform we built up our own protocol Protocol is packet based with variable number of packets depending on direction of data transmission and the required data to be transferred Due to the usage of Bulk transfer in the USB interfacing protocol which guarantees transmission no checksum was implemented in our protocol 8 3 1 Java to Micro Protocol 8 3 1 1 Sites of Usage 1 Sending initial user data used to control processes in MCU 2 Sending TGC gain coefficients to amplify signal 3 Sending control signals as freeze continue stop or Reset 8 3 1 2 Packet Format e Of Bytes A fixed number of 6 bytes is used in three sites of usage e Header Byte Is used to ensure that data is received from the Software OXAA e Status Byte Used to differentiate the data bytes of the three sites of usage 0x00 Initial User Data 0x01 TGC coefficients 0x02 Control Signals e Data Bytes Usage Site of Data Bytes Byte Format DC Dense Cataract 1 M A Manual mode 1 0 Auto mode T Type Phakic 00 Initial Data 1 Aphaki om Aphakic nolens 10 Pseudophakic 11 Ltype in case of pseudophakic only PMMA 00 Acrylic 01 Silicon 10 Byte 1 a Byte 2 b TRE A Byte 3 c Byte 4 d Control Signals 1 Aish hr S F C Freeze 1 Continue O STP Stop 1 RST Reset 1 0x00
49. act settings e Axial length lens thickness vitreous depth and anterior chamber depth of the eye are to be measured accurately abiding to the standards of A scan Biometry systems worldwide standards e Accurate eye dimension measurements and IOL power calculation e Software includes all IOL formulae SKR SKR Il SKR T BINKHORST HOLLADAY HOFFER Q HAIGIS e Lens correction factor e Continuous plotting of acquired signal e Freezing accepted signal and continuing scans e Saving patient information and images e Facility to print a full report e Amplification Fixed and TGC e Thresholding to eliminate noise Added Features e Aiding in Automatic Diagnosis of any abnormalities e Enhanced Contact Technique e Automatic Detection Software selects the best scans by calculating average e Post processing enables optimization of A Scan Gain and TGC after the patient examination adjustable TGC e Adjustable velocity according to lens type e Probe Misalignment check e Guiding error messages for misalignment and corneal compression e Labeling peaks using gates e Calculating standard deviation and average of gated signals e Manual and automatic selection of IOL formula e Comparison between 2 or more formulae for IOL calculation e Manual labeling of unrecognized signal semi automatic e User input of observed case e TGC adjustment in manual mode e Dense cataract modification of gain e Adjustment of reading for Traumatized
50. al echo Sclerlal echo The amplification value is calculated as shown in the table below Region Echo 1 Echo 2 Echo 3 Echo 4 Echo 5 Attenuation dB 0 208285 0 628284 11 38628 13 399284 14 138484 Attenuation Multiplied 0 41657 1 256568 22 77256 26 79856 28 276968 by 2 Amplification Value 1 049 1 1556 13 76 21 873 25 93 Table 4 7 5 Amplification value for each region So we can conclude that the max amplification value is 26 but according to the Fixed Gain Amplification module the amplification value is 10 Since 26 10 2 6 3 So we can reach the suitable values for the Time Gain Compensation parameters a 0 b 215 gt as the sclera spike is the furthermost one Lower gain gt c 1 Higher gain gt d 3 Figure 4 7 0 1 Final TGC curve Position 4 8 References 1 Wolf s Anatomy 2 Real Time Ophthalmic Ultrasonography and Biometry Richard Koplin Martin Gersten and Barton Hodes SLACK Inc 1985 3 Medical Imaging Physics William R Hendee E Russel Ritenour fourth edition 2002 4 Ultrasonic Bioinstrumentation Douglas A Chrostensen University of Utah 1998 Parthi System Design Chapter Hardware Introduction Enveloping Circuit Transducer Bandpass filter Pulser Circuit References T R switch 5 1 Introduction Carrying out certain parallel processes leads to realization of the design Figure 1 6 1 showed the
51. asound Biometry Systems constituent 30 E A scan only BA amp B scans El B scan only 15 0 Current Models Figure 1 5 1 Statistical Results for scanning techniques 1 5 2 Ophthalmologists Survey We also managed to survey various ophthalmologists to determine the type of common A Scan systems used in addition to inquire any desired features that would be added to the typical A scan systems Our conclusion of the commonly used A scan Systems is demonstrated in the graph below showing that almost all ophthalmologists would prefer to purchase a Stand Alone A scan assembly 1 5 2 1 Commonly used A Scan Systems 30 Bi Stand Alone System El PC Based Software Chip O Laptop USB Current Models Figure 1 5 2 Statistical Results for A Scan system types 1 5 2 2 Preferred A Scan Systems Design Bi Stand Alone System E PC Based Software Chip Laptop USB Existing System Preferred Design System Design Figure 1 5 3 Statistical Results preferred system design 1 6 Work Sequence and Design Flow The implementation of a complete Enhanced A scan Biometry system requires a precise well pre defined design flow incorporating all necessary stages that guarantee integrity and reliability of the system Our work progression was pipelined by the block diagram shown in Figure 1 6 1 9 Having a clear vision of the added value and objective of our system we started to list all its
52. back Figure 1 3 1 Anatomy of the eye The eye consists of three layers 1 The outer fibrous or sclera 2 The middle uveal or choroid layer 3 The inner nervous layer or retina Internally the eye is divided into two cavities 1 The anterior cavity filled with the watery aqueous fluid 2 The posterior cavity filled with gel like vitreous fluid 1 section The first layer which is the outer fibrous layer encasing and protecting the eyeball consists of two parts the cornea and the sclera e Cornea it is a strong clear bulge located at the front of the eye which bends incoming light onto the lens inside the eye The cornea is a thin membrane which has an index of refraction of approximately n 1 38 The cornea contributes to the image forming process by refracting light entering the eye It covers the iris pupil and anterior chamber e Conjunctiva A fine mucus membrane that covers the cornea and also lines the eyelid e Sclera It is a dense tough opaque coat that protects the outside of the eye ball This is the part of the eye that is referred to by the colloquial terms white of the eye 2 section The middle or uveal layers of the eye is densely pigmented well supplied with blood and includes three major structures the iris the ciliary body and the choroid Iris it is a circular adjustable diaphragm with a central hole the pupil sited in the anterior chamber behind the cornea It regulates the amount of
53. cessive scans The first scan is for calculating the axial length while the second is used to calculate the ultrasound path length provided that the misalignment check is disabled We can get the probe s angle of inclination by the following equation ee ae 0 cos SS And the radius at which the tumour is located by R Lsin 0 f tumour is detected e Output Tumor Location by ophthalmologist e Yes Calculate the US path length L Calculate the angle theta arccos L AL and radius R L sin theta Figure 2 3 34 Non Axial Scanning Algorithm Flowchart 2 4 References 1 Ultrasound of the Eye and Orbit Sandra Byrne and Ronald Green Mosby Year Book St Louis 1992 2 2 William R Hendee amp E Russell Ritenour Medical Imaging Physics Wiley Liss Inc 2002 Chapter 3 Algorithm and Simulation Introduction MatLab Modules DSP Tool Selection MatLab Simulation Output Algorithm Block Diagram 3 1 Introduction Among the three categories of signals analog discrete and digital signal A Scans deal with a returning echo that is a pure analog signal This signal is defined continuously in time have an infinite range of amplitude values and can be processed using electrical devices including both active and passive elements Our System depends on Digital Signal Processing and the use of digital hardware to analyze modify condition and extract information from the signal Thu
54. ctive power as the natural one Lens power is a function of eye dimensions and curvature values Accuracy level is crucial as an error of 0 4 mm in dimensions measurement would result in one Diopter error in power calculation Our project will cover all aspects of a device development cycle including Building our knowledge base surveying competitive systems in the market identifying specific needs of system users in Egypt and seeking continuous feedback throughout the implementation of the system and providing the full documentation user and service based to ensure upgrading and efficient utilization of system features and tools We implemented a low cost highly featured well accommodated to Egypt Ophthalmologists requirements enhanced A scan Biometry system providing a fully designed implemented tested and documented prototype of the device A software package including a friendly user interface setup files help files and a softcopy of user amp service technical manuals with troubleshooting section available to act as the initial step in the manufacturing process by a National Medical Devices Company and eventually substituting the need to import such systems from other countries 1 3 Biology of the eye The human eye is a complex anatomical device that remarkably demonstrates the architectural wonders of the human body It is about 0 9 inches 24 mm in diameter and is not perfectly round being slightly flattened in the front and
55. d work In this case CTS is tied to ground When CTSH is active low the FT232BQ will transmit any data in it s internal buffers The FT232BQ drives RTS high when the available buffer space inside the device drops below 32 bytes This allows the MCU logic to continue to send up to 30 characters to the FT232BQ after RTS goes high without causing buffer over run Since we fully control the sending of the MCU and guarantee buffer size sufficiency we don t use the RTS pin and leave it floating 1 The final design of the FT232BQ is shown in Figure 8 4 c i 3 H CH f W71 1 1 Ts mme re La rf Len Le Lem Cu Y A A 8 o z eod TO tut SO 1sf A v our E L 1 EA e COM E Us E Zanen 2 E np L i P roni i H 2 gt gt oe 34 1 E 4 H x t RED 1 f Con fom amp ls 1 ima vuseow H B yH nom ra HL rer n K LJ N eer geng ka 2 ono E SOF BR em utto La L 3 R4 othe P el 145 pa LA UtB 8 CONN WI 1 1 gsTOUTE ocos pe Er i zs LAN HH ness AIR a FT232BO noen HL Ds Wwe D i D F vu n T _ EPROM L Yi ma ac wid 1 e De ps H L BH M n E mantne s 2 2 9 pe PA com 1 gt 3 e e j A a e EJ Figure 8 2 3 FT232BQ Connections 8 2 3 USB The FT232BQ outputs the USB signal on pins USBDM and USBDP These are connected to a B type USB connector on the PCB depicted in Figure 8 4 The Laptop s USB port is connected to the PCB s connector via a
56. e non zero center frequency 1 FL E Utilizing a modified sallen key circuit we designed and f aswu zst fe Freq implemented a four pole 2 stage lt f 4 f P band pass filter of Bessel type for e b ciem E lt e Sharper cutoff frequencies Figure 5 6 1 Band pass filter characteristics e Removing ripples in the pass band e Eliminating overshooting and ringing problems 3 4 Verification The table below shows the output voltage amplitude of the BPF relative to the input amplitude at particular input frequencies Frequency Output Amplitude MHz output v H Digital Oscilloscope 25 2V 9 6 MHz 5V 8 76 MHz 2 aN le 7 MHz GIE 0 2 of the input amplitude 4 38 MHz pay 5 6 1 Mathematical Derivation Bandpass sampling not only reduces the speed required for the ADC but it also reduces the amount of digital memory necessary to capture a give
57. e device s decription and default ID number This is shown in Figur 6 4 1 Output Ascan GUI run DD run H USB lt gt Serial rer S Se 41 110 H ftdibu E ftdipo EN lt E Installing device driver software Click here for status al Projects USB lt gt Serial 41 Figure 6 4 1 Successful installation procedure 6 4 2 Plotting Data As soon as the Java Platform receives data bytes from the MCU they are plotted in the scan window as shown in Figure 6 4 2 Ascan GUI NetBeans IDE 6 5 File Edit View Navigate Source Refactor Run Debug L j ei d 5 def auk config Projects Output Ascan GUI P run Patient N ponam GectingStreams GC Date USB lt gt Serial Type of Eve 14 7 41 e de Type of GettingStreams Aphakic Phakic man startScanning null inputs 4 Writting iputs to micro written byte B eldec Writting iputs to micro Writting TGC to micro writing inputs in USB Reading data Start Scan Diagnose Measurements Physical Symptoms 34 Traumatized eye Left eye Right eye Gi Dense Cataract Hag Yellow Spots x Inflammation after Surgery Adult Ascan GUI run SG jbo Docume TA KC LEI 3 hm B TEN lt PS ARO 0816 Figure 6 4 2 Plotting the data received from the MCU 6 4 3 IOL and Axial length Measurement With a si
58. e used which already reside in a memory pool section of the external memory and to ensure efficient exchange of data the rest of the runtime variables were to be in the same memory Second is that when SMALL memory model was used the runtime Data memory caused overflow Internal memory was explicitly used to store all non pointer variables using data directive while the simulation Look up table used in validation in Chapter 9 resides in the external memory 7 3 System Setup 7 3 1 Sampling Frequency Is adjusted to 4 55 MHz which according to the fact of our Band limited signal would be sufficient to acquire the signal with fine resolution 7 3 2 Samples per scan One of the main challenges we faced was the determination of the acquisition array size We determined the maximum possible array size depending on two factors sampling frequency and time of returning echo Assuming that the very first spike anterior cornea appears at time Zero then the fastest returning echo will from the second spike posterior cornea at time 0 24 useconds RTT The sampling frequency of the ADC is 4 55 MHz corresponding to a sampling time of 0 219 seconds which is shorter than the time needed for the fastest echo In other words index 1 of the acquiring array will contain the first arriving spike Index n n tsampling tarrival n indezii tarrival 1 BESSE tsampling 0 24 0 219 1 09 1 Thus the first factor is satisfied and the used
59. eline with minimum amplitude height of 7096 of the corneal echo The Anterior Lens and Posterior Lens echoes should also have a height of at least 70 of the corneal echo 6 7 e Normal results A normal ultrasound scan would indicate a fully healthy eye For therapeutic ultrasound a normal result would be an improvement in the targeted condition such as shrinking of a tumor or lessening of pressure inside the eye of a glaucoma patient e Abnormal results Because diagnostic ultrasound is generally used to investigate symptoms the results of a scan will often be abnormal and they will detect evidence of an underlying condition 1 5 Market Survey Statistical Results 1 5 1 A Scan Systems Market Survey We carried out an intensive market survey of standard A scan Biometry systems from various approved products manufactured by international ultrasound companies A scan systems under research to study the following 8 Typical and advanced features Estimate price Utilized probe A and or B Type of applied scanning technique Immersion and or contact Applied frequency range Used IOL formulae Also we made an A Scan probe survey to purchase one for our system as constructing an ultrasound probe would be extremely difficult due to the housing and the assembly You may view Appendix II for more details on the Market Survey The extracted results are demonstrated in the chart below showing the weight of each of the Ultr
60. eye and support its internal components Hyaloid is a transparent membrane that divides the aqueous humour from the vitreous humour Lens It is a crystal clear transparent ellipse shaped body The entire surface is smooth and shiny contains no blood vessels and is encased in an elastic membrane It is located in the posterior chamber behind the iris and in front of the vitreous humor It helps to focus light on the retina Retina The light sensitive layer of tissue that lines the back of the eye The retina may be described as the screen on which an image is formed by light that has passed into the eye It contains photosensitive elements called rods and cones that convert the light they detect into nerve impulses that are then sent onto the brain along the optic nerve e Optic Nerve the bundle of nerve fibers that carry visual messages from the retina to the brain Ophthalmic pathologies tend to produce various alterations to the eye s physical properties i e thicknesses of interfaces you may view Appendix I for more details 1 4 A Scan Systems Amplitude mode A mode ultrasound is used to judge the depth of an organ or otherwise assess an organ s dimensions When the ultrasound beam encounters an anatomic boundary the received sound impulse is processed to appear as a vertical reflection of a point On the display it looks like spikes of different heights hence the amplitude 1 The A scan provides a one dimensional
61. f the small lens spikes L1 amp L2 and the jagged retinal spike RL 39 Figure 2 3 12 Phakic eye with Corneal Compression showing an axial length reading of 22 65 mm 39 Figure 2 3 13 Phakic eye without Corneal Compression showing an axial length reading of 22 96 mm 40 Figure 2 3 12 3 1 Manual Peak Detection Module 40 Figure 2 3 16 Eye Calculations Module 41 Figure 2 3 15 Yellow markings on displayed signal are placed by the ophthalmologists guided by Input Time Gates to identify the main eye spikes ssseesssesesssssseeen nennen nnne nennen nnn nnn ness sss saa i ann nns isis s sain 41 Figure 2 3 17 IOL Measurement Module 42 Figure 2 3 18 Model of an A scan Display Monitor stating the identified peaks IS represents the spike due to the probe interfacing with the eye C1 represents Anterior Cornea spike C2 represents Posterior Cornea spike L1 represents Anterior Lens spike L2 represents Posterior Lens spike R represents Retinal spike and S represents Scleral spike naa di Ee ese pete O et e 43 Figure 2 3 19 Another Model of an A scan Display Monitor stating the identified peaks C1 represents Anterior Cornea spike C2 represents Posterior Cornea spike L1 represents Anterior Lens spike L2 represents Posterior Lens spike and R represents Retinal Spike nnns 43 Figure 2 3 20 Eye Auto Diagnosis Module nennen nennen nennen nnnai irn nnns sess naar nsns nsns anna 44 Figure 2
62. gital signal processors DSP chips 3 Digital building blocks DBB such as multiplier adder program controller and 4 Special purpose devices such as application specific integrated circuits ASIC The characteristics of the four platforms are compared in Table 4 1 ASIC DBB HP and pC DSP chip Chip count 1 gt 1 1 1 Flexibility None limited programmable programmable Design time long mdeium short short Power consumption low Medium high medium Medium high Processing speed High high Low medium Mediu high Reliability high Low medium high High Development cost high medium low Low Production cost low high Low medium Low mdeium Table 4 2 1 Comparison of different Hardware platforms A proper choice from the many available characteristics requires a full understanding of the processing requirements of the DSP system under design The objective is to select the device that meets the system s time scale and provides most cost effective solution according to certain criteria After intensive investigations and search we came to the decision of using the C8051F020 microcontroller developer kit manufactured by Silicon Laboratories It satisfied the above criteria as follows Criteria Required Provided Efficient data flow Real time data transmission YES Computational power Medium High Resolution Medium 8bits High up to 12 bits Processing speed High High Memory size
63. he isochronous transfer mode does not need handshake signals and is programmed by a bit in the external EEPROM the bulk transfer needs handshake signals but is the default mode of the FT232BQ and needs no external EEPROM We considered the usage of the external EEPROM in our design in order to use the isochronous transfer mode which easier to implement But upon contacting the FTDI support group www ftdichip com FTSupport htm to ask about the way of programming the EEPROM attached to the FT232BQ we got the following answer Hi We do not support isochronous transfers in the 232B device because during the design stage the USB1 1 isochronous specification changed and the chip could not be modified to meet the change We will correct our datasheet later Thanks Paul Paul Huang Asia Pacific Engineering Manager Future Technology Devices Intl Ltd Taiwan Branch Tel 886 2 87971330 Fax 886 2 87519737 Email paul huang ftdichip com WWW www ftdichip com Consequently we had no choice except the bulk transfer mode and employ handshake signals 8 2 2 3 Handshake signals The FT232BQ has 2 pins reserved for handshake purposes RTS Request To Send and CTS Clear To Send Both pins are active low Since the C8051F020 MCU does not have dedicated handshaking signals we used general purpose UO pins of Port 1 There were no threats that the MCU may receive the data with some delay thus a single wire handshake will do the require
64. hn nes n sten inen ENN 30 2 2 1 FAC GS ccc cL LU DUE 30 2 2 2 SR e e A ON 31 2 2 2 1 Physical description 31 2 2 2 Measurement Accuracy seen nn nnnne A 32 PAD O 32 2 3 System Block Diagratm eere eere eee erepto irte E Eee ree pete Reinheit 33 2 3 1 Higher Level Block DidgraM ii a s 33 2 3 2 Lower Level Block Diagram ccccccccssssssseececececeaeeeeeeeeeeeessaeeeeeeeeeeeeessaeaeeseeeeeeeesaaaaaseeeeeeeeeaaaaasss 34 2 3 2 1 Signal Acquisition Module 36 2 322 Presprocessing Modulen A iii iii iiie oes 37 2 3 2 3 Mode Selection Module 38 2 3 24 Eye Calculations Module ete ERR ERR ERE ERE EE EEEER VERRE REESE TE NEE 41 2 3 2 5 IOL Measurement Module 42 2 3 2 6 Display MOdUl O25 ART ee T 43 2 3 2 7 Auto diagnosis Module 44 2 3 2 8 Non Axial Scanning ettet etiem RE BO Bs BS is Bi e EER 51 2 4 References ii AAA A Ana Ela 52 Chapter 3 3 1 Introduction ae ct t ertt AA ana 54 3 2 DSP Lol lee HOH m 54 3 3 Algorithm Block Diagram iere Heic eres 54 3 4 Matlab OT 55 3 4 1 Module 1 Simulating returning echo nennen nennen enn rne nnns nnns 55 VAT leet rre ee ee mundane 55 3 4 1 2 MatLab Code Excerpt nnn nssnnnai nnne ness sss sa again esses sss s assa senses nana 55 3 4 2 Module 2 AmiplifiCatiOr uioi oett treo eee ette eto eee eu to ee Ee etae eu aee ERR SEEN TENERE TERR URS 56 SADA leet Serre AES 56 3 4 2 2 MatLab Code Excerpt nennen nennen snnnii nnn neris sss sai
65. imilar amplitude to the retinal spike while ehare cholesterolibOdies eene EE 48 Figure 2 3 30 Ocular Melanoma where T corresponds to the base of the tumour and the arrow corresponds to the tumoUul S COME ooi rtr EE ERE e EE EY EEREEE EEEE EFE eege 48 Figure 2 3 31 Expulsive Haemorrhage in the subscleral region after the retinal peak C represents the corneal spike while the first arrow represents a chain of decaying spikes S represents the Scleral Spike 49 Figure 2 3 32 Eye Auto Diagnosis Flowchart oooocccccnnccccononnncnnnnnnnononanononnnnnononnnnnnnnnnnnnnnnnnnnnnnnnnnnononanananinnnnnns 50 Figure 2 3 33 Non Axial Scanning Module eene nssnnai irr n nenne sss saa a nnns sss nna a n 51 Figure 2 3 34 Non Axial Scanning Algorithm Elowchart nennen nennen nnne nns naan 51 Figure 3 3 1 MatLab Algorithm Block Diagram nennen nennen nnns nnn ann nnns nissan aaa 54 Figure 3 5 1 MatLab Siumlation Signal Output 61 Figure 3 5 2 Snapshot of MatLab Command Window AL ACD VD TL and IOL are calculated 62 Table 4 2 1 Comparison of different Hardware platforms sisse nennen eene nnns nna 64 Table 4 2 2 Criteria of Selection eese eene senes esses esses eese 65 Table 4 5 1 Votes for Pros and Cons of different Systems 67 Table 4 6 1 Summarized Table ot values RE 68 Table 4 7 1 attenuation values for interfaces of the human eye 68 Table 4 7 2 Time of echo retur
66. l Corneal Compression 0x01 Misalignment e Data Bytes Number of bytes varies with the data type being sent Eg Labels Char 1 Byte each Times Amplitude or Standard Deviation Integer 2 Bytes each Accordingly the number of Bytes in a char byte array would be Number of Spikes 3 And Number of Bytes in Integer Array would be Number of Spikes x 2 3 STATUS
67. l Schematic of System 86 Figure 5 8 2 Schematic of probe pulser circuit and T R switch oooooccccccnnnnonanananonononanonanononononononnnnnnnnnnnononnnanns 87 Figure 5 8 3 ET232BO schemmatlc nr RWRRRRRRRWRHRRRRRRWIRRRRRRRRRRRENHNTT 87 Figure 5 8 4 Bandpass filter schematic reese 88 Figure 5 8 5 Power Supply Scliemiatic i rn CDD PIDE 89 Figure 5 8 6 System PCB Layout Top view 90 Figure 5 8 7 System PCB Layout Bottom view 90 Figure 5 8 8 Powers Supply PCB Layout Top view cccccccccooonccnnnnnnncnnnnnnnnnnnnnnnoononannnnnnnnnnnnnnnannnnnnnnnnnnnnananinnnnnns 91 Figure 5 8 9 Power Supply PCB Layout Bottom view 91 Figure 6 2 1 Login Tab ttt ttt eH IHE 94 Figure 62 3 A Scan Tab ttt tre HH IHE De 95 Figure 6 2 2 Patient information Tab EE ERR EE ERE SERE E E ERES TERES ERR 95 Figure 62 4 Autodiagnosis Tab E 96 Figure 6 2 5 Patient Report Generation Tab 96 Figure 6 2 7 Iob Formula Selection rre aaa 97 Figue 6 2 6 TGC Cotrolsand theres lting Curve e e eines 97 Figure 6 3 1 Class DiagramiofJava Code e eee UE 98 Figure 6 4 1 Successful installation procedure isses nnne nennen nnns sns rne nnns 108 Figure 6 4 2 Plotting the data received from the MCL 108 Figure 6 4 3 A Scan Tab press Measurement button 109 Figure 6 4 4 Calculation of time and thicknesses appear in the command window during debug 109 Figure 6 4 5 IOL and Axial length measuremnts are displayed ooooooocnccnnnnnccnn
68. light entering the eye by adjusting the size of the pupil It also gives the eye its color which varies depending on the amount of pigment present Ciliaray Muscle It is a ring shaped muscle attached to the iris It is important because contraction and relaxation of the ciliary muscle controls the shape of the lens Choroid It is a thin membrane located behind the retina and is connected to the posterior section of the ciliary body It has a good blood supply and provides oxygen and nutrients to the retina it also absorbs unused radiation The front of the eye houses the anterior cavity which is subdivided by the iris into the anterior and posterior chambers Anterior chamber It is the region of the eye between the cornea and the lens that contains aqueous humor Aqueous humor It is a clear watery fluid located in the anterior chamber of the eye supplying nutrients to the lens and cornea and disposing of the eye s metabolic waste Posterior chamber It lies behind the iris and in front of the lens The aqueous humor forms in this chamber and flows forward to the anterior chamber through the pupil 3 section The posterior cavity is lined entirely by the retina occupies 60 of the human eye andis filled with a clear gel like substance called vitreous humor Vitreous humor It is a clear jelly like substance that fills the eye from the lens on back It consists of 99 water contains no cells and helps to maintain the shape of the
69. ling peakdetection and max functions Defining peak amplitude by calculation area under the envelope divided to multiple trapeziums by calling Peakvalue and Trapz functions O P 2arrays one for peak position and one for peak value which dynamically varry by number of detected peaks Allpeakstime amp Allpeaksamp void threshold unsigned int allpeaksamp unsigned int allpeakstime unsigned int finalpeaks unsigned int finaltime 1 P allpeaksamp amp allpeakstime from Getpeaks Action Eliminates Peaks under a certain fraction of the initial peak removes noise from signal O P 2arrays one for filtered peaks one for peak position and one for peak value finalpeaks amp finaltime void Check unsigned int finalpeaks unsigned int finaltime char actualpno char lenstype bit pseudo 1 P finalpeaks amp finaltime from Threshold Boolean indicating Pseduophakic eye type is selescted and a byte representing lens type Action Includes nested functions to perform all module actions state earlier O P Nodirect output is returned to Main module instead it either sends data through UART or returns back to automatically aquire a new scan void naming char actualpno unsigned int mintime unsigned int maxtime char actualnames unsigned int finaltime char names unsigned int finalpeaks 1 P actual peak number actualpno from user through UART Arrays to define ranges at which each peak is to be found mintime maxtime Array of
70. m 3 http www emedicine com proc TOPIC486 HTM 4 http www freshgasflow com physics us sound ultrasound htmlitintroscan a scan 5 http folk ntnu no stoylen strainrate Ultrasound 6 S W LEGE amp B MILLER amp SCHNEIDER A Scan Systems 2000 7 Jacques Poujolg Echography in Ophthalmologyn Masson Publishing 1985 8 http www jultrasoundmed org cgi reprint 26 2 149 9 Richard G Lyons Understanding Digital Signal Processing Prentice Hall 2001 Chapter 2 system Requirments Specifications Introdcution Lower Level Block Diagram Featrures and Specifications References Block Diagram Higher Level Block Diagram 2 1 Introduction After formulating the problem with as much specificity as possible and determining required output it is now time to put hands on the specifications and requirements needed to achieve the desired output Figure 1 6 1 We then creatively synthesize the requirements into design solutions believed to satisfy those requirements The set of decision making processes and functional blocks that make up the system are exhaustively elucidated by detailed block diagrams and accompanying explanation 2 2 System Features amp Specifications 2 2 1 Features We propose an enhanced relatively low cost A scan Biometry system which connects via USB cable to any Windows XP laptop or desktop computer All features are thread below in details Standard Features e Automatic and Manual modes e Cont
71. mm Active surface 154mm2 Acquisition ii Horizontal resolution 1024 points max iii Vertical resolution 256 lines iv Linear resolution 0 052mm 2 3 System Block Diagram 2 3 1 Higher Level Block Diagram Our A Scan ultrasound system is an ultrasonic diagnostic system intended to be used for ophthalmic applications Scans can be made by placing the probe directly on the eye hence contact technique Gain Control Signal Figure 2 3 1 High Level Block Diagram of e DIOLA scan 2 3 2 Lower Level Block Diagram The e DIOLA scan system consists of an ultrasound unit which contains the ultrasonic pulsing and receiving circuitry and scan converter and an attached computer for control patient data storage and calculations Main Blocks 1 Signal Acquisition 2 Preprocessing Amplification Phase Thresholding 3 Mode Selection Manual detection amp Input Time Gates Autodetection amp Check Signal Validation 4 Eye Calculation 5 OL measurements 6 Display 7 Auto diagnosis 8 Angular probe Algorithm A mm Tam DE 198611 Figure 2 3 2 Low Level Block Diagram of e DIOLA scan 2 3 2 1Signal Acquisition Module Pre Amplifier If NO Cataract Figure 2 3 3 Signal Acquisition Module e Input Signal from probe e Operation The ophthalmologist is only required to adjust the device to the patient s eye and initiate the measurement The system will automatically decide when
72. mula 2 Binkhorst public float Binkhorst float AL float K1 float K2 float Ref Calculates the IOL using BINKHORST formula 3 SKR2 public float SKR2 float AL float K1 float K2 Calculates the IOL using SKR2 formula 4 HofferQ public float HofferQ float AL float K1 float K2 float Ref Calculates the IOL using HofferQ formula 5 Holladay public float Holladay float AL float K1 float K2 float Ref Calculates the IOL using Holladay formula 6 SKRT public float SKRT float AL float K1 float K2 float Ref Calculates the IOL using SKRT formula 6 3 2 14 Class IOL Formulas UI 1 main public static void main java lang String args Parameters args the command line arguments Creates new form from IOL Formulas Ul 6 3 2 15 Class No Of Peaks 1 Get No Of Peaks public int Get No Of Peaks java lang String Eye Type Returns the actual number of peaks corresponding to the eye type that the user input it initially 2 Naming Peaks public java lang String Naming Peaks int Peak NO java lang String Eye Type Returns the name of peak when chosen by the gate in case of using manual mode 6 3 2 16 Class Plot 1 run public void run Specified by run in interface java lang Runnable Execute the plotting function 2 plotting public void plotting float time float intensity plotting the scan of peaks in the graph window by applying some scaling in x and y direction draw coordinate
73. n recognition recognizing when the probe is indenting the cornea by monitoring anterior chamber depth by automatically rejecting measurements less than the appropriate axial length in automatic mode in the automatic mode Figure 2 3 12 Phakic eye with Corneal Compression showing an axial length reading of 22 65 mm Figure 2 3 13 Phakic eye without Corneal Compression showing an axial length reading of 22 96 mm e Output identified peaks while Valid Spikes are sent to Eye Measurement Module Abnormal Spikes are sent to Auto diagnosis Invalid Spikes are sent to the Reset to rescan B Manual Mode amp Input Time Gates e Manual Peak Detection e Input Spikes from eye Interfaces e Operation The ophthalmologist selects the echoes by simply placing a marker at the top of the peaks representing the 6 main interfaces of the eye To Pulser A Preprocessing 5 scans 5 rows amp 6 col or 5 row amp 5 col Figure 2 3 12 3 1 Manual Peak Detection Module e Input Time Gate Protocol Employing a five gate measuring system Biometery does individual velocity measurements for the aqueous the lens and the vitreous first gate measures position of cornea second measures position of anterior lens spike third measures position of posterior lens spike Fourth measures the position of retina spike Units have visible and moveable gates Figure 2 3 15 Yellow markings on displayed signal are placed
74. n time interval of a continuous signal In bandpass sampling we are more concerned with signal bandwidth than with its highest frequency components Our bandpass signal s highest frequency is 9MHz Conforming to the Nyquist criterion implies that the sampling frequency be 18MHz to avoid aliasing provided that all band signal contains information In our case information is band limited around 9MHz so we won t need all 18MHz to sample the signal Thus the efficient sampling frequency is calculated using the law below 2fc B 2 B ie N CR m m 1 Where fc is corner frequency which is 9MHz B is bandwidth of signal assume it to be 0 2MHz m is number of replications which is a positive number and integer m 2fc B 2fc B Optimum m m 1 sampling rate 1 17 8 9 1 2 8 9 6 07 3 5 93 4 55 4 4 45 3 64 5 3 56 3 03 6 2 967 2 6 7 2 54 2 275 8 2 225 2 022 9 1 978 1 82 10 1 78 1 654 11 1 618 1 516 12 1 48 1 4 13 1 369 1 3 14 1 27 1 21 15 1 187 1 138 16 1 11 1 07 17 1 047 1 01 18 0 99 0 96 19 0 937 0 91 20 0 89 0 87 21 0 85 0 83 22 0 81 0 79 23 0 77 0 76 24 0 74 0 73 25 0 71 0 7 26 0 68 0 67 29 0 61 0 61 Table 5 6 1 Band pass filter coefficients It is clear from Table 5 1 above that two regions are equal as at m 29 Thus we selected 0 63 to be the system s sampling frequency For safety measures we raised the sampling frequency to 0 64MHz Starting from 0 MHz the HPF frequency is 8 76MHz and LPF frequency is 9
75. nal is conveyed over an intermediate converting stage and enters the USB port of the laptop This chapter will discribe the low level and hogh level protocols that are implemented in order to achieve this data transmission 8 2 Low Level Protocol The Low Level Protocol describes the hardware connections between the sub systems Pure signal flow is addressed in this section irrespective of data type and amount The role of each interfacing component will be explained 8 2 1 C8051F020 Micro Controller Serial Communication is provided from the micro controller unit over one of its UARTs UART1 of the micro controller operates in a full duplex asynchronous mode transmitting and receiving data on the Tx PO 2 and Rx PO 3 pins respectively Both signals are routed via the Priority Crossbar to the Port pins of PortO The data has a TTL logic level which complies with the required logic level of the USB Serial converter IC following the micro controller Consequently a TTL to RS232 converter IC like MAX232 is not needed in our design An important point to consider while interfacing the MCU to other components is that the C8051F020 is a 3 3V micro controller unit thus providing a high logic level of 3 3V not 5V 8 2 2 FT232BQ USB Serial Converter IC The FT232BQ is a Single Chip USB lt gt Asynchronous Serial Data Transfer IC played the data transmission role As mentioned in section 4 4 the many features provided by this chip made it the most
76. nctions 122844884 AAA AAR A AAR AAAS AAAS AAR AA RR AA RRA AR er ere erre eer AS 124 ALA POIDIOES ioco eee Guus ses Sous seus Sous seus seuss vessvovsvossvonssussvesssussvusssussvusssusseussuusdvussuusdvessuusdvesseusdvesseusSeusseeptuees 124 RIZ References ERE ERUIT 126 Chapter 8 8 1 IntroductiOb cce e ee tete tet te rete tte eee tee Eee Pee eee eee ere 128 8 2 LowiLevEl e e 128 8 2 1 C8051F020 Micro Conttollers rrr DP eme tnde 128 8 2 2 ET232BQ USB Serial Converter IC roii AAA 128 8 2 2 1 Power Configuration ettet ker Re rtr E ane vous EE EEEREN EENE ER 130 8 2 2 2 USB transfer mode and connection to FERRON 130 8 2 2 3 Handshake signals nennen enses nnnn nnne esses saa annes sisse saa ai isses essa naa 132 8 2 3 UR 132 8 3 High Level Protocol eie estet even Sh os vire Pe rese Pere Ee ERE RENE TERRE XR ERE ENEE 133 8 3 1 Java stos Micro Protocol E 133 E E O A E E T 133 8 3 1 2 Packet Format 133 8 3 2 Micro to Java ege rr ia 135 8 3 2 1 SAA E E TE 135 A eg EU 135 8 4 V rification o A RR 138 8 5 e e 139 Part III Chapter 9 9 1 Introduction PRENNE 142 9 2 Signal Generations iei ee ete repete ie rire ete ie rere pete peine eeh 142 9 2 1 ol A AAA AP E EET 142 9 2 2 Analog Audio Signal 143 9 3 Test results with look up table 144 9 3 1 Signal Processing in MCW iiec een eI 144 9 311 Normal ECHO E 144 9 3 12 Aphakicintact echo E 144
77. nding Also we found out that the output voltage waveform is improved considerably when a filter capacitor is added after the rectifier diodes We used a transformer of 28 0 28 V as maximum voltage to produce 25 V Requirements Figure 5 7 2 Rectifier Circuit Bridge Configuration After we designed all hardware modules we concluded the following desired voltage values Hardware Module 1 FI232 2 Micro kit 3 BPF 4 pulsar circuit Desired Voltage V 5 3 2 15 25 To provide the above required voltages we used different regulators all are mentioned below For further details refer to Appendix VI 25 volt nm Input Van e Component LM317 variable positive Fa voltage regulator EI H A e Input At pin 3 gt 28 volts e Output At pin 2 25 volts e Calculation Vo 1 25V 1 Ro R41 lapy Ro Since lap is controlled by less than 1004A we assumed it to be 50 pA If we set that R2 10KQ By substitution we get that R2 5380 1 Adj 2 Output 3 Input 15 volt e Component LM 7815 positive voltage regulator Input At pin 1 gt 25 volts e Output At pin 3 gt 15 volts Calculations no need for calculation 1 Input 2 GND 3 Output 15 volt e Component LM 7915 negative voltage regulator Input At pin 2 gt 25 volts e Output At pin 3 15 volts Calculations no need for calculation 1t GND 2 Input 3 Output 5 volt e Component LM 7805 positive voltage regulator e Input
78. ness using samples sampling time amp US Speed in cornea corneathickness time 3 time 2 echowidth samplingdelta USinCornea Generating the names for the pulses based on case names naming pulseno actualpno actualtime actualnames time check corneal compression if corneathickness lt realCdistance 5 Call Alarm Reset else check for misalignments pl checklensper actualpno thresh p2 checkretper pulseno thresh actualpno names p ER ER o 1 The used functions are found in Appendix III 3 4 7 Module 7 Calculations 3 4 7 1Algorithm Algorithm Calculate Input s array of spikes thresh Output s Eye Dimensions AL ACD VD TL amp IOL Calculate AL ACD VD TL using function calculate Calculate IOL using most suitable formula with function auto return AL ACD VD TL amp IOL 3 2 7 2MatLab Code Excerpt WNckUKCA Kk K Kock Ko UK Calculations KEE AL ACD VD LT calculation alltime allintensity 2 pulseno 1 porpseudo typeorthick value trauma we are sending no 1 for testing IOL calculation if alOL 1 IOL auto AL K1 K2 Ref end end else acceptedscan 0 end end end else call alarm amp reset 1 The used functions are found in Appendix III 3 5 MatLab Simulation Output Returning Echo
79. ngle click on the Mesurement button e DIOLA automatically performs the necessary calculatons and displays the results in the Results tab NetBeans IDE 6 5 Patient Ascan Measurments rMode Patient Name Date rType of Eye 16 7 2009 Phakic Type of Eye Aphakic i Pseudophakic TGC Start Scan Measurements AAA AAA A rPhysical Symptoms Traumatized eye Left eye EN Right eye Generate Report Dense Cataract Flag Yellow Spots Inflammation after Surgery Reset Et li Adult ees EEE j Cal gt E Snapshots EDGE Diagrammer Gy GUI calc D Presentation Ascan GUI NetBe A Figure 6 4 3 A Scan Tab press Measurement button Output Ascan GUI Y Proje run Time as El PRN Fe 098901098S010S88E 7 5384615384615385E 6 967032967032S67E 6 4065934065934064E 5 K 5274725274725273E 5 Gr thickness Of Output Ascan GUI X Projects run Time ET 0 17802198 1 5384615384615385E 2 142857 2 967032967032967E 6 16 925825 1 4065934065934064E 5 1 8615385 1 5274725274725273E 5 2 3285713 Figure 6 4 4 Calculation of time and thicknesses appear in the command window during debug The user needs only to type the Keratometry readings in the specified fields The results will be generated automatically using the best fitting IOL formula 3 IOL Calculations e Automatic Formula Selection _ Manual Formula
80. ning from each interface oooccccnncccccnnnnnncnnnnnnonononannnnnnnnnnnnnnannnnnnnnnnnonnnannnnnnnnnns 69 Table 4 7 3 Distance of each Interface 69 Table 4 7 4 Attenuation of each interface in dB eese 69 Table 4 7 5 Amplification value for eachregion enne nennen nina n nennen nana 69 Figure A E Da BR let Lee le E 70 Figure 5 1 1 Overall Block Diagram of hardware module nennen eene nnns nnn 74 Fig re 5 2 1 Transd cer Schematlc Ae eee sen ever Pes reve EE eese tes e EIER 74 Fig re 5 2 2 Transducerz c RSRREDRERESGSI D EDSneneneDSneneengneafeiescgfefeItscsgne ie tes 74 Figure 5 2 3 Transducer Test RESUIt eerte eere e ENEE herr e Te NEAR 74 Figure 53 1 Pulser circuit schematis nA 75 Figure 54 1 T R Switch schematis eren ence cr c ite aR ee 76 Figure 5 5 T Envelope Generation Schematic Wegen nM 77 Figure 5 6 1 Band pass filter characteristics cccccccccssssssseecceceeeaeeeseeeeceeeeesaaeeseeeeeeeesaaaeesseeeeeeeesaaaaaseeseeeeesaaa 78 Table 5 6 1 Band pass filter cOefficientS ooooncccnnnnnccconnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnannnnnnnnnnrnnnnnnnnnnnnnnnnnnnannnnnnnnnns 80 Figure 5 6 2 Illustration of sampling frequency effect eene 80 Figure 5 7 1 Power Supply Schematic ccccccccccoooonnccnnnnononononononnnnnonononnnnnnnnnnnononnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnananinnnnnns 82 Figure 5 7 2 Rectifier Circuit Bridge Configuration enne nnn nennen nnn n nennen nna 83 Figure 5 8 1 Overal
81. nnonnnnnnnnnonononannnnnnnnnononnnannenos 110 Figure 7 5 1 Firmware Algorithm e teret EAR he e Pete ee ee Pe ERR Re ak reos 116 Table 7 7 1 Summary of storage arrayS EEN 120 Figure 7 9 1 Debug window NO Errors and No Warnings nnne nns 121 Table 7 30 1 Time Analysis of MCU e eed a A een 122 Figure 7 10 1 nk Steg Sege eer ANNE EEGEN GE NEEN 122 Figure 8 1 1 Overall Block diagram gege 128 Figure 8 2 1 Schematic diagram pin out sess nnne 129 Figure 8 2 2 Power Configuration of FT232BQ oooncnccnnnnccccononnncnnnnnnnonnnnnonnnnnnnnnonnnnnannnnnnnnnnrnnnannnnnnnnnnnnnnananenos 130 Figure 8 2 3 FT232BQ COnne tions nennen nennen nnne na nnne sa esr i ssa sitis nass sss sa assess annees 132 Figure 8 4 1 Java recognizes the ET 3Z33p0 nen nsnnnniir nnne snis ss aea aine sessi assa a aane nnns 138 Figure 8 4 2 MCU receives test bytes sent from Java 138 Figure 9 1 T Test Stages diat t decem eee iere edes ect va eve sp wa Seu e SEE TEL AE Ee ER ve TUS ER ve DUE P RE ea tose cote 142 Figure 9 2 1 Simulation Signals generated by Matt ab 143 Figure 9 2 2 Analog Signal generated by Mat ab 143 Figure 9 3 1 Signal processing of a normal escan nnne nennen hann nnns sss aa anne nnns 144 Figure 9 3 2 Signal processing of an aphakic intact echo nennen nnn nnne nnns 144 Figure 9 3 3 Signal Processing of an aphakic eye without ene 145 Figure 9 3 4 Signal processing of a Coat s diseased ecan enne nnne nnns 145 Figure 9 3 5 Signal
82. nt StdDev I P one 2 dimentional array including amplitudes of 10 valid peaks fpeaks array of average amplitudes of each peak Avgpeaks from Avg function Action calculates standard diviation of amplitude of detected peaks O P array of standard diviation StdDev void UARTnorm unsigned int Avgtime unsigned int Avgpeaks unsigned int StdDev char names I P Array for peaks time Avgtime for peaks amplitude Avgpeaks for peaks labels names and Standard diviaion StdDev Action Prepares Header and Status bytes for normal peaks and call UARTloop function to transfere specifc array O P Internal calls to UARTloop function void UARTauto unsigned int finalpeaks unsigned int finaltime char names I P Array for peaks time finaltime for peaks amplitude finalpeaks for peaks labels names Action Prepares Header and Status bytes for autodiagnosis peaks and call UARTloop function to transfere specifc array O P Internal calls to UARTloop function void UARTloop unsigned int tosend unsigned char UARTtemp char noofpeaks I P current array to be sent through UART tosend and number of pulses noofpeaks Action Divides integer values for time and amplitude to byte and fill them in UARTtemp array and transfer through UART O P Array sent by UART 7 7 Main Data Storage Variables Due to multiple arrays exchanged through the functions and modules of the project a summery table of all storage arrays with type and size was required to keep
83. nus33v uorjeTnbay 5 8 1 5Power Supply Figure 5 8 5 Power Supply Schematic 5 8 2 Layout 5 8 2 1 Main Circuit o Top FILTER PULSER R42 e e ot LI LL LUI VI IT M D ee er TR SWITCH 8 Ri I be rios ENNLIS 4 WEE POMERS Figure 5 8 6 System PCB Layout Top view o Bottom Figure 5 8 7 System PCB Layout Bottom view 5 8 2 2 Power Supply o Top o Bottom Figure 5 8 9 Power Supply PCB Layout Bottom view 5 9 References 1 Richard G Lyons Prentice Hall Understanding Digital Signal Processing 2001 2 Kraig Mitzner Complete PCB Design Using OrCAD Capture and Layout Chapter Software Introduction Program Structure Description Methods and Variables Implementation Refernces 6 1 Introduction Parallel with the Hardware branch discussed in chapter 5 proceeds the software branch This chapter shows how the Java Platform supports the implemented hardware to achieve the set of requirements of e DIOLA scan 6 2 Description Designed by Java netbeans 6 5 the E DIOLA Scan software has a user friendly interactive graphical user interface making interaction extremely easy and straight forward The continuously appearing instructions in the window guides the user through the program This facilitates the usage and saves the time taken to explore the software To make a measurement the operator first displays the acquisition screen and follows the instructions f
84. oduced by a single dense Vitreous Opacity 4 Coat s disease e Regional Location Subretinal space after the retinal spike amp before the sclera spike e Description Multiple spikes of similar amplitude to the main retinal spike e A scan Photograph Figure 2 3 29 Coat s Disease the arrow represents a few spikes of similar amplitude to the retinal spike while c are cholesterol bodies 5 Ocular Melanoma e Regional Location Subretinal space after the retinal spike amp before the sclera spike e Description Amplitude of Retinal peak noticeably increases almost same as corneal spikes corresponding to the base of the melanoma tumour While a few spikes of extremely low amplitude corresponding to the core of the melanoma tumour are observed after e A scan Photograph Figure 2 3 30 Ocular Melanoma where T corresponds to the base of the tumour and the arrow corresponds to the tumour s core 6 Tear Retinal Detachment e Regional Location Subretinal space after the retinal spike amp before the sclera spike e Description Theretinal spike is observed in its expected range but it s slightly indented The amplitude increases to 100 7 Expulsive Hemorrhage e Regional Location Scleral space after the retinal spike amp before the sclera spike e Description Achain of multiple decaying spikes right after the retinal spike and before the sclera peak e A scan Photograph Figure 2 3 31 Expul
85. of processor 2 Limited data storage 2 Restricted by complex multitasking 2 Higher risk of computer freezing or limitation 3 Not friendly software 3 Compatibility issues 3 Compatibility issues 4 Limited processing 4 Dependent on laptop power supply 4 Upgrading 5 Integrated printer so more complex 5 Specific requirements of laptop or PC 5 Dependent on laptop power supply 6 Viruses problem no windows network Votes 28 3 51 7 20 Table 4 5 1 Votes for Pros and Cons of different Systems Since the votes were in favour of the microcontroller PC based model it was this hybrid model that we employed in designing e DIOLA scan The hybrid nature is demonstrated in detail in Part Il were the system design is put in plain words 4 6 Data and Values Collection In order to produce a sophisticated software we needed to determine the precise values of thickness of each interface within the eye specific ultrasound velocities minimum and maximum length of the human eye We have managed to collect the required values from various sources as ultrasound books eye anatomy and ophthalmologists 1 2 The concluded values are shown in the table below you may view Appendix V for more details Eye interface Thickness mm Velocity m s 1 Cornea 0 52 1620 2 Aqueous 3 16 1500 3 Lens 4 3 min 2 62 max 6 Normal lens 1620 or 1641
86. ons in AC measurements indicate compression of the cornea and or off axis positioning of the probe Vitreous Cavity s Depth VCD when measured use a velocity of 1532 m s Special Conditions approximation of an axial length the eye to be operated on is difficult to measure whether it s a recently traumatized eye or an eye with vitreo retinal pathology where the retina cannot be identified The AL can be approximated by comparing both eyes hence opposite eye is measured In case the eye under test is traumatized then the ophthalmologist scans the other healthy one and the DIOLA software performs the necessary steps to compensate the differences in the two eye measurements despite not scanning the traumatized eye Output Eye Measurements AL VCD LT VCD 2 3 2 510L Measurement Module Based on Short eye long Manuai Figure 2 3 17 IOL Measurement Module Input IOL Formula from Manual or Automatic modes Operation The new generation of A scan instrumentation is making IOL measurement easier faster and more accurate They are also building in features that reduce errors and improve accuracy Having various built in IOL formulae the ophthalmologist selects the most appropriate formula according to the axial length The most common formula is the Holladay you may view Appendix lll for more details on IOL Formulae Output Calculated IOL Power 2 3 2 6 Display Module The image below depicts a waveform dis
87. or its various controls The probe is applied to the patient s eye directly For biometry there are two modes of operation automatic and manual In automatic mode the system identifies the critical structures in the eye and makes the measurements In manual operation the operator must freeze an image and then select the points for the measurements There are optional settings for particular cases such as dense cataracts or silicone filled eyes The user is first welcomed with an attractive welcome screen Upon clicking onto the screen the user enters the software A Scan Biometry System Enter Figure 6 2 1 Login Tab Usually the ophthalmologist would primarily add a record for the patient by filling a form with the patient s personal information Fill in this form Date 12 7 2009 Clinic s Information Name DRAMO rDoctor s Information Name Omnia rPatient s Information Name Samar Age 12 Years ID 1 OK Figure 6 2 2 Patient Information Tab To run a scan the user only needs to click on the A Scan tab and check the radio button that correspond to the patient s case Patient Ascan rMode Automatic Patient Name Manual Date rType of Eye Type of Eye Phakic Phakic Aphakic Pseudophakic TGC Start Scan Diagnose rPhysical Symptoms Traumatized eye Left eye Save Ope Right eye Generate Report Dense Ca
88. or pigment cells may give rise to echoes with a wide range of amplitudes and therefore cannot generally be differentiated ultrasonically Our auto diagnosis A Scan system we will only be concerned with the alterations made on interface reflectivity hence amplitude of generated peak From the table given below it is declared that ocular melanoma is the only type of eye tumors that can be detected using A scan systems only excluding the role of B scan photography as it strongly attenuates the US signal due to its low reflectivity 1 Eye Tumor Types Acoustic Consistency Melanoma Low Reflectivity Homogeneous Secondary Low Reflectivity Homogeneous Haemangioma Low Reflectivity Homogeneous Retinoblastoma Low Reflectivity Homogeneous We managed to collect a lot of abnormal A scan photographs in order to set the precise criteria of how to discriminate the various ophthalmic pathologies from each other In addition to any other information related to physical alterations made to the eye due to these pathologies which the ophthalmologist can load into aid the DIOLA software produce accurate diagnosis 1 The extracted conditions set to identify a particular disorder are illustrated below 1 Asteroid Hyalosis e Regional Location Vitreous space after the posterior lens spike amp before the retinal spike e Description o Mild Case Multiple spikes of medium to low amplitude O Severe Case Multiple s
89. ose the peaks and name them manually Class Inputs_To_Micro Contains functions that convert data that will be sent to microcontroller to byte equivalent to the agreed code Class IOL Calculation Contains functions that apply the algorithm of calculating IOL automatically manually or compare between two or more IOL formulas results Class IOL Compare UI GUI that enables the user to choose the formulas of IOL he wants to compare their results Class IOL Formulas Calc Contains function for each formula that calculate the corresponding IOL Class IOL Formulas UI GUI that enables the user to choose manually only one formula of IOL Class No Of Peaks Contains functions that return some information about the peaks like number of peaks and names of peaks Class Plot This class for plotting the scan of peaks in the graph window by applying some scaling in x and y direction Class Reading Thread Reading data come from microcontroller Class Save Saving patient report as file document or image and display result as an image Class Temp Scan Contains arrays that contains all temporary data about the scan e g peaks numbers intensities and times of peaks Class USB Searching for the available USB device and getting its input and output streams Class USB Data In this class we apply the protocol by which we can write and read from the microcontroller 6 3 2 Methods and Variables 6 3 2 1 Class AscanUl main public static
90. pikes of medium to high amplitude Physical signs of yellow spots on cornea e A scan Photograph Figure 2 3 21 A few spikes having low amplitude produced by the dispersed asteroid bodies signifying Mild Asteroid Hyalosis 8 5 d wen M d i KA is AN US ad Figure 2 3 22 Another A scan of Mild Asteroid Hyalosis showing multiple moderately reflective spikes produced by the dispersed asteroid bodies Figure 2 3 24 Multiple spikes of medium to high amplitude produced by the dispersed Asteroid bodies Severe case 2 Endophthalmitis Uveitis e Regional Location Vitreous space after the posterior lens spike amp before the retinal spike e Description Patient must have undergone surgery Chain of low amplitude spikes e A scan Photograph Figure 2 3 25 Extremely low amplitude spikes produced by Endophthalmitis infection followed by inflammation The disease is termed Uveitis 3 Vitreous Opacities e Regional Location Vitreous space after the posterior lens spike amp before the retinal spike e Description Few peaks of low amplitude due to the presence of small granular opacities e A scan Photograph Bes 787 OS 18 17 NOU 26 96 BIAG 72db d T NEXT B DEL caLIP NE LENGTH 5 76mm 1550m s TS 72db Figure 2 3 27 Very low reflective spikes from the vitreous opacities V and a double peaked highly reflective from the shallow detachment C Figure 2 3 28 Multiple moderately reflective spikes pr
91. play The following are displayed on the system monitor e Patient Name e Date of Test e Scanning Technique immersion Contact e Eye Mode phakic Aphakic pseudophakic e Axial Length e ACD e VCD e Identified Interface Peaks THHERSHI PHREIL 1 1632156411622 ARE e e Hu EN 7 Pan DEI IS C2 C1 D L1 L2 R NI A n Figure 2 3 18 Model of an A scan Display Monitor stating the identified peaks IS represents the spike due to the probe interfacing with the eye C1 represents Anterior Cornea spike C2 represents Posterior Cornea spike L1 represents Anterior Lens spike L2 represents Posterior Lens spike R represents Retinal spike and S represents Scleral spike Figure 2 3 19 Another Model of an A scan Display Monitor stating the identified peaks C1 represents Anterior Cornea spike C2 represents Posterior Cornea spike L1 represents Anterior Lens spike L2 represents Posterior Lens spike and R represents Retinal spike 2 3 2 7 Auto diagnosis Module If Identify each spike Determine their location Extra spikes found Check intensity 4 Display which disease Figure 2 3 20 Eye Auto Diagnosis Module e Input Abnormal Spikes from Automatic Mode e Operation The auto diagnostic module is a sub set of our biometry system Diagnostic ultrasound is now used routinely in the investigation of patients with opacification of the ocular media or with orbital disorders Through an intense market s
92. precise assessment of ocular health The clinical application of this versatile diagnostic technique is performed and enhanced by e DIOLA scan Enhanced Diagnostic Intraocular Lens Power A scan We ll start with introducing our project s vision and scope with the statement of need followed by a statistical analysis as rationalization In order to fully comprehend the mission of e DIOLA scan the reader will be provided with some brief grounding knowledge about the eye s biology and the physics of A scan systems At the end of this chapter we ll define the sequence followed throughout this document in order to keep the reader on track of our system design 1 2 Statement of need Performing eye dimension measurement and intraocular lens IOL power calculation is the initial step to be done in any Cataract surgery Ophthalmology clinic or hospital in Egypt or worldwide Our basic concept simply depends on the ultimately safe Ultrasonic waves to identify thicknesses and depths of various tissues in the eye and hence performing further lens power calculations Recent Studies have shown a remarkable prevalence of ophthalmic diseases According to the World Health Organization WHO cataracts are the leading cause of blindness in the world This eye disease affects about one in every six people Furthermore there are 400 000 new cases each year Cataract surgery involves substitution of natural lens by an artificial IOL characterized by the exact refra
93. requirements and specifications This is shown in Chapter 2 The Development of algorithm as well as its simulation with a high level DSP tool is performed in Chapter 3 Moving from the Simulation level to the implementation level is demonstrated in Chapter 4 by first identifying our system s components and wisely selecting the devices that are most appropriate to our application The Hybrid Model of the enhanced A Scan system is presented here and thus Part I terminates with the grounding for the implementation Execution of the design is illustrated in Part Il where branching into the Software and Hardware units is revealed Detailed rationalization is provided in Chapters 5 through 8 Integration of the components and validation of their functionality is presented in Part Ill In Chapters 11 to 12 of Part IV we discuss the results and limitations of our design Also the foreseen future work is presented in this part Many Appendices wrap up the design and provide all necessary basic knowledge that support comprehension of the underlying enhanced A Scan biometry system Software Architecture ardware Schematic ardware Prototype oding and Debugging System Integration and Debug System Testing and Release Figure 1 6 1 Design Flow 1 7 References 1 William R Hendee amp E Russell Ritenour Medical Imaging Physics Wiley Liss Inc 2002 2 http www eyetec net ce M1S3 ht
94. rtcomings e Interrupts e O addresses e Cabling e Non sharable interface e No hot attachment e Installation While the universal serial bus USB interface and communication protocol had the following advantages e Fast e Bi directional e sochronous e low cost e dynamically attachable serial interface e Backward compatible e High performance up to 480Mbps for USB2 0 and 12Mbps for USB1 1 e Provides automatic error detection and recovery e Provides cable power and power management features e consistent with the requirements of the PC platform of today and tomorrow e Completely external to the PC e Simple and standard connector Clearly it would have been unwise to use anything but a USB interface since it fulfills all necessary prerequisites that grant a fast reliable and error free data transmission But this would not happen until matching of communication nature is achieved Thus we need to convert the data sent serially by the MCU s UART to USB in order to be accepted by the USB port and consequently the Java Platform Just as famous as the USB interface was the FTDI Serial USB data transfer chip FT232BQ that features e full handshaking signals e different data package definitions e selectable baud rates e USB bulk or isochronous transfer modes e USB 1 0 and USB 2 0 compatible e n board programmable external EEPROM e Integrated 3 3V regulator for USB I O e Virtual COM and D2XX supporting Drivers
95. s and labels of coordinates 6 3 2 17 Class Reading Thread run public void run Specified by run in interface java lang Runnable Reads data come from microcontroller all the time and executes some function due to the data received 6 3 2 18 Class Save convert public void convert javax swing JPanel P java lang String T Convert all panel components and texts to image as jpg 2 19 Class Temp Scan 2 20 Class USB GettingStreams public void GettingStreams Gets the input and output streams of the available USB device to be used in writing and reading from the microcontroller 6 3 2 21 Class USB Data 1 Read Data public void Read Data byte b Reads the array of bytes from the microcontroller with a certain protocol 2 Write Data public byte Write Data int status byte inputs byte TGC byte F R C Constructs the array of bytes that will be written to the microcontroller with a certain protocol 3 Tolnt public int ToInt byte b Converts the two bytes to the equivalent integer number 4 ToTime public float ToTime int b Converts the index of the time which is an integer number come from the microcontroller to the equivalent time with seconds using some calculations 6 4 Validation 6 4 1 Serial Communication Just upon connecting the USB connector to the Laptop the OS recognizes the new device and installs its driver When this is done successfully then the Java Platform easily gives back th
96. s of TGC controls Final f 1 A series of linear potentiometers for discrete setting of time delays at various depths Siope E 2 A three knob control that allows adjustement Initial G of initial gain slope and far gain When using higher frequency the ultrasound beam attenuates more due to the dispersive absorption of the tissue Thus the slope at higher frequencies is larger than that with lower ones Typical attenuation for soft tissue gt 1dB cm MHz 1dB MHz for interval of time corresponding to 1cm of pulse travel Corneal spike will have two spikes corresponding to the epithelium and endothelium Care should be taken to keep the gain low enough to appreciate and resolve these two spikes If the gain is set too high poor resolution of these two interfaces will occur and the corneal spike will appear wide and flattened Figure 2 3 5 Types o f TGC controls Top Type 1 Bottom Type2 e Output Amplified signal 2 3 2 2 Pre processing Module e Input Amplified Signal e Operation In this stage all spikes having amplitudes below the valid threshold value are eliminated This is called thresholding In order to select the threshold value we must determine highest spike of all the eye Figure 2 3 6 Thresholding Module interfaces Basically the two corneal spikes tend to constantly have the highest amplitude Measuring lights are attached to spikes A C and D because they are the first three spikes beyond the probe
97. s there are two main prerequisites 1 Converting the returning echo into a digital representation 2 Developing an accurate algorithm for the processing and information extraction This chapter precisely demonstrates the sequence of operations performed by our A Scan biometry System that is the algorithm that will lead to the validation of all features carried out by analog and digital hardware and by software The algorithm is justified by the graphical and analytical results of the simulation 3 2 DSP Tool Selection At the algorithm development stage high level DSP tools are used to enable algorithmic level system design simulation Some advantages of such DSP tools are 1 Save software development time 2 Facilitate debug and modification of programs 3 Input output operations are easy to implement and to analyze We chose MatLab to be our DSP tool since it is an interactive technical computing environment for scientific and engineering numerical analysis computation and visualization Its strength lies in 1 Complex numerical problems can be solved easily 2 Relatively simple programming capability 3 Being easily extendable to create new functions and many other features that can be explored in the MatLab Help 3 3 Algorithm Block Diagram Spikes Detection S amp Eofenvelop Locate at max Thresholding Simulate returning ech Amplification Enveloping Generate Signal Apply Attenuation
98. selection D Comparison between more than 1 formula K1 1 K2 n Target Ametrop 0 ER Axial Length ACD Lens Thickness Viterous Depth Send to report Patient Name Date Type of Eye 6 4 References 1 M Dietel J Dietel Java How to program 4 edition 2 Java API documentation http java sun com j2se 1 5 0 docs api 3 OTI Scan 1000 user manual User Manual OTI OPTHALMIC TECHNOLOGIC INC Software version 5 1 January 2004 Chapter Firmware Introduction Main Data Storage Variables Memory Model Main Controlling Flags System Setup Debugging Algorithm Structure Performance Analysis Algorithm Flowchart Code Guidelines and Pitfalls Algorithm Functions Refernces 7 1 Introduction The parallel paths of hardware and software shown in Figure 1 6 1 meet each other at a certain interface that defines how they communicate with each other The Firmware of a system provides the necessary set instructions that control this communication Design and verification of those software and hardware interfaces have become crucial to first pass success of the overall system design This chapter will exhaustively demonstrate implantation of e DIOLA scan Firmware 7 2 Memory Model Although SMALL memory model generates smallest and fastest possible code two reasons forced us to use LARGE memory model First is the multiple dynamically allocated arrays using pointers that w
99. signal finds its way to trigger the probe while the TR switch prevents it from reaching the band pass filter When the Ven is low and Vep is high the returned signals from the tissue through the probe finds their way to the band pass filter while the TR switch prevents them from reaching the pulser circuit Verification Ven Vep Pulser BPF Probe Simulation pulse from Case1 high low operating OV the Pulser circuit receives signal signal from aces dou hish Zero input from E B signal the tissue probe 5 5 Enveloping Schematic Figure 5 5 1 Envelope Generation Schematic Picture Input Sound Pressure Signal gt Time Voltage gt Time Envelope Detector Response to a realistic A Scan Pulse Function Enveloping is another term for low pass filtering When a complex signal is passed through a low pass filter the resulting signal is the envelope outline of the original Verification upon applying a sinusoidal input the rectified output was shown on the oscilloscope 5 6 Bandpass Filter Function Before encountering the ADC the signal is processed by an anti alias filter to prevent aliasing during sampling We used a technique known as bandpass sampling to sample a continuous bandpass signal that is centered about a f G2 17 5 MHz spectum decret
100. sive Haemorrhage in the subscleral region after the retinal peak C represents the corneal spike while the first arrow represents a chain of decaying spikes S represents the Scleral Spike All the above condition were well studied and the following flowchart was developed for Autodiagnosis all Scleral unction Figure 2 3 32 Eye Auto Diagnosis Flowchart e Output Pathology Name viewed on display monitor accompanied to the abnormal A scan 2 3 2 8 Non Axial Scanning e Input Spikes from Manual Mode e Operation Over the past few decades the use of ultrasound in ophthalmology has become an important and often necessary tool to aid in the diagnosis of intraocular and orbital diseases One of the added values to the typical A scan systems is detecting irregularities i e tumours in the orbital cavity hence the eye s non axial plane In case there is a suspicion of a tumour existing in the orbital cavity the ophthalmologist may choose to use the introduced feature manually to scan through the entire eye Thus the detection of the tumour s position with respect to the axial plane is identified Tumor Localization Figure 2 3 33 Non Axial Scanning Module Manual Mode Perform the first Scan alculate axial length A perform the second scan while the misalignment check is disabled e Algorithm Flowchart The ophthalmologist determines the angle at which the tumour is located by performing two suc
101. taract Flag Yellow Spots e Inflammation after Surgery J Adult Figure 6 2 3 A Scan Tab The Auto diagnosis tab shows the opthalmologist what disease e DIOLA has detected automatically L a Patient Ascan Autodiagnosis Autodiagnosis Patient Name Date Type of Eye Disease Send to report Continue measurements Exit Figure 6 2 4 Autodiagnosis Tab The results of the test are published in form of a printable report thus preventing loss of data Patient Ascan Measurments Report Save Report Final Display Clinic s Name 16 7 2009 Doctor s Name Patient s Name Patient s Age Results Eye Type Axial Length ACD Lens Thickness Viterous Depth IOL Diagnosis Signature Figure 6 2 5 Patient Report Generation Tab The ophthalmologist can control the TGC curve if he she is operating in the manual scan mode The first slide presents the value of the initial low gain and the second slider sets the values for the High gain The other two determine the slope by which attenuation will be compensated for IOL Formulas are specific to the axial length It is one of e DIOLA s features that the software automatically decides the most suitable formula for the case at hand At the same time the user is given the option to choose the formula manually IOL Formulas IOL Formulas choose form
102. tion Software TGC Calculation Interface References 4 1 Introduction When creating a complete A Scan Biometry system it is important to consider a wide variety of interacting factors that contribute to the overall efficiency performance and cost of the system In order to better understand these considerations we will identify the key characteristics of the main subsystems Signal Processing Hardware Software and Interface and identify how each sub subsystem interacts and also influences the design Preparing for the implementation step the device selection process plays a decisive and critical role since all subsequent phases will build on it Its success depends on the accuracy of the collected data Thus data aggregation and collection is of great necessity and guarantees compatibly of each sub system with the data it works on Appendix V contains all gathered data and values essential fo designing e DIOLA scan This Chapter documents the device selection procedure as well as the resulting model of the sub system due to this selection 4 2 Signal Processing Hardware The Processing of the signal is carried out using DSP hardware Although it is possible to implement DSP algorithms on any digital computer the throughput processing rate determines the optimum hardware platform Four DSP platforms are widely used for DSP applications 1 1 General purpose microprocessors and microcontrollers uP and uC 2 General purpose di
103. ty that is inherently integrated into it Java is interpreted An interpreter is needed in order to run Java programs The programs are compiled into Java Virtual Machine code called bytecode Java is secure Java is one of the first programming languages to consider security as part of its design The Java language compiler interpreter and runtime environment were each developed with security in mind Java is robust Robust means reliable and no programming language can really assure reliability Java puts a lot of emphasis on early checking for possible errors as Java compilers are able to detect many problems that would first show up during execution time in other languages Java is multithreaded Multithreaded is the capability for a program to perform several tasks simultaneously within a program In Java multithreaded programming has been smoothly integrated into it while in other languages operating system specific procedures have to be called in order to enable multithreading Hence Java has certainly proved itself the most suitable software platform not only by the numerous advantages it provides but also with its user friendly Netbeans IDE and open source libraries and developing tools 4 4 Interface Having settled on the hardware and software platforms we had to choose a proper communication channel to ensure reliable and correct data transfer Commonly used parallel ports and or serial ports showed a remarkable number of sho
104. uit Schematic from power supply EE E LJ trigger from the Eon eq oru ab microcontroller TE GND Figure 5 3 1 Pulser circuit schematic Function The pulser circuit energizes the transducer of the US probe by a relatively high voltage short duration pulse to produce ultrasound waves Initially the 25 supply volts are divided equally across the resistors Ri and R as R3 is relatively small and can be ignored When the circuit is triggered from the microcontroller The transistor Q is turned ON gt R is short circuit Now there is V across the SCR gt causing forward break over While SCR and transistor Q are conducting capacitor C4 discharges through this series circuit Thus the voltage at point X falls rapidly from V to the ground As the voltage across the SCR is decreased it will switch back to the blocking state and a positive voltage across X begins Verification As shown below a voltage pulse is produced when the microcontroller triggers the circuit ma tt fe L uj Am 5 4 T R switch Schematic Figure 5 4 1 T R switch schematic Function The Transmitter Receiver switch is provided to prevent the large signals from the pulser circuit from finding their way into the band pass filter When the Ven is high and Vep is low the pulser output
105. ulas HOLLADAY HOFFERQ Binkhorst el Edit TGC Low Gain a High Gain 6 Transition Begin mm Ey Transition End mm v 460 o ME IOL Formulas choose 1 formula Figure 6 2 7 IOL Formula Selection 6 3 Inplementation 6 3 1 Program Structure CL cuss Em Buttons Or Data Manual Automatic IOLO _ Compare Semi Autodiagnosis Gate IOL Formulas 6 3 1 Class Diagram of Java Code Class AscanUl The main class that contains all the principal taps Class Ascan Help Contains instructions that help the user to deal easily with DIOLA software Class AutoDiagnosis Conditions Contains undefined peaks and returns the accurate diseases to GUI Class AutoDiagnosisDiseases Contains all cases to detect different diseases Class Avg StdDev Contains functions that calculate the average and standard deviation of array of values Class Calculations Contains functions that calculate the axial length ACD lens thickness and viterous depth Class Edit TGC GUI that enables the user to change the values of a b c and d of the TGC Where c lower gain value d upper gain value a end of zero initial interval b end of sloped gain interval Class Final_Scan Contains arrays that contain all data about the final scan e g peaks numbers intensities and times of peaks Class Gate This class is created in the manual mode to enable the user cho
106. urvey Appendix only one model DGH 5000e DGH Technology INC Georgia United States is provided with feature of auto detection discarding faulty readings Pathologies that acted as random errors to the outputs of the systems causing an obvious misjudgment of eye dimensions is to be auto identified and corrected for more certain results As we mentioned before ophthalmic pathologies tend to produce various alterations to the eye s physical properties i e dimensions of interfaces you may view Appendix I for more details The nature of abnormalities giving rise to echoes may be suggested by the size extent and movement of the echoes Another problem is effect of certain pathological cases Tumors and Retinal Detachment on measurements which have to be detected interpreted by the ophthalmologist Detected echoes may be either point like or membrane like for each of these two types a number of criteria may be used in order to determine the abnormality giving rise to the echoes Point like echoes may sometimes be differentiated on echo amplitude and attenuating properties The acoustic properties of foreign bodies for example differ greatly from biological materials foreign bodies may thus give rise to very high amplitude echoes and may also strongly attenuate the sound beam In addition artifacts e g multiple reflections of the sound within the foreign body may also be produced Vitreous opacities e g hemorrhage inflammatory cells
107. void main java lang String args Parameters args the command line arguments Creates new form from AscanUl 6 3 2 2 Class Ascan Help main public static void main java lang String args Parameters args the command line arguments Creates new form from Ascan Help 6 3 2 3 Class AutoDiagnosis Conditions check arrays public void check arrays throws java lang Exception Throws java lang Exception Returns names of different diseases in multiple regions 6 3 2 4 Class AutoDiagnosisDiseases 1 MAXAMP public float MAXAMP float Amplitude Returns maximum element of the array 2 Start End public java lang String Start End int i Returns the surround peaks of certain region 3 Construct Arrays public float Construct Arrays int i float intensity float Time Returns array of undefined peaks intensity and time 4 Vitreous Diseases public java lang String Vitreous Diseases float M Amp float Vamp float Vtime Returns possible disease due to certain conditions in vitrous region 5 Sclera Disease public java lang String Sclera Disease float M Amp float Samp Returns possible disease due to certain conditions in sub sclera region 6 Retinal Disease public java lang String Retinal Disease float Ramp float Rtime int G float ACamp float PCamp float PLamp float ALamp float Ratamp float Samp Returns possible disease due to certain conditions in sub retinal region 6 3 2 5
108. we have a good scan unlike the manual mode where the operator is allowed to decide A typical older machine has an automatic mode that simply grabs any spike that ventures over a threshold value in a prescribed area along the baseline Whereas our automatic mode will be built on a well based analysis in identifying each spike using more sophisticated pattern recognition algorithms For greater accuracy measurements are taken from the position of intersection of the leading edge of the pulse with the time base line and not that of the spike The Subsystems of this module are 1 Preamplifier for impedance matching the signal and prevent ion of signal loss 2 ADC digitizes the analog received signal 3 Fixed gain Amplifier amplifies the signal by a fixed amount of gain 4 Time Gain Compensation TGC The attenuation of the ultrasound signal by the different interfaces of the eye is usually considered an undesirable factor because it produces falloff of signal intensity with depth without yielding any useful information 2 This attenuation can be compensated for by use of Time Gain Compensation TGC circuit The key to compensating for this falloff is the relationship between the depth and time of arrival of the echo at the transducer Echoes returning at longer times receive greater amplification to compensate for increased attenuation by different interfaces of the eye Figure 2 3 4 TGC effect illustration There are two common type
109. window NO Errors and No Warnings Output Window 7 10 Performance Analysis With 25 MIPS microcontroller core our algorithm achieves sufficient speed coinciding with system real time acquisition requirement Further processing is performed post full acquisition of a single scan The time required to acquire all 10 scams should be in range of time low enough to ensure accurate consistent signal acquisition and comfortable probe positioning by User 7 10 1 Time Analysis Code Segment Total of of Calls msec Percentage per Instructions Scan Time Initializations 64 1 0 087 0 2 Trigger 8 1 0 ADC Interrupt Service Routine 51 260 0 916 4 0 UART Interrupt Service Routine 128 UART Transmission 755 1 0 416 1 8 Amplification FIXED 78 1 2 311 10 1 Amplification TGC 385 1 12 570 54 7 Peak Detection 1037 1 3 784 16 4 Thresholding 369 1 0 267 1 2 Check for normality 2602 1 0 129 1 2 Main Loop 591 1 0 170 1 5 Mathematical Calculations 307 Dynamic Allocation 320 70 1 451 6 7 Total Time scan 6694 26 70 100 Total Time 10 scans 251 76 Table 7 10 1 Time Analysis of MCU code 10 20 30 40 50 60 70 80 90 100 lt unspecified gt WAscansimfinalMAINNnit ADCI Ascansimfinal MAIN nit_Clock Ascansimfinal MAIN init_Port VAscansimfinal MAIN init_UART1 Ascansimfinal MAIN main li Ascansimfinal AMPLIFICATION T G
110. yte revieved by UART Initrecv Indicates User Initial Data was received by UART TGCrecv Indicates TGC coeifficents received by UART TGCinterrupt Indicates editing of TGC has occured Freezeorcont Freezes scanning during manual mode Stop Stops scanning Reset Resets system 7 9 Debugging During programming phase multiple errors and deviations occurred Debugging using logic analyzer breakpoints and watch window helped fix those errors and ensure that the code performed exactly as requested At this level of testing the target was to ensure that the code is error free and that transitions between modules is guaranteed Also various condition controlling looping or exiting the system were manually altered through the watch window and its effect observed using breakpoints The second level of testing was to include a simulation signal and check performance specific to the inserted values This validation stage is to be discussed in Chapter 9 UART data exchange required an even higher level for performance testing that is to use the USB Serial converter with junction to the Software this is also discussed in Chapter 9 X Build target Target 1 compiling Amplification c compiling CheckForNormality c compiling Classification c compiling Main c compiling serial c linking Program Size data 64 1 xdata 4029 code 14098 iscansimfinal O Error s O Warning s gt PL Build Command d Figure 7 9 1 Debug

Download Pdf Manuals

image

Related Search

Related Contents

広報せと2011年6月1日号(4.24MBytes)    ダイナホール・チルメーター  DeWalt WP54AG Network Card User Manual  DSC-W515PS  "取扱説明書"  Kenmore Elite 5.6 cu. ft. Gas Range w/ True Convection - Black Owner's Manual (Espanol)  別紙 1.防じんマスク DD11-S2 (合格番号 M131) 「10個入袋詰め  Anti-Mouse IgG MicroBeads  Orion 7816 User's Manual  

Copyright © All rights reserved.
Failed to retrieve file