This instructable describes in detail the steps required to create an Arduino-based ECG simulator. An ECG simulator replicates the cardiac waveform that can be measured by attaching three electrodes (RA, LA, RL) to the patient's chest. This ECG signal is only a few millivolts in amplitude. The finished project is shown in the first photograph below.

The project was built using an Adafruit Menta kit plus a few additional parts. The Menta kit includes a Arduino ATMega328P microprocessor with 32K of Flash memory and 2K of RAM memory plus an Altoids-type metal case which has enough room to fit a small numeric display, a potentiometer to adjust the heart rate, and three banana receptacles for the patient leads.

The waveform was created by first doing a screen capture of a suitable waveform image from the Internet. This picture file was then digitized using the open source Engauge program from Sourceforge. The resulting text file was further processed by a custom Python program that used linear interpolation to space the samples 1.0 millisecond apart followed by formatting the digitized table into a C Language array construct that could be pasted into the Arduino sketch.

To output an analog waveform on the Arduino Menta, an inexpensive Microchip 12-bit digital-to-analog converter was soldered to the Menta prototyping area. A simple resistive voltage divider was employed to attenuate the D/A signal to the required millivolt levels.

The resulting signal from the Adafruit Menta was then connected to a Texas Instruments ADS1293EVM Evaluation Module which itself demonstrates the operation of their ADS1293 ECG front-end chip (a single integrated circuit that implements all the signal processing normally found in the front end of an ECG heart monitor).

The TI software that shipped with the Demonstration Kit was used to display the incoming ECG signal from the ECG simulator which agreed closely with the shape and amplitude of the ECG waveform captured from the Internet document.

While this project was directed solely at generating an ECG signal, the methodology could be used to create just about any waveform you can draw or extract from a document!

The project also shows just how useful the Adafruit Menta kit can be when used as a starting point for a custom, one-off embedded micro-controller design. I needed an ECG simulator and was able to build it for about $60 in parts.

If you would like to view the full tutorial (pdf) of the project, which goes into much more detail about the techniques and procedures used to replicate the ECG waveform, click on this link:


This will bring up the summary GitHub repository (second figure above) which has only the detailed tutorial (pdf) and the Arduino sketch (ino). Just click on the ZIP button to download these two files (about 136 megabytes).

If you would like to have everything about the project including the Libra Office document and all drawings, click on the following link (about 242 megabytes):


Step 1: Background

Twenty six years ago, I was in charge of of software development for the world's first color heart monitor, the Mennen Medical Horizon 2000. The CRT display for this instrument was the first to make use of color for alarm conditions, alerts, and so forth.

The Horizon 2000 patient monitor had two Motorola 68000 microprocessor circuit boards, one for signal collection and one for the
graphics display and soft-menu system. I wrote the software for the signal collection board and my astute and industrious office mate, Linda, wrote the software for the board supporting the menus and displays. In a design feature rarely seen today, the 68000 boards communicated via a shared, arbitrated dual-port RAM memory.

While developing software for the heart monitor, one indispensable tool I used was a “ECG simulator”. This was a device that created a reasonable facsimile of an ECG signal (that waveform you see on all medical shows). These units were usually battery-powered and the heart monitor's ECG leads were connected to the simulator rather than a patient (or yourself).

These ECG simulators can be bought on Ebay for a couple hundred dollars. An ECG simulator can be very sophisticated, displaying not only the standard “normal sinus rhythm ECG” but the abnormal waveforms as well (arrhythmia,
tachycardia, and so forth).
The key-sentence for the impatient reader is &quot;(it can) be utilized to create any waveform that you might see in a book or on the Internet&quot;. <br> <br>Great work regarding electronics, programming, mechanics and documentation. <br>Thanks, I really enjoyed it.
<p>Hi ; I want to program ads1293 with lpc1768 ; please help me</p>
<p>Nice project, Thanks</p><p>If you are looking for circuit ideas, I found many fine projects on</p><p><a href="http://artic-instruments.webs.com/" rel="nofollow">http://artic-instruments.webs.com/</a></p><p>John</p>
<p>very good</p>
Hi Jim, thanks for sharing this project. I'm from Brazil and i'm currently making a similar one, using PIC16F microcontroller and R-2R &quot;resistor-ladder&quot; DAC, instead of a commercial DAC. But i have a question: the commercially avaliable ECG monitors with 3-lead cable normally have : RA + LA + LL (instead of RL tied to ground in your schematics). It's correct ? Where should i hook the RL lead? Can you help me? Should i tie to ground too? Thanks.
<p>RL should be LL I think.</p>
Excellent instructable, very nice and complete. Any future additions, like arrhythmias?
No immediate plans to add additional cardiac waveforms; I want to concentrate on designing and building a DIY heart monitor. Any improved version of the ECG simulator would probably require a larger case since the Altoids tin could only fit three banana jacks.
Your Army EKG download link doesn't work. Is there a spot on the AMEDD Center and School website where you got it?
Matt, thank you for catching that, The following link works (today at least). <br> <br>http://www.scribd.com/doc/6072532/ECG-Interpretation <br> <br>I updated the Instructable with the new link. <br>Cheers, Jim <br>

About This Instructable




Bio: Jim Lynch lives in Grand Island, New York and is a software developer for Control Techniques, a subsidiary of Emerson Electric. He has two grown ... More »
More by lynchzilla:ECG Simulator 
Add instructable to: