Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

The Design of Mobile EeG Monitoring System

Jihong Chai
School ofElectronic and Communication Engineering
Shenzhen Polytechnic
Shenzhen Xiii Lake Shenzhen Polytechnic, Shenzhen, China
chaijih @szptedu.cn

Abstract-With the increasing requirements of mobile ECG


monitoring, a convenient mobile ECG monitoring system
solution is proposed in this paper. The monitoring terminal is
designed by using MSP430 to achieve ECG signal acquisition,
amplification and AID conversion. CC2540 integrating low­
power Bluetooth 4.0 BLE-Stack is also used. System has the
function of mobile ECG data transmission from the monitoring
terminal to the smart phone. This design can use in home
healthcare, community healthcare due to the characteristics of
low power consumption, small size and reliability.

Keywords: ECG monitoring, Bluetooth, mobile health, CC2540

I. INTRODUCTION

Patients are difficult to rush to the hospital in time for


effective ECG detection because the cardiovascular disease
always outbreaks randomly. In recent years, the research of
mobile ECG monitoring system has very broad application
Figure 1. Mobile ECG monitoring system diagram.
prospects.
In this paper, a solution of convenient mobile ECG III. ECG MONITORING TERMINAL
monitoring system is proposed. ECG data is gathered by the
portable ECG monitor, and then is transmitted to the smart The hardware of ECG Monitoring Terminal is composed of
phone by the protocol of low-power Bluetooth 4.0. ECG data is three units namely ECG amplification and filtering circuit
ultimately transmitted to the health records management module, MSP430 main processing module and CC2540
platform of remote doctors via 3G mobile communication Bluetooth communication module. The hardware circuit
networks. So the interactive mobile health service could be diagram is shown as Figure 2.
realized. This article focuses on the system's network
architecture, the implementation of Bluetooth 4.0 using
CC2540, and the function of the health mobile phone based on ECG
MCU CC2540
Android[ll. Detect Pre-amplifier
MSP430 B1uetooth 4.0
Electrode Filter Module
FG439
II. SYSTEM DESCRIPTION

The system is composed of three parts, including ECG Figure 2. ECG Monitoring Terminal circuit diagram.
Monitoring Terminal, Health Smart Phone and Health Records
Management Platform, shown as Figure 1. ECG Monitoring A. ECG Amplification and Filtering Circuit Module
Terminal achieves ECG amplification, signal filtering, and AID
The core of monitor terminal is microcontroller
conversion, and etc by using low-power microprocessor
MSP430FG439. It is a 16-bit processor. It has features of
MSP430[21. The ECG signal is transmitted to Health Smart
upper low power consumption, and high integration. To
Phone by the protocol of low-power Bluetooth 4.0. Health Smart
reduce the product volume, the design of signal amplification
Phone is designed based on the microprocessor of ARM series,
circuit makes full use of its internal integrated operational
and Android operating system is embedded in it Health Smart
amplifier.
Phone can log on the healthcare server to search health records.
The process of signal processing begins with the weak
The doctor could give health guidance to Health Smart Phone of
ECG signal collected on the electrodes. The pre-amplifier is
the patient via 3G mobile communication networks. Therefore
made of CMOS instrumentation amplifier INA321. The gain
the two-way communication between doctors and patients could
is 5. There is a 50Hz filter following the pre-amplifier, which
be easily achieved anytime and anywhere.
eliminate 50Hz interference effectively. The internal

Sponsored by Shenzhen Polytechnic

978-1-4673-4933-8113/$31.00 ©2013 IEEE


operational amplifier of MSP430FG439 provides the maj ority power Bluetooth devices is initiated by the Central. But the
amplification. It has the gain of 100 with a total gain is 5 X Peripheral needs to fust send a datagram including device
100=500. The amplitude of ECG is high enough to implement address and some other information (such as device name) in
analog-to-digital conversion. The ECG signal is transmitted to order to let the Central know that it is a connected device. The
Health Smart Phone by the protocol of low-power Bluetooth Central sends 'Scan Request' after it receives this datagram,
and then the Peripheral replies 'Scan Response'. The Central
4.0 after the l2-bit AID converter.
sends 'Connect Request' after it receives 'Scan Response', and
B. MSP430 main processing module then the Peripheral replies 'Connect Response'. Thus, the
ECG Monitoring Terminal is characterized by Bluetooth connection between ECG Monitoring Terminal and
miniaturization and portability, so MSP430 main processing Health Smart Phone is completed.
module is responsible for ECG signal acquisition, analog The specific function calls are as follows: The Central
amplification, AID conversion, and Bluetooth wireless initiates the scan, and it can receive the data packet SCAN-RSP
communication module. The amplified ECG signal is including the parameters of the Peripheral if the Peripheral is
internally fed to the on-chip analog-to-digital converter scanned. Then the Central will initialize the Peripheral, and
ADC12 input channel AI. The ADC12 samples the ECG start 'Device Found' by calling API function of
signal with a sampling frequency of 512 Hz. GAP DeviceDiscoveryRequestO.The Central starts to establish
a connection by calling API function of EstablishLinkRequesO.
C. CC2540 Bluetooth communication module
2) GATT(Generic Attribute Profile) Layer of BLE-Stack:
The MCU CC2540 is used in the Bluetooth communication
The application data communication between two devices
module of ECG Monitoring Terminal to realize the protocol of
is achieved through the GATT layer of BLE-Stack.GATT
Bluetooth 4.0. Bluetooth radio front-end, Bluetooth protocol
defmes two kinds of roles namely Server and Client. Because
stack, microprocessor, memory, ADC, and etc are all integrated
the ECG data is supplied by ECG Monitoring Terminal, so
on a single chip. CC2540 is equipped with three low-power
ECG Monitoring Terminal is defmed as Server and a service
operating modes to meet low-power requirements.
named 'ECG Monitor' is added to it. On the other hand, Health
The layered software architecture of protocol stack of Smart Phone is defmed as Client.
Bluetooth 4.0 BLE (Bluetooth Low Energy) is shown in The Bluetooth connection between ECG Monitoring
figure 3. BLE-Stack is divided into two parts including the Terminal and Health Smart Phone is established in GAP layer.
BLE-stack files and the OSAL (Operating System Abstraction In GATT layer, ECG Monitoring Terminal as a server calls
Layer) system. BLE-Stack makes all layers together and forms API function of GATTServApp_RegisterServiceO to add a
library functions for the user to call. OSAL i � a kind of small new service named 'ECG Monitor' and store the basic
operating system with task allocation function[Jj. parameters of the service in an array of structures list. Health
Smart Phone as Client finds service by calling API function of
GATT DiscPrimaryServiceByUUIDO and access to service by
calling- API function of GATT_ReadUsingCharUUIDO.
Therefore the transmission of ECG data is completed.
3) Software design ofOSAL(Operating System Abstraction
Layer) system:
OSAL, which is a small operating system upon BLE-Stack,
is responsible for the management of data transmission in
Figure 3. Software structure of BLE. application layer and for task creation, task scheduling, task
synchronization and allocation of mutual exclusion resource.
1) GAP(Generic Access Profile) Layer ofBLE-Stack: Preemptive task scheduling strategy is used for different
GAP is the top layer of BLE-Stack, and it closely links the priority tasks and Time division task scheduling strategy is
underlying protocol stack and applications layer. It is the core used for the same priority tasks. OSAL applies event-driven
lay to connect Bluetooth device.GAP defines four kinds of polling mechanism which greatly degrades the system power
device roles namely Broadcaster, Observer, Peripheral and consumption.
Central. In this system, ECG Monitoring Terminal is defined as
Peripheral to send datagram and response the connection The function of ECG Monitoring Terminal is that ECG data
initiated by Health smart phone which is defined as Central. is collectted by the main processing module MSP430 and ECG
Therefore, we must first initialize the device settings to defme data is sent to CC2540 via data signal line of UART, and then
roles. ECG data is transmitted to Health Smart Phone via Bluetooth
4.0 by CC2540. Therefore the software design of CC2540
Secondly, connection parameters of Bluetooth includes two function modules: Data Receive by UART and
communication should be configured regardless of the device Data Transmission by Bluetooth.OSAL main program
roles. Specific parameters are Connection interval, Slave workflow is composed of two phases, initialization and starting
latency and Supervision timeout. tasks polling, which is shown in figure 4.
Two devices can establish a connection when connection
parameters are determined. The connection between the Low-
storage, display and transmission of ECG data, There are 5
functional modules of the smart phone including the Bluetooth
communication module, the signal processing module, the
interface display module, and the 3G transmission module.

