Вы находитесь на странице: 1из 4

1/29/2018 DIY EKG – How to Build an Electrocardiogram | DIY Hacking

DIY EKG – How to Build an Electrocardiogram


By Robin Mitchell

The eld of medicine has been radically changed thanks to the e orts of scientists and engineers. Scientists help to make new discoveries and
develop new cures while engineers turn those discoveries into action. In this DIY Hacking project, we will build an EKG machine (also known as
an ECG or electrocardiogram machine) that detects heartbeats which can be helpful in medical diagnosis.

WARNING! – THIS DEVICE IS CONNECTED ACROSS THE CHEST THAT CAN POTENTIALLY CAUSE HARM AND/OR DEATH UNDER FAULT
CONDITIONS. This circuit should only be operated and built by those who are con dent in the functionality of circuits and know what they are
doing.

Required Materials  
100R Resistor (R2, R3, R4)
2.2K Resistor (R5)
10K Resistor (R7)
100K Resistor (R1)
10K Potentiometer (RV3, RV1)
100K Potentiometer (RV2)
100nF Capacitor (C2, C4, C6, C7, C8)
100uF Capacitor (C1, C3, C5)
Diode 1N4148 (D1, D2, D3, D4, D5, D7)
Diode 1N5817 (D6)
LED (D8)
AD620 Instrumentation Ampli er (U1)
LM358 (U2, U4)
7805 5V Regulator (U3)
3 Muscle electrodes

https://diyhacking.com/diy-ecg-build-electrocardiogram/ 1/6
1/29/2018 DIY EKG – How to Build an Electrocardiogram | DIY Hacking

DIY EKG Schematic

How Does it Work?


The human heart is a muscle like most others in the human body. Upon receiving an electrical impulse, it will tense up and then relax once that
electrical signal is removed. However, unlike most muscles in the human body which rely on nerves from the brain for control signals, the heart
contains its own electrical system for controlling the pumping action. When the heart beats, it generates a potential di erence which is large
enough to be detected by electronics and this is what our circuit detects.

The various heartbeat stages – Image Courtesy Wikipedia

https://diyhacking.com/diy-ecg-build-electrocardiogram/ 2/6
1/29/2018 DIY EKG – How to Build an Electrocardiogram | DIY Hacking

Simply connecting a pair of electrodes across the chest and measuring the di erence is not an ideal way for measuring this potential di erence.
While the signal can be detected, it is commonly superimposed on 60Hz noise thanks to the electrical grid distribution so this needs to be
reduced as much as possible. One method for doing this is to use three electrodes instead of two with the third electrode being connected to
the left leg and then being connected to the ground plane on our circuit. The second electrode, CHEST1, is then connected to the right side of
the chest, and the last electrode, CHEST2, is connected to the left side of the chest. By doing this, we ground most of the body and make the
60Hz signal common to everywhere.

So, with a lot of the noise removed, it’s time to detect our heartbeat! The rst stage in our circuit is a series resistor and two reversed biased
diodes. These parts are there for safety with the resistor acting as a current limiter while the diodes conduct during high voltage spikes and
mitigate electric shock against the user. The next stage is the instrumentation ampli er (U1) which takes these two tiny voltages and ampli es
them. The amount of ampli cation depends on the value of RV3 but is it advised that RV3 is con gured as to provide a resistance of 2.2KΩ
across pins 1 and 8. The ampli ed signal is then added to an o set voltage of 100mV (potential divider formed by R1 and R5), to provide a small
DC o set which improves the LM358 signal detection. This signal is then ampli ed by U2A which is an adjustable gain ampli er whose gain is
controlled by RV1.

This signal will still contain some 60Hz noise and this is further removed by R3 and C1 which form a low pass lter. This lter will pass the
heartbeat signals very well but not the hum from the mains and so this lter produces a very clean signal. This heartbeat signal is then passed
into a comparator (U4A) and a bu er (U4B). The comparator is set to trigger upon a heartbeat which blinks the LED while U4B is used to view
the signal on a computer or other circuit (such as an oscilloscope).

Construction
This circuit can be built using most (if not all) construction techniques such as PCBs, stripboard, matrix board, and even solderless breadboards.
The project here was mounted on a wooden base with some connectors to demonstrate the nal circuit board. However, if this was to be used
on a regular basis then this circuit would be better mounted in a proper enclosure with exterior connectors. All les needed to produce this
project are included as a project zip and include CNC G-Code with auto leveling.

The PCB in all its glory!

https://diyhacking.com/diy-ecg-build-electrocardiogram/ 3/6
1/29/2018 DIY EKG – How to Build an Electrocardiogram | DIY Hacking

The electrodes

The EKG Pack

Using an EKG
First, and most important, POWER THIS CIRCUIT WITH A BATTERY. There are two reasons for this, one being safety, and the other being noise.
A battery (such as a 9V) is very unlikely to cause harm due to the small voltage produced which if placed across the chest would not be able to
cause issues (however please do not try this). The second reason is to prevent noise from mains power supplies entering the circuit. In this
circuit, we are trying to get rid of as much noise as possible, so the last thing we want to do is inject more noise than we already have!

As stated before, you will need to take the three electrodes and place one onto your left leg (thigh if possible), left of the chest, and right of the
chest all horizontal to your heart. The left chest electrode connects to CHEST2, and the right electrode connects to CHEST1. Using an
oscilloscope, you should probe the output of the instrumentation ampli er to con rm the small heartbeat signal which should be anywhere
between 10mV and 5V (yes, the output really can be that much depending on the value of RV3). Adjust RV3 until you get an obvious signal and
make sure not to saturate the next ampli er (U2A). At this point, adjust U2A so that a clean signal appears on C1 (the low-pass lter). Finally,
you can adjust RV2 until you see the LED blink with your heart and if you are lucky, it will pulse on both beats (remember, your heart beats
twice per beat). If you have issues getting a signal you may need to swap your chest electrodes around as a negative voltage could be generated
instead of a positive one.  

https://diyhacking.com/diy-ecg-build-electrocardiogram/ 4/6

Вам также может понравиться