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): 

Remove these adsRemove these ads by Signing Up
The key-sentence for the impatient reader is "(it can) be utilized to create any waveform that you might see in a book or on the Internet".

Great work regarding electronics, programming, mechanics and documentation.
Thanks, I really enjoyed it.
fvgm6 months ago
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 "resistor-ladder" 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.
jopiek fvgm4 days ago

RL should be LL I think.

sleeping1 year ago
Excellent instructable, very nice and complete. Any future additions, like arrhythmias?
lynchzilla (author)  sleeping1 year ago
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?
lynchzilla (author)  thematthatter1 year ago
Matt, thank you for catching that, The following link works (today at least).

I updated the Instructable with the new link.
Cheers, Jim

Get More Out of Instructables

Already have an Account?


PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!