A. Bluetooth communication module

Bluetooth communication module is mainly responsible for


establishing Bluetooth wireless connection between ECG
Initialize GAP layer, configure . monitoring terminal and the smart phone, Firstly Bluetooth
Peripheral and other parameters....
permission is needed to be declared in the fIle of
Initialize GATT layer, define .... AndroidManifest.xml. Then get a Bluetooth adapter and turn
Server and other parameters+' on the Bluetooth function. Search the ECG monitoring tenninal
Initialize OSAL system, Jefine two tasks:
in the paired Bluetooth devices, and a new device search
Task_UartData and Task_BlueToothData. procedure will be started if the target device is not found. In
order to establish a Bluetooth connection, the underlying
communication capabilities are set for the Bluetooth device. At
last the user-defmed communication protocol is applied to
complete ECG data transceiver.

Figure 4. OSAL main program flow chart. B. Signal processing module


Firstly, OSAL initialization consists of software system Signal processing module completes the real-time fIltering
initialization and hardware resources initialization. Software pretreatment of ECG data, and extracts waveform
system initialization comprises some initialization of variables, characteristics and then calculates heart rate parameters. The
event tables and function tables of tasks and other data wavefonn analysis method of the combination of time domain
structures. All tasks should be initialized. There are some and frequency domain is used in this paper. Integer coeffIcients
system tasks which are defIned by each BLE-Stack layer comb fIlter band-pass fIltering to realize 50Hz notch fIltering.
including LL, HAL, GAP, GATT, and SM. There are two user­ Move window and integration method is used to enhance the
defmed tasks, the one is the task to transfer data via Bluetooth QRS complex wave. Five o'clock differential is used for
named as 'Task_BlueToothData', and the other is the task to further weakening the P wave and T wave. Finally, the QRS
complex wave energy is enhanced by the integral square and
receive data from UART named as 'Task UartData'. In the
the R wave can be accurately located combined with the
initialization function of Task_BlueToothData, the roles of the
integrated waveform and the original waveform especially for
Peripheral and the Server are defIned, and other transmission
high amplitude and long QRS interval ECG data[41.
parameters of GAP layer or GATT layer are confIgured. An
Event of SBP_START_DEVICE_EVT in operating system
C. Interface display module and 3G transmission module
virtualization layer is set to trigger connection confIguration
initialization of GAP layer. So that ECG Monitoring Tenninal Interface display module takes charge of displaying ECG
could be discoverable to receive and respond to request of scan waveform and heart rate parameters. Due to the need to have
ECG data sent with high accuracy, timeliness and effIciency,
and connection from the Central and establish a connection. In
3G transmission module is designed. When ECG wavefonn is
the initialization function of Task_UartData, the UART
steady, click the send button and switch into 3G transmission
resources are initialized including setting Baud rate to
module, Then real-time transmission of ECG is achieved
115200bps and enabling UART interrupt. The initialization of through the mobile communication medium. After the ECG
the hardware resource is relatively simple, such as the data is transferred, user information should also be inputted
initialization of RAM, Flash, Timer, and so on. into the mobile phone. Therefore health parameters can be
After successful system initialization, System performs stored in the remote database on the health records
the function of osal_start_system () to start the OSAL system management platform in order to make it easier for doctors to
and polls tasks into the task table. When detecting the interrupt diagnose. On the other hand, the doctor could feedback the
event of UART port, system schedules the task of diagnose device to the user's smart phone.
Task UartData and calls the function of serial read data
achieved by BLE-Stack, so that ECG data could be received V. CONCLUS10N
from MSP430 and then sent to the Health Smart Phone via
In this paper, a new solution of mobile ECG monitoring
Bluetooth protocol. When detecting the interrupt event of
system based on Bluetooth 4.0 and Android system is proposed
Bluetooth RF port, system schedules the task of
This system takes full advantage of the on-chip operation
Task BlueToothData in order to receive command from
amplifIer of MSP430FG439 and the transmission convenience
Health Smart Phone. and low power consumption of CC2540. The smart phone
IV. HEALTH SMART PHONE based on Android system is used as the communications
gateway. Therefore the ECG data could be easily transferred to
The Health smart phone is responsible for receiving the the remote doctors via 3G mobile communication networks.
ECG data from ECG monitoring tenninal and signal processing,
Users can effectively receive professional medical diagnosis [2 ] Yu Xuefei, "Theory and Design of Modern medcal instrumentation,"
South China University of technology Press,vol. I,2008.
and treatment recommendations anywhere and anytime.
[ 3] n, 2. 4-GHz Bluetooth low energy System-on-Chip,2011.
[4] Bo Zou and Jihong Chai, "The Design of the ECG Tele-monitoring
REFERENCES system," Journal of Shenzhen Polytechnic,vol. 3,pp 1-5,2003.
[ I] Yang Lei and Zhang Chao, "Design and Reelization of Portable Rapid
Electrocardiograph," China Medical devices,vol. 8, pp.II-13, 2010.

You might also like