10.07.2015 Views

Project Description.pdf - WWU EET Home - Western Washington ...

Project Description.pdf - WWU EET Home - Western Washington ...

Project Description.pdf - WWU EET Home - Western Washington ...

SHOW MORE
SHOW LESS

Transform your PDFs into Flipbooks and boost your revenue!

Leverage SEO-optimized Flipbooks, powerful backlinks, and multimedia content to professionally showcase your products and significantly increase your reach.

Hai VoNovember 21, 2005Professor: MortonElectroPlethysmographETEC 471 <strong>Project</strong> <strong>Description</strong><strong>Western</strong> <strong>Washington</strong> UniversityElectrical Engineering Technology


Introduction:Technological advancements allow for a wide variety of medical instruments.From machines that can remove blood clots from a brain without open surgery to instrumentsthat monitor a patient’s heartbeat continuously, doctors rely on these instruments to better carefor their patients. Medical instruments are a $52 billion dollar industry in the US alone and aregrowing steadily. A wristwatch heartbeat monitor from Polar can easily cost $430 dollars andcan be complicated to operate.I propose to develop a Photo-Electro Plethysmograph (PEP) that continuously measuresthe heartbeat rate and display the result in beats per minute. The finished PEP is designedtoward a user-friendly interface with no setup required. The “plug and play” feature will be veryuseful for those who do not have time to fool around with complicated gadgets or those who arenot “tech savvies”.Functional <strong>Description</strong>:The finished prototype PEP gets its power from a battery source. Intypical applications, two AA batteries will easily drive the microcontroller. However, the PEPwill use four AA batteries, thus significantly increasing the longevity of the power source. Theestimated life of the PEP is discussed in the power dissipation section.Figure 1: Detailed Block Diagram shows the top level block diagram for the PEP. Themicrocontroller controls the Infrared (IR) emitter and also interprets the data coming from the(IR) sensor. Based on the data coming from the IR sensor, the microcontroller then out puts thedata via the 2 X 16 character LCD display. In our case, the output data is in beats per minute.2


The ideal microcontroller for this project is the MC9S12C32. Although a less powerfulmicrocontroller can be used, I chose the MC9S12C32 because of its versatility. TheMC9S12C32 has a built in voltage regulator, an Analog to Digital (A/D) converter, a timermodule and several general purpose I/O ports. A couple attractive features of thismicrocontroller are its 32K byte flash/ROM and a 2K byte RAM. The larger size flash memoryshould provide enough room for this project. Figure 1: Detailed Block Diagram also shows theinformation flow between the microcontroller and its external components. Starting from the3


power source, we have four AA batteries in series driving the microcontroller and external itsexternal components. The IR sensor in Figure 1 detects the change in blood flow from the user’sfinger or earlobe and out puts an analog signal to the microcontroller. The sensor is mostsensitive to Infrared light with a wavelength of about 940 nanometer (940nm). Extensiveresearch indicates that 940nm wavelength is optimal in photo-electro plethysmographyapplications. The analog signal from the sensor is fed to port 0 of the A/D converter (PTAD0)on the microcontroller. As each time the user’s heart beats, the rate of blood flowing through theuser’s capillaries changes, thus also changing the signal output from the IR sensor. Themicrocontroller will calculate a person’s heart rate base on the changing signal of the IR sensor.Unlike the IR sensor, the microcontroller has total control over the IR emitter. Precisetiming of the IR emitter is important due to the high power dissipation through the IR LED (seepower dissipation calculation). In order to limit unnecessary current dissipating through the IRemitter, the microcontroller must know exactly when to turn the emitter on and off. PortA0 fromthe microcontroller is reserved for the IR emitter. The LED emitter is designed to emit infraredrays particularly around 940nm.An 8MHz external crystal oscillator (Xtal) is connected to the timing module of themicrocontroller which controls the timing of the system. A typical value of Xtal oscillator is16MHz, but a higher frequency also means higher current dissipation. I chose an 8MHz Xtaloscillator because it is high enough in frequency to suit my project. More importantly, I couldscale down the 8MHz Xtal oscillator to a desired frequency for lower power dissipation. The32K byte Flash ROM and 2K byte RAM memory will be used for programming the4


