资讯 :: 相关学科

How to build your own heart monitoring device, a simple ECG?

simple ECG

I haven’t been writing for some time and I am sorry for it. During the summer I got a three week scholarship in Germany! I had a great time there, btw. I would like to greet those people now! Finally the exams are over and I wanted to share one of my projects with you. Lately Biomedical engineering is getting more and more popular, the emerging technologies made this field change rapidly. So I gave it a try, why not?

This article should teach you how to build a simple heart monitoring device, ECG/EKG (electrocardiograph). In the United States and Worldwide million’s of people are losing their life because of heart failure. It is a disease that comes with diabetes, stress and etc. Before I continue to explain what I did, I would like to WARN you! 500mA (miliAmps) on 220V will completely destroy your nervous system (so run it from battery supply), check everything twice and you are responsible for it on you own. OK! I think I can continue. There was a student job which I wanted in the Biomedical field, so to make my CV look even better I wanted to have something from this field so I built an ECG. First what I did was I went to google.com and looked for similar projects and I found a great number of similar projects. Some were for logging data of heart disease patients, some were for some futuristic health monitoring devices and some were just for fun, as mine.

Let’s start with the definition what ECG is all about (taken from Introduction to Medical Electronics Application by D. Jennings, A. Flint, BCH Turton, LDM Nokes):

“The human heart can be considered as a large muscle whose beating is simply muscular contraction. Therefore contractions of the heart cause a potential to be developed. The measurement of the potential produced by cardiac muscle is called electrocardiology.

The depolarising field in the heart is a vector which alters its direction and magnitude through the cardiac cycle. The placement of the electrodes on the surface of a patient determines the view which will be obtained of that vector as a function of time. The most commonly used electrode placement scheme is shown in Figure 1. Here the differential potential is measured between the right and left arm, between the right arm and the left leg and between left arm and left leg. These three measurements are referred to as leads I, II, III respectively. This measurement lead placement was developed by Einthoven who stated that through measurement of lead I and lead II the signal seen at lead III could be calculated. This is the most basic form of ECG lead placement: from this the various features of the heart’s depolarisation can be calculated. Clinically there is a range of lead placement schemes which incorporate limb leads and chest leads.

3 Lead ECG

Figure 1.

Therefore the ECG waveform shows the clinician the electrical waveforms associated with the contraction of the atria and ventricles. From an ECG a clinician may determine the relative timing of the contractions of the atria and the ventricles and assess the relative amplitude of the atrial and ventricular depolarisation and repolarisation. This information may allow the identification of mild heart block. Following a heart attack a patient’s ECG shows changes as the timing and shape of the waveform are dependent on the transmission of the waveform through the muscle tissue. This changes with ischaemic muscle damage associated with heart attacks.”

Figure 2., connection diagram

Figure 2., connection diagram

After a little introduction into ECG we will move on to the electronic description. The simplest way to explain how it works is to make a block diagram! The signal from the body is being amplified(the signals from the body are small and weak, ranging from 0.5 mV to 5.0 mV), filtered (to remove the noise), sampled (by sampling I mean it goes to an Analog to Digital converter aka ADC) and then sent to your computer through RS232 (wireless or any other way but RS232 was chosen because it is the simplest and fastest to make). The first two steps are shown in Figure 3.

Figure 3., ECG Chain

Figure 3., ECG Chain

The amplifiers we use in biomedical engineering, data acquisition or where the signal of interest is represented by a small voltage fluctuation superimposed on a voltage offset are called Instrumentation amplifiers. Instrumentation amplifiers have a high CMRR(Common Mode Rejection Ratio) which means they have the ability of a differential amplifier to not pass (reject) the portion of the signal common to both the + and – inputs. The famous producers of Instrumentation amplifiers are Texas Instruments and Analog Devices. I used the amplifiers from the second company, Analog Devices. The AD620, instrumentation amplifier, and OP97, a high precision operational amplifier. As they require negative voltage supply I generated it with the Linear LTC1044, switched capacitor voltage converter, Figure 4. The supplied voltage was 5V. The schematic is shown on Figure 5, and it was taken from this datasheet where it is explained in more details.

Figure 4., LTC1044, negative voltage generator

Figure 4., LTC1044, negative voltage generator

Figure 4., ECG Schematic

Figure 5., ECG Schematic (click on it for a larger version)

The noise comes from muscle contractions, power line interference 50-60 Hz, electrode contact noise, noise from other electronic devices and etc. The filter for the ECG application should be a notch filter(high-pass and low-pass filter). It should filter in the range from 0.5 Hz to 50 Hz. I created a simple RC highpass and lowpass filter, in series connected (just two capacitors and resistors).

Figure 5., ECG signal

Figure 6., ECG Signal

The ADC I used was an internal ADC from an Atmel MCU, ATMega8. The code is here:

.include "m8def.inc"


.def temp = r16

.equ CLOCK = 4000000    ; define frequency speed

.equ BAUD = 9600    ; define baud rate of sending data

.equ UBRRVAL = CLOCK/(BAUD*16)-1




ldi r16, 0b00100000    ; configure the ADC

out ADMUX, r16


ldi r17, 0b10000111

