Connect with us

Problem with a homemade ECG

Discussion in 'General Electronics Discussion' started by rjng, Jul 6, 2013.

Scroll to continue with content
  1. rjng

    rjng

    10
    0
    Jul 6, 2013
    Hi guys!

    My first post!

    I'm a medicine student and a hobbyist in electronics.
    I have been trying a circuit to make a homemade electrocardiograph (ECG). I know it will be very hard to make a good device cheapest. Well, the fun is try!

    The best I did was this project here: http://www.eng.utah.edu/~jnguyen/ecg/ecg_index.html

    It worked very nice. And more - using knowledge of cardiology, I could expand the possibility of using the device, getting 12 views of ECG (instead of the standard 3).
    The circuit is here: http://www.eng.utah.edu/~jnguyen/ecg/bigsch.gif
    Notes:
    IN- and IN+ is an electrode (for arm or leg)
    BODY is like a "ground", putted in right leg.
    Three electrodes is the basic of ECG.
    Nice.

    After some tries, I get a good result! I was really pleased.

    But there is a good problem. Understandind the standard of waves, we can detect a strange behavior of the wave. Look this image: http://s9.postimg.org/woxaexn7j/Problema_com_ondas_1.jpg

    After the big peak, I got a wave like a sine wave, first positive and after negative, until reach zero again. It cannot be right. This wave, in this case, is just positive! It occours in the original project (in that link above) too.
    Another problem is the "wrong zero" - biologically, where I wrote zero is real zero, and where is Wrong zero, have to be zero (its a ECG of mine, and i know im normal, or it could be an infarct! but the last image shows i'm normal :) )

    So, my question is - would you have any suggestions for changing the circuit to fix these problems? I have no idea.

    Thanks!!
     
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,418
    2,788
    Jan 21, 2010
    If you look carefully, what you'll probably note is that the signal you see is related somewhat to the derivative of the signal you want, i.e. if you look at the "actual" signal, your signal tracks the rate of change of that rather than the instantaneous value.

    The simplest cause of this is that the signal has a high impedance and it is driving a capacitive load.

    Since you're processing this on your PC, perhaps you can do some signal processing to null out this effect.

    One thing you can do is to use a signal source to input a square wave then process what to get on your PC to make it look as square as possible. Then your ECG signal should be cleaner.(make sure the input signal is the same magnitude as your ECG signal)
     
  3. rjng

    rjng

    10
    0
    Jul 6, 2013
    I had been suspecting a problem with the signal from the capacitor load.

    Well, in my limitation, it's not easy change de software... it's based in visual basic 6. I've already read the source code (I know basics of basic language), but I cant see a future in changing it :mad:
    I've already tried to decrease the sample rate of data acquisition. The standard is 44100. I dont remember what it caused exactly. I remember that in lower sample rates I got a cleaner signal, but I dont remember about my current problem. I still remember that very low sample rates (like 100, I guess), destroyed my signal :p but it come normal again with a little more sample rate. I have a real dificulty each time I need to test the circuit, its the why I cant test it now. But, do you think that decreasing sample rate could solve the problem?

    About the square wave input, yes, it will be interesting. Another useful application of this would be a possibility to set the voltage of signal detected. A commom ECG has a 1mV square wave signal in the end of paper to check the calibration of device and paper. Do you have any suggestion to make a 1mV signal source to use in a push button? I thought in a voltage divider with resistors, but I think it's very low voltage to do successfully. And I am subject to changes of battery voltage.

    Thanks!

    EDIT: change capacitors/resistors (I'm thinking in filtering things) could solve any problem?
     
    Last edited: Jul 6, 2013
  4. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,418
    2,788
    Jan 21, 2010
    Perhaps it would be best for you to show us the exact circuit you're using for the analog part of your circuit. It's also possible that the weirdness is happening at the input of the sound card you're using for input.
     
  5. rjng

    rjng

    10
    0
    Jul 6, 2013
    The exact circuit is this: http://www.eng.utah.edu/~jnguyen/ecg/bigsch.gif
    Nothing more.
    Using metal film 1% resistors.
    I don't if it's necessary to use there diodes.

    It's true... maybe the problems is in my soundcard... If true, it is a big problem, I think...
    Do I have risk to damage my soundcard playing with this circuit? Maybe adding a resistor in the output... maybe not necessary... It hasnt damage yet :D
     
  6. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,418
    2,788
    Jan 21, 2010
    There's something going on with that instrumentation amp. I don't understand the reason for the 2 op-amps in the middle.

    I would also place capacitors across the resistors used to generate the middle rail. It will help reduce noise a little.

    The signals are very small, the diodes should not be affecting them.
     
  7. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,270
    Nov 28, 2011
    If the signal you see looks like the differential of the expected signal, the problem is series capacitance (high-pass filtering), not parallel capacitance. This will be the input coupling capacitance in the sound card. Sound cards are not designed to (and will not) record signals in the region of 1 Hz (60 bpm heartbeat). You need to find the input coupling capacitors in your sound card and increase their value.
     
  8. rjng

    rjng

    10
    0
    Jul 6, 2013
    I can not give a reason for the existence of these amplifiers. Do you believe that they were helping or hindering?
    Any suggestions on where exactly to put new capacitors (and capacitance?)?
     
  9. rjng

    rjng

    10
    0
    Jul 6, 2013
    Unfortunatelly I'm using the soundcard of my notebook, and it wont be possible to change the capacitors. I have an USB Sound Card. It's not very good.. but maybe can help me. So, with a standard soundcard, I will never reach the expected signal? Or can change something in the circuit?

    Thanks
     
  10. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    648
    May 8, 2012
    Where did you download the VB6 source code from?

    Chris
     
  11. rjng

    rjng

    10
    0
    Jul 6, 2013
    I aseked to Marcus, from this webpage: http://www.neozap.com/freeECG.htm
    He modified the original source of the site project, and it's better. If you need the old original version, I have it too.
     
  12. eKretz

    eKretz

    251
    27
    Apr 8, 2013
  13. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    648
    May 8, 2012
    Thanks for the links mates. I was just curious to know if I knew the developer.

    Chris
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-