Introduction | High Level Design |
Hardware Design | Software Design | Results |
Conclusions | Photos 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. 3) Hardware diagram
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 The mid-band gain of the first filter is Second Band-pass filter: The lower frequency cutoff is The higher frequency cutoff is The mid-band gain of the first filter is Thus for the band-pass filter stage, the overall gain is 399.6. Combining this gain with the gain from the DC amplifier, the total AC gain for the circuit is .The choice of high and low cut-off frequency is good enough to give us very clean AC waveform. 4) AC coupling stage The ac coupling stage is used to provide the DC bias level. We want the DC level of the waveform to locate at approximately half Vdd, which is 2.5 V. The schematic for AC coupling stage is shown in figure 4. Given this bias level, it is easier for us to process the AC signal using the on-chip ADC in the microcontroller. Figure 4: AC coupling stage for DC bias level The AC output from this stage will be passed on to the analog-to-digital converter in the Mega32 microcontroller. The image from the laboratory bench is shown in figure 5. We can see that it is very nice and clean. Figure 5: AC Waveform 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 Figure 6: State Diagram for Measurement 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. The results of the project are as expected and satisfactory to us. If the user stays still during the operation, the device can measure blood pressures(both systolic and diastolic) and heart rate without any problem.
1) Duration of measurement From the start until all the measurements are done, it takes about 1.5 minutes. However, this also depends on each individual and how the cuff is worn. For each person, the amplitude of the waveforms may differ causing the operating time to vary. Still, the difference is small and is usually within 10 seconds. 2) Accuracy As mentioned earlier, all the measurements are mainly dependent on the waveforms from the circuit and the pressure sensor is very sensitive to even a slight movement of the user. As a result, it is possible that sometimes the device fails to obtain the desired data, especially if the user does not stay still or wear the cuff improperly. Regarding the three result values (systolic, diastolic and heart rate), some of them has more success rate than the others. For the heart rate, the success rate is very high for getting an accurate value. To find the heart rate, we need to find the period of the AC waveform. And since the period of heart rate stays pretty much constant through out the measurement, it is relatively easy to obtain an accurate result. To find the pressure values, however, are harder because they depend on the amplitude of the waveform, and the amplitude varies a lot during the measurement. However, if the user stays still and wears the cuff right, the measurement are usually successful 8 time out of 10 tries (80% success rate). Another topic that is worth mentioning is that the method of measurement that we used is called the oscillometric method. It is usually deployed in commercial products due to the reliability. However, this method is not as accurate as the auscultatory method, in which the doctor uses the mocrophone to listen to the noise in the artery. 3)Safty in Design Since this is a medical instrumentation device, the safety of the user is the first concern to us. The cuff while driven by a 5 volts motor can squeeze the arm really hard and cause injury if being used improperly. So in our device we have 3 levels of security, making sure that the operation can be aborted by the user at anytime. For the first safety design, the microcontroller is programmed in the way such that if the pressure in the cuff is greater than 160 mmHg, the motor will stop. For most people, the pressure at 160 mmHg will only cause a little discomfort to the arm. This desgin makes sure that the pressure inside the cuff will never exceed the maximum limit of 160 mmHg. The second safety design is to provide an emergency button for the user. While the motor is pumping and the cuff is being inflated, if the user encounters too much discomfort or pain, he/she can press this button to stop the operation immediately. The motor will be stopped and the valve will be opened to release the air out of the cuff. However, we still think that only a pushbutton is not enough for the safety of the user. This is because the emergency button still relies on the operating system of the program in the MCU. Even though we have no bug in our program, if something goes wrong with the MCU or the button connections, there is a possibility that the emergency button becomes unusable. So we agree that we must have another swtich that control the device physically. This switch must be able to disconnect the circuit from the power supply immediately. This way it is certain that the user will be able to stop the operation even when the emergency button does not work. And this switch is the on-off power switch that we have on the device. Other than the cuff and motor concerns, our project is very safte to use because it is very well packaged in a plastic enclosure. The device is run by low-voltage(9 volts) battery which cannot cause any major harm to human body. 4)Interference with other people's designs Since our project only performs measurements on an individual (user), there should not be any interference produced by the device besides the sound of the motor running (which is very quiet compared to regular motors). 5) Usability Our project should be useable to most adults, since it is basically a regular blood pressure moniotor sold in the markets nowadays. The instructions LCD screen are pretty straight forward and easy to understand. Since this device is built to be portable, it can be used anywhere and any time as long as the battery still has power. The cuff that we use is appropriate for the average adult arm size (9-13 inches in circumference). Thus the arm size that is out of this range may not give the accurate measurement. Due to our budget constraints, we do not have many cuff size for our project For people with health problem, especially on blood pressure or heart, it is not recommended to use this device, because we have only tested it with healthy people. Therefore, for the maximum safety of the user, this device can only be used by the people who do not have medical problems on heart and circulartory system. 1) Analysis and expectations Most of the designs that we proposed before we started the project are met in our final result. In fact, we are really happy and satisfied with the final result of our project. The measurements are acceptably accurate (please see 'Accuracy' section in results part). The operations of the device are reliable and have not produced any major problems. The power consumption of the device is decent as we have already tried lots of measurements(more than 20) and the set of two 9-volt batteries has not died yet. Regarding the batteries and power consumption, we encountered a big problem in this issue while testing the device. At the first place, we used one battery to power the MCU board, and the other to power the circuit, valve and motor. However after a couple of tries, the battery that powered the circuit and motor lost its power and could not provide a constant voltage during the measurement. In other words, the voltage across that battery drops constantly as the motor runs. As a result, the voltage that feeds all the chips in the circuit are not high enough (the AD620 and OPA2277 requires 5V and -5V) and causes the circuit to mulfunction. So we fixed this problem by separating the battery that runs the valve and motor from the rest of the circuit. Then we use the battery that supplies the MCU board to power the circuit instead. Now that the battery that supplies the valve and the motor is separated, it ensures that there will be no voltage drop in the circuit while the motor is running. This way, the power consumption of the 2 batteries will be more balanced, since the circuit and the MCU do not consume much power. There is only one proposed feature that is missing from our project. It is the option that let the user to output the pulse waveform(AC component) on the TV. If we want to output the signal on TV, we will need another Mega32 and a pc board. However, due to the limited budget of $50, this could not be done. 2) Intellectual property considerations All the circuits and the codes are originally designed by us. The topologies of the circuits are the one discussed in standard textbooks. We do not use other people's codes or circuit topologies from other people designs. Thus, we are sure that we do not violate any intellectual property of the existing design. 3) Ethical considerations We have tried to ensure that our design conforms to the IEEE codes of Ethics. Here are the considerations that we take in mind. 1) to accept responsibility in making engineering decisions consistent with the safety, health and welfare of -We have been aware of the danger of our device in which the arm cuff may injure the patients. 2) to avoid real or perceived conflicts of interest whenever possible, and to disclose them to -There is no conflict with interest between any of the design team during this project. 3) to be honest and realistic in stating claims or estimates based on available data -We base all of our design on available data supplied by the vendors and the measurement in the lab 4) to reject bribery in all its forms -Of course, there is no bribery issue for our project. 5) to improve the understanding of technology, its appropriate application, and potential consequences -Through this project, we have improved our understanding of how to benefit the society through our engineering 6) to seek, accept, and offer honest criticism of technical work, to acknowledge and correct errors, and to We have been opened to any criticisms and help from the instructor, TA and colleagues through the design 7) to avoid injuring others, their property, reputation, or employment by false or malicious action; We have always been trying to avoid injuring others by performing the experiment on ourselves. The hard work before the product is done
Appendix A: Code Because our code is quite long, please click here to download the file Appendix B: Schematics Figure A1: Schematics
Figure A2: Schematic of Motor and Valve Control
Figure A3: Schematic of Supply Voltage Circuit Appendix C: Parts Listing
Appendix D: Tasks For this project, both of us work very closely with each other and spend more than 50 hours in the lab. For the design of analog circuit, we worked on the design together during the first two weeks of the final project. Then we split up the tasks of writing the code. Warut is responsible for writing the motor and valve control codes. Woradorn is responsible for the codes for the measurement of the metrics (systolic, diastolic and heart rate). After we finished the design, we split up the task for soldering the components into the proto-board. Warut is responsible for soldering the proto-board for the microcontroller. Woradorn is responsible for the soldering of the analog circuit board. Furthermore, we both contribute equally to the soldering of the supply circuit (all the voltage regulators and battery). For the package design, Warut takes care all of that. 1) Data Sheet AD620 (for DC Amplifier) from Analog Devices http://www.analog.com/UploadedFiles/Data_Sheets/37793330023930AD620_e.pdf MPX2050 (Pressure Transducer) from Motorola OPA2277 (used in band-pass filter design) from Texas Instrument PT178NR105V (voltage regulators) from Texas Instrument 2) Reference Site How to measure the blood pressure
|