Wednesday, December 22, 2010

Medical Electronic Project tips





           Our final project is to design and build a portable blood pressure monitor device that can measure a user's blood pressures and heart rate through an inflatable hand cuff. The device is consisted of three main parts: external hardwares (such as cuff, motor, valve, and lcd), analog circuit, and microcontroller. The anolog circuit converts the pressure value inside the cuff into readable and usable analog waveforms. The MCU samples the waveforms and performs A/D convertion so that further calculations can be made. In addition, the MCU also controls the operation of the devices such as the button and lcd display. Since we have the word 'portable' in our title, for sure all of the components are put together in one package which allows a user to take it anywhere and perform a measurement whenever and wherever he/she wants.
           It is undeniable that nowadays people are more aware of the health conditions. One of the most widely used methods to test the health conditions of an individual is to measure his/her blood pressures and heart rate. We, as ones of those who are concerned about their health, decided to work on this subject matter because we would like to build something that is useful and useable in real life.
1) How blood pressures are measured
           Usually when the doctor measures the patient's blood pressure, he will pump the air into the cuff and use the stethoscope to listen to the sounds of the blood in the artery of the patient's arm. At the start, the air is pumped to be above the systolic value. At this point, the doctor will hear nothing through the stethoscope. After the pressure is released gradually, at some point, the doctor will begin to hear the sound of the heart beats. At this point, the pressure in the cuff corresponds to the systolic pressure. After the pressure decreases further, the doctor will continue hearing the sound (with different characteristics). And at some point, the sounds will begin to disappear. At this point, the pressure in the cuff corresponds to the diastolic pressure.
           To perform a measurement, we use a method called “oscillometric”. The air will be pumped into the cuff to be around 20 mmHg above average systolic pressure (about 120 mmHg for an average). After that the air will be slowly released from the cuff causing the pressure in the cuff to decrease. As the cuff is slowly deflated, we will be measuring the tiny oscillation in the air pressure of the arm cuff. The systolic pressure will be the pressure at which the pulsation starts to occur. We will use the MCU to detect the point at which this oscillation happens and then record the pressure in the cuff. Then the pressure in the cuff will decrease further. The diastolic pressure will be taken at the point in which the oscillation starts to disappear. 






The diagram above shows how our device is operated. The user will use buttons to control the operations of the whole system. The MCU is the main component that controls all the operations such as motor and valve control, A/D conversion, and calculation, until the measurement is completed. The results then are output through and LCD screen for the user to see.
4) Analog Circuit
           The analog circuit is used to amplify both the DC and AC components of the output signal of pressure transducer so that we can use the MCU to process the signal and obtain useful information about the health of the user. The pressure transducer produces the output voltage proportional to the applied differential input pressure. The output voltage of the pressure transducer ranges from 0 to 40 mV. But for our application, we want to pump the arm cuff to only 160 mmHg (approximately 21.33 kPa). This corresponds to the output voltage of approximately 18 mV. Thus, we choose to amplify the voltage so that the DC output voltage of DC amplifier has an output range from 0 to 4V. Thus, we need a gain of approximately 200. Then the signal from the DC amplifier will be passed on to the band-pass filter. The DC amplifier amplifies both DC and AC component of the signal (it's just a regular amplifier). The filter is designed to have large gain at around 1-4 Hz and to attenuate any signal that is out of the pass band. The AC component from the band-pass filter is the most important factor to determine when to capture the systolic/diastolic pressures and when to determine the heart rate of the user. The final stage is the AC coupling stage. We use two identical resistors to provide a DC bias level at approximately 2.5 volts. The 47 uF capacitor is used to coupling only AC component of the signal so that we can provide the DC bias level independently.


1) Pressure Transducer
           We use the MPX2050 pressure transducer from Motorola to sense the pressure from the arm cuff. The pressure transducer produces the output voltage proportional to the applied differential input pressure. We connect the tube from the cuff to one of the inputs and we leave another input open. By this way, the output voltage will be proportional to the difference between the pressure in the cuff and the air pressure in the room. The transfer characteristic is shown in figure 1.



Figure 1: Output voltage vs. Differential input pressure 

2) DC Amplifier   

           Since the output voltage of the pressure transducer is very small, we have to amplify the signal for further processing. We use the instrumentation amplifier AD620 from Analog Devices. The resistor R G is used to determine the gain of the amplifier according to the equation .
 
Since we need the gain of approximately 200, we choose the resistor R G to be 240 ohms. This will give us the gain of 206 according to the equation. However, we have measured the gain from the finished circuit, and the measured gain is 213. The schematic of the amplifier is shown in figure 2. 

Figure 2: Schematic of DC amplifier 

3) Band-pass Filter
           The band-pass filter stage is designed as a cascade of the two active band-pass filters. The reason for using two stages is that the overall band-pass stage would provide a large gain and the frequency response of the filter will have sharper cut off than using only single stage. This method will improve the signal to noise ratio of the output. The schematics for both filters are shown in figure 3. 
Figure 3: Bandpass Filter Stage
First Band-pass filter :
The lower frequency cutoff is 
The higher frequency cutoff is 




1) Design for the operating control
The block diagram for the operating control is consisted of a total of 7 states. We first start at the START state where the program waits for the user to push the white button of the device. Once the white button has been pushed, the measurement process begins by inflating the hand cuff. While the cuff is being inflated, if the user feels very uncomfortable or painful, he/she can push the grey button(emergency button) to stop the motor, quickly deflate the cuff and stop the measurement. This will ensure that the safety of the user is well maintained while using the device. Anyhow, if the cuff-inflating procedure goes smoothly, the air will be pumped into the cuff until the pressure inside the cuff reaches 160 mmHg. After that, the motor will be stopped and the air will be slowly released from the cuff. Again, at this point, the user can abort the process by pressing grey button. Once the MCU has obtained the values of systolic, diastolic and heart rate, the valve will be open to release air from the cuff quickly. Then it will report the result of the measurement by displaying the obtained data on the LCD screen. After that if the black button is pushed the program will return to the START state again waiting for the next measurement. Note that if the emergency button is pushed, the black button needs to be pushed in order to return to the start state.








2) Design for measuring the metrics
           Once the motor pumps the air into the cuff until the pressure exceeds 160 mmHg, the motor then stops pumping more air and the cuff is deflated through the slightly-opened valve. The pressure in the cuff starts decreasing approximately linearly in time. At this point, the program enters the measurement mode. The MCU will looks at the AC signal through the ADC0 pin and determines the systolic, diastolic pressure values and the heart rate of the user respectively. For this project, we perform the measurement using the oscillometric method, in which the program monitors the tiny pulsations of the pressure in the cuff. The state diagram of the measurement is shown in figure 7

2.1) Systolic Pressure Measurement
           After the motor pumps the pressure up to 160 mmHg which is approximately more than the systolic pressure of normal healthy people, the cuff starts deflating and the program enters Sys_Measure state. In this state, the program will looks at the AC waveform from ADC0 pin. When the pressure in the cuff decreases to a certain value, the blood begins to flow through the arm. At this time if we look at the oscilloscope, we will see the onset of the oscillation. The systolic pressure can be obtained at this point.
           The way we program this is that we set a threshold voltage of 4V for the AC waveform. At the start, there is no pulse and the voltage at the ADC0 pin is constant at approximately 2.5 V. Then when the pressure in the cuff decreases until it reaches the systolic pressure value, the oscillation starts and grows. We then count the number of pulses that has maximum values above the threshold voltage. If the program counts up to 4, the program enters the Sys_cal state. At this state, the program records the DC voltage from pin ADC1. Then it converts this DC voltage value to the pressure in the cuff to determine the systolic pressure of the patient.
           From the transfer characteristic of the pressure transducer and the measured gain of the DC amplifier, we can determine the systolic pressure by looking at the DC voltage of the ADC1 pin. We will explain the conversion procedure here. Let's the DC voltage that we read off of the ADC1 pin be ‘DC_voltage', and the gain of the DC amplifier be ‘DC_gain'. Then the differential voltage that comes out of the DC amplifier is calculated as . From the pressure transducer's transfer characteristic given in figure 1 in the circuit design part, we can calculate the pressure based on the transducer_voltage. The slope of the typical curve is calculated as . Thus, the pressure in the cuff in the unit of kPa can be calculated as . Then we can convert the pressure back to mmHg unit by multiplying by .Thus the pressure in the mmHg unit is expressed as . Combining these conversions all together, we obtain the formula for converting the DC voltage to the pressure in the cuff as .
           After the program finishes this calculation, it enters the Rate_measure state to determine the pulse rate of the patient.
2.2) Pulse Rate Measurement
           After the program finished calculating the systolic pressure, then it starts monitoring the pulse rate of the patient. We choose to determine the pulse rate right after determining the systolic pressure because at this point the oscillation of the waveform is strongest. The program samples the AC waveform every 40 millisecond. It then records the time interval when the values of the AC waveform cross the voltage value of 2.5 volts. The program then takes the average of five time intervals so that the heart rate will be as accurate as possible. The variable used for counting the number of time intervals is count_average as shown in the state diagram. After the heart rate is determined, the program then enters the Dias_measure state, in which it tries to measure the diastolic pressure of the patient.
2.3) Diastolic Pressure Measurement
           After the pulse rate is determined, the program enters the Dias_Measure state. In this state, the program is still sampling the signal at every 40 millisecond. We then define the threshold for the diastolic pressure. While the cuff is deflating, at some point before the pressure reaches diastolic pressure, the amplitude of the oscillation will decrease. To determine the diastolic pressure, we record the DC value at the point when the amplitude of the oscillation decreases to below the threshold voltage. This is done by looking at the time interval of 2 seconds. If the AC waveform does not go above the threshold in 2 seconds, it means the amplitude of the oscillation is actually below the threshold. The DC value can then be converted back to the pressure in the arm cuff using the same procedure as described in the Systolic Pressure Measurement section.
           Please note that determining the diastolic pressure is quite difficult and ambiguous since the voltage threshold varies from person to person. Thus, we have to adjust the voltage threshold that we use so that the value of diastolic pressure that we obtain corresponds to the known value we usually get when we measure it using the available commercial product.
           After the program finishes calculating the diastolic pressure, it will display the information acquired from the measurement on the LCD. Then the program will open up the valve and the cuff will deflate quickly. The measurement is now finished.





No comments:

Post a Comment

Kindle Fire Case