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>hi author,</p><p>can this circuit be used for EEG? please tell me what to modify...</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>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>Hello, can i replace the oscilloscope with the mobile phone?? </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>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
<p>Pretty any oscilloscope will do. I'm using a DSO nano v2.</p>
<p>Hi! Awesome project! I think it's the best one available and trust when I say I have searched. I have been able to build out the circuit but like many, &quot;I am dead!&quot; I even have a cardiologist helping me in electrode placement, using electrode gel with real electrodes, and still dead... Now, I understand you can't answer every question because some just must be left to the &quot;engineer&quot; in all of us, but I have two issues that are rather specific and was hoping you could help me in figuring out if at all possible.<br><br>1) Diagram is followed to the T other than the fact that there's a break in my breadboard between power strips so I jump between them to make a solid power strip. The issue is my 7805 is heating up like CRAZY! i understand it should heat up a bit but it's to the point of 3rd degree burn, power coming in and out of it is at around 1.6-1.8v higher on the emitter side... Also, the 9v connected to the board by the ina128 gets super hot... Thoughts? The way you have the diagram it looks like NPN with the 7805 but you run the first post of the 7805 to the positive strip. Can you explain? ...i'm still learning.<br><br>2) Electrodes, do you have the electrode leads connecting from lead to jumper to board? or how did you find best result? I currently have a lead connected to jumper cable connected to board... Thoughts?</p><p>Last questions, wattage on the resistors, does it matter? I'm running 1/4 watt resistors the whole way through... only question would be &quot;are you using non-polar capacitors?</p><p>Thanks in advance for any and all help!! Really appreciate your instrucable, Awesome work bro!</p>
<p>Hi CarlosM87, I'm glad to see your great interest in my project, it's for people like you I'm sharing it!<br>Yes, overheating of 7805 is a common issue here, probably it's because you wired it backwards like many others. I hope you've reacted quickly by removing power before permanent damage was done to some components. The most dangerous thing for your safety here is the 9V battery short-circuit, as it may explode if the short draws too much current, I've never seen that but it can happen. So now remove the 7805 of the circuit, check if it's still working &amp; check if your battery still have some juice. If you can't get 5V out of it, you unfortunately burned it and need a replacement (we all learn that way one day or another, don't worry about it, it happens to everybody ;) Maybe I should use a 7905 in this instructable to make sure this common mistake will no more harm anybody... but when I was building this I only had 7805 on hand, so I made a little trick not so easily understandable for beginners : making a negative voltage supply with a positive voltage regulator. So, for example, if you had a 5V battery, how would you make -5V? By putting the plus lead to the circuit ground, and the minus lead would give you -5V. It's the same thing here, excepted that you're using a positive voltage regulator, so you need to use the correct polarity in the input section (+ lead of 9V goes to input+, - lead of 9V goes to &quot;GND&quot; of the regulator, but you reverse the output section <strong>without connecting the regulator ground to the circuit ground</strong>, so the regulator output goes to circuit ground, and then the regulator ground becomes -5V relative to the circuit ground, perfect for the negative supply of op-amps. Almost no current is drawn by this line, so it really shouldn't heat. Ho and also, the bottom &quot;positive&quot; strip of the breadboard is not positive at all, it's supposed to be -5V in fact, if you look at the schematic it goes only to V- of op-amps. It's not a perfect design in an engineering point of view, but I consider myself more like an hacker, so it's not beautiful but it works hahaha!</p><p>For the electrode connection, just make sure that it's holding well, i'm seeing on your picture that you're using clips to make the junction, it's probably not the best thing to do, but all that matters here is a good permanent electric connection, as even small random disconnections will certainly be picked up by the amplifier. My &quot;best result&quot; was by twisting the electrode cable to the jumper cable of the board, actually, it's not really better than your technique ;)</p><p>Yep 1/4 watt is fine everywhere, and yes I'm using non-polar capacitor, check them by the way, I think you're not using the right values for your capacitors, it looks more like 10uF than 10nF... the factor 1000 of difference will flush all the signal to the ground!</p>
<p>Thank you sooo much for your awesome response, I got it all wired up, all seems good (no batteries blowing up :) or overheating 7805s), and for some reason still i cant get any reading, i left out the speaker because it was making wife mad :) lol but I've attached another pic to show you my circuit, all seems to match, just no detection of hearbeat or anything, just a steady on LED and &quot;youre dead&quot; on the screen :( I promise i'm alive... any suggestions? The only thing I did different from the board is used 2 resistors in parallel to make the 470Ohm out of 2 1k Ohms, also, used 2 .1 uf caps to make a 500 nf cap (in series). everything else is to the T like yours following the design. (in the design btw you have the battery polarities shown backwards based on your recent response and how you said you were using NPN 7805... :) Just fyi. Anyway, again AWESOME project, just this last bit of help would be greatly appreciated. From the picture does all look well (i know it's hard to gauge based on the jumpers) but if all is well, do you think it may just be the electrodes? Is this normal performance for not having an electrode reading? Also, ground from ankle is going to ground of circuit on bottom strip right? (where the output from the 7805 goes? Thanks again and again, if you can, PM me and I would love to communicate on this further and have a few ways you can maybe help on a few other projects I have going on which would be based on this :) so again THANK YOU!!!! You're going to help many more people than you know!</p>
<p>Ok, the supply is looking good, just to be sure you can check it with a multimeter, you should get -5V between the ground (blue line) and bottom red line. Haha I reckon that the speaker dead tone is quickly annoying, I used to deconnect one of its wire when debugging ;) Yes your ground electrode is going to the circuit ground, it's blue lines and it's supposed to be connected to the reference pin of the instrumentation amp.<br>The manipulation for the 470 ohms is ok, it's only for the LED, with two 2.1kohm in parallel you'll get approx 1 kohm it's perfectly fine if you can see the LED glow. For the cap, it's still not the right value you get, two 2.1uf in series will give you 1uF and you need something more like 47 nF otherwise you'll flush all the signal to ground. Do you have access to an oscilloscope? It will make the debugging far easier for you if you could check what the signal looks like at each block of the circuit, because maybe you're getting something out of your instrumentation amp (if not, start there), and then you're attenuating it like crazy with your 1Hz low pass filter (if I remember, the low-pass filter in this circuit has a cutoff frequency of approx 35Hz to remove almost completely the 60Hz power line interference). It could be the electrodes, too. A good start if you don't have an oscilloscope is to check the output voltage of the instrumentation amp with a multimeter, if it's saturating to ~5V or ~-5V, then one or two electrode is not well connected. If I remember well, the correct signal should oscillate between -500mV and 500mV there. And yes maybe the picture is inducing people wrong, you should use the schematic and not the breadboard version, I don't know why but in fritzing the pinout of the 7805 was not the same than common 1A versions you're using... it's a bit confusing I know, maybe it's time to edit this ;)</p>
Guess what?!?! Right after i sent last message, I GOT IT!!! Works perfect! Just need to actually solder it out because it seems the electrode connections are very very finicky. Also, the craziest thing happened, i honestly didn't even know i had it because i disconnected the speakers, but by accident, even testing with the oscillator between the two 100k resistors, i ground out the oscillator on the actual resistor leg that is going to ground. As soon as i did that, i was getting a perfect signal on the oscillator. In fact, enough for a cardiologist to see p, r waves and qrs pattern :) Only thing is that the led doesn't seem to flash, but I'm sure it's finicky connections, once soldered it should be perfect! And yes, please get in touch, you'll be amazed as to how this project is impacting a bigger cause on my end. Send an email out to carlosjm0325(@)gmail and I'll respond so we can chat and get a few other projects underway :) thanks so much again for your great contribution :)
<p>Hello <a href="http://www.instructables.com/member/birdyberth/" rel="nofollow">birdyberth</a>! Congratulation fantastic project!</p><p>But I have a problem...my project detects only the first beat immediately after printing &quot;&lt;30 you're dead&quot;. I copied the same as both the code and all cables: what may depend? (I have, however, a screen with i2c) </p><p>sorry for my english XD</p>
<p>Are you getting a pulse? The LED is supposed to flash at each pulse. If it is not the case, check your circuit connections, especially the connections of your electrodes. If you have an oscilloscope, use it to see what is going on.</p>
<p>Thanks for response birdyberth! Connections appear correct, but it seems that the electrodes are the problem because they do not send any signal (I have done as you did and how it was explained here: &quot;http://www.instructables.com/id/How-to-make -ECG-pads-conductive-gel / &quot; but I can not get anything. the light is always on, LCD always print &quot;&lt;30&quot; and sound of minispeaker is ongoing. The only difference is that I use the LCD with I2C and then use the battery connected to the jack and not to 5v Arduino. may depend on what?</p><p>Thanks in advance you're very kind!</p>
<p>Hi, I'm building this project for my final in my robotics class. I can get my LCD to print &lt;30 you're dead and the speaker to make the flat tone, but I can't seem to have the electrodes translate any signal into the circuit, and I'm using real ECG electrode pads. I did remove the LED since it wasn't lighting up and everything else still works. </p><p>Any tips?</p><p>responding ASAP would be preferable since my project is due in like 3 days</p>
<p>Lol &quot;my project is due in 3 days&quot; you have a great sense of humor since you're copying all my work for your final. Your project huh? I hope it will receive a good grade! And most of all you want me to respond ASAP! Hahaha! Open source does not mean it's ok to plagiarize. Maybe a bit of reading of the current licence of this project can help you : https://creativecommons.org/licenses/by-sa/4.0/</p>
<p>I have same problem! Do you have solve?</p>
<p>I don't!</p><p>Somebody please please help us!</p>
<p>Hı,</p><p>I trıed to use your code and cırcuıt schematıc ın my project. but ıt dıdn't work. I tested components as well everythıng ıs fıne. the problem ıs ıt ıs always showıng below 30 bpm, and LED ıs not blınkınd ıt ıs alwyas on, and on the LCD ıt ıs always showıng &quot;dead&quot;. I cannot fıgure out the problem.can you please gıve me any ıdeas ?? Thank you, apprecıate ıt !</p>
<p>It's because you are dead! Seriously, check the electrodes connections, it's a bit tricky to make them pick up the faint heart signal.</p>
<p>I have same problem! Do you have solve?</p>
<p>Bonjour <a href="http://www.instructables.com/member/birdyberth/" rel="nofollow">birdyberth</a> merci pour cet tuto,</p><p>j'ai une question pour la masse de circuit: est ce que toutes les masses du circuit sont reli&eacute;es &agrave; l'&eacute;lectrode de r&eacute;f&eacute;rence ou seulement la masse de l'amplificateur qui reli&eacute;e &agrave; l'electrode??</p>
<p>(translation for others:)</p><p>&quot;I have a question about the circuit grounding: are all the grounds connected to the reference electrode, or just the amplifier ground?&quot;</p>
<p>(translation for others:)</p><p>Yes, all the grounds are connected to the reference electrode. You could add a virtual ground between the circuit and the reference electrode if you like, but I've not tested this.</p>
<p>Oui, toutes les masses sont reli&eacute;es ensemble! L'&eacute;lectrode de r&eacute;f&eacute;rence est reli&eacute;e &agrave; la masse g&eacute;n&eacute;rale du circuit. Mais si tu veux vraiment &ecirc;tre puriste tu peux rajouter un circuit de &quot;virtual ground&quot; entre les masses du circuit et l'&eacute;lectrode de r&eacute;f&eacute;rence, &ccedil;a peut peut-&ecirc;tre am&eacute;liorer un peu les performances, je ne l'ai pas essay&eacute;.</p>
<p>Hi. thanks you tuto is good, i have a doubt the 741 is used as virtual ground? and I don't understand diode use.</p>
<p>No, the 741 is used as a comparator. The diode is a protection for the Arduino input pin, preventing the voltage to drop below ground.</p>
Hi birdyberth, <br><p><br>Could you explain how the Arduino is able to read continuous data such as heart rate through the digital pin even though it's more of an analog signal? <br><br>ie. I thought that any data input through the digital pin will either be high/low (on/off) - how are you able to display the ECG wave through the digital pin rather than the analog?<br><br>Kind Regards,<br>footballfanatic</p>
<p>I'm not able to display the ECG wave with the arduino, for this task I'm using an external oscilloscope. You are right, the digital pin samples only high and low states. In my circuit, I'm generating a transition from low to high at each heart pulse. The arduino then measures the time between those pulses and computes the frequency of the heart beat.</p>
<p>Merci birdyberth pour cet tuto, svp est ce que je peux changer l'INA128 par l'AD620?</p>
<p>Probablement. Cependant, il va peut-&ecirc;tre falloir que vous ajustiez la r&eacute;sistance du gain pour obtenir un bon r&eacute;sultat.</p>
<p>I dont have an oscilloscope, can I use a programs that simulate oscilloscope on mine PC and still have a real time communication between them two?</p>
<p>Yes, because my project works at a low frequency you can easily sample the signal with the sound card of your computer. I'm sure you can find a lot of tutorials on how to do this on the internets. </p>
<p>Hi, I would like to know, what is the purpose of using another OpAmp 741?</p><p>Also, can I use OpAmp INA126 instead of using INA128?</p>
<p>Hi, you can use the INA126 instead, just adjust the gain resistor to have something similar to my values. The 741 is used as a simple comparator to find the peak of the heartbeat and output a near 5V pulse to the arduino wich acts like a frequency meter.</p>
<p>Hi, I have few enquiries:</p><p>(1) I've assembled the circuit, instead of using a oscilloscope to view the waveform, I have connected a digital-millimeter at the filter area. Now, when I remove(disconnect) the digital-millimeter, the LCD Screen will show &lt;30bps, LED stopped blinking and speaker sounding a 'dead' pulse. My friend create another identical circuit and encountered same issue as mine. The only components that we uses different from yours is the diode (1N4001). I read your earlier post, diode should not post any problem.</p><p>(2) I've to convert my Arduino codes to Atmel Studio because I'm using a Atmel Development Board, do u have any codes that can run in Atmel Studio? Or do you have any website/guides that can help me?</p>
<p>Is it working when the DMM is connected to the circuit? If you reset after your manipulations (i.e. unplug the batteries and replug them) does it restart to work? Maybe try to add a high value resistor between your DMM and the circuit.</p><p>For Atmel Studio, sorry, I can't help you.</p>
<p>On the V- lead at the INA128, Do I just add the GND lead of the 9V battery to it? I don't have a voltage regulator.. </p>
<p>No. If you absolutely want to use a single supply you have to make a ground point in the middle of a voltage divider. I don't know if it'll work with my circuit, though.</p>
<p>Hi, can you send me algorithm scheamtic plse :D ...my email: jaks_0327@yahoo.com </p>
<p>Hi i am using ATMEGA-164A can you please explain how to use it?</p>
<p>please can you send for us the programmation of the arduino= stp donnez nous la programmation de l'arduino </p>

About This Instructable


568 favorites


More by birdyberth: 3D Contactless Mouse (Interactive 3D Position Sensor) Electrocardiograph & Heart Rate Monitor
Add instructable to: