Print this Post

Simple DIY ECG + Pulse Oximeter (version 2)

Of the hundreds of projects I’ve shared over the years, none has attracted more attention than my DIY ECG machine on the cheap posted almost 4 years ago. This weekend I re-visited the project and made something I’m excited to share!  The original project was immensely popular, my first featured article on Hack-A-Day, and today “ECG” still represents the second most searched term by people who land on my site. My gmail account also has had 194 incoming emails from people asking details about the project. A lot of it was by frustrated students trying to recreate the project running into trouble because it was somewhat poorly documented. Clearly, it’s a project that a wide range of people are interested in, and I’m happy to revisit it bringing new knowledge and insight to the project. I will do my best to document it thoroughly so anyone can recreate it!

The goal of this project is to collect heartbeat information on a computer with minimal cost and minimal complexity.  I accomplished this with fewer than a dozen components (all of which can be purchased at RadioShack). It serves both as a light-based heartbeat monitor (similar to a pulse oximeter, though it’s not designed to quantitatively measure blood oxygen saturation), and an electrocardiogram (ECG) to visualize electrical activity generated by heart while it contracts. Let’s jump right to the good part – this is what comes out of the machine:

That’s my actual heartbeat. Cool, right? Before I go into how the circuit works, let’s touch on how we measure heartbeat with ECG vs. light (like a pulse oximeter).  To form a heartbeat, the pacemaker region of the heart (called the SA node, which is near the upper right of the heart) begins to fire and the atria (the two top chambers of the heart) contract. The SA node generates a little electrical shock which stimulated a synchronized contraction. This is exactly what defibrillators do when a heart has stopped beating. When a heart attack is occurring and a patient is undergoing ventricular fibrillation, it means that heart muscle cells are contracting randomly and not in unison, so the heart quivers instead of pumping as an organ. Defibrillators synchronize the heart beat with a sudden rush of current over the heart to reset all of the cells to begin firing at the same time (thanks Ron for requesting a more technical description).  If a current is run over the muscle, the cells (cardiomyocytes) all contract at the same time, and blood moves. The AV node (closer to the center of the heart) in combination with a slow conducting pathway (called the bundle of His) control contraction of the ventricles (the really large chambers at the bottom of the heart), which produce the really large spikes we see on an ECG.  To measure ECG, optimally we’d place electrodes on the surface of the heart. Since that would be painful, we do the best we can by measuring voltage changes (often in the mV range) on the surface of the skin. If we amplify it enough, we can visualize it. Depending on where the pads are placed, we can see different regions of the heart contract by their unique electrophysiological signature. ECG requires sticky pads on your chest and is extremely sensitive to small fluctuations in voltage. Alternatively, a pulse oximeter measures blood oxygenation and can monitor heartbeat by clipping onto a finger tip. It does this by shining light through your finger and measuring how much light is absorbed. This goes up and down as blood is pumped through your finger. If you look at the relationship between absorbency in the red vs. infrared wavelengths, you can infer the oxygenation state of the blood. I’m not doing that today because I’m mostly interested in detecting heart beats.

For operation as a pulse oximeter-type optical heartbeat detector (a photoplethysmograph which produces a photoplethysmogram), I use a bright red LED to shine light through my finger and be detected by a phototransistor (bottom left of the diagram). I talk about how this works in more detail in a previous post. Basically the phototransistor acts like a variable resistor which conducts different amounts of current depending on how much light it sees. This changes the voltage above it in a way that changes with heartbeats. If this small signal is used as the input, this device acts like a pulse oximeter.

For operation as an electrocardiograph (ECG), I attach the (in) directly to a lead on my chest. One of them is grounded (it doesn’t matter which for this circuit – if they’re switched the ECG just looks upside down), and the other is recording. In my original article, I used pennies with wires soldered to them taped to my chest as leads. Today, I’m using fancier sticky pads which are a little more conductive. In either case, one lead goes in the center of your chest, and the other goes to your left side under your arm pit. I like these sticky pads because they stick to my skin better than pennies taped on with electrical tape. I got 100 Nikomed Nikotabs EKG Electrodes 0315 on eBay for $5.51 with free shipping (score!). Just gator clip to them and you’re good to go!

In both cases, I need to build a device to amplify small signals. This is accomplished with the following circuit. The core of the circuit is an LM324 quad operational amplifier.  These chips are everywhere, and extremely cheap. It looks like Thai Shine sells 10 for $2.86 (with free shipping). That’s about a quarter each. Nice!  A lot of ECG projects use instrumentation amplifiers like the AD620 (which I have used with fantastic results), but these are expensive (about $5.00 each). The main difference is that instrumentation amplifiers amplify the difference between two points (which reduces noise and probably makes for a better ECG machine), but for today an operational amplifier will do a good enough job amplifying a small signal with respect to ground. I get around the noise issue by some simple filtering techniques. Let’s take a look at the circuit.

This project utilizes one of the op-amps as a virtual ground. One complaint of using op-amps in simple projects is that they often need + and – voltages. Yeah, this could be done with two 9V batteries to generate +9V and -9V, but I think it’s easier to use a single power source (+ and GND). A way to get around that is to use one of the op-amps as a current source and feed it half of the power supply voltage (VCC), and use the output as a virtual ground (allowing VCC to be your + and 0V GND to be your -). For a good description of how to do this intelligently, read the single supply op amps web page. The caveat is that your signals should remain around VCC/2, which can be done if it is decoupled by feeding it through a series capacitor. The project works at 12V or 5V, but was designed for (and has much better output) at 12V. The remaining 3 op-amps of the LM324 serve three unique functions:

STAGE 1: High gain amplifier. The input signals from either the ECG or pulse oximeter are fed into a chain of 3 opamp stages. The first is a preamplifier. The output is decoupled through a series capacitor to place it near VCC/2, and amplified greatly thanks to the 1.8Mohm negative feedback resistor. Changing this value changes initial gain.

STAGE 2: active low-pass filter. The 10kOhm variable resistor lets you adjust the frequency cutoff. The opamp serves as a unity gain current source / voltage follower that has high input impedance when measuring the output f the low-pass filter and reproduces its voltage with a low impedance output. There’s some more information about active filtering on this page. It’s best to look at the output of this stage and adjust the potentiometer until the 60Hz noise (caused by the AC wiring in the walls) is most reduced while the lower-frequency component of your heartbeat is retained. With the oximeter, virtually no noise gets through. Because the ECG signal is much smaller, this filter has to be less aggressive, and this noise is filtered-out by software (more on this later).

STAGE 3: final amplifier with low-pass filter. It has a gain of ~20 (determined by the ratio of the 1.8kOhm to 100Ohm resistors) and lowpass filtering components are provided by the 22uF capacitor across the negative feedback resistor. If you try to run this circuit at 5V and want more gain (more voltage swing), consider increasing the value of the 1.8kOhm resistor (wit the capacitor removed). Once you have a good gain, add different capacitor values until your signal is left but the noise reduced. For 12V, these values work fine. Let’s see it in action!

Now for the second half – getting it into the computer. The cheapest and easiest way to do this is to simply feed the output into a sound card! A sound card is an analog-to-digital converter (ADC) that everybody has and can sample up to 48 thousand samples a second! (overkill for this application) The first thing you should do is add an output potentiometer to allow you to drop the voltage down if it’s too big for the sound card (in the case of the oximeter) but but also allow full-volume in the case of sensitive measurements (like ECG). Then open-up sound editing software (I like GoldWave for Windows or Audacity for Linux, both of which are free) and record the input. You can do filtering (low-pass filter at 40Hz with a sharp cutoff) to further eliminate any noise that may have sneaked through. Re-sample at 1,000 Hz (1kHz) and save the output as a text file and you’re ready to graph it! Check it out.

Here are the results of some actual data recorded and processed with the method shown in the video. let’s look at the pulse oximeter first.

That looks pretty good, certainly enough for heartbeat detection. There’s obvious room for improvement, but as a proof of concept it’s clearly working. Let’s switch gears and look at the ECG. It’s much more challenging because it’s signal is a couple orders of magnitude smaller than the pulse oximeter, so a lot more noise gets through. Filtering it out offers dramatic improvements!

Here’s the code I used to generate the graphs from the text files that GoldWave saves. It requires Python, Matplotlib (pylab), and Numpy. In my case, I’m using 32-bit 2.6 versions of everything.

# DIY Sound Card ECG/Pulse Oximeter
# by Scott Harden (2013) http://www.SWHarden.com

import pylab
import numpy


data = numpy.array(raw,dtype=float)
data = data-min(data) #make all points positive
data = data/max(data)*100.0 #normalize
times = numpy.array(range(len(data)))/1000.0
pylab.xlabel("Time Elapsed (seconds)")
pylab.ylabel("Amplitude (% max)")
pylab.title("Pulse Oximeter - filtered")

Future directions involve several projects I hope to work on soon. First, it would be cool to miniaturize everything with surface mount technology (SMT) to bring these things down to the size of a postage stamp. Second, improved finger, toe, or ear clips (or even taped-on sensors) over long duration would provide a pretty interesting way to analyze heart rate variability or modulation in response to stress, sleep apnea, etc. Instead of feeding the signal into a computer, one could send it to a micro-controller for processing. I’ve made some darn-good progress making multi-channel cross-platform USB option for getting physiology data into a computer, but have some work still to do. Alternatively, this data could be graphed on a graphical LCD for an all-in-one little device that doesn’t require a computer. Yep, lots of possible projects can use this as a starting point.

Notes about safety: If you’re worried about electrical shock, or unsure of your ability to make a safe device, don’t attempt to build an ECG machine. For an ECG to work, you have to make good electrical contact with your skin near your heart, and some people feel this is potentially dangerous. Actually, some people like to argue about how dangerous it actually is, as seen on Hack-A-Day comments and my previous post comments. Some people have suggested the danger is negligible and pointed-out that it’s similar to inserting ear-bud headphones into your ears. Others have suggested that it’s dangerous and pointed-out that milliamps can kill a person. Others contest that pulses of current are far more dangerous than a continuous applied current. Realists speculate that virtually no current would be delivered by this circuit if it is wired properly. Rational, cautionary people worried about it reduce risk of accidental current by applying bidirectional diodes at the level of the chest leads, which short any current (above 0.7V) similar to that shown here. Electrically-savvy folks would design an optically decoupled solution. Intelligent folks who abstain from arguing on the internet would probably consult the datasheets regarding ECG input protection. In all cases, don’t attach electrical devices to your body unless you are confident in their safety. As a catch-all, I present the ECG circuit for educational purposes only, and state that it may not be safe and should not be replicated  There, will that cover me in court in case someone tapes wires to their chest and plugs them in the wall socket?

LET ME KNOW WHAT YOU THINK! If you make this, I’m especially interested to see how it came out. Take pictures of your projects and send them my way! If you make improvements, or take this project further, I’d be happy to link to it on this page. I hope this page describes the project well enough that anyone can recreate it, regardless of electronics experience. Finally, I hope that people are inspired by the cool things that can be done with surprisingly simple electronics. Get out there, be creative, and go build something cool!

About the author

Scott W Harden

Scott Harden has had a lifelong passion for computer programming and electrical engineering, and recently has become interested in its relationship with biomolecular sciences. He has run a personal website since he was 15, which has changed names from HardenTechnologies.com, to KnightHacker.com, to ScottIsHot.com, to its current SWHarden.com. Scott has been in college for 10 years, with 3 more years to go. He has an AA in Biology (Valencia College), BS in Cell Biology (Union University), MS in Molecular Biology and Microbiology (University of Central Florida), and is currently in a combined DMD (doctor of dental medicine) / PhD (neuroscience) program through the collaboration of the College of Dentistry and College of Medicine (Interdisciplinary Program in Biomedical Science, IDP) at the University of Florida in Gainesville, Florida. In his spare time Scott builds small electrical devices (with an emphasis on radio frequency) and enjoys writing cross-platform open-source software.