MC9S12C32 microcontroller. The modules and software codes will be stored in the 32K byteFlash ROM. While the 2K byte RAM is used for storing the user’s instantaneous heart beatvalue. The microcontroller then takes the average instantaneous heart beat over a specificamount of time to get the current heart rate.Most of port T (PTT0-6) is reserved for the 2 X 16 character LCD display as shown inFigure 1. The LCD display will be in 4 bit mode as indicated in Figure 1. Input from the user isnot required other than the reading from the finger “pleth”. The LCD display will show theuser’s current heart rate. An example of the display is shown in Figure 2: User InterfaceDisplay.The user’s output heart rate display will have a range from 0 to 199 beats per minute. Not shownin figure 2 is the hundreds digit. Should the user’s heart rate rise above 100 BPM, a half digitwill show as in the most significant digit place. The output heart rate display (not includingcharacters) will use a total of 2 ½ digits.Power Management:Managing the power consumption of the PEP is one of the mostimportant routines the microcontroller has to do. Since the device is battery operated, conservingevery ounce of energy is essential in prolonging battery life. Thus the microcontroller must5


know when a user is not present and shut down power consuming components while idling. Theopposite means that the microcontroller must detect the user’s presence and redistribute power tothe unit. A method of detecting the user’s presence is illustrated in Figure 3: Detection Method.To detect a user in Figure 3 (a), the microcontroller will send a brief pulse to the LED emitterand expect a certain voltage value returned from the IR sensor. If the user is not present, thesensor will send a voltage which will exceed the minimum expected value, thus telling themicrocontroller to go back to sleep. However, if the user’s finger is there Figure 3 (b), thepathway will be partially obstructed and the sensors output will not exceed the minimumrequired voltage thus telling the microcontroller to “wake up, the user is here!”6


An illustration of the power distribution management cycle can be seen in Figure 4: PowerManagement State Diagram. In Figure 4, power is distributed to all external components i.e.LCD display when the PEP is in an active state. When in the active state, the PEP is ready tomeasure the user’s heart rate. However, if no user is detected for 60 seconds, the device will gointo sleep mode. When the PEP is in sleep state, it will wake up every two seconds to enter thesemi-active state. While in the semi-active state, the microcontroller only allows power to the IRemitter and IR sensor. Enabling the IR emitter and IR sensor will allow the microcontroller tobriefly check to see if the user is present (see Figure 3: Detection Method). If the user isdetected, the microcontroller will return to its active state. However, if no user is detected, thedevice will go back to sleep mode for another two seconds. A major advantage of putting the7


PEP to sleep while idling is the significant increase in battery life. A drawback of having thedevice go to sleep is that a user must wait a maximum of two seconds plus the detection timebefore the PEP starts measuring the user’s heart rate.The maximum power dissipation can be seen in Table 1: Estimated Power Dissipation.The specifications of the power source can easily supply the 88.7 mA needed in the active state.A typical AA battery can supply about 1600 mA in one hour. Based on Table 1, the absoluteworse case power dissipation would be 88.7 mA. If the PEP were in the active statecontinuously, it would take about 18.04 hours before the batteries need to be replaced. It can beassumed that the PEP will be on for 1/10 of an hour, every hour. Thus in sixty minutes the PEPwill spend only six minutes in its active state and 54 minutes in its sleep state. The newestimated battery life time extends to about 130 hours. 130 hours of battery life is a very modestestimate assuming that the user obsessively checks his heart rate once every hour for six minutes.Item <strong>Description</strong>Microcontroller MC9S12C32Resistors (various)Capacitors (various)8MHz Xtal OscillatorIR Sensor TSL260IR Emitter LEDPrecision Amplifier OPA27GP2x16 LCD DisplayTotal DissipationMax Iq35 mA6 mA≈0mA15 mA1 mA23 mA5.7 mA3 mA88.7 mATable 1: Estimated Power Dissipation8


