Design of Blood Glucose Meter Based on MSP430

Publisher:张延强Latest update time:2011-03-14 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Abstract : This article introduces in detail the multifunctional blood glucose meter designed with MSP430 series single chip microcomputer. This blood glucose meter can not only accurately measure blood glucose and real-time clock, but also has functions such as temperature display and alarm reminder. The article introduces the design principle and the design of software and hardware, and finally gives the most core and key calculation formula of this design.
Keywords : MSP430; Chinese LCD display; low power consumption; RS232; calculation formula

Introduction
There are many types of blood glucose meters on the market, with various shapes and structures, but the prices and accuracy are very different; and it is difficult to have both price and accuracy. The reason is that there is no suitable microprocessor. In addition, due to the limitation of screen size, the interface generally uses English characters to display, which brings some confusion to Chinese patients.
With the development of electronic technology, the functions of microprocessors are becoming increasingly powerful and the prices are becoming increasingly lower. It is necessary to select a powerful and inexpensive microprocessor to redesign the blood glucose meter. The MSP430 series microprocessor selected in this system makes the above idea possible.
Principle
The blood glucose meter is designed based on the principle of electro-biochemistry - the current generated by applying a certain voltage to the blood after the enzyme reaction will increase as the blood glucose concentration in the blood increases. By accurately measuring these weak currents and calculating the corresponding concentration based on the relationship between the current value and the blood glucose concentration. Therefore, determining this relationship is the core of the problem. However, the relationship is complex and is affected by many factors. The voltage intensity, the test strips used, and the amount of blood tested will all have an impact on it. In theory, a large number of experiments are required at all concentration points to determine the final relationship. In actual operation, it is only necessary to select a number of important concentration points for a large number of experiments and determine the relationship between them and the current value. The adjacent concentration points are replaced by simple linear relationships. Figure 1 is the relationship curve summarized by this design under a certain amount of voltage.
System Hardware Design
According to the actual needs of the blood glucose meter and the characteristics of the MSP430 series microcontrollers, the MSP430F435 microcontroller is used as the control core. Other modules include current detection, key input and power supply, display, speaker and serial communication, etc. As shown in Figure 1.


Figure 1 System composition

MSP430F435 microcontroller
The microcontroller MSP430F435 used in this system has 16Kb Flash memory, 512B RAM, up to 160-segment LCD driver, 8-channel/12-bit ADC and a large number of I/O ports, which fully meets the functional requirements of this blood glucose meter.


Figure 2 Port settings of the microprocessor

The main port settings are shown in Figure 2. Among them, COM0~COM3, S16~S39, R03~R33 are used to realize LCD display; Port74 and Port75 are used for serial communication; Port79~Port81 are the input terminals of the buttons; Port76 and Port77 provide power supply voltage for the operational amplifier and RS-232 chip respectively. Port78 connects to the buzzer; Port2 and Port3 are ADC inputs; Port7 reference voltage output; XOUT and XIN connect to the 32KHz crystal oscillator, which is the clock source of the system.

LCD display
MSP430F435 has a liquid crystal drive function, which can support up to 160 segments of LCD and has the characteristics of low power consumption. This system uses a Chinese interface LCD display, which is also a major feature of this blood glucose meter. This LCD has 96 code segments, rich content and powerful functions. It greatly facilitates the use of domestic patients.

Blood sugar detection
As we know from the principle, when measuring blood sugar, a certain voltage needs to be applied to the corresponding electrode, and the stability of the voltage will directly affect the measurement result. Therefore, it is considered to be obtained from a relatively stable reference voltage rather than directly from the power supply.

The MSP430 microcontroller A/D samples the voltage value, and the detected current value is a trace amount; therefore, the current value also needs to be amplified and converted into a corresponding voltage value. This requirement can be achieved by using the circuit shown in Figure 3. Among them, the resistor R is used for amplification. In addition, too little blood will also cause deviation in the results; therefore, it is necessary to design a simple circuit for detecting whether the blood is sufficient. And this circuit can be completely replaced by the same circuit as Figure 3. Therefore, two such circuits can be used to achieve blood sugar measurement.


Figure 3 Amplification circuit

Other modules
The power supply voltage of this system is 3V, and two batteries are used. One is the main power supply; the other is a backup so that the device can still work normally when the battery is replaced. There are

three buttons, namely the left button, the right button and the OK button; the OK button is mainly used for power on, power off and confirmation, the left button is used for number reduction or option left shift, and the right button is the opposite of the left button.

Since there are a large number of measurement results stored in the blood glucose meter, it is necessary to add a serial communication function to upload these results to the PC for further processing. The microcontroller itself has a serial communication interface, and it only needs to convert the TTL level into the RS-232 level; the SP3232 chip is used here to achieve this function. The SP3232 chip requires a low power supply voltage and is suitable for portable device applications. The connection of its peripheral circuit is simple, and only a few 0.1µF capacitors are required.
System software design
The system software is written in C language. Its main program framework is shown in Figure 4.