Permanent link to this article: http://www.SWHarden.com/blog/2013-04-14-simple-diy-ecg-pulse-oximeter-version-2/


  1. Mac Ha Nguyen

    Hi Scott, very interesting project, I’m thinking about testing it out once cleared of all my deadlines… I’ve noticed, however, that specs for LM324 (for example here http://www.ti.com/product/lm324a?CMP=AFC-conv_SF_SEP) allows operating from single supply voltage in the range of 3V to 30V. So I’m still not quite understand why we need to use the virtual ground? As the ground reference to the signal?..
    Thank you and best regards,
    Mac Ha

    1. Scott Harden

      Mac, indeed the chip can operate as single supply, but there are advantages of using a virtual ground. It is touched on in this page: http://www.swarthmore.edu/NatSci/echeeve1/Ref/SingleSupply/SingleSupply.html

      Briefly, the easiest way to design high-gain op-amp stages is to use +VCC, -VCC, and feed the small input signals near 0V (GND). By using a single supply with virtual ground, we have -VCC (0V), virtual ground (6V), and +VCC (12V). If we treat the virtual ground as ground, and feed it very small signals (decoupled through a series capacitor), the op-amp does an excellent job of amplifying it. The primary advantage is that, although the circuity is identical to that requiring +6V and -6V, with the virtual ground a negative power supply is not needed.

  2. Juan Pablo Madrigal Cianci

    Hello Steve.

    I’ve been checking you projects (well, mostly the first ecg and the pulse oximeter) and let me say I’m a big fan of yours!
    I’d love to make the pulse oximeter for my analog electronics class, but I have a few questions about the scheme:

    1. In the virtual ground, where is the upper 100k R conected? Is it connected to Vcc?
    2. What about R’s value in the phototransistor’s collector? (Rc)
    3.Wich phototransistor should I use?

    Thanks a lot, I hope i didn’t bother you too much.

    I’ll let you know how it went!

    1. Scott Harden

      1.) Yes, connected to VCC. Since both Rs are the same value, the voltage divider takes the voltage to 1/2 of VCC. Thus, virtual ground becomes VCC/2

      2.) The phototransistor R depends on what phototransistor you use. Also, different Rs will change the sensitivity of the output. Experiment (perhaps with a potentiometer) to find an R you like. 10k seems like a good value, but it’s quite flexible.

      3.) My exact phototransistor is http://www.dipmicro.com/store/RPT-311PTA49 which I purchased on eBay 10 for $3 (free shipping). Pretty much any phototransistor will do. If it’s an IR phototransistor, it will only respond to IR light (like that coming out of a TV remote control), but I’m not sure how it would work for pulse. It might actually work really well for pulse detection if you use an IR led.

      Keep in touch, let me know of your progress!

  3. Russell McMahon

    Scott, It’s good that the circuit does so well measuring pulse – but you really should take the term “Oximeter” out of the description. You make it clear in the text that this is not an Oximeter, and that it doesn’t try to be one, but the misleading term is in the title, in the writeup and in the Hack-a-Day article that I followed a link in to get here.

    What would be nice to see would be a followup design that did use differential absorption at different optical wavelengths to produce a genuine oximeter – a real black art.

    I like your clothes peg finger grip. You can also use earlobes for sensing and even the wall of your mouth! (Clip with one jaw insid mouth and the other on your cheek. You’d probably want a clip with less spring power :-).


    Russell McMahon

    1. Scott W Harden

      Thank you for the tip! I added the words “photoplethysmograph” and “photoplethysmogram” to the bolded text, which I hope further clarifies (to Google if nothing else) what it is officially referred to as.

      I agree that a true pulse oximeter would be useful, and one is in the works! I’m using a ubiquitous ATMega48′s analog-to-digital inputs to read the output of LM234-amplified signals and sending the data a few hundred times a second to the PC via RS-232 into an FTDI USB interface chip. Coupled with some graphing software I wrote with Python and Qt, it graphs (A) red absorbency, (B) infrared absorbency, and (C) the difference between the two. It’s not finished yet, but it’s certainly a stab in that direction doing it at minimal cost/minimal complexity. Thanks for the encouragement!

  4. Chris Rorden


    Your design is very elegant, using very common components which is terrific. In your replies you mention you are using an ATMega for your upcoming project. You may want to use the Arduino code from my web page
    The limitation with older Arduino’s is the slow FTDI, that limits your communication rate to about 100 Hz and the 10-bit ADC. In these respects your technique of using the 44 kHz and 16-bit audio port has big advantages. My software allows the microcontroller to oversample the data, for example you could sample the data at 1600 Hz and transmit it at 100 Hz. You will get better precision (square root law). I provide sample oscilloscope software in the XCode, Processing, Lazarus and Matlab languages. You will get much better USB bandwidth with a 32u4 device that has in-built USB (Arduino Leonardo or Teensy 2). However, I suggest the ARM-based Teensy 3 that has terrific bandwidth and theoretically 16-bit ADC (about 14 bit in reality). My code works with both AVR and ARM CPUs (you need to specify the device in the first few lines), and uses interrupts for precise timing.

    By the way, your data suggest that the op-amps are sufficient for ECG, and your design is very elegant. For advanced users, the following pages shows how to use an instrumentation amplifier for EMG (using an audio port) and much smaller and lower frequency EEG (using an Arduino):

  5. Carlos

    Very nice, but this is NOT a pulse oximeter. Remove that from the title….

  6. Espen

    Hi, this looks like so much fun, but one question, I have a bunch of other op-amps laying around (TL072, LM386) can I use those instead of your quad-amp?

    1. Scott Harden

      Yes, pretty much any op-amp will work. The LM386 also has automatic gain control, which might be an interesting concept to work with in this project, but it would probably be best for a later stage. If you don’t have some, consider getting some LM324 op-amps. They’re extremely cheap! About 25 cents each at http://www.thaishine.com/

      1. huynh tho

        you can send the circuit diagram ECG principles IC LM324 use it? I am urgently! thank you much ..

  7. Espen

    Hi again, just a little confused, I’m not that well versed in electronics, so excuse me for my obvious stupid question. But when using as ECG with electrodes, do both leads go to the same input? Or does one go to the VG and one to IN?

    Also would it be possible to combine the data from both ECG and pulse oximeter to cancel out noise further?

  8. Mike

    This is a cool little project. I’m going to have to give it a try.

    I ran some simulations and it looks like, if you’re going to run it at 5V, a 0.1u input cap is needed instead of the 0.22u. And a 0.1u decoupling cap at the non-inverting input of the virtual ground op-amp would help to protect that part of it from power supply fluctuations.

  9. Mike

    Just an addendum to what I wrote. The 0.22u input cap may work with a 5V supply if the input signal is small enough. If the first stage shows clipping then drop the cap down in size.

    1. Jessica

      hi mike did you ever end up simulating this project with 5V?

  10. Tamonud

    can you put up a board diagram for the ECG and the pulse oximeter circuit??? It would be really helpful. Is this the same ecg circuit that you posted using two lm324s. ???

  11. Espen

    One more question, will using a battery powered mobile audio recorder or laptop make the circuit safer to use? Regarding any potential life threatening current over your chest?

  12. Joeseph Rodrigues

    I’m very much a novice to circuits, but I’d love to assemble this. I have all the components to put it together, but I’m a deer in the headlights when it comes to reading schems. Is there any way to get some hi def pics of the physical circuitry to get a better idea of the connections?

    1. Scott Harden

      Dude, you got this! It’s all wrapped around the single microchip, LM324. Google for the datasheet for this chip. Here it is. http://www.ti.com/lit/ds/symlink/lm124-n.pdf It shows you the pin layout (which pins do what) for the four amplifiers. You can use them in any order. Match the pins with the circuit diagram in this web page, and you’re good to go!

  13. ivan

    Hello. I have a doubt regarding output potentiometer: the idea is simply to reduce voltage? what about current? Because with ohm’s law, the current must raise through the potentiometer (and directly to the sound card), am i right?

    1. Scott Harden

      It’s a trimmer potentiometer. http://www.murata.com/products/resistor/basic/trimmer/index.html It serves as a voltage divider.

  14. Anonymous

    Hey great post!

    I was wondering where exactly you place the leads. I know you said to put them in an armpit-chest configuration but can you post a good diagram for exactly where to do 2-lead placement. There’s not much I can find on the web but it would be a GREAT help since this step is the hardest

    1. Christopher

      The fairly common positioning for routine monitoring of a surface ECG would be known as Lead II. This places the negative electrode on the right arm (shoulder or wrist) or right torso above the clavicle. The positive electrode should be placed on the left leg (thigh or above the ankle) or left flank/abdomen just above the waist.

      If you look up Einthoven’s Triangle you’ll find examples of the other common “Limb Lead” positions, and more likely you’ll want to look at Mason-Likar positioning to make monitoring more convenient with respect to electrode positioning (“ambulatory monitoring”).

  15. CarloxTa

    Any info about adding an optoisolator to this? which one? any other component needed to do it?
    Thanks a lot for such an interest project.

  16. Anonymous

    numpy has a wonderful function called genfromtxt. You should try it.

  17. Nick

    An excellent post. I am building my own Pulse Oximeter based on Op-amps and arduino, still lots to do. The only issue I have is with the post title as you mention you are building a heart/pulse monitor and not an Oximeter. Anyway, well done, excellent write up.

  18. pooja shukla

    can we not use java or c++ for programming

  19. Mass

    I noticed that you have 3 electrolytic caps and one ceramic on your pcb but the schematic is only showing 2 electrolytics and one ceramic.

  20. gasstationwithoutpumps

    I’ve used a small EKG project like this as a lab exercise in my Applied Circuits class. I’ve also done some little PC boards to do “blinky EKGs”.

    See, for example

    I never had any luck with op-amp-only designs like the one here, and have had much better luck using instrumentation amps. The INA126P is only about $2.50.

  21. Balko

    in which a function of the LED current control profiled by R / IR, because the absorption of patients is different from patients?

  22. Kasra Mohammadi

    Hey Scott,

    Superb ECG design man. Simple and reproducible DIY project. Reading through the comments on here, you mentioned back in April of this year that you were working on an actual Pulse Oximeter design using the NIF and Red LED combo. I’m very curious to know if you have made progress on that design.

  23. elliot

    I were required to refresh the page times to look at this page for reasons uknown, however, the knowledge here was worth the wait.”

  24. dexter

    Excellent read, I recently passed this onto a new colleague who had been doing a little research on that. And he really bought us lunch since i found it with regard to him grin So let me rephrase that.

  25. Salman Sheikh

    How do you attach the Nikotabs to a wire?

  26. Térence

    HI Scott,
    Thanks a lot for those detailed explanations.
    I tried the original ECG version but wasn’t able to make it work properly (actually it gives the same signal if I disconnect the batteries…).
    I was looking forward to trying this new version but the technical part seems even less documented that in the first one. I can’t find references to the parts or their name (except for the op-amp) and there’s no clean diagram of the circuit. Moreover, the hand-made drawing doesn’t explain how to turn the pulse-meter into an ECG machine as said in the video.

    I’m a third year medical student from Europe, I’ve only basic skills in electronic, soldering and stuff but I really want to build something that works because of my interest for electrophysiology. Your work is wonderful but could be even better with those details.

    Anyway, thanks again!

  27. Andreas

    Dear Scott
    nice design! I just finished the rebuild of your optical pulsemeter. I wonder if one ‘just’ detects the movement which is induced by the bloodpressure change, as extremely slight twitches induce a much stronger but similar signal. I will play around with a 300 mW 638 nm laser and light up my finger like a christmas tree to see whether physical contact to the sensors is necessary or not.

  28. Paul - G4JNN

    Hi there Scott,

    I love your website. The projects are great.
    I’m interested in lots of different subjects.
    In fact I’ve been collecting informative articles
    on many of them – for my own use and research.
    Gradually, I’m putting them on my website.
    You’re readers are welcome to take a look if they like.
    Go to: The G4JNN Article Directory

    73 (Best Wishes) From Paul, G4JNN.

  29. angel

    Hi Scott,

    I was wandering if you can help me with a project I have.
    I need to design a pulse oximeter like the one you published but I want it to be an embedded system using a microcontroller. You know the finger clip connected to the board and the LCD will show the heardbeads and the oxygen ect…

    Looking forward for your reply


  30. Raj Murare

    Hello Scott,
    My group and I are working on our senior project. We need to measure the output from a pulse oximeter. Then we will take that output and use it as a input for a pump. We made a circuit consisting of Low pass filters and amplifiers. I was wondering if you know how we can measure the output.
    Thank You

  31. Rubecca

    Hi Scott,

    Wow its just amazing how u can build all this.
    I am planning on making an oximeter as well using ATMEGA32 microcontroller. This microcontroller uses 5V of power so I am thinking I will have to buy an O2 sensor that operates within 5V.

    I am unable to find any O2 sensor like that ;(
    also I dont understand with signal conditioning I will have to use (filters, op amps etc) while connecting to the microcontroller.

    Please help and please reply asap.
    Looking forward to your reply.

  32. reece

    Hello there, can i ask why do you get a 60 Hz interference when its powered by a dc input? Thank you

  33. Gary Golding


    Wish you all the best on your career! That said, have you ever build a triggering attached to a shunt? Specifically I am using a 100 Amp shunt (50mV full scale) and I am looking to build a trigger that goes high to release a latching relay, a kind of circuit breaker, but one that set/resetable using a momentary toggle switch (mom. up to latch a relay, mom. down to release it) and that limits the current across the shunt to 100 amps which if exceeded, opens a relay that drives a high current contactor. I was considering using two opAms such as a 741′s one to provide signal gain and the other to be used as a comparator that will set the trip threshold, i.e. if the high limit is 50mV (amplified 20x to say 1 voltP, then any signal higher then the preset voltage of 1 volt will provide a sink of the output that pulls down the base of an NPN transister which in turn is inverted by coupling its output to ground and the emitter to the base of the second NPN and also a current limited 12v power supply. The idea is that the second NPN transister will pass through the closed contacts of a latched relay before driving the relay’s releasing coil. Any thoughts?

  34. Christopher

    Very neat, and you could likely clean it up further with a high pass filter of ~1 Hz, which should be satisfactory for routine/ambulatory monitoring. If you’re using lower quality electrodes a bandpass filter of 1 Hz / 21 Hz should be sufficient. Simple skin prep with an alcohol pad and a towel can improve your signal as well (the skin/electrode interface is a common cause of interference).

    I noticed some commentators on Youtube were wondering about the amplitudes of your P-waves with this project, which is likely due to the lead position you chose (the uncommon qRs configuration certainly reflects the positioning). Positioning of the negative electrode closer to the head of your sternum and the positive electrode just to the right of your xiphoid process would enable closer inspection of the P-waves for your viewers (this is a variant of Sir Thomas Lewis’ atrial lead). The standard Lead II positioning of electrodes may also help in this endeavor.

    Lastly, the Bundle of His actually rapidly conducts electrical signals from the AV Node out to the bundle branches and finally into the Purkinje fibers in the ventricles. It is the different myocardial tissue in the AVN itself which slows conduction just long enough to allow the atria to better fill the ventricles before the ventricles receive their message to contract. I think it would also be better to change “Heart Attack” for “Sudden Cardiac Arrest”, as there are numerous other causes of ventricular fibrillation unrelated to myocardial infarction.

    Very impressed by the project, and I think I’m going to have to attempt this on my RPi at home!

  35. Marta

    How to make ground and the circuit with a battery of 4.6V?

  36. Marta

    How to make the circuit with a battery of 4.6V , whatis ground, vcc is the positive voltage?

  37. Anonymous

    why in the image are 5 capacitors and 2 potentiometers? in the scheme there are only 3 capacitors and 1 pot .

    I have tried to mount it and it seems my phototransistors don’t conduct .

  38. Anonymous

    Why a capacitor of 0.22uF? I have put one and i don’t understand why I put a led in the output of the capacitor and can’t see light , but if i don’t put the capacitor , then i see the led’s light.

  39. Anonymous


    I have a doubt, what value is the resistance of the phototransistor?

  40. jegadeesh

    Hi, scott, i doing project named as design a pulse co-oximeter with the use of digital signal processor, i here ask one important doubts pulse oximeter circuit only i used apply the mathematical computation over observed electrical parameters(that are observed from sensors similar your finger clip) in the way if possible to obtain the 3 or 4 parameters of pulse co-oximeter.!

  41. Neel Joshi

    Hi,Scott, I’m working with a pulse oximeter project for my bachelors in electronics and telecom. This post of yours is very helpful regarding the same. But i would like to know whether the above mentioned project be extended as a Pulse oximeter..? And if yes then what changes should be made in the design or the code. Will you be able to help me with it.

  42. bezoek deze site nu

    This weblog is cool. I wanna thank you for it. I’ll follow your weblog also.

  43. pro

    I am new to this area, your works are real cool… i was thinking about implementing this… but got a bit confused… how do i use the sound card…could you be a bit more elaborate?

  44. abhirup

    can i use a lm358 for building the photoplethysmoghraph???

  45. in the news

    Hi would you mind sharing which blog platform you’re using?
    I’m looking to start my own blog soon but I’m having a hard time
    deciding between BlogEngine/Wordpress/B2evolution and
    Drupal. The reason I ask is because your design seems different then most blogs and I’m
    looking for something unique. P.S My apologies for getting off-topic but I had to ask!

  46. Jason

    Hello, Scott!

    I am working on my senior project for BMET, and we’re building an electric bike that will take the rider’s pulse via pulse grips mounted on the handlebars and we’re trying to figure out which op-amp would be best to use for the ECG circuit. I’ve heard LM324, LF353N, INA121, etc. What would you recommend?


  47. Dr Boletyone

    Hello Scott
    I am trying your projet.But not ok now.
    1.finished circuit
    2.downlad and instralled Goldwave5
    3.Record Ecg
    4.filter band pass under 40Hz
    What must i do next stage
    I want to run your ECG on android oscilloscope

  48. Dr Boletyone

    Please help me

  49. Dave

    An excellent project, like others only issue I have is title says Oximeter, it isn’t, please change that.

  50. seckin

    thanks …..

  51. jeevigyay

    how to make the circuit of pulse oximeter using aurdino mainly we want to interface the aurdino with our circuit of pulse oximeter.

  52. galvyn

    hello there.. i want to ask how do you connect the lead wire to the op-amp? do you direct solder it to the board or do you use wire adapter?

  53. jeremy tom

    I came accross a very interesting website with more info on this product: http://www.medicalexpo.com/medical-manufacturer/electrocardiograph-1057.html

  54. genital Wart Removals

    It’s awesome in favor of me to have a web site, which is beneficial in
    favor of my know-how. thanks admin

  55. soft furnishings

    Great weblog right here! Also your site a lot up very fast!

    What web host are you using? Can I am getting your associate link in your host?
    I desire my website loaded up as fast as yours lol

  56. HaloCig

    I was curious if you ever considered changing the page layout of your
    blog? Its very well written; I love what youve got to say. But maybe you could a little more in
    the way of content so people could connect with it
    better. Youve got an awful lot of text for only having
    1 or 2 images. Maybe you could space it out better?

  57. Rugstraditional.Blog.Com

    I’m curious to find out what blog platform you
    are working with? I’m having some small security issues with my latest blog and I would like to find something more
    safe. Do you have any suggestions?

  58. air jordan sparks

    Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point.
    You definitely know what youre talking about, why waste your intelligence on just posting videos to your site when you could be giving us
    something informative to read?

  59. Monserrate

    Do you mind if I quote a couple of your articles as
    long as I provide credit and sources back to your blog?
    My website is in the exact same area of interest
    as yours and my users would certainly benefit from a
    lot of the information you provide here. Please let me know if this ok with you.

    Thanks a lot!

  60. Mickael

    Hello, i want to do a finger pulse oximeter. Can i follow this project?

  61. Diego Santana


    You said that you want to do a real oximeter, and you´re very close, cause you only have to repeat the same circuit with an IR light and do a simple processing with both signals, wich is (IR data/ (Red data + IR data)) x 100 and that’s your percentage off blood saturation.

  62. internet

    Suppose you now have a solid hosting provider
    and offers amazing service but still your page speed loading time is much more.
    Click here to see information about social bookmarking service or
    visit our website : submitcube. * Specific text message – Promoting Graphical design.

    Feel free to surf to my homepage – internet

  63. Cheap Herve Leger Outlet online-one shoulder Dresses on sale

    at the class, and / Herve Leger Outlet store or provided herve leger bandage dresses locally Herve Leger Outlet store sale-Herve Leger on sale for sale to your home dependent on locale, volume and native companies. Herve Leger Outlet Store Online-Cheap Herve Leger Dresses Sale For Women-Free Shipping! The Web site moreover provides cheap herve leger tips on how to vegetation and also forest, in addition to a number of several other tree correlated information and facts.. In brief individuals und

  64. Corey

    Hey! Quick question that’s entirely off topic. Do you know how to make your site mobile friendly?

    My weblog looks weird when viewing from my iphone.
    I’m trying to find a template or plugin that might be able to correct this issue.
    If you have any recommendations, please share. Many thanks!

  65. jerseys Nuggets

    Penguins jerseys cheap VIP Size
    jerseys Nuggets http://ip-manila.com/css/about.html

  66. free download video converter

    Write more, thawts all I have too say. Literally, it seems as though you relied on the video to make your point.

    You obviously know what youre tawlking about,
    why waste your intelligence on just posting videos to your site when you could be giving us something informative to

    My web-site – free download video converter

  67. Chiffon- Kleid Proms

    gillis_28 Finden Modische 0odeblog Alle Frauen will eine Partei Kleid, das machen sie stehen rund um die Partei, sondern der Suche nach dem perfekten Kleid überwältigend sind. Sie wollen ein Kleid, das Spaß erscheint, dennoch fühlt sich wohl; ein Kleid, Mode strahlt noch bleibt einzigartig. Dieser Artikel wird Ihnen die Vorbereitung Spaß und trendige Party-Kleider, die die Show zu stehlen im Moment helfen. Am bemerkenswertesten Stile sind jetzt Mut und auffällige

  68. junk cars in arizona

    The repairing is essential if it is going to be sold directly in the market.
    Purchasing aftermarket parts helps reduce the need of manufacturing new spare parts.
    You don’t have to get into many formalities and details to
    get your vehicle disposed off via these companies.

    Feel free to surf to my blog post … junk cars in arizona

  69. junk cars pick up

    Additional charitable businesses deliver less cash for junk cars to inspire
    visitors to engage in the actual charity. Make sure you
    ask his or her requirements with regards to selling some sort of <. They know all the approaches of avoiding detection at your expense.

    my blog :: junk cars pick up

  70. virginia beach auto auction

    These experts can help impose a cleaner method to get
    rid of waste. These expert companies will excavate the soil to pump out the chemical compounds.
    These folks think that these automobiles are write-offs with absolutely no importance whatsoever.

    Look at my web page: virginia beach auto auction

  71. http://www.charlottejunkacar.pw

    Another alternative is to acquire the services of a green disposal unit.
    A seasoned mechanic will also be able to tell you whether
    a certain salvaged part is still usable is a scrap metal.
    Since the shape of bolts and nuts is mostly hexagon or 6-point, you first need 6-point socket set in both standard and metric.

    Here is my web-site :: http://www.charlottejunkacar.pw

  72. http://www.www.youtube.com/watch?v=1zyI9sw9jmw/

    You will find at least, one taxi company, for virtually every city in the database.
    If the parents say it isn’t necessary then insist they check out your driving record, car
    insurance, and whether or not you have a criminal record.
    Princeton Taxi and Limousine Services are focused
    on providing reliable taxi and limo service to all the major airports and train stations within the tri-state area.

    my website: http://www.www.youtube.com/watch?v=1zyI9sw9jmw/

  73. taxi

    Many travel agencies are innocent victims of this
    as they also have no way to control what vehicle is carrying out their services
    in some foreign country and after having their request for hire passing through three or four hands before reaching the driver,
    and you. If the parents say it isn’t necessary then insist they
    check out your driving record, car insurance, and whether or not you have a criminal record.
    Either accounts package would suffice but on balance
    the self employed accounting solution would be better as it
    has greater sales analysis of income not required for cab
    and taxi drivers.

  74. Judson V Sutherland

    There are things to consider, like being related to a historical figure,
    celebrity, inventor or even having distant relatives that resided in different
    parts of the world. We can get the final results on a click of a button. Aside from expanding the market to other areas,
    the use of genealogy leads will be useful given that the current one is not yet saturated.

    My page … Judson V Sutherland

  75. taxi

    You will find at least, one taxi company,
    for virtually every city in the database. Either way, I recommend this
    restaurant to any lover of vegetarian food. Get ready to become a taxi driver and be part of one of the
    most interesting jobs anywhere.

  76. Elaine

    Asking questions are in fact pleasant thing if you are not understanding something totally,
    however this post presents fastidious understanding even.

  77. how to win at the lottery Read the Full Posting

    Hello, the whole thing is going sound here and ofcourse every one is sharing
    data, that’s truly good, keep up writing.

  78. Beste Norske Casino på Nett

    For most up-to-date news you have to pay a visit world-wide-web and on internet I found this
    web page as a finest website for most recent updates.

    Alsoo visit my web blog: Beste Norske Casino på Nett

  79. tom

    if you run on low voltage batteries with no ac driven power supply , then there is no danger of injury . AC is to be feared because even small currents can leak into the thorax and mess with that nice normal sinus ryhthm you show on your post . Great work , keep it up .

  80. senuke xcr crack free

    Good article. I am going through some of these issues as well..

  81. music group

    So happy I came across this one

  82. Sankeerth

    Can u please mail me the exact diagram of how to make the device?

  83. penis surge

    When someone writes an paragraph he/she maintains the idea of a user in his/her
    brain that how a user can understand it. So that’s why this paragraph is great.


  84. call contact center

    I savor, lead to I discovered exactly what I was having a look for.
    You’ve ended my 4 day long hunt! God Bless you man. Have a
    great day. Bye

  85. Elena

    I have a question.how account blood oxygen by output signal of IR and red LED??
    please reply my Q!!!!

  86. Google

    It’s really a great and useful piece of information. I’m glad that you shared this useful information with us.
    Please keep us up to date like this. Thank you for sharing.

    Here is my web site – Google

  87. reporting hipaa security violations

    you’re truly a excellent webmaster. The website loading velocity is incredible. It kind of feels that you’re doing any unique trick. Also, The contents are masterwork. you have performed a fantastic job on this subject!

  88. informative post

    What’s Going down i am new to this, I stumbled upon this I have discovered It absolutely useful and it has aided me out loads. I’m hoping to contribute & help different customers like its helped me. Good job.

  89. Jessica

    Has anyone tried to make this using a 5V supply? The phototransitor I am using runs off 5V and I am having issues trying to work out some of the cap and resistor values

  90. Classic Snake

    Having read this I believed it was very enlightening.
    I appreciate you finding the time and energy to put this short article together.
    I once again find myself spending a lot of time both reading and leaving comments.
    But so what, it was still worthwhile!

  91. harddisk seagate

    This is one of the most widely recognized symbols in the hardware world.
    More and more people can afford a personal computer in their home, and
    more work is operated through computers, which greatly decrease the demand for smart phones, because after all smart phones
    can’t compare with computers when computers are nearby.

    From text adventures, we suddenly were capable of playing games like Super Mario 64 using the mouse and keyboard.

  92. http://discussit.us/members-2/eliza76q/activity/25345

    Using ingenious technology and innovation the Romans
    made an Empire that withstood the test of your time.
    So unless any business completes the formalities and find the necessary certifications they can’t start their business.

    ” The company sees innovation as considered one of its core organizational competencies.

    Feel free to visit my webpage http://discussit.us/members-2/eliza76q/activity/25345

  93. acai berry for slimmers

    Aաesome issues here. I am ѵery glad to peer уour post.

    Thank you a lot and I am looking forwarԀ to touch you.

    Will you please drop me a e-mail?

    Herе is my website – acai berry for slimmers

  94. Google

    Using Ancient Rome 3D in Google Earth,
    you can explore Rome as it appeared in 320 A.
    20 percent of customers have the potential to spend five times as much as they do currently A relatively small
    amount of marketing effort creates the majority of output.
    The only tab of your concern is Public Templates, and no actions are necessary
    as it is already on the screen.

  95. alez

    Very interesting article. I will surely make something similar.
    A good enhancement for electronic-enthusiasts would be a graphical display showing pleti-sismograph.
    I would suggest, in particular if you try to make an oximeter, to use a professional probe. In fact, ir and red leds should stay as close as possible to have a good read, and this is difficult to do-it-yourself. You can find cheap chinese probes on ebay searching for example “Nellcor DS 100A”. Pinout can be easily found with google.

  96. Hildred

    I read a lot of interesting posts here. Probably you spend a lot of time writing, i know how to save you a lot of time, there is an online tool that creates unique,
    google friendly articles in minutes, just type in google – laranitas free
    content source

  97. Google

    Adsense is actually a really great program for those who maintain blogs, as blogs get updated all the time and the Adsense possibilities are almost limitless.

    It has the highest ROI (Return of Invesment) in all advertisement
    channels. There are other ways to improve your ranking
    in Googlemaps, the purpose of this blog post is not to tell you EVERYTHING Frederick Web Promotions can do to improve your ranking, the purpose of this particular blog post is to:.

    Visit my homepage – Google

  98. ray ban aviator

    Hey there! Do you know if they make any plugins
    to safeguard against hackers? I’m kinda paranoid
    about losing everything I’ve worked hard on. Any suggestions?

  99. programa de dj

    What’s up, this weekend is pleasant designed for me, since this point in time i am reading this enormous educational piece of writing here at my house.

    my homepage – programa de dj

  100. document management software comparison

    I discovered your blog site on google and examine a few of your early posts. Continue to maintain up the superb operate. I simply further up your RSS feed to my MSN Information Reader. Seeking ahead to studying extra from you in a while!…

  101. farmville hack cheat engine 5.5

    Hello! I just wanted to ask if you ever have any problems with hackers?
    My last blog (wordpress) was hacked and I ended up
    losing many months of hard work due to no back up.
    Do you have any solutions to protect against hackers?

  102. http://www.youtube.com/watch?v=D73e07edGCg

    It’s actually a nice and useful piece of information. I’m glad that you just shared this useful information with us.
    Please keep us up to date like this. Thanks for sharing.

  103. centricity emr software

    I have read a few good stuff here. Definitely worth bookmarking for revisiting. I wonder how so much attempt you set to make this kind of great informative web site.

  104. Isabel Marant Femme

    You can see application fees,, annual fees,Chaussures Brooks, late fees, processing fees and in addition fees for crossing your borrowing limit. Fees might also be levied once you close your or transfer the balance to another location visa card. Take a look at Citicards offers offered at applyonline.citicards.com.You can find what things to select which means you isn’t going to fall short of ideas. Because we are intending for Christmas,Sac Lancel Pas Cher, we are begin with beautiful crystal Ch

  105. Basil

    Wow! In the end I got a weblog from where I know how to in fact take helpful
    facts regarding my study and knowledge.

  106. Josie

    The more that you promote the e – Book the more people you
    will get to purchase it. t provide you with some means of contacting them, Don. You
    can get the same sales message (often exactly the
    same email) over and over telling you to get
    on board and buy to resell before it’s too late.

    my page … buy ebooks; Josie,

  107. gallon aquarium aquarius

    What’s up, I want to subscribe for this webpage to obtain most recent updates, so where
    can i do it please assist.

  108. freestyle birugear micro usb

    I got this web page from my pal who informed me on the topic of this site and now this time I am browsing this web site and reading very
    informative articles at this time.

  109. Joe teo

    hi scott ,

    currently i am involving into this project on blood oximeter which base on an1525a. could you provide me a sample code of how to calculated the spo2 and heart pulse.

  110. Nyck

    Hi Scott, very nice project!

    I’m trying to create your ECG hardware, but is not working for me.
    Please, could you send to me the full detail circuit?

    To see the heart beat in the oscilloscope, I’m using a RC filter cutting in 2Hz (120BPM).
    My normal BPM is close from 70.

    I’m using LM342N to amplificate 100 times the original signal.

    What I’m doing wrong?
    I’m will be grateful by the full circuit of ECG (Heart Beat).


  111. Sara

    Hi Scott

    I’m having troubles connecting the output to the usb soundcard. In the picture seems like you use a capacitor, i don’t understand why. I think a more detailed explanation will help me very much.


  112. 3d fiber lash

    Really when someone doesn’t understand after that its up to other people that they will assist, so here it takes place.

  113. hipaa security

    I discovered your weblog site on google and check a few of your early posts. Proceed to maintain up the superb operate. I simply extra up your RSS feed to my MSN News Reader. Looking for forward to studying extra from you later on!…

  114. Alexander Grau

    Nice project! If you don’t want to develop code, you can try out my web-based sound card oscilloscope with this ecg-pulse-oximeter:

    It allows to adjust input gain, add filters, see frequency spectrum and much more – So a nice addition to this project :-)

  115. sb

    Hi. Do you have a component list and circuit diagram for this.?


  116. LivingFossil

    Dear mr. Harden,
    Yours is a truly awesome project, and l’ll have a fling at recreating it with a small modification. Although I’ve always been interested in electronics and built quite some radios (from Crystal Brush to Super Het) as a boy, this is now more than 60 years ago, and I haven’t kept up.
    The reason I want to build an EGC Recorder is that I really need it. I’m suffering from a typical and frequent old age problem called Atrial Fibrillation. Moreover, I belong to those patients who are often without symptoms, especially when an attack occurs at night and is of short duration.
    So I need to know what happened during the night. A single channel ECG suffices because fibrillation is always accompanied by heart racing. Long term monitoring is either horrendously expensive – in the medical sector, or you pay for it with handing over your most sensitive data to people like “Endomondo” or “Runtastic”.
    In comes your DIY ECG detector. The main problems with long term recording are saving the data and then transporting them to the PC. Using an Atmel or Arduino is way over my head, and I’ve come up with a different solution – maybe: My wife had at some time need of a Dictaphone but not anymore. The thingy has a Micro-SD chip for storage amounting to nearly one week’s capacity.
    I plan to output the OpAmp’s signal to the Dictaphone, and from there, using the phone jack, to the PC – as a kind of acoustic coupler (communication device from the stone age). Signal levels will have to be adapted to the diverse devices, of course.
    Could you please tell me what you think about my idea, and if it could work? Or am I inventing the wheel anew?
    Thanking you in advance for your response, I have the honour to remain yours sincerely,
    Jan the Fossil

    Dear mr. Harden,
    Yours is a truly awesome project, and l’ll have a fling at recreating it with a small modification. Although I’ve always been interested in electronics and built quite some radios (from Crystal Brush to Super Het) as a boy, this is now more than 60 years ago, and I haven’t kept up.
    The reason I want to build an EGC Recorder is that I really need it. I’m suffering from a typical and frequent old age problem called Atrial Fibrillation. Moreover I belong to those patients who are often without symptoms, especially when an attack occurs at night and is of short duration.
    So I need to know what happened during the night. A single channel ECG suffices because fibrillation is always accompanied by heart racing. Long term monitoring is either horrendously expensive – in the medical sector, or you pay for it with handing over your most sensitive data to people like “Endomondo” or “Runtastic”.
    In comes your DIY ECG detector. The main problems with long term recording are saving the data and then transporting them to the PC. Using an Atmel or Arduino is way over my head, and I’ve come up with a different solution – maybe. My wife had at some time need of a Dictaphone but not anymore. The thingy has a Micro-SD chip for storage amounting to nearly one week’s capacity.
    I plan to output the OpAmp’s signal to the Dictaphone, and from there, using the phone jack, to the PC – as a kind of acoustic coupler (communication device from the stone age). Signal levels will have to be adapted to the diverse devices, of course.
    Could you please tell me what you think about my idea, and if it could work? Or am I inventing the wheel anew?
    Thanking you in advance for your response, I have the honour to remain yours sincerely,
    Jan Willem E. Roberts


  117. Korey

    It is a relaxing and entertaining way for your….

    Feel free to visit my blog; outpatient alcohol treatment – Korey

  118. transcription services cambridge ma

    I don’t know if it’s just me or if everybody else encountering issues with
    your blog. It looks like some of the text in
    your content are running off the screen. Can somebody else please comment and let me
    know if this is happening to them too? This may be a issue with my web browser because I’ve had this happen previously.
    Appreciate it

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>