Saturday, May 7, 2011

Based on ARM core of single realization of ECG testing module

As the clinical application of the electrocardiogram and the development of electronic technology, ECG as biomedical measurement in a more mature, more extensive technical, has gradually become a general clinical examination, and heart disease diagnosis, care, and pharmacology of played a very important role.

Current common ECG detection circuit for dual supply, this scenario requires a lot of power devices and large route, which will increase the cost of the product. This paper presents the design uses single supply, you can resolve these problems, and reduce product costs, while the design is also based on ARM core embedded system using a simple and practical algorithms that can quickly and accurately locate QRS complex wave (that is, man's heart rate). The design for the home user, small size, just need a personal computer connected to real-time operation and observation of the ECG.

ECG signal acquisition system's basic structure as shown in Figure 1.

The body of the ECG electrodes and dedicated lead wire from the human body sent to the system. By filtering and amplifying weak regulation circuit, ECG signal is amplified to a suitable value, and in A/D conversion.

Figure 1: ECG signal acquisition system infrastructure.

System control and data processing by ADI ARM7 TDMI kernel based MCU ADuC7020.

This chip has a wealth of on-chip peripheral circuits, processing speeds up 40MIPS, A/D conversion rate of up to 1MSPS, with very high performance-price ratio. Final results from the UART port ADuC7020 through to the computer, the computer through an interface by LabVIEW to write the results visually displayed or stored. Figure 2 is the basic hardware circuit diagrams.

Figure 2: basic hardware circuits.

From the human body or ECG signal generator on acquisition to the ECG signal amplitude between the 0.05 ~ 5mV (normally 2mV), frequency between the 0.05Hz ~ 75Hz.

ECG to buffered, matching resistor network, voltage amplifier and filter circuit, and several levels.

ECG first after a two-level RC low pass filter, into the buffer level.

Signal before entering the system, you need to get rid of high frequency components, so here's a cutoff frequency for 300Hz's low pass filter, to ensure 0.05 ~ 75Hz faint ECG not decay. Buffering level consists of a voltage follower components, which can enhance the entire amplifier input impedance, lower output impedance. In order to guarantee the consistency of the differential signal, should use integrated on the chip of the amplifier. Matched resistor networks typically use Wilson power Center side network that uses a specific electrical resistance network access Wilson Center side as the entire ECG system of reference point.

Filter amplifier with front-stage amplifier with differential negative feedback, use the ADI adjustable gain high common-mode rejection ratio of instrumentation amplifier AD8221 as front-stage amplifier.

The magnification is set to 8 times, by the formula k G = 49.4 Ω/R G + 1 calculated that RG is AD8221 two RG pin resistance value between.

The resistor should adopt high accuracy, low drift of metal film resistors, to ensure low noise performance AD8221.

AD8221 ref no grounding pin, which is a low-pass filter and constitute a negative feedback loop, so that we can effectively filter out the DC component, so that the voltage U1 Department are always clamped in 1.25V. Because it is a single supply, and different-lead ECG signal voltage there is a negative, so be sure to provide a suitable clamping voltage. ADuC7020 ad conversion mode voltage input range is 0-2.5V, here select intermediate values 1.25V as clamp voltage.

AD8221 output of single-ended signal amplitude is very small, mixed with a large number of interference for data processing.

After the class filter amplifier gain from a larger Active lowpass, adjustable gain. Different people is not the same as ECG signal strength, taking into account the attenuation, the gain is set to 150 times. System's transfer function is:

The two low-pass filter requires a low voltage offset, low temperature drift and low-noise characteristics, ADI's rail-to-rail input output dual operational amplifier AD8607 well meet these requirements.

As a result of the second level amplifier is RP-input, so the resulting signal is inverted, that can be made in the software.

From protecting patients and improve the system in terms of common-mode rejection ratio, common-mode signal must be reversed and zoom, and then back to the human body, so that the system and the body will comprise a voltage shunt negative feedback network, commonly referred to as the right leg drive circuit.

By ADuC7020 on the ECG for AD conversion, select the timer control in the ADC sampling mode. Once A/D conversion end interrupt trigger ADC, the interrupt service program on digital signal processing.

Handle the ECG signal lies on the ECG in the QRS complex wave of precise identification.

Normal QRS complex of width 0.06 to 0.10 seconds, and is not controlled by rhythm changes. For R-wave is very sharp features, we passed a sliding window determine signal peak and Valley meets the requirements, while acknowledging its whether time window. The signal amplitude threshold thresholding using double variable, which is set on a wave crest and trough threshold. If the peaks and valleys threshold in a reasonable time has a larger change, reset Peak threshold and Valley threshold. Here we will use the QRS complex wave positioning and arrhythmia calculation. On the start time of the signal only for RP and filter processing, this is to be inverted to recover of ECG andAvoid signal early fluctuations threshold. And then in a certain period of time, according to the sample data set Peak threshold Thpeak and Valley threshold THtrough and QRS positioning. Finally, follow the steps below (see Figure 3) for data processing.

Figure 3: the basic steps for data processing.

Read new sampling point Ni:

1) judgment sampling point of signal amplitude value is greater than Peak threshold Thpeak.

If not, go back to step 1).

2) If a condition is satisfied, the start count n = 1, and record the n value is peaktime1.

The time window starting side slip here.

3) continue to sample Ni + 1 per sampling time then n + 1.

4) judging new sampling point Ni + 1 is less than Valley threshold.

If not, go back to step 4).

5) if the sampling point is less than the threshold Thtrough, the Valley of the point of the n value is troughtime1.

6 judge both meet the amplitude of the signal point requirements at all times the difference between peaktime1 troughtime1 and whether a time window, which is less than the window width THtime.

If not less than THtime, return to step 1).

7) If true, then the signal is considered a QRS complex.

Peaktime1 is positioned as one of the R wave.

The position of the R wave, on the basis of statistical heart rate by following these steps: 1) to locate the first R-wave, and record the n value is peaktime1; 2) found the second R wave, and record the n value is peaktime2; 3) in accordance with the following formula to calculate the rhythm.

Practice has proved that with this algorithm the calculated rhythm accuracy is high, the calculation is simple, easy to implement, and eventually on PC observed ECG waveform and rhythm values.

No comments:

Post a Comment