This paper designs an ECG monitoring system based on TI's TMS320LF2407A DSP. This system is small in size, low in cost and practical.
TMS320LF2407A DSP Introduction
An important part of the ECG monitoring system is the processing of ECG signals, so it is important to choose a suitable signal processor. The most successful DSP chips are the TI products in the United States. The three major DSP platforms, TMS320C2000, TMS320C5000 and TMS320C6000, have become the most influential DSP chips in the world.
This system uses TMS320LF2407A as the signal processor and core controller. The TMS320LF2407A is a new high-performance 16-bit fixed-point digital signal processor from TI, and is a new member of the TMS320C2000 series. Designed for digital control, it combines DSP's high-speed signal processing capability with optimized peripheral circuitry for control. It is a true single-chip controller and is widely used in digital control systems.
The TMS320LF2407A DSP has the following features:
(1) Using high-performance static CMOS technology, the supply voltage is reduced to 3.3V, reducing the power consumption of the controller; 40MIPS execution speed shortens the instruction cycle to 25ns, thus 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 up to 32KB of FLASH program memory on the chip, up to 1.5KB of data/program RAM, 544 words of dual-port RAM (DARAM) and 2KB of single-port RAM (SARAM).
(4) Two event manager modules EVA and EVB, each consisting of two 16-bit general purpose timers and eight 16-bit pulse width modulation (PWM) channels.
(5) Scalable external memory for a total of 192K word space: 64K words of program memory space, 4K words of data memory space and 64K words of I / 0 addressing space.
(6) Watchdog Timer Module (WDT).
(7) The 10-bit A/D converter has a minimum conversion time of 500 ns. Two event managers can be used to trigger two 8-channel input A/D converters or one 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) A clock generator based on a phase locked loop.
(12) Up to 40 general purpose input/output pins (GPIO) that can be individually programmed or multiplexed.
(13) 5 external interrupts (two electrode drive protection, reset and two maskable interrupts).
(14) Power management includes three low-power modes that independently switch peripheral devices to low-power mode.
(15) With encryption function, the key length is 64 bits.
System hardware structure
The entire system can be divided into an ECG signal acquisition part and a signal processing part. The signal processing part uses the TMS320LF2407A as a processor, which expands the external memory, liquid crystal display, buttons and serial communication interface.
The power supply is the primary condition for system operation. The system uses 5V and 3.3V voltages. The system input power supply voltage is 5V DC, so it needs to be converted. The system uses AMS1117-3.3 for 5V "3.3V voltage conversion, and LED D3 is the power supply. Indicator light.
The electrocardiogram (ECG) acquisition circuit collects the ECG signal through the sensor and then sends the collected analog signal to the 10-bit A/D input integrated in the TMS320LF2407A for A/D conversion. Two event managers are used to trigger a 16-channel input. The A/D converter is used to improve the conversion accuracy to accurately acquire weak ECG signals.
TMS320LF2407A integrates 1.5K RAM and 32K FLASH, 32K FLASH capacity is basically enough, and the internal RAM storage space is too small, in order to save a large amount of sampling data, the intermediate result of the operation and improve the running speed of the system, the system adds external Data memory (RAM) and external program memory (RAM) are chip-selected using the PS and DS signals of the TMS320LF2407A, respectively. The RAM memory used in this system is two IS61LV6416-10T, which has a storage capacity of 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 working voltage of DSP, 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 ECG can also be displayed by a PC via a serial port connected to a PC. When not used to display an electrocardiogram, the LCD can display system status and other information. This LCD module contains SED1335 controller with a resolution of 128 128. The module features low power consumption and strong anti-interference ability. The module integrates liquid crystal display controller, driver, RAM, ROM and LCD display. Send the appropriate 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, the liquid crystal module is powered by 5V power supply, so they should be connected by level conversion circuit. This system uses SN74LV16345A to achieve level matching.
The TMS320LF2407A integrates a full-duplex asynchronous serial port to enable communication between the ECG module and a PC or other device. However, the RS232 level and TTL level are not compatible. We use a level conversion chip MAX232, which uses a single +5V power supply. The circuit is simple and easy to use.
In order to facilitate the setting, the system also adds a button module, and the user can control some functions of the system, such as starting and stopping, by pressing a button.
software design
Understanding and analyzing the characteristics of ECG is the basis for studying the detection of ECG signals. It is an important task of software design to design the detection algorithm of the corresponding frequency band for the characteristics of ECG in different frequency bands.
An electrocardiogram is made up of a series of wave groups, each of which represents each cardiac cycle. A wave group consists of P wave, QRS wave group, T wave and U wave. Studies have shown that the main bands of ECG are in QRS wave, R wave and P band. Heart rate variability (HVR) analysis has received widespread attention in clinical research and is the primary method for analyzing ECG abnormalities. The 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 R wave position, and calculates the interval RR interval between adjacent R waves. storage. The task of the system software is to filter the collected ECG signals, then perform heart rate variability analysis, calculate the RR interval, and finally display the final ECG on the LCD screen.
After all the programs are debugged, the emulator's FLASH programming program is used 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 with TMS320LF2407A DSP as the signal processor. The system integrates the collection, analysis and display of ECG signals, and the system is small in size, low in cost, easy to carry and practical.
1KW-6KW Hybrid Inverter(with MPPT Charge)
1KW-6KW MPPT Hybrid Inverter,Solar Inverter With Mppt Charge,Hybrid Mppt Charge Solar Inverter
suzhou whaylan new energy technology co., ltd , https://www.nbwhaylan.com