In view of the shortcomings of traditional ECG monitoring equipment, this paper proposes a design scheme for a low-power mobile ECG information collection and monitoring system based on Android. The system designed in this scheme collects and processes ECG signals through smart electrodes embedded in underwear, and sends ECG data to the Android monitoring terminal for storage, management and analysis through the Bluetooth wireless data network that has become a standard feature of mobile devices. Finally, the feasibility and practicality of the ECG monitoring system based on Android devices and Bluetooth wireless data networks are verified through link implementation, thereby verifying the practicality of this scheme.
1. Introduction
With the continuous development of information technology and medical level and the continuous improvement of people's living standards, more and more people have put forward higher requirements for personal and family health care, hoping to be able to understand their physical health at any time, and to detect symptoms and solve problems as early as possible. At present, the traditional Holter system is large in size and inconvenient to use, which also brings great inconvenience to people's daily use. Therefore, using the latest wireless sensor network and microprocessor technology, designing and implementing a mobile ECG information collection and monitoring system that can be online for a long time and has wireless mobile monitoring capabilities has high practical value and market potential.
This paper studies the main characteristics of human ECG signals and actual monitoring application needs, and designs and develops a wireless sensor ECG information monitoring system. The system collects and processes ECG signals through smart electrodes embedded in underwear, and sends ECG data to the Android smart monitoring terminal through the Bluetooth wireless data network, which has become a standard feature of mobile devices, for storage, management and analysis of the received data.
2. Overall structure of system design
The overall structural block diagram of the system is shown in Figure 1, which includes an ECG lead embedded in underwear, an intelligent electrode signal processing circuit module, and an intelligent Android terminal application configured with Bluetooth. The intelligent electrode signal processing module includes an analog signal conditioning circuit, a microprocessor circuit, and a wireless Bluetooth network module, and a body temperature sensor and a blood oxygen probe can be expanded on the module, thereby expanding life and health monitoring parameters.
The system first sends the ECG signals collected by the lead electrodes embedded in the underwear to the signal processing circuit module in the intelligent electrode, and the analog signal conditioning circuit performs filtering and amplification.
After the signal is conditioned, it is sent to the main control microprocessor for analysis and preprocessing through A/D conversion. After that, it is sent to the smart Android terminal application equipped with Bluetooth through the wireless channel via the wireless Bluetooth network for diagnosis, analysis and monitoring display. When an abnormality is found, the terminal application will issue an alarm and send the results to the remote medical center through the mobile Internet.
Since the analog signal conditioning circuit in the smart electrode is not the focus of this article on system design, this article mainly introduces data analysis preprocessing, wireless Bluetooth communication and Android terminal application design.
3. Intelligent electrode control software design
This system uses TI's MSP430G2553 ultra-low power microprocessor to build the central processing unit. The MSP430 microcontroller performs well in low power consumption, supports fast sleep, saves a lot of system energy consumption, and has stable working performance under harsh conditions. The G2553 microcontroller used is loaded with a self-designed critical feature extraction algorithm, which can meet the design requirements.
Figure 2 shows the flow chart of the intelligent electrode control software.
The main process is that after the signal conditioning circuit pre-processes the ECG analog signal, the ultra-low power microprocessor collects and converts the analog data through the built-in 10-bit AD conversion module (sampling accuracy is 3mV), the sampling period is 5ms, and the converted data is taken from the high 8 bits and then sent to the Bluetooth module through the asynchronous serial port (UART) through the wireless Bluetooth network. 4. Android terminal application design
4.1 Design of Bluetooth Data Receiving Module
In modern society, intelligent mobile terminals have become an indispensable part of people's lives. At present, most of the intelligent mobile terminals represented by mobile phones are based on the Android system as the operating platform and are equipped with Bluetooth devices. Therefore, in order to meet the needs of people's daily life, the application is developed with the intelligent Android mobile terminal equipped with Bluetooth as the data processing and diagnosis platform. The application is mainly developed in Java language. As shown in Figure 3, the design of the Bluetooth data receiving module of the Android device is shown.
4.2 Implementation of Bluetooth transmission for Android devices
Bluetooth communication adopts C/S communication mode. In the design, the Bluetooth of the receiving end (Android device) is used as the client, and the Bluetooth of the sending end (smart electrode) is used as the server.
When Bluetooth is connected to each other, the Socket mechanism commonly used in data communication is used. After the sockets at both ends are connected to each other, the applications of the sender and receiver can send data to their own sockets and obtain data from the sockets. The sockets of both parties act as connection transfer stations to send and receive data to each other. The following is a detailed description of the implementation process of Bluetooth receiving software on Android devices.
First, turn on the Bluetooth function of the Android terminal. As a client, the Android terminal Bluetooth device needs to actively search for surrounding Bluetooth devices. This search process requires the use of a broadcast mechanism, that is, the search initiator needs a broadcast receiver to receive search information. The specific steps to establish it are: first define a class that inherits BroadcastReceicer. The instance generated by this class has the ability to operate on receiving information and can obtain the required information, such as the name and MAC address of the Bluetooth device. After setting, the broadcast receiver only responds to the message of discovering a Bluetooth device and the message of ending the Bluetooth search, and completes the registration of the broadcast receiver in this application. When using it, the user only needs to click the "Search" button, and the terminal device will start searching for surrounding Bluetooth devices. The entire search process will take 12 seconds. During this process, the local Bluetooth adapter will search for all the surrounding Bluetooth devices that can be connected, and present these search results on the screen in the form of a list for selection. Before the connection starts, first turn off the Bluetooth search function.
There is a BluetoothSocket class in the system library. The corresponding instance generated by this class is the socket of the receiving Bluetooth. If the Bluetooth is connected as a server, the system class BluetoothServerSocket is used to generate the socket object. Before connecting, the UUID needs to be set in advance, and then the Android smart terminal initiates a connection request. Here, the connect() method in the BluetoothSocket class needs to be called. After the Bluetooth device on the server side listens to the connection request, it will verify whether its UUID is consistent with its own. After the verification is passed, the connection can be completed. It should be noted that in this process, the connection process is a blocking call process. In order not to affect the work of the main thread, a separate thread is required to perform the connection work.
After waiting for the Bluetooth connection to be completed, data transmission can be carried out. The data transmission between Bluetooth is automatically carried out by the Bluetooth module according to the requirements of the Bluetooth protocol stack, while the data transmission from the microcontroller to the Bluetooth module on the smart electrode side and from the Bluetooth device to the application on the Android terminal are all carried out in accordance with the URAT asynchronous serial communication method. The data transmission format set in the design is transmitted in a frame with a byte length, which consists of 7 data bits and 1 parity bit. Therefore, the data received by the receiving end is stored in bytes. In this communication system, another data error detection scheme for the received data is also added. The data transmission and reception does not directly convert the collected data into binary serial data for transmission, but converts these data into the corresponding ASCII code and then converts them into serial data before sending the data. In this way, after receiving the data at the receiving end, the data will be converted into ASCII code. If these ASCII codes do not correspond to numbers or have exceeded the ASCII code range, they are considered to be wrong data and discarded. After doing this, combined with parity check, only data with two errors in the lower three bits cannot be detected. The probability of this happening is relatively small, and the Bluetooth transmission distance is short and the transmission environment is not bad, so this error detection capability is sufficient. The data receiving process is also a blocking call process, so it also needs a separate thread to complete.
All received data are converted into digital form (amplitude information) and stored to provide data support for the display of the electrocardiogram. The Android Bluetooth transmission software process is shown in Figure 4.
4.3 Terminal ECG Display
After receiving the data, the electrocardiogram must be drawn on the Android terminal for the user to view. In Android application development, controls such as View are usually used to draw patterns. The system graph is a two-dimensional coordinate graph of heartbeat amplitude over time, with the vertical axis in millivolts and the horizontal axis in seconds. It should be noted that the marking interval of the horizontal axis, the Bluetooth communication rate is set to 9600 bits per second, that is, 1200 bytes per second, so 1200 data points of information will be sent and received per second, and the horizontal axis should be set to 1200 points per second.
The description of a waveform is a process of plotting points using coordinates.
The received ECG signal data is converted into coordinate point representation and stored in the buffer. When the application is drawing the waveform, it will extract data points from the buffer in sequence and draw a continuous waveform on the coordinate graph. 5. System Function Link Implementation
The mobile ECG monitoring system is built according to the link shown in FIG5 , and a normal person with no history of ECG diseases is used as a test subject to implement the link function of the entire system.
After starting the system's smart electrode and Android terminal application, first perform data pairing, enter the interface to select the paired device, and click the "connect" button. The connection begins, and the Android terminal actively initiates a connection request. After the sender listens to the request information, it can respond and establish a connection.
For ease of use and control, data transmission is initiated by the receiving end. Click the "receive" button on the screen, and the receiving end sends a "start" signal for data transmission to the sending end via Bluetooth as the start signal for data transmission. After receiving the "start" signal, the sending end will start sending data until the data in the buffer is sent. The receiving end has a buffer of the same size as the sending end to receive data. When the receiving buffer is full, the receiving stops. This is to synchronize the sending and receiving of data. The receiving end needs to perform error detection on the received data, discard the erroneous data, and then store the valid data in the waveform display buffer. A clear ECG waveform can be seen in the middle of the screen, as shown in Figure 6.
When the user clicks the "realTime" button, he can observe the real-time updated electrocardiogram on the screen.
6. Conclusion
This paper introduces the design and implementation process of the mobile ECG information monitoring system, including the overall design of the system and the design process and main implementation methods of the smart electrodes and Android mobile terminals.
The system design in this solution separates the data collection, processing, transmission and diagnosis in the traditional Holter system. It only uses the smart electrodes in the form of underwear to collect information parameters and uses a microcontroller for simple preprocessing. The data is then sent through the wireless network via Bluetooth wireless transmission technology and handed over to a Bluetooth Android smart receiving terminal for further processing and diagnosis. It overcomes the shortcomings of the traditional Holter system, which is large in size, inconvenient to use, and high power consumption. It can work online for many days in daily life and monitor the health risks of users. The terminal data management and diagnostic analysis program can accurately record the user's test information and query it at any time, and send an alarm to save lives in critical situations.
Previous article:Decrypting the ARM A17 processor
Next article:Design of a car light control system using CAN bus
Recommended ReadingLatest update time:2024-11-17 00:17
- Popular Resources
- Popular amplifiers
- Semantic Segmentation for Autonomous Driving: Model Evaluation, Dataset Generation, Viewpoint Comparison, and Real-time Performance
- Machine Learning and Embedded Computing in Advanced Driver Assistance Systems (ADAS)
- Intelligent program synthesis framework and key scientific problems for embedded software
- arm_embedded_machine_learning_design_dummies_guide
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Activate the new generation of video doorbell! Let your eyes and ears be close to you
- Ask about inductor winding
- Selection of power inductors and filter energy storage capacitors for DCDC buck and boost circuits
- "Goodbye 2019, Hello 2020" + Looking back at 2019 and looking forward to 2020
- MSP430F5529 ADC Reference Sampling Example
- [ST MEMS waterproof pressure sensor LPS27HHW review] + comparison and application between 2 drivers (and final report)
- The problem of mutual influence between the operational amplifier voltage follower circuit and the amplifier circuit in parallel
- Help: What is the problem with low output voltage of DCDC circuit?
- What does CGSN in AT+CGSN stand for? Where can I find the full name table corresponding to the AT command abbreviation?
- Implementation of HPI Boot Mode in TMS320C62x