ECG Machine

The electrocardiography is a technique of recording the bio-electric currents generated by the heart. The graphical display of this recording is called electrocardiogram. The acronym ECG, refers in general to both electrocardiogram and electrocardiography. Sometimes, the acronym EKG is used instead of ECG. For more than one hundred years, the ECG has been used to reveal the condition of the heart and to diagnose cardiac illnesses. This has been possible because the cardiac muscle cells generate bio-currents which can be detected inside the body or on its surface using some special electrodes. Unlike the bio-currents generated by some other muscles, the currents generated by the heart muscles are periodic, that is, they consist of a repeated sequence of characteristic waveforms which correspond to a heart beat.
This short tutorial on electrocardiography presents the basic principles underlying this medical technique. Being written by an engineer and not a physician, this introduction to electrocardiography tutorial is mainly focused on the technical aspects of the electrocardiography and provides only a brief introduction to the physiology of heart and the medical interpretation of the electrocardiography signals.
The Heart
The heart is an organ responsible for pumping the blood in the body. Through the blood, nutrients are provided to the body's cells and waste products are removed from these cells. The heart has four chambers: two upper chambers which are called atria and two lower chambers which are called ventricles. These chambers are also classified as left and right atrium and left and right ventricle, and each of them has a specific function. A schematic frontal section through the human's heart is presented in the following figure. 
The heart pumps the blood by repeated contractions of its muscles. These cardiac contractions are produced due to an electrical phenomenon called depolarization that takes place in the heart muscles' cells (myocardial cells). The myocardial cells have a negative electric resting potential. Through the depolarization, this potential goes temporarily to a positive value that stimulates them to contract. Each heart cycle consists of two phases: depolarization, which represents the myocardial stimulation and repolarization, which represents the recovery phase. Both depolarization and repolarization are electrical phenomena.
Specialized conductive fibers inside the myocardium allow the transmission of cardiac stimulus to all the myocardial cells in a specific order. The atria contract first, and then the ventricles. Under normal conditions, the cardiac stimulus originates in a point, called sinoatrial node or sinus node, located in the posterior wall of the right atrium. The property of the node's cells to fire automatically and periodically an electric stimulus is called automaticity. However, the automaticity is a property possessed by all myocardial cells. In case the senatorial node fails to fire a stimulus, other myocardial cells will initiate this stimulation automatically. 
The stimulus generated by the sinoatrial node is propagated as a wave of depolarization and stimulates both atria. The depolarization wave produces a current wave of atrial contraction, which is called the P wave, as presented in the following figure. After a puse of about 1/10 of a second, the atrial depolarization wave reaches the atrioventricular node, which is situated between the two sets of chambers. The electrical stimulus passes then from the atrioventricular node through the bundle of His to the atrioventricular bundle branches, and the Purkinje fibers, which initiate the ventricular depolarization. 
The ventricular depolarization is represented graphically on the electrocardiogram by an abrupt waveform called QRS complex, as presented in the following figure. During the ventricular depolarization, the right and 
left ventricles contracts and pump the blood they contain. The QRS complex consists of three distinctive waves: Q, R and S. After the QRS complex, there is a pause, called ST segment. During the ventricular repolarization, which is represented by the T wave, the heart cells regain the negative polarization.
The sinoatrial node stimulates the heart at a rate of 60-80 beats per minute. If the sinoatrial node fails to fire an impulse, other cells from atria can do that instead. If this does not happen, then the artioventricular node can fire impulses at a rate of about 40-60 times per minute. Further, if no excitation occurs from the previous sources, the ventricular cells can fire a depolarization at a rate of about 20-40 times per minute.