Figure 4 Main program flowchart

For portable devices, battery life is crucial; power consumption should be minimized during design so that the system can stay in a low-power state for as long as possible. Therefore, consider automatically shutting down the device at the appropriate time. A timer is used here. When the timer is greater than 0, the system is in the power-on state; when the timer counts down to 0, the system automatically shuts down. This timer is implemented by the Basic Timer in the microcontroller. The Basic Timer control register is set by software, the signal source is set to the auxiliary clock, the size is 32KHz, and it is divided by 256, and then the interrupt timing interval control bit is set so that the interrupt is performed once per second, and each time it comes, the timer is reduced by 1, thus realizing the function of reducing the timer by 1 per second. The specific operation is as follows: when the machine is turned on, the timer is initialized to a value greater than 0, such as 30, and the system reinitializes this value every time a valid key is pressed. Therefore, when no valid key is pressed, it will automatically shut down after 30 seconds, thereby achieving the purpose of power saving. The
system also has a real-time clock function, and its implementation method is similar to the above-mentioned timer. Just change "minus 1 per second" to "plus 1 per second"; specific operation: add 1 to the second variable every interruption, when the value of the second variable becomes 60, add 1 to the minute variable, and the second variable starts counting from 0 again; similarly, when the minute variable accumulates to 60, add 1 to the hour variable, and it starts counting from 0 again. By analogy, the real-time clock and date functions can be realized.

In order to meet personalized needs, clock and unit settings, average value and temperature display functions are also added. I will not go into details here. The following mainly introduces the measurement module. First, initialize each port and ADC register; then wait for blood to drip. When sufficient blood is detected, turn off the power and wait for several seconds to allow it to fully react with the enzyme on the test strip. Then power on and read quickly after one second. Figure 5 is a curve of the current generated by the test strip used in conjunction with this blood glucose meter after several seconds of reaction between blood glucose and enzyme at different concentrations and then power on. It is not difficult to see from the figure that the curve is relatively stable one second after power on, which is why this design uses "power on for one second" to read.

Calculation formula
This part is undoubtedly the key to this design. Table 1 is part of the data measured using the prototype of this design. It is not difficult to see from the data in the table that the measurement repeatability of the blood glucose meter and blood glucose test strips is good - CV <3%, which is far higher than the national standard requirement of <7.5%.

Table 1 Part of experimental data

Concentration (mg/dl)
Current (µA) 50 100 200 300 400
1 3.003 6.752 13.101 16.861 19.836
2 3.028 6.678 12.368 17.130 19.621
3 2.918 6.800 13.272 16.764 20.366
4 2.893 6.910 13.028 17.179 20.622
5 3.064 7.081 13.614 17.574 20.341
6 2.881 7.106 13.211 17.264 20.268
7 3.075 6.703 12.905 17.628 19.645
8 2.905 6.849 13.150 17.029 20.158
9 2.991 7.130 13.233 17.081 20.024
10 2.901 7.240 12.964 16.838 20.952
Mean 2.9659 6.9249 13.0846 17.1348 20.1833 MSD
0.0746 0.2001 0.3200 0.2924 0.4218
CV (%) 2.5153 2.8896 2.4456 1.7065 2.0898By

fitting the data in cubic curve, we can get the relationship curve between blood glucose value and current value. Figure 6 is a comparison of the original data segmented curve and the fitted curve. It is easy to see that the two curves are very consistent; therefore, in actual operation, a formula can be used to replace the segmented function. The curve formula here is:

Where X is the current value, unit is µA, and Y is the corresponding blood glucose value, unit is mg/dl. In the actual verification process, the above formula has good accuracy.


Figure 5 Comparison of data segmentation curve and fitting curve
Conclusion
This blood glucose meter uses MSP430F435 as its core control unit, which has 12-bit A/D conversion; the sampling accuracy reaches 1/4096. In addition to the basic functions, the system also adds alarm reminders and serial communication functions, so that users can not only measure at regular intervals, but also save the measurement results to the PC through the serial port, and then further process the data through the corresponding software. The formula summarized in this article has been clinically proven to have good accuracy. In addition, the Chinese character interface also greatly facilitates user use.
References:
1 MSP430F43X/F44X data sheet TI. Corp.
2 Shen Jianhua, Yang Yanqin, Zhai Xiaoshu. Principle and application of MSP430 series 16-bit ultra-low power microcontroller, 2004.11

Reference address:Design of Blood Glucose Meter Based on MSP430

Previous article:Design of Digital Predistortion System Based on DSP
Next article:MC3 integrated telemetry system based on GSM short message interface

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号