introduction
With the development of society and the improvement of people's living standards, people pay more and more attention to health, but with the improvement of living standards, the incidence of cardiovascular diseases continues to rise. Especially in recent years, with the intensification of social aging, cardiovascular disease has become a major disease threatening human life, and heart disease has become the disease with the highest mortality rate in the world. In view of the increasingly severe situation of patients with cardiovascular disease, it is imperative to improve the means of preventing and monitoring the disease. ECG signal detection is the most direct way to find heart disease, but at present, almost all ECG monitors used in hospitals are imported, which are expensive and have high maintenance costs, which increase the financial burden on hospitals and patients; , Economical ECG monitoring equipment is of great significance. This paper designs a ECG monitoring system based on TI's TMS320LF2407A DSP. This system has small size, low cost and strong practicability.
Introduction of TMS320LF2407A DSP
An important part of the ECG monitoring system is to process the ECG signal, so it is very important to choose a suitable signal processor. At present, the most successful DSP chip is the series product of American TI company. Its three major DSP platforms TMS320C2000, TMS320C5000, and TMS320C6000 have become the most influential DSP chips in the world today.
This system uses TMS320LF2407A as the signal processor and core controller. TMS320LF2407A is a new high-performance 16-bit fixed-point digital signal processor introduced by TI and a new member of the TMS320C2000 series. It is specially designed for digital control and integrates the high-speed signal processing capability of DSP and the optimized peripheral circuits suitable for control. It is a true single-chip controller and has been widely used in digital control systems.
TMS320LF2407A DSP has the following characteristics:
(1) Using high-performance static CMOS technology, the Power Supply voltage is reduced to 3.3V, which reduces the power consumption of the controller; the execution speed of 40MIPS shortens the instruction cycle to 25ns, thereby improving the real-time control capability of the controller.
(2) The CPU core based on TMS320C2xx DSP ensures that the TMS320LF2407A DSP code is compatible with the TMS320 series DSP code.
(3) There are FLASH program memory up to 32KB, data / program RAM up to 1.5KB, 544-word dual-port RAM (DARAM) and 2KB single-port RAM (SARAM).
(4) Two event manager modules EVA and EVB, each including two 16-bit general-purpose timers and eight 16-bit pulse width modulation ((PWM) channels.
(5) Extensible external memory total 192K word space: 64K word program memory space, 4K word data memory space and 64K word I / 0 addressing space.
(6) Watchdog timer module (WDT).
(7) The minimum conversion time of the 10-bit A / D converter is 500ns, and two event managers can be selected to trigger two 8-channel input A / D converters or a 16-channel input A / D converter.
(8) Controller area network (CAN) 2.0B module.
(9) Serial communication interface (SCI) module.
(10) 16-bit serial peripheral (SPI) interface module.
(11) Clock generator based on phase-locked loop.
(12) Up to 40 general-purpose input / output pins (GPIO) that can be individually programmed or multiplexed.
(13) Five external interrupts (two electrode drive protection, reset and two maskable interrupts).
(14) Power management includes three low-power modes, which can independently turn peripheral devices into low-power modes.
(15) With encryption function, the key length is 64 bits.
System hardware structure
The overall structure of the system is shown in Figure 1. The entire system can be divided into an ECG signal acquisition part and a signal processing part. The signal processing part uses TMS320LF2407A as the processor, which expands the external memory, liquid crystal display, buttons and serial communication interface.
The power supply is the first condition for the system to work. The system uses two voltages of 5V and 3.3V. The input power supply voltage of the system is 5V DC, so it needs to be converted. The system uses AMS1117-3.3 for 5V ~ 3.3V voltage conversion, and the light-emitting diode D3 is the power supply. Indicator light. The circuit of the power supply is shown in Figure 2:
The electrocardiogram (ECG) acquisition circuit collects the electrocardiogram signal through the sensor, and then sends the collected analog signal to the 10-bit A / D input terminal integrated in the TMS320LF2407A for A / D conversion. A 16-channel input is triggered by two event managers The way of A / D converter to improve the conversion accuracy to accurately collect weak ECG signals.
TMS320LF2407A integrates 1.5K RAM and 32K FLASH internally. The capacity of 32K FLASH is basically enough, and the internal RAM storage space is too small. Data memory (RAM) and external program memory (RAM) are chip-selected with PS and DS signals of TMS320LF2407A, respectively. The RAM memory used in this system is two pieces of IS61LV6416-10T, and its storage capacity is 64K 16 bits. The data access time is 10ns, which can meet the needs of high-speed operation. The working voltage is 3.3V, which is consistent with the DSP working voltage, and no level conversion circuit is needed.
The liquid crystal display module is used to display the electrocardiogram, so that the user can visually observe the electrocardiogram without a PC. The electrocardiogram can also be connected to the PC through the serial port and displayed by the PC. When not used to display the electrocardiogram, the LCD can display the system status and other information. This LCD module contains SED1335 controller with a resolution of 128 128. The module is characterized by low power consumption and strong anti-interference ability. The module integrates a liquid crystal display controller, driver, RAM, ROM and LCD display. Send the corresponding commands and data to the module to display the required information. Simple interface with DSP, easy to use and flexible.
TMS320LF2407A is 3.3V power supply, and the liquid crystal module is 5V power supply, so they must be connected through a level conversion circuit. This system uses SN74LV16345A to achieve level matching.
The interface between TMS320LF2407A and LCD module is shown in Figure 3.
TMS320LF2407A integrates a full-duplex asynchronous serial port, which can realize the communication between ECG module and PC or other devices. But RS232 level and TTL level are not compatible, we use a level conversion chip MAX232, which uses + 5V single power supply, simple circuit, easy to use.
In order to facilitate the setting, the system also adds a key module, the user can control some functions of the system, such as starting and stopping, by pressing the key.
software design
Understanding and analyzing the characteristics of ECG is the basis for studying the detection of ECG signals. For the characteristics of ECG in different frequency bands, it is an important task of software design to design detection algorithms for the corresponding frequency bands.
The electrocardiogram is composed of a series of wave groups, and each wave group represents each cardiac cycle. A wave group includes P wave, QRS wave group, T wave and U wave. Studies have shown that the main bands of ECG are QRS wave, R wave and P wave band. Heart rate variability (HVR) analysis is currently receiving widespread attention in clinical research and is the main method for analyzing abnormal ECG. The object of heart rate variability analysis is the RR interval of the ECG waveform. When the system samples the data, it locates the R wave of the waveform, finds the position of the R wave, and calculates the RR interval between adjacent R waves storage. The task of the system software is to filter the collected ECG signals, then analyze the heart rate variability, calculate the RR interval, and finally display the final ECG on the LCD screen. The flow of the software is shown in Figure 4.
After debugging all the programs, use the FLASH program of the emulator to download the target code to the FLASH of the TMS320LF2407A through the JTAG port to realize the independent operation of the entire system.
Conclusion
This paper designs an ECG monitoring system using TMS320LF2407A DSP as the signal processor. This system integrates the collection, analysis and display of ECG signals, and the system is small, low cost, easy to carry, and practical.
Featuring level VI energy efficiency and meet international safety standards, the external ac to dc Power Adapter accepts universal AC input voltage ranging from 100V to 240V and provides 3 years warranty. These wall plug series power adapters includes safety protections for over voltage, over current and short circuit.
5V Dc Adapter,Travel Plug Adapter,Ul Power Adapter,Wall Plug Power Supply,Adapter 230V 24V
Shenzhenshi Zhenhuan Electronic Co Ltd , https://www.szzhpower.com