Software <strong>Description</strong>:The main programming language for the PEP will be C. Dependingon my proficiency in C programming in winter quarter, I am also open to program in assemblylanguage. The more complex modules will be written in C language while the simpler modulescan be written in assembly. Some software modules for the PEP are listed below.Module<strong>Description</strong>LCD………………………... A module written by Professor Morton which governs theLCD basic alpha numeric display. In addition a customcharacter made to resemble a heart shape will be written byme. The heart shape character is achieved by lightingcertain LED dots from a 5X7 dot matrix. See Figure 5:Customized Character Using 5X7 Matrix. TheLCDCustom module will be combined with ProfessorMorton’s LCD module to enhance the overall user interfacedisplay.AtoDAnalysis………………. A module written to interpret the analog signal comingfrom the IR senor and convert it to a digital signal.IRReceive…………………... This module governs the data coming from the IR sensor.IRSend……………………... This module can enable or disable the IR LED.Power………………………. A complex module designed to control the powerdistribution to all components and governs the sleep modecriteria, wake mode criteria, and semi-active state criteria.9


Development Plan:Development tasks for the PEP can be divided into two separate tasks:Hardware and software. The hardware tasks will take up most of winter quarter and it involvesordering necessary parts as well as building the unit. The completed prototype PEP will be 5inches in width, 4 inches in depth, and 2 inches in height. A chord connecting the PEP to thefinger pleth will be 3 feet long and the plethysmograph will about 3 inches long. An estimatedphysical analysis is shown in Figure 6: PEP Dimension Analysis. The bulk of the project is insoftware development. Software programming begins in the seventh week of winter quarter andcontinues until the project demonstration.10


Weekly Schedules:A weekly schedule has been developed for both Winter and Springquarter. Winter quarter has been designated for ordering parts, circuit construction, and softwaredevelopment. Spring quarter will primarily be software development until the final week of thequarter. Table 2: Winter Quarter and Table 3: Spring Quarter provides more details on thedevelopment plan.WeekTask1 Research and order remaining components. Also gather on hand materials.2 Design finger pleth portion of the project.3 Apply signal conditioning techniques and finalized design.4 Build the finger plethysmography.5 Design battery power supply (5V regulated).6 Build battery power supply.7 Software design begins.8 Develop codes for Power module.9 Continue with Power module.10 Continue software design.Table 2: Winter Quarter11


WeekTask1 Develop codes for LCDCustom module.2 Develop codes for Sleep, Active, SemiActive modules.3 Finalize hardware design for hardware review.4 Continue software design.5 Debug and eliminate software problems.6 Complete prototype construction.7 Finishing software design.8 Software review.9 Touch up on codes and finalize.10 Finalize aesthetics construction (SENIOR DEMONSTRATION!!!!!)Table 3: Spring QuarterElectrical Specification:Supply source:4XAA BatteriesWorst Case Power Dissipation:88.7mAOperating Temperature Range: 20ºF ± 100ºFResolution:Range:±1BPM0 to 199 BPM12


Preliminary Parts List:Item <strong>Description</strong> Lead Time Source Quantity PriceMicrocontrollerMC9S12C327 Days Digikey 1 $11.28Resistors (various) On Hand Digikey ≈10 $1.00Capacitors(various)8MHz XtalOscillatorOn Hand Digikey ≈3 $0.307 Days Digikey 1 $2.94Battery Case On Hand Radioshack 1 $1.50AA Battery Immediate Radioshack 4 $4.00IR Sensor TSL260 10 Days Futureestore.com 1 $1.88IR Emitter LEDPrecisionAmplifierOPA27GP2X16 LCDDisplay10 DaysReynoldsElectronics1 $0.557 Days Digikey 1 $2.457 Days Digikey 1 $15.33Total $41.23Table 4: Preliminary Parts List13

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!