What you will learn
You will learn about electrocardiography (ECG), also known as an EKG. ECG is one of many vital signs monitored by patient monitors. By using our kit and this content you will learn how to connect patients to an electrocardiogram, set patient alarms, and identify common ECG artifacts. Of course you can choose what you want to focus on – or you can simply build the patient monitor and have fun with it.
Patient monitors, aka vital sign monitors, are used in all areas of healthcare and are important for clinicians as they monitor and diagnose patients. The role of the biomed or technician is to ensure that these devices are working properly and to repair them when something goes wrong. Patient Monitors can measure electrocardiography, blood oxygen concentration, respiratory rate, blood pressure, and other vital signs.
There are many parameters measured by patient monitors but we are going to focus on electrocardiography.
Electrocardiography (ECG), also know as an EKG, measures the electrical activity of the heart. Just like a multimeter can measure the voltage in a circuit clinicians can use a patient monitor to measure the voltage of the hearts electrical activity. However, a better analogy is to compare a patient monitor to an oscilloscope.
An oscilloscope measures the voltage between two points and plots the voltage with respect to time. In fact many of the early patient monitors were made by the same people who manufactured oscilloscope. For example Tektronix, still known for making oscilloscopes use to make patient monitors as well
In order to measure voltage of the heart electrodes (conductive pads of silver chloride) are attached to the body. These electrodes are then connected to leads, leads are electrically conductive wires with insulation. The leads are attached to a trunk cable. One end of the trunk cable is connected to the leads and the other end to the patient monitor.
ECG Trunk Cable
One of the defining symbols of the ECG is the QRS complex. You may not have known what it was called but the QRS complex has come to symbolize life, and the absence of the QRS complex as death, in many popular tv shows and movies.
However reading an ECG waveform is more nuanced than this. The waveform of the heart beat can be used in a variety of ways to diagnose clinical issues. There is a whole science devoted to reading electrocardiograms (the data taken off an ECG measurement) and nuances of the hearts electrical activity. But for our purposes or our project we only need to understand a couple key points.
First, not all heart rate waveforms have clear defined QRS complexes. Depending on how well the heart functions you can get different waveforms called hear rate arrhythmias. Two examples of heart arrhythmias are shown below
First the heart rate can be calculated by looking at the average time between QRS complexes. For example if there are 60 QRS complexes observed in 1 minute of time then the heart rate is 60 beats per minute, since each QRS complex represents a heart beat (this is a little bit of an oversimplification but is good enough for this activity). Alternatively, and more commonly, the number of heart beats are counted over a period of 20 seconds. Then the counted number is multiplied by 3 to get the number of beats that would occur over a full minute. However, this calculation can be complicated by difficult to read waveforms and noise.
When talking about electronics, artifacts are any undesired or unintended alteration in data. There are four common artifacts that occur for a patient under cardiac monitoring, which we can refer to as ECG artifacts. The four common types are: noise from patient movement, misplaced electrodes, electromagnetic interference, and dirty/loose electrodes. Common troubleshooting techniques for each artifact can be found in the troubleshooting section of your patient monitor service manual.
The following figures show examples of different ECG artifacts
Base Line Drift
The images above show examples of ECG artifacts – however the reason for these artifacts is not always clear or straightforward. Generally the issues shown can be fixed by using these troubleshooting methods:
- Check all electrodes and cables are connected properly
- Re-apply electrodes to cleaned and prepared skin
- Check for electrical interference from electrical devices (move electromagnetic source away from the patient monitor)
- Check for patient movement
- Check equipment digital filter settings
- Diagnostic: frequency range 0.05Hz ~ 150Hz
Most common setting – good for low motion low noise environments
- Ambulatory patient monitoring: frequency range 1Hz ~ 40Hz
More noise used to primarily detect the heart rate
- ST segment: cutoff frequency ~1 Hz
Low frequency response for ST segment monitoring
- Muscle, ESU noise: cutoff frequency ~ 15 Hz
Reduced higher frequency to reduce muscle noise and or the use of an electrical surgical generator
- Diagnostic: frequency range 0.05Hz ~ 150Hz
- Replace all ECG electrodes and connections (leads and trunk cable)
Building your ECG Reader
To create your PCB ECG reader you will need, the ECG Reader kit that includes
- ECG Reader PCB Board
- 1 Arduino Nano
- USB cable
- 3.5 mm female audio jack
- Two 8 Pin IC Sockets
- One 10 kOhm potentiometer
- Four 1 kOhm resistors
- One 10 kOhm resistor
- One 22 kOhm resistor
- Three 100 kOhm resistors
- Two 2.2 𝞵F capacitor
- Test Leads
To build your ECG reader you will solder the components found in your kit to the PCB Board.
The order that you solder your components is not important. You can choose to place them into the board and solder them one at a time or you can choose to solder them all at once. Your choice will depend on how you hold the board and components in place as you solder. You do not need any additional equipment i.e. helping hands to do this project but they can be useful.
Make sure you check out our videos on the HTM Workshop Youtube channel on soldering and assembly for help.
Assuming you use the 2 female header pins and 2 IC sockets you will need to place the Arduino Nano, the AD623, and the TLC 272 in the correct orientation. This is important! Failure to put these two chips in the correct orientation may cause damage and you will need to replace them.
The Arduino orientation can be seen on the PCB board – make sure the USB port of the Arduino is in the same location as the USB outline on your PCB board.
The correct orientation of the AD623 and TLC 272 is pictured here. Pay careful attention to the notch/printed dot of the IC.
In this figure the red arrows denote the chip location and orientation of the AD 623. The TLC272 name and location can also be seen in the upper left hand corner. Orientation is denoted by the notch.
Correct orientation of AD623 and TLC272 on 8 pin sockets on board
Connect your ECG Leads to your ECG Reader
Once the ECG reader is assembled you will need to put the leads into the audio jack.
Now that you have assembled your ECG Reader device you will need a way to view the ECG waveform. You can view this waveform directly using an oscilloscope but your ECG reader also comes with software that will let you read the information on a computer using the ECG Viewer software.
Now that your ECG Reader is built its time to make sure the software is ready – when you receive your kit from HTM Workshop your software is preloaded onto the Arduino. If you reset your Arduino software on accident and need the code you can reach us at firstname.lastname@example.org.
In order to view the electrocardiography signal you will need to use a computer to process, filter, and display the waveform data measured by your ECG reader. The link to the graphical user interface (GUI) for the ECG viewer will be sent to you when you purchase a kit. If you did not receive the software link email us at email@example.com. The installation instructions are shown in the video:
To you use the ECG viewer software you must extract the zip file then open the ECG viewer application (.exe file) or linux/mac version. Once the software is open you will see the ECG Viewer graphical user interface. You will not see any graphed data yet since you need to connect the ECG Reader hardware.
The next step is to connect the ECG Reader hardware to you computer via USB cable. Next select the device from the dropdown menu. Once connected to the correct communication port you should start seeing some data (even if its noise). If the ECG Reader device does not show up in the list of choices check the physical connections and make sure you have the correct driver for your Arduino Nano (Missing FTDI drivers are often a common connection issue).
Connect a Human
Once you connect your ECG Reader to the ECG Viewer software you are ready to connect yourself to the device (or whoever/whatever you are trying to measure the electrocardiogram of). The ECG leads are color coded red, black, and blue. There are many ways that you could connect your ECG electrodes to your body to read a signal. However, when beginning to acquire a signal we recommend starting with one of these configurations (see figure for locations)
- Red – LL
- Black – LA
- Blue – V or RA
Figure shows ECG lead placement locations.
Answer these questions to check your understanding of the material
- What is the BPM of a patient with 47 QRS complexes in 60 seconds? What is the BPM of a patient with 15 QRS complexes in 20 seconds?
- Describe 3 different types of ECG artifacts and describe a possible (at least one) troubleshooting method for each type.
- What electronic measuring device is similar to a patient monitor?
- What are two common and dangerous heart arrhythmia’s?
- Describe one type of digital filter used in patient monitors and why.
- You can change the alarm limits for the ECG Viewer, what are the common high and low limit values for heart rate alarms?
Tips and Troubleshooting
Common issues/mistakes include:
- If the Arduino IDE is not letting you upload code make sure you are using the correct board (nano) and bootloader for your Arduino
- If your Arduino is not showing up after hitting refresh in the ECG viewer, make sure you have the correct driver for your Ardiuno and the USB is connected properly. A common issue is that you do not have the latest FTDI driver, if so you will need to go to the FTDI website and download their driver. Alternatively the USB chipset may require a CH340 or CH341 driver – directions on how to install these drivers are found here https://learn.sparkfun.com/tutorials/how-to-install-ch340-drivers/all#windows-710
- Make sure you put the AD623 and the TL272 chips in the correct orientation
- Check for common solder issues (such as solder bridges or unsoldered loose components)
Here are some examples of ways to challenge yourself even further with this kit and activity
- What are the optimal settings in the ECG viewer for your electrocardiogram?
- Can you add another digital filter to improve the waveform for your application?
- What kind of artifacts can you generate on the ECG viewer?
Show off your achievements by sharing your ECG Reader – make sure to tag us on posts with #HTMworkshop. Also, if you successfully build your ECG simulator you can earn our digital badge! Email firstname.lastname@example.org with a picture of your ECG Reader and get awarded a digital badge that can be stored and shared.