This instructable shows you how to make an electrocardiograph and a heart rate monitor. It is intended to be a fun science project only. Of course, it should not serve as a medical purpose.

PLEASE NOTE : To avoid any risk of electric shock, only use battery alimentation. Electrodes are theorically isolated from the circuit by the instrumentation amplifier, but play safe. I'm not responsible for any accident that may happen. 

This is a simple design that fits on a single breadboard. You are free to experiment and to custom it for your needs.

Since it's my first Instructable and also since English is my second langage, don't hesitate to contact me if you find an error or if you want some clarifications about a section or another. I will be happy to edit my project for the better!

Step 1: List of Materials

- (1) Instrumentation amplifier INA128
- (1) Operational amplifier 741
- (1) Arduino Uno
- (1) 16x2 characters Liquid crystal display
- (1) Voltage regulator 7805
- (1) 8 ohms mini speaker
- (1) Brigth LED (I use a 10 mm one)
- (1) Diode 1N3064
- (2) 9V Batteries with connectors
-  Breadboard
-  Jump wires
Resistors :
- (2) 100 ohms, 1/4W
- (1) 470 ohms, 1/4W
- (1) 1 kiloohms, 1/4W
- (2) 10 kiloohms, 1/4W
- (2) 100 kiloohms, 1/4W
- (1) 1 Megaohms, 1/4W
Capacitors :
- (1) 10 nF
- (1) 47 nF

For the electrodes :
- About one meter of speaker wire
- Antistatic wrist strap
- Medical tape
- Aluminum paper
- (2) metallic paper clips
- Shower gel (a substitute for electrocardiogram gel)