out ADCSRA, r17


; Stackpointer initialisation

ldi temp, LOW(RAMEND)

out SPL, temp

ldi temp, HIGH(RAMEND)

out SPH, temp


; Baudrate configuration

ldi temp, LOW(UBRRVAL)

out UBRRL, temp

ldi temp, HIGH(UBRRVAL)

out UBRRH, temp


; Frame-Format: 8 Bit

ldi temp, (1<<

out UCSRC, temp


sbi UCSRB,TXEN    ; TX activate



ldi r18, 0b00100000

out ADMUX, r18


ldi r19, 0b11000111

out ADCSRA, r19



in r24, ADCSRA    ; check if ADC done

sbrc r24, 6

rjmp loop


in temp, ADCH    ; fill the converted ADC value to temp

rcall serout    ; send ADC value to RS232(to computer)


rjmp ADC





rjmp serout

out UDR, temp


The results can be seen on the following pictures. I used LABView to see the ECG of my heart. I would like to mention the blog from my friend, Rich Hoeg, eContent. I hope you like it. :)


Figure 7., ECG Results in LABView (click on the picture for a larger version)

Figure 8., ECG Results in LABView (click on the picture for a larger version)

Figure 8., ECG Results in LABView (click on the picture for a larger version)

Figure 9., that's me with the electrodes (the image on the t-shirt is the logo of the Bosnian Basketball Association)

Figure 9., that’s me with the electrodes (the image on the t-shirt is the logo of the Bosnian Basketball Association)

Figure 10., the ECG board that I created myself

Figure 10., the ECG board that I created myself, front (click for a larger version)

Figure 11., the ECG board that I created myself, back

Figure 11., the ECG board that I created myself, back (click for a larger version)

<< Cardio View-1200运动平板心电图 12-Lead ECG Transmission for STEMI Management >>

  • 文章地址: http://www.fjecg.cn/modules/article/view.article.php?c3/13
  • 跟踪地址: http://www.fjecg.cn/modules/article/trackback.php?13
API: 工具箱 短消息 Email PDF 书签 打印 | RSS | RDF | ATOM
Copyright© webmaster & 福建心电学网

发表者 树状展开
发表日期: 02月01日 10:55  更新: 02月01日 10:55
注册日期: 02月01日
发表总数: 46
 french shoes
nations about the globe as well as other created nations using the precise similar economies. cheap louboutins faith shoes outlet Rather louboutin pump , the main cause seems to become increasing unit rates. alexander mcqueen website red heels shoes To put it differently gianmarco lorenzi shoes , every person remedy is a lot more costly within the us suede ballet . Jordan Rau of Kaiser Wellness Information lately printed an post for an NPR Nationwide Manifeste Radio weblog about this phenomenon. According to Rau, the consolidation involving hospitals into several big chains can be a key issue. In specific markets, there's practically no competitors within the clinical business. As a result, that monopoly permits them to boost rates as much as the industry will tolerate. boots miu miu The Washington Submit makes use of details from a 10 years in the past. Well being treatment inflation has tory burch boots

发表者 树状展开
发表日期: 02月24日 14:36  更新: 02月24日 14:36
注册日期: 02月01日
发表总数: 46
 cheapest fake rolex
features.o The plan requirements ? swiss patek philippe replica watches Some USB cellphones have certain strategy requirements best imitation watches . The standard rule is generally that older tactics are not able to maintain the completely new cellular telephone methods, watches imitations but more recent notebook deals ought to offer you accessibility towards the whole variety. audemars piguet fake watches for sale o Visible appeal ?Obviously, replica concord watches the visible attraction of the VOIP phone normally performs a portion! In situation you just like the seem of your phone then you may be a whole lot additional almost certainly to create utilization of it! As becoming a race, people are shallow so of coaching this might have an effect on your choice. o Pricing tag heuer replica watches ?Some USB telephones are significantly much more highpriced than other men and women. This might perform a part within your summary whenever you transpire to become on fake rolex replica breitling watches

发表者 树状展开
发表日期: 04月13日 17:34  更新: 04月13日 17:34
注册日期: 02月01日
发表总数: 46
 replica oris
strategies per se and more emphasis on assessment of students' reading abilities and the fit between those abilities and text. I am searching for ways to affect student teachers' mindsets so that reading strategies are implemented as finding out resources, lexicon omega lexicon omega not teaching applications (Conley, 2008). Finally replica watch replica watch replica rolex watches for sale replica rolex watches for sale , I provide opportunities for student lecturers to create several text sets for use in constructivist and inquirybased ways (Walker & Bean, 2005). On the first day of class, I always ask for a raise of hands of those who plan to show English, history, math replica cartier replica cartier , science patek philippe calatrava patek philippe calatrava , art, and Tag Heuer Replica music. Students eagerly raise their hands as their subject material location is called out. When I ask who plans to show reading, replica police watches replica police watches not a hand is raised. At the end with the course, when 1 ask the question again cheap designer watches cheap designer watches , while there are always a few holdouts that daniel roth daniel roth bangle watch bangle watch


会员注册 | 找回密码
主办单位:福建省生物医学工程学会心电学技术分会 闽ICP备09053815号