Home

Final Report - University of Portland

image

Contents

1. FINAL REPORT REV 0 9 PAGE Ill TEAM GOONIES Table of Contents ANCKMOW ICG GS CINICING id ad 7 Dr electum ouium m 7 D Tosco loteo eR T OU m PT 7 ibi dbi n 7 Erie a AA O II EE EEEE 7 I tre Poi H 7 AS A qo RT cT 7 TOUCH Aa 8 Technical OUICOLDIES AA Ai 9 Hard wate Components oio or UE aa PRU eee Isdem eee E LO Md DELL NS CiU Dc 9 PONXSUSUDDIVL qudd tatu ctc Pietra ertum IL UMOR EM MEME 9 M ieatstohe brasero 9 AMDAN S E DET EE 11 Norbe Reduci oN deter aid estet etia eed tele uo nt dd deri 14 ADI ACK orina 14 COMPU sits eerie T teeter ee ts eee ee 15 Software COmponents AA E 15 Userintertace COMPONEN Cl 15 MATLAD ici 15 PROCESS CVU OMICS O O 15 UIS NEED UE 15 A AlOS Ouces EE EO DOO ULT 16 PASS MMM OMS tesis oia ice 16 SA 17 FINAL REPORT REV 0 9 PAGE IV TEAM GOONIES Problems Encounter 19 Ri mE 20 Dictamen a 20 ASSIM 16 S TO LOTES 20 Changes 16 RD Urn NN E rs 20 A E 24 Resource REQUIEM online 25 Concos iaa das 22 Appendix A MATLAB Script for the LabJack eese 2 Appendix B Analog Circuitry PSPICE LAYOUT e eeeeeeeeeeeeeee eene nenne tnnt nnnne nnne 29 Appendix C Final Productin Metal Case 29 APpe uix D User Mantas 31 FINAL REPORT REV 0 9 PAGE V TEAM GOONIES List of Figur
2. The solution is to fuse the two vertebrae into one bone to eliminate movement between the two vertebrae The spinal fusion surgery adds external hardware which supplies structure and bone material which jumpstarts the body to begin forming bone tissue around the hardware as seen in Figure 1 It takes between 6 and 18 weeks for bone to form and Vertebrae fuse to the existing vertebrae Currently the only way to measure the bone formation is using X rays Unfortunately bone material can only be E a seen on an X ray once it has mineralized which Figure 1 Illustration of Spinal Fusion does not occur right away Also it is hard to see the newly formed bone because the hardware is in the way While the bone is forming the patient must be in a cast that extends from their arm pits to hips for many months and in some cases up to a year Bones used to fuse vertebrae Dr Deborah Schenberger a Mechanical Engineering professor at the University of Portland has been researching an alternative solution to X rays in measuring bone formation She has developed a strain gage that can be implanted during the spinal fusion surgery to measures the strain in the metal hardware Initially the strain in the hardware will be high because the hardware is carrying the load of the vertebrae As bone tissue forms around the structure the strain in the hardware will decrease Eventually once the bone has fully healed the strain value will plateau
3. PAGE 7 TEAM GOONIES Acknowledgements Team Goonies would like to thank the following people for their support and help to make the Spinal Fusion Strain Gage project a success Without them the success of this project wouldn t be possible Dr Robert Albright Dr Albright is the Faculty Advisor for Team Goonies He helped the team stay on schedule and as well as providing assistance with project development research and documentation revisions Dr Joseph Hoffbeck Dr Hoffbeck provided Team Goonies with MPLAB and MATLAB debugging assistance and also proposed the use of the LabJack Dr Wayne Lu Dr Lu provided PIC Microcontroller software that Team Goonies used in programming the PIC24 He also provided necessary debugging help for the PIC24 Craig Henry Craig Henry the Electronics Technician at the Shiley School of Engineering provided material and assistance essential for construction of the project Dr Timothy Doughty Dr Doughty provided Lab View equipment to test with the analog circuitry as the team was waiting for the LabJack to arrive Patrick Hickey Patrick Hickey Trever s father built the steel metal casing where the entire circuitry is enclosed FINAL REPORT REV 0 9 PAGE 8 TEAM GOONIES Introduction Spinal fusion is a surgical technique that joins two vertebrae and is usually done to relieve pain When cartilage between the vertebrae wears away the bone on bone contact causes discomfort and pain
4. also illustrates that data was collected and our teams specifications were indeed met From this project we were successfully able to design a spinal fusion strain gage reading and recording system This project included both analog and digital components interfacing with each other to accomplish our data collection system Although the analog design was very easy to build there was trouble building our initial digital design that forced us to rely on alternative designs From these experiences we have learned to explore alternatives to designs much sooner because 1f one problem exists that can t be worked around then the final design will not work We also learned a lot about serial communication device interfacing and noise reduction technique which are important skills in real practice For future Electrical Engineering students doing design projects we recommend that they understand any programming technologies they may use in their projects during the Fall so that they don t run into trouble figuring out how to program their device in Spring FINAL REPORT REV 0 9 PAGE 27 TEAM GOONIES Appendix A MATLAB Script for the LabJack FuUnCE Lon M Collect Data run time gain voltage name strain name data name 9 Function name Collect Data Function description This fuction continually collects the data for the Specified run time from the AINU input of the LabJaek and stores it into the matrix M It graphs the vo
5. noticeable on an oscilloscope when the gain of the circuit was measured on several occasions On one occasion 1f the lid to the box was open the gain was roughly 1000 FINAL REPORT REV 0 9 PAGE 20 TEAM GOONIES and 1f the lid of the box was closed the gain decreased to about 500 This was a huge change and it demonstrated how noisy the environment was where this project was being tested The noise reducing techniques employed have helped alleviate this problem Risks The risks associated with the analog portion of this project were not anticipated very well in the design document The only risk that was acknowledged was that delivery of parts might take longer than anticipated In reality this was never a problem since everything that was ordered from a manufacturer was delivered in less than three days The biggest risk that was not well accounted for was the likelihood that noise would significantly affect our signal It was probably the biggest source of uncertainty in this project and had it not been appropriately handled could have made the project worthless Luckily by using a few noise reducing techniques such as using bypass capacitors at the voltage source inputs shielding the voltage source inputs with special cable and enclosing the entire circuit in a steel box the noise in the system was drastically reduced so that the signal can be accurately measured Digital Outcomes Assumptions One of the greatest assumptions
6. the input supply voltage from the power supply All voltage sources are connected to a common ground to minimize radiated noise Finally the device is enclosed in a steel metal casing which blocks off any other electric and magnetic interference A photo of the stell metal casing can be found in Appendix C LabJack The LabJack is a 12 bit ADC that connects to a computer through USB It provides drivers that can configure its settings for data collection in MATLAB It is able to sample data every three milliseconds Figure 7 below shows the LabJack Figure 7 LabJack The output of the analog circuitry 1s imputed into the LabJack via a single wire The internal ADC converts the analog signal into a digital signal that can be read by the computer To make the LabJack perform the way it needed to MATLAB was required FINAL REPORT REV 0 9 PAGE 15 TEAM GOONIES The MATLAB script sets up the LabJack and collects data for a specified period of time and creates both a voltage vs time and a strain vs time graph from the collected data Computer The analog circuitry is connected directly to a computer running Windows XP Since the LabJack has an internal analog to digital converter the signal from our analog circuit is automatically converted Also because the LabJack is controlled through MATLAB nothing really needs to be done aside from plugging everything together A single wire from the analog circuitry 1s imputed into the LabJack and
7. 2 FINAL REPORT REV 0 9 PAGE 13 TEAM GOONIES Low Pass Filter The final stage of the analog circuitry 1s a low pass active filter also known as an anti aliasing filter The filter circuitry is made up of a low pass filter which consists of a 741 operational amplifier a 350 uF capacitor and two 100 kQ resistors The low pass filter eliminates high frequency noise and prevents aliasing of the analog signal when it is converted to digital Figure 6 shows the circuit layout of the low pass active filter It is a simple first order RC filter Figure 6 Low Pass Filter Schematic The value of the capacitor determines the cutoff frequency of this filter using the equation below 1 cutoff 24R2C Therefore the filter has a cutoff frequency of the filter is 0 00482 Hz The value of the capacitor C 1s a fixed capacitance but 1f the client requires a different cutoff frequency it can be easily replaced with another capacitor Another purpose of the low pass filter is to remove conducted noise and prevent sampling aliasing an effect that occurs if there are frequencies within the input signal that are greater than half the sampling frequency The sampling frequency is significantly higher than the cutoff frequency chosen The output voltage as a function of radian frequency is given as follows V out R 1 Vin Ri 1 joR C FINAL REPORT REV 0 9 PAGE 14 TEAM GOONIES Note the negative sign for both the summing ampl
8. 2 12 Develop function for serial communication 2 8 12 FINAL REPORT REV 0 9 PAGE 16 TEAM GOONIES NA NX eao a STE ra cms oster VANE Develop ston or AD comes UD E Test product on sheep spines IR 0 a SOT 5 Fn Dat nal Rene 0 Tode TE 0 Roane Dyson 0 Tet sig eta edee waar VATE 5 T 10 Peer evaluations and lab notebooks due 4 23 12 Develop MATLAB script to parse data 3 21 12 Complete first user test on sheep spines 3 28 12 14 N A ANA NA First Draft of Final Report due 4 6 12 As Table 2 shows the order of the Milestones was rearranged Also several milestones were added to better define the processes used to assemble and test the project These changes helped the team stay on task Our initial predictions while writing the design document did not fully account for how this project would be built By making these adjustments early on we were able to stay on task for the most part The delayed milestones will be discussed further in following sections Analog Outcomes Since the project was implemented by separating the analog and the digital parts among the team members the outcomes for the project are separated accordingly In general the analog part of the project went significantly smoother than the digital part Very few changes were made to the initial design and only a few minor problems were encountered stemming from incorrectly placing components and significant sources of noise in the testing environ
9. Donald P Shiley School of Engineering Phone 503 943 7314 University of Portland 5000 N Willamette Blvd Fax 503 943 7316 Portland OR 97203 5798 Final Report Project Goonies Spinal Fusion Strain Gage Team Members Trever Hickey Spring Team Lead Kelcey Lajoie Fall Team Lead Ashley Martin Caroline Nakaye Faculty Advisors Dr Robert Albright Customer Dr Deborah Schenberger FINAL REPORT REV 0 9 PAGE II TEAM GOONIES Revision History Rev Date Author ReasonforChanges 0 1 4 April 2012 K Lajoie C Nakaye Initial draft Contains analog A Martin technical outcomes digital technical outcomes and analog process outcomes 0 2 5 April 2012 T Hickey Added digital process outcomes and conclusion 0 3 10 April 2012 A Martin Added edits to Digital Technical Outcomes 0 4 12 April 2012 T Hickey Edited Digital Outcomes amp Conclusion Still need to edit Figures Table of Contents References and talk about data results in conclusion 0 5 12 April 2012 C Nakaye Added edits to analog technical outcomes 13 April 2012 K Lajoie Added edits to Introductions Milestones and analog process outcomes 13 April 2012 A Martin Formatting and addition of data collection to conclusion 21 April 2012 Added Acknowledgements Appendixes and edited spinal fusion strain gage block diagram 25 April 2012 A Martin Final edits o 20 April 2012 T Hickey A Martin Added information about LabJack
10. OG ENABLE PORT Oy 12 16 FINAL REPORT REV 0 9 PAGE 28 TEAM GOONIES brror Message Er cor The following code was written by Team Goonies oe c anreta ize variables LS s Mo 10 017 O Calculate number of samples based on estimated 3ms per sample sample count run time 003 Collect samples of data fOr re dl sample Count Get voltage sample brror AINO lud eGetiljHarndle LJ TOGET AIN 0 0 0 7 brror Message BEror Add voltage to row of matrix M2 AINO MUI B E DOS Go to next sample l5 qud end Graph the voltage vs time PprIoE MUS 1 M f 42 xlabel Time s ylabel Voltage V title Voltage vs Time Graph Ssaveas OCT Voltage name ELE sconvert to strain M 42 M 2 2 5 o85ubtract 2 5V M 2 M 2 gain sdeamplify by dividing by gain of instrumentation amp M t 2 M i 2 350 5 convert EG change anh resistance by multiplying by 350 and dividing by 5 MiGip2y ML t2l ll1 350 SCOnvert to Stradi by dividing by 350 and multrplyxng by 2 lt Ll graph the strain vs time figure PLE Mil MES iz xlabel Time s ylabel Strain title Strain vs Time Graph saveasigor Strain mame tap save raw data in excel file xlswrite data name M end PAGE 29 REV 0 9 FINAL REPORT TEAM GOONIES itry PSPICE LAYOUT ircu Analog Ci Appendix B dajJjssedbwo coc u T Jadu Duns c tabes aspuo
11. The strain gage will allow doctors to be sure that enough bone has formed to support the spine before allowing the patient s cast to be removed Use of the strain gage is still in the research phase Dr Schenberger has tested her design using deceased sheep spines and manually measuring the strain using a multimeter Since a strain gage 1s essentially a variable resistor she used a Wheatstone bridge and an amplifier and measured the changes in voltage as she incrementally added bone cement which simulates bone fusion Since her research will still take several more years and her current method of measurement is tedious she asked our electrical engineering team to devise a way to more quickly measure and graph the output of the strain gage This year s project s goal was to connect to the strain gage as part of a Wheatstone bridge filter amplify the signal convert the analog signal to digital and graph the data in a computer program with MATLAB Many challenges were faced along the way as this design was implemented This document outlines exactly what the final project includes in the Technical Outcomes section It also highlights the differences between the design and the final product in the Process Outcomes section The challenges that were faced and how they were overcome is also included in that section FINAL REPORT REV 0 9 PAGE 9 TEAM GOONIES Technical Outcomes The Spinal Fusion Strain Gage project consists of several comp
12. a Vout Vin i AR R The output voltage can be calculated by the following formula Vout R3 R3 R4 Ri Ri Rz Vin FINAL REPORT REV 0 9 PAGE 11 TEAM GOONIES The input voltage of the bridge circuit is 5 V and is supplied by the power supply that is discussed in the above section Amplifiers The amplification circuitry consists of two stages of operational amplifier circuitry The first stage is an instrumentation amplifier and the second stage is the summing amplifier The instrumentation amplifier consists of three operational amplifiers and resistors which amplify the voltage output of the Wheatstone bridge circuit by one thousand The summing amplifier consists of a 741 operation amplifier and three 100 Q resistors Since the input range of the PIC microcontroller s A D converter is 0 to 5 V in order to optimize this range the signal must be amplified and shifted up in voltage level This was accomplished using a series of two amplifiers The first stage is known as an instrumentation amplifier which amplifies the signal by a factor of 1000 The second stage is a summing amplifier which shifts the signal up by 2 5 V Instrumentation Amplifier The instrumentation amplifier is shown in Figure 4 below Figure 4 Instrumentation Amplifier Circuit Layout The circuit is made up of three 741 operational amplifiers and several resistors The circuit is essentially a more advanced version of the simple differentia
13. ace for how this chip works can be seen in the Figure 12 below AD Al SAR AINO ADS7842 d Channel AINZ AIN3 Comparator Wa N Figure 12 Block Diagram of How ADS7842EB ADC Functions FINAL REPORT REV 0 9 PAGE 23 TEAM GOONIES Although the serial signal was now at the appropriate voltage levels using the line driver the computer still could not recognize the signal coming from the UART By contacting the manufacturer and referring to serial communication tutorials online the team learned that some of the computer s default settings needed to be changed and that there are different types of serial cables straight through serial cables and cross over null modem cables that change the pin layout between devices The differences between how these cables are wired are shown in the Figures 13 amp 14 below Ground 1 eE 5 9 O RX eu O 70 TX TX O8 30 O3 8 3x O7 oc mm BL 9 6 9 50 O01 Figure 13 Wiring Layout of a Straight Through Serial Cable um 10 Ground 5 D RX O9 20 Oa o 7C 3 3042 il IRL aie 80 y O7 140 O 2 90 oF su O1 Figure 14 Wiring Layout of a Null Modem Cable FINAL REPORT REV 0 9 PAGE 24 TEAM GOONIES Once the proper settings were disabled and the PIC24 microcontroller was connected to the computer using a straight through serial cable the computer was finally able to recognize the signal f
14. being outputted to the I O Expansion Board FINAL REPORT REV 0 9 PAGE 21 TEAM GOONIES By contacting the manufacturer the team learned that the PIC24 had a pin remapping module that needs to be configured to output pins to the board Once the PIC24 s pin layout was verified connected to the I O Expansion board and had its pin remapping module set up the serial signal was transmitted out of the desired pin Table 3 Pin Layout of I O Expansion Board TABLE 1 HEADER INTERFACE o J J3 J4 J4 441 Pin Pin Pin Pins Ping Pin Pin 01 85 amp amp amp amp 1 a BB e amp k 4 LL um o __ Em 5 er pH 118 MEC ees aoe a zo 15 18 113 ie 30 30 3 pu T2 NH i em 158 755527 zz 106 106 106 a ie 1s toe 12 s E EE E pe 3 39 ax METER 7 16 7 a PE Ys A o gt ps ELLEN 39 T e gt T r Her m E E a E Fi Fe Bi Fi i i P 12 i 13 31 M RN o r s me mr Ves 7 r 105 n rr a aT zi dz d 46 ar 4a 58 ME 66 By tracing the pin layout in Table 3 above the PIC24 s output pins were verified as properly connected Because the computer still didn t recognize the signal research showed that the PIC24 s Universal A
15. de to the analog circuit s design during its implementation The only notable change made was the placement of the potentiometer in relation to the strain gages in the Wheatstone bridge circuit Figure 8 shows how the potentiometer changed position FINAL REPORT REV 0 9 PAGE 18 TEAM GOONIES Before After Figure 8 Change in Potentiometer Placement Figure 8 shows the potentiometer the variable resistor labeled as P and to where it was moved It was previously meant to be in series with one of the constant resistors shown in Figure as R and the output taken between the potentiometer and the strain gage Instead we found the best results with the potentiometer in series with the strain gage and the output taken between the constant resistor and the potentiometer A few minor additions were made to the circuit design to decrease the noise in the system One significant addition was the use of bypass capacitors placed at the inputs of all the power supplies to the circuit board Figure 9 shows how a bypass capacitor is connected E Jj C E 5V HH Figure 9 Bypass Capacitor Placement A bypass capacitor is placed between the positive terminal of a voltage source and ground as shown in Figure 9 This keeps the voltage from jumping around too quickly which introduces noise into the system Since four different voltage levels were used for power supply 15V 15V 2 5V and 5V four bypass capacitors were needed to ke
16. diately finding alternatives once problems arose Alternatives should have been pursued sooner to give adequate time to finish the project The reason this did not occur was the manufacturer was able to get the code to work so progress was made by configuring the project to be made like theirs hoping that it would eventually work One of the ways this dilemma could also be avoided was to have more plans for alternatives and ways to integrate them into the design easily so they wouldn t have to be integrated hastily and at the last minute FINAL REPORT REV 0 9 PAGE 25 TEAM GOONIES Resource Requirements The biggest change in the budget occurred when the PIC24 microcontroller started having trouble using the serial port The budget was adjusted for extra serial cables the line driver to amplify the UARTS signal and external ADC but these were reasonable adjustments to the original budget Once 1t was decided the PIC24 would not work the budget now had to include the backup LabJack system because the design had changed which drastically changed our budget Another resource underestimated was finding faculty who understood problems configuring the PIC microcontroller Although documentation material existed in the form of contacting the manufacturer and manuals there were few online tutorials for configuring the PIC24 microcontroller Also the faculty with the most experience with PIC microcontrollers Dr Wayne Lu was on sabbatical so he co
17. e spine and hardware have been loaded into the SATEC machine Step 12 Once you are ready to collect data type the following in the MATLAB Command Window Collect Data run time gain voltage name strain name data namne y Where run_time is the time in seconds the trial will take Gain is the gain of the amplifier circuit which will generally be 1000 Voltage_name is the file name of where you would like to store the voltage graph For example you could type voltage Strain_name is the file name of where you would like to store the strain graph For example you could type strain Data_name is the file name of where you would like to store the spreadsheet of raw data For example you could type data An example of how to use this function is Collect Datat 50 gt T0007 WOIDCage Strain data The files generated will be saved in the current directory that MATLAB is operating in The graphs will be saved as tif files and the spreadsheet will be saved as an xls file The excel file does not have any header information The first column generated is time in seconds and the second column is strain in units of strain Step 13 Troubleshooting errors Sometimes the first time the MATLAB code runs it gives you an error Try running it a second time and hopefully it should work If you continue to have issues with the MATLAB code you may have stored the files in different directories Make sure
18. ep the input voltage as constant as possible Another addition to the design was to use shielded twisted wires for all the power supply cables to the circuit board The use of shielding helps block electric fields from introducing noise into the system The shields are all tied to the same ground to minimize ground loops that can also add noise to the system Twisting the wires helps minimize the effect of magnetic fields Special cables were constructed using shielded twisted wire to use for this project FINAL REPORT REV 0 9 PAGE 19 TEAM GOONIES Problems Encountered A few problems were faced as the analog circuit was built The first problem faced was due to a misunderstanding about the pins for the 741 operational amplifier Two similar pin layouts are shown in Figure 10 TOP VIEW OFFSET N1l 1 81 NC IN 7UVcc IN t 3 6 1 OUT Vec 5 OFFSET N2 Figure 10 Two Pin Layouts for the 741 Operational Amplifier The first pin layout is what we initially were using to design our circuit board As Figure 16 shows this diagram does not specify which of the voltage pins Vcc or Vre is the 15 V DC input and which is the 15 V DC input Mistakenly the original circuit was wired with 15 V DC going to the Vcc pin and 15 V DC going to the Vgg pin As the second diagram clearly shows this is the opposite of how a 741 operational amplifier should be biased This mistake in wiring caused many 741 operational amplifiers to be
19. es Fieure T Mustratiomor Spinal FUSION ioci oec eee bv tiene rne te nee enc ddnde 8 Figure 2 Spinal Fusion Strain Gage System Block Diagram esses 9 F stite3 Wheatstone Bridge Circuitry Layout 1 in iia 10 Figure 4 Instrumentation Amplifier Circuit Layout eese 11 Figure 5 Summing Amplifier Configuration eese eene enne nnne nnne nennen 12 Fig re 6 Low Pass Filter Scene mMal Crta datan 13 Foire T Eao Eto PAE cc 14 Fieure 5 Change in Potentiometer Placenta aia 18 Lieure 9 Bypass Capacitor Placement eod aet e oue nea nx ebd ceti iiv e 18 Figure 10 Two Pin Layouts for the 741 Operational Amplifier esses 19 Pour T RS Leak Dine DEDE eua e i a RU EcUE ias 22 Figure 12 Block Diagram of How ADS7842EB ADC Functions esses 22 Figure 13 Wiring Layout of a Straight Through Serial Cable esses 23 Figure 14 Wiring Layout of a Null Modem Cable sese 23 Pere lo Lablack Module orina 24 Pitre To Data Colle cion 26 FINAL REPORT REV 0 9 PAGE 6 TEAM GOONIES List of Tables Table 1 Resistor Values For Instrumentation Amplifier oooooccnocccoooncnoncncnonncnoncncnnnccnnnccnnnos 12 Table 2 Project MESOM S occasio de E ole ter pb dec sa sal tomes cecdstasienidesatspsa eee 15 Table 3 Pin Layout or VO Expansion Board n ns aes 21 FINAL REPORT REV 0 9
20. fried Once the mistake was realized and the 741 operational amplifiers were replaced the circuit worked correctly Unfortunately this problem caused the milestone for testing each component individually to be delayed from 2 17 12 to 2 24 12 Luckily even though troubleshooting took a week the testing of each component was very easy and the following deadline to test the components with the strain gage could be completed the same day Another problem encountered was that 741 operational amplifiers are extremely sensitive and needed to be replaced fairly frequently On several occasions the replacement operational amplifier was placed one pin too high or low than it was supposed to which caused severe problems In one case a 741 exploded because it was shifted down one pin so that the 15 V DC power supply was going into the NC pin After several mistakes we learned to be especially careful in checking where to place the 741 operational amplifiers when they need to be replaced Another large problem this project constantly had to face was working in an extremely noisy laboratory environment All the initial testing was done without implementing the low noise techniques which caused the results to vary greatly causing questions about whether or not the circuit was working correctly Once bypass capacitors shielded power cables and a shielding metal box were included in the project the circuit worked as expected The noise was drastically
21. ifier gain and the low pass filter gain They cancel each other out so that our final input signal to the A D converter has the same sign as the original output signal of the Wheatstone bridge Noise Reduction Preliminary calculations show that the output voltage of the Wheatstone bridge will vary from 2 5 mV to 2 5 mV Ideally the circuitry has the resolution to measure 1 ue which corresponds to a bridge output voltage of 2 5 uV With such a small signal it was extremely important to minimize the noise in our circuit To modify the circuit and minimize noise six different steps were taken that include using low noise resistors shielded wire bypass capacitors steel metal casing and grounding all voltages sources to a common ground To reduce conducted noise by pass capacitors are connected between each voltages source and ground First the circuit 1s built using low noise resistors of 1 8 watt and 5 precision which are more resistant to noise Additionally twisted shielded wires are used to connect from the bread board to the voltage supply and strain gages This shielded twisted wire reduces severe electromagnetic radiation and pickup Furthermore we kept the leads in the circuit as short as possible because long leads act as antennas and pick up a variety of electric and magnetic interference To reduce conducted noise bypass capacitors are connected between each voltage source and ground The bypass capacitors also stabilize
22. in the project was that an analog voltage signal could be sampled converted to a digital value and outputted to a computer Although not in the assumptions of the functional specifications the design assumed that using a Microchip PIC24 microcontroller would be similar to using the PIC18 microcontroller a technology that the team members were familiar with The team had a basic understanding of assembly language and believed there were enough similarities between architectures that 1t would be easy to program a PIC24 Although the PIC24 and PIC18 assembly languages are similar their assembler directives and syntax are different enough that it took a long time to set up the code used on the chip Although the PIC24 microcontroller could be programmed in assembly language similarly to the PIC18 it is much more difficult to do so and is less documented In order to get this working the manufacturer of the PIC had to be contacted to help figure out how to program the PIC24 in assembly language Changes to Design The primary change to the design is how the analog voltage of our circuit is collected and sent to the computer to be graphed Once the PIC24 microcontroller was programmed in assembly language the primary focus of the project was getting serial communication working between the microcontroller and computer to make sure the collected analog data could be sent to the computer Once the PIC was programmed the appropriate signals were not
23. l amplifier using input buffers to eliminate the need for impedance matching The gain is calculated by the following formula Vout f AR A Ra lou E 3 Va W TR 3 Ra ga FINAL REPORT REV 0 9 PAGE 12 TEAM GOONIES where V V Vou the output voltage of the Wheatstone bridge In order to achieve a gain of 1000 V V the resistor values have been chosen to be those listed in the following Table 1 Table 1 Resistor Values For Instrumentation Amplifier LENS 250 KQ Roo I0kKOQ R 20kQ The resistor Ra is a fixed resistor but if the client requires a variable gain it can easily be replaced by a potentiometer Summing Amplifier The final stage is the summing amplifier which is a simple amplifier with a gain of 1 which shifts the input by a DC offset of 2 5 V Since the output of the instrumentation amplifier is in the range 42 5 V to 2 5 V and the input range of the A D converter is 5 V the signal is shifted up by precisely 2 5 V to meet the correct input range The summing amplifier in Figure 5 shows how this is accomplished with a 741 operational amplifier and three 100 kQ resistors OPAMP Figure 5 Summing Amplifier Configuration In Figure 5 Vi is the output of the instrumentation amplifier and V3 is a steady 2 5V from the DC power supply The output of the summing amplifier of unity gain is a signal shifted up 2 5 V The output of the summing amplifier is given by Vo V1 V
24. ltage versus time and the 0 ct b QD H D versus time and stores the data in an excel spreadsheet BUNCE LOM Inputs run time is the total time of the trial in seconds gain is the gain of the amplifier circuit 1000 V V generally voltage name is the name of the file to store the voltage vs time AP o9 o9 A o9 oe graph e Strain name cs the name orf the tile to Store the stralm vs Cime graph data name is the name of the file to store the raw data initialize the LabJack This code was provided by the LabJack website clc Clears the command window clear global Clears all global variables ljud LoadDriver Loads LabJack UD Function Library ljud Constants Loads LabJack UD constant file E EO 1jHandle ua OpenlabJack LJ dtu3 did GEUSB TI 1 3 Returns ljHandle for open LabJack O Error Message Error e Check for and display any Errros oe sotart by using the pin configuration reset IOIype so that all Spin assignments are in the factory default condition Error 1jud ePut ljHandle LJ ioPIN CONFIGURATION RESET 0 0 0 brror Message Error First some configuration commands These will be done with the SPUL Sfunction which combines the add go get into a single call Configure FIO2 and FIO3 as analog all else as digital That means we will start from channel 0 and update all 16 flexible bits We will pass a value of b0000000000001100 or d12 brror 1jud ePut ljBandle LJ 106PUT ANAL
25. ment Assumptions Several assumptions were made throughout the design process during the Fall Semester One assumption that was fairly crucial was that the parts needed could be purchased and delivered quickly and the parts functioned the way we expected them to This assumption proved mostly valid especially with regards to the analog circuitry The analog circuit is comprised of mostly resistors capacitors and operational amplifiers All of these components were readily available in the senior design laboratory and did not need to be ordered One part that needed to be ordered was the multi turn potentiometer for the Wheatstone bridge These were available for purchase online were delivered very quickly after being ordered and worked as expected FINAL REPORT REV 0 9 PAGE 17 TEAM GOONIES The only part that presented some challenges in ordering was a low noise operational amplifier The parts supplied in the senior design laboratory are 741 operational amplifiers which are not specifically design to be low noise Ideally low noise operational amplifiers would help keep our circuit as accurate as possible It was a challenge to find low noise operational amplifiers to be purchased in the limited quantity we wanted At the very least the circuit required five operational amplifiers but ideally we wanted to order around 25 to have as back ups All the suppliers we contacted only sold this product in large rolls of several hundred to a tho
26. onents that all work together to collect data from the strain gages process it and graphs it on a computer in form of strain against time Figure 2 outlines how the different components interact Power Supply Wheatstone Instrumentation Summing e i inn Low Pass Filter Bridge Amplifier Amplifier Digital Circuitry Computer LabJack MATLAB Figure 2 Spinal Fusion Strain Gage System Block Diagram The following section will discuss each of the components shown in Figure 2 above in greater detail It will also describe how each component interacts with the component before and after it Hardware Components Power Supply The DC power supply has four voltage outputs One output is a fixed 5 V output which is used as the input voltage to the Wheatstone bridge and A D Converter The other two outputs are variable from 0 V to 35 V For the purposes of our project one variable output is set to 2 5 V and used as the DC offset input voltage to the summing amplifier The other two variable outputs are a set to 15 V and 15 V which are the bias voltages of the 741 operational amplifiers used in this project Wheatstone Bridge The Wheatstone bridge contains two strain gages each with nominal resistance of 350 2 One strain gage is placed on the load carrying hardware in such a way that it will measure the strain The second strain gage is placed perpendicular to the load and its purpose is to compensate for temperat
27. psj s AR X 3 w EUN ARES WIE HD BEEN A OSE iy e SN FINAL REPORT REV 0 9 PAGE 30 TEAM GOONIES Appendix C Final Product in Metal Casing FINAL REPORT REV 0 9 PAGE 31 TEAM GOONIES Appendix D User Manual Step 1 Make sure LabJack software is downloaded onto computer being used to collect data The software can be found at the following website http labjack com support windows ud Choose the link that corresponds to the computer in use It will likely be the first link Step 2 Connect the LabJack via the USB port on the computer This will then prompt you to install the hardware Follow the steps in the set up window Step 3 Download the Driver and Examples for MATLAB from the following website and unzip the folder http labjack com support ud examples matlab Step 4 Download the MATLAB script attached in the email This script is named Collect_Data m This needs to be saved in the following subdirectory of what was downloaded in Step 3 MATLAB_LJUD gt LJUD_FUNCTIONS Step 5 Start the MATLAB software Step 6 Change Current Directory to the subdirectory titled LJUD_FUNCTIONS Step 7 Solder the twisted shielded wire we have supplied to you this eliminates noise to the strain gage solder pads Connect the other end of this wire to the labeled places on the circuit board Figure highlights the places to connect It does not matter which strain gage goes in which position One st
28. rain gage should be perpendicular to the load and one should be parallel to the load FINAL REPORT REV 0 9 PAGE 32 TEAM GOONIES Strain Gage 2 Strain Gage 1 T gt e We Output of Wheatstone Bridge Figure 1 Wheatstone Bridge Step Load the spine gages with the hardware and the strain gages into the SATEC machine Step 9 Turn on the voltage power supplies to the circuit starting with one with red yellow and black leads In general you should avoid disconnecting the power cords attached directly to the power supplies Disconnecting at the circuit board will eliminate any confusion since they are color coded at the circuit board connection and not at the power supply connection Figure 2 shows how the power cords are attached to the circuit board and Figure 3 shows how the power cords are attached to the power supplies FINAL REPORT REV 0 9 PAGE 33 TEAM GOONIES le 2m Figure 2 Circuit Board Connections ace ENO E d Figure 3 Power Supply Connections Step 10 Using a mulitmeter on the millivolt setting measure the output of the Wheatstone Bridge On Figure 1 the output of the Wheatstone Bridge is where the blue arrows point FINAL REPORT REV 0 9 PAGE 34 TEAM GOONIES Step 11 While still monitoring the output of the Wheatstone Bridge use a small non metallic screw driver to turn the blue potentiometer until the output voltage is zero This step must be done after th
29. rom the PIC24 However the characters the PIC24 s UART were sending were not the characters the computer was receiving The computer s COM port was verified that it was working correctly to ensure that the COM port was not broken This was accomplished by making the COM port s transmitter send characters to its receiver Because the computer received the characters that it sent 1t was verified to be working correctly Once this was done an attempt to send a limited number of characters and adjusting the baud rate to verify our results was made but the proper characters were still not being received Since it was April 27 and there were only a few weeks till Founder s Day it was decided to stop using the PIC24 and use another device to accentuate data collection It was decided to use a LabJack U3 HV module a device that could collect analog voltages and output their results to a spreadsheet This module can be seen below in Figure 15 A benefit to using this device was that it could be configured using MATLAB so few changes would need to be made to our post process data analysis MATLAB script Figure 15 LabJack Module Once the drivers for the Lab Jack were installed we were able to easily set it up and verify that the correct voltages were being collected by the LabJack Risks The greatest risk to the project was spending so much time getting the PIC24 s serial port working Too much time was spent on this instead of imme
30. synchronous Receiver Transmitter UART needed to be amplified and inverted using a device called a line driver This would amplify the UART s signal to the RS 232 protocol so that the computer could properly understand the signal The team decided to order the RSLink2 line driver because it provided pin connections that could be made with the I O Expansion board the line driver chip preconfigured with capacitors and the outputs of the FINAL REPORT REV 0 9 PAGE 22 TEAM GOONIES chip connected to a 9 pin female serial connector to easily interface with a computer This device is shown in the Figure 11 below bight DDR CSC2 C3 C4 e Wiww embedinc com products Gima 4 Figure 11 RSLink2 Line Driver By this point the building phase became so focused on getting the PIC24 s serial module working it was decided that there would not be enough time to test and configure the PIC24 s ADC module As an alternative it was decided to use an external ADC that could automatically convert an analog voltage to a digital signal that way the analog data could easily be read and sent over the serial port to the computer Because of the many different models of ADC it was decided to get one with 12 bits of precision and didn t require some special communication protocol such as SPI or I2C to read its output An ADS7842EB chip was eventually ordered that had 12 bits of precision and parallel outputs to read its results The layout and interf
31. then by a USB cable the LabJack is connected to the computer The data collected and converted by the LabJack is then stored as a comma separated csv file to be used later by MATLAB Software Components User Interface Component MATLAB After the data collection was complete MATLAB was used to manipulate the data We wrote a script that allowed for import of the file with the saved data and converted the output voltages into strain and plotted them on a graph of strain vs time The MATLAB script can be found in Appendix A Process Outcomes The purpose of this section is to outline how the final product differs from the original design Several changes were made to the design as problems were faced mostly relating to noise in the analog system and difficulties programming the Microchip PIC 24 microcontroller Milestones In order to better judge our progress weekly milestones were created at the time the design document was finalized at the end of the Fall Semester As the Spring Semester began it became clear that the proposed milestones needed to be reorganized to better suit the building and testing process The following table shows how these milestones were restructured Table 2 Project Milestones Build Wheatstone Bridge 1 27 12 Build Amplifier Filter 1 27 12 Build amplifier filter 2 8 12 Build Low Pass filter 2 3 12 3 MATLAB script to graph data 2 8 12 Build Wheatstone Bridge 2 8 12 Test each component individually 2 2
32. uld not directly assist with the design The team was able to consult with Dr Lu by email though and he was able to help debug some errors within the code Because of this limitation it should have signaled the team to switch to an alternative sooner so that the device would be more familiar to available faculty and might have better tutorials and documentation Conclusions Some testing on the SATEC loading machine in the School was done in order to determine that the device worked as expected The expected outcome was that the strain on the device would have an initial start of zero strain and jump extremely high due to the metal device carrying all the strain Overtime the strain on the device would decrease as a result of the bone growth and the device carrying less and less strain Figure 16 on the next page displays some sections of the collected data It 1s a tab delineated spreadsheet that shows tension and then compression FINAL REPORT REV 0 9 PAGE 26 TEAM GOONIES ala baBb6 ala PRO H 1BBBBH IZ T2 119006 22547 12 120006 42912 12 121006 045779 12 122006 56289 Tz 123006 ate hat b52HBBB b53BBB 00400 b55BBB HEHHE ala l 59H36 HB ADD 394197 14470 149405 HALE Mo CO to Pa P2 P3 Pi HIHHH 516492 Figure 16 Data Collection In this figure the initial starting point is 2 7 volts due to certain circumstances however 1t still shows that it starts at zero jumps high and then slowly tapers off It
33. ure affects Since strain gages are extremely sensitive to small FINAL REPORT REV 0 9 PAGE 10 TEAM GOONIES changes in temperature using two strain gages in the Wheatstone bridge allows for changes in temperature to have little effect on the output of the Wheatstone bridge The Wheatstone bridge circuitry 1s complete with two fixed resistors of 330 2 each One of the strain gages is in series with a 10 Q multi turn potentiometer which accurately balances the bridge When the bridge is balanced the resistors satisfy the following ratio giving an output voltage Vou of O V R R3 Ro Ry This describes the half bridge configuration which 1s illustrated in Figure 3 R2 R4 Figure 3 Wheatstone Bridge Circuitry Layout In Figure 2 R and R3 are the strain gages R and R4 are 330 Q resistors The strain gage R3 is in series with the 10 Q potentiometer The strain gages act as variable resistors and the Wheatstone bridge measures the change in resistance that corresponds to a change in strain The strain can be calculated from the change in resistance from the following formula AR R F Where R is the nominal gage resistance 350 Q and F is the gage factor which is 2 11 for the strain gages used in this project These values can be found on the packaging of the strain gage The output voltage Vou of the Wheatstone bridge is then measured and is related to the change in resistance AR by the formul
34. usand so we decided to use 741 operational amplifiers for our testing purposes In the design document it was assumed that the strain gages that would be used would all be approximately the same and no calibration would need to be done on the strain gages to make them work with our project In a sense this assumption was true because the strain gages themselves do not need to be calibrated and in fact cannot be calibrated But each time the circuit is turned on the potentiometer in the Wheatstone bridge must be adjusted to set the voltage output of the Wheatstone bridge to zero Though this is slightly tedious for testing purposes it 1s extremely important to zero the circuit before collecting data to make sure the data is as accurate as possible The potentiometer is a very simple solution to adjusting the circuit to get reliable data every single time Another assumption made was that the Wheatstone bridge is the best method for compensating for temperature differences in the strain gages Research throughout the building process confirms that this circuit is the most commonly used method when dealing with strain gages so we are confident this assumption was valid Another assumption was that the output of the Wheatstone bridge would be less than 2 5 mV Once the circuit was built it was easy to confirm that this was true This also confirmed the assumption that this signal needed to be greatly amplified Changes Very few changes were ma
35. you are in the correct directory and all the MATLAB functions from the website as well as the Collect_Data m file are in the same place FINAL REPORT REV 0 9 PAGE 35 TEAM GOONIES If you are continuing to experience problems make sure you have only one set of these files If the files exist two different locations on the same desktop MATLAB doesn t know which one to use and will give you an error Make sure that only one copy of these files exists If the data is not coming out with reasonable numbers there may be a problem with the 741 operational amplifiers The easiest solution is to just replace all 5 with new chips

Download Pdf Manuals

image

Related Search

Related Contents

取扱説明書  IMPULSE®.Link 4.1 Wireless Diagnostics System    Quadra-Fire HUDBAY-INS 7008-115 User's Manual  Sony VGN-N350N/B Marketing Specifications  Thecus 6TB M3800 HDMI 1080P  Samsung Galaxy Trend Lite Bruksanvisning  mini guide du centre inffo  HP Sprinkler 8620C User's Manual  user manual - Urban Rider7 EU VS.indd  

Copyright © All rights reserved.
Failed to retrieve file