Optional but recommended:
-Oscilloscope, for the electrocardiography part of the device
<p><a href="http://www.instructables.com/member/birdyberth/" rel="nofollow">Birdyberth</a>. Great project! Can you tell me your process to finding a heart beat. My circuit works, but when I add the electrodes the LED doesn't correspond and the oscilloscope can't read a beat.</p>
<p>Hi!! Can you tell me what is the INA128 used for? I mean, what its function in the project?</p>
<p>It's the instrumentation amplifier. The instrumentation amplifier, is an amplifier that is particularly built for measurement. This will be measuring your heart rate. The other amplifier (operational amplifier) is to amplify the signal that the heart rate is giving off. The signal is so small that it needs to be larger in order for it to be read and later displayed on the LCD.</p>
<p>what is the purpose of 10nf capacitor? why is it placed in between the output and low pass filter? does 30hz cut off frequency too big for ecg signal from the body? why not make the cut off 10 or lower which is close to heart's frequncy (1-4 hz)? Im sorry if I have a lot of question, just trying to understand the circuit before making it. :P</p>
<p>I am a student trying to learn electrical engineering. I am plugging my circuit and electrodes into the scope and I am only recieving static.Has anyone found a good place for the electrodes?</p>
<p>Hi, how are you?, I have one question about the circuit if you can help me, my questions is why you need the regulator (7805)? and what is the output of 7805?</p>
<p>hii bro, my circuit is not working.. i hope you can reply me and suggest me please..</p><p>i do everything in the tutorial but didn't work, and the lcd alsways print &lt;30 bpm.</p><p>1. i want to know where input to the ground v+ or v- ?</p><p>2. where the output?</p><p>thanks bro..</p>
<p>hii... i tried that 2 electrodes on fingers and its working(getting waveform)...but 1 problem is that it doesnt have a stable base line..what i mean is that the baseline keeps shifting up and down....so how will i calculate heart rate(i was planning to set some threshold)</p><p>and another major problem...for heart rate i am passing it through op-amp and taking output after diode..but getting 0 as soon as i feed my output to op-amp... if op-amp is not connected and output taken after the filter, than i am getting waveform.. but as soon as op-amp is connected the output goes to 0...what could cause that?? thanks in advance!</p>
<p>hii.. ı dont understand the pin connection of 7805 (voltage regulator) because circuit is complex. I used to arduino's 5V but ina128 is very heat. what is our purpose while 7805 is using ? are you writing 7805 's pin connection and ina128 4. pin ? thanks in advance...</p>
<p>Hi,</p><p>Can you tell me if i can use INA 118P?</p><p>Thanks</p><p>Regards</p>
<p>Yes I think it should work fine. Maybe you'll have to adjust the gain.</p>
<p>I have to filter the signal yet, but this is satisfactory as well :)</p>
<p>I don't see the familiar wave shape of an heart beat out there... However you seem to have put the two electrodes on the same wrist. Try putting one electrode on each wrist (one on your right and the other on your left). Also, a good ground is important, I don't know if you had grounded yourself to the circuit but you should, it really helps to get rid of the noise. If every electrode is well placed, you should be able to observe the heart signal with a small amount of noise, the filter is there to extract residual noise but the most part of the job is done by the instrumentation amplifier itself.</p>
hi<br>i have a couple of cuestions, does de code needs any modification?, what ecg model are you using for this project.
<p>My code does only very basic amplitude peak detection it's the simplest model ever. To use an ecg model for a more accurate computing, you'd need to sample the signal with an ADC, something this project isn't doing (but I'm working on something similar right now).</p>
Thank you for replying my previous comment☺️. I have another ques. <br>1) the speaker wire has polarity positive and negative. So, if i were to put 2 inputs like you (2 electrodes ) do i need to connect all the input to the positive speaker wire and the negative should be put to ground? Im confused. <br><br>2) at which pin of ina128 i should put the three inputs(including antistatic wrist strap) ? In your schematic diagram, i need to put the input probes at the Vin- and Vin+ .. So , is it the electrodes connect to Vin+ and the antistatic wrist strap connect to Vin-? Or it doesnt matter?
<p>My pleasure, don't hesitate to ask more question if something isn't clear!<br>1) speaker wire doesn't have a polarity, it's a wire, you can connect it the way you want! :) In this project I use it to connect my two electrodes to the Vin+ and Vin- inputs of the instrumentation amplifier.<br>2) The two chest electrodes go to Vin+ and Vin- and the antistatic wrist strap is connected to the ground. <strong>Vin- isn't the ground</strong></p>
And can i know, which part is the output for ecg? I mean at which part of the IA or Opamp i should insert the output cable?
<p>After the Instrumentation amplifier.</p>
Hi . Can we use jumper wire instead of speaker wire?
<p>Yes of course, if you find sufficiently long ones to connect your electrodes to. The best would be to use shielded medical cables, but it's not necessary. A good idea is to twist the two wires together to reduce the area of the loop and thus reduce electromagnetic noise.</p>
And can i know, which part is the output for ecg? I mean at which part of the IA or Opamp i should insert the output cable?
Can i use jumper wire instead of speaker wire?
<p>Hola<br>puedo usar una amplificador INA129 ??</p>
<p>Hola!</p><p>S&iacute;, puedes usar una INA129.</p>
<p>Hi birdy,</p><p>I have an issue with my circuit as it powers up correspondingly, I must mention that I followed your guide exactly, but unfortunately the LCD display does not show anything, besides the background light. I am using a 3 lead electrode that is connected to the breadboard by an audio jack input, but I added additional cables to the 2,3 pins of the INA128 and the ground electrode to the ground. Can you please tell me what I'm doing wrong ?</p><p>Thank you kindly,</p><p>Filip</p>
<p>I can't see well on the picture but first I suggest you to check your wiring to the lcd, try the example code on the arduino library, like printing hello world on the lcd or I don't remember, something like this, just to isolate the troubleshooting and make this part of the circuit working. Then for the other part maybe check points with an oscilloscope/voltmeter to see if you can get a signal? Often what is happening is that your INA saturates, try to lower the gain first, see if you can get a signal. Sometimes electrodes are not well enough in contact with your skin, try to adjust them till you get something. Good luck!</p>
<p>thanks for your replies..a bit more help..if i just want ecg waveform, i should take output before op-amp amplification or after?<br>and also can the electrode be placed elsewhere, like somewhere near hands or wrist position?would i still be able to detect signals for ecg?</p>
<p>You should take it after the instrumentation amplifier (INA128) and before the op-amp. And for the electrodes placement I don't know but I encourage you to experiment! I've seen designs that work with one electrode on each wrist. The only important thing to make this work is to have a good different signal between the two points, for example put one electrode at the left of the heart and the other at the right, or top/bottom, but the heart should be between your two electrodes in a way or another. But you won't pick up any ecg if you put your two electrodes on the same hand.</p>
Hey there! This is a GREAT project, i love it, but have you considered to make it completely alone-standing integrating a video synthetizer and a monitor?
<p>Thanks! Yes I've considered it, I'm currently working on something quite similar to this in some aspects : https://hackaday.io/project/9641-lati</p>
<p>thanks for your previous reply....another question....can a different diode be used, as in i am getting Diode 1N3064....pls help</p><p>thanks in advance!</p>
<p>Yes, any standard diode will work.</p>
<p>hi author,</p><p>can this circuit be used for EEG? please tell me what to modify...</p>
<p>Yes maybe, you should start by using only the instrumentation amplifier part and add some filters. But you would end with a mostly different circuit, with some similitudes with mine of course.</p>
<p>Hello <a href="http://www.instructables.com/member/birdyberth" rel="nofollow">birdyberth</a>, I am using exact this circuit but I am getting the attached waveform. the output waveform is taken at the node between R2(100k) and R5(100k). Any help would be appreciated.</p>
<p>Hum it's a very weird signal... Can you send me a picture of your build? It will be hard to troubleshoot though... Good luck!</p>
<p>hello berdyberth! it is an awesome work, i am trying to work on it...</p><p>i am a beginner, can u please tell why speakers are being used..??</p><p>thanks in advance</p>
<p>Hi AnkeshG, speakers are used to provide audio feedback for the circuit in addition to the visual feedback. It's just a fun way to control a speaker with your heart beats, nothing more. But it could be useful if you need the visual channel to do other tasks but still need to know approximately the heart beat by hearing it.</p>
<p>Hello, can i replace the oscilloscope with the mobile phone?? </p>
<p>Well maybe. If you have an oscilloscope app and a loose audio cable to make probes, I think it should work. You only need an audio bandwidth scope to correctly sample the signal, so an audio card should work.</p>
<p>What kind of mini speaker do you advise? There many with different characteristics and I don't know what is the best for this project. Thank you </p>
<p>I've found mine in an old toy. It's a speaker something like this one : https://www.sparkfun.com/products/10722 </p>
<p>Any chance of getting the Fritzing files?</p>
<p>Sure! It's all open source after all! Just share your modifications with the community!</p>
<p>i am a beginner , i have a doubt that how to connect to dso?</p>
<p>You put the ground probe on the ground of the circuit and the test probe after the filter (or directly after the instrumentation amplifier if you want).</p>
<p>hello your project is great, except that I have a question, which connect the oscilloscope ? I am a beginner in this. thanks for your time.</p>
<p>You put the ground probe on the ground of the circuit and the test probe after the filter (or directly after the instrumentation amplifier if you want).</p>
I am trying to make this project can you tell me about that which type of oscilloscope you used

About This Instructable