Home made ECG - Issues with interference - guru required!

Discussion in 'Electronics & Electrics' started by mhgarage, Nov 12, 2007.

  1. mhgarage

    mhgarage Member

    Joined:
    Feb 22, 2005
    Messages:
    1,080
    I've built a home made ECG to these designs:
    http://www.eng.utah.edu/~jnguyen/ecg/ecg_index.html

    Unfortunately, while I can see the QRS complex, the P & T waves get lost in the noise. It looks like everybody has atrial fibrillation - not good!

    Here's the physical device:

    As you can see, I have surface mounted it inside a tin can, intending to reduce the interference.
    [​IMG]


    I've also used shielded audio cable (single core, braided outer) for the electrode leads. The braiding is earthed to the tin can via the outer rim of the RCA plug.
    [​IMG]


    This is a view of the 'inside' of the can. As you can see, the three blue wires connect the 'leads' to the RCA plugs. I don't think they're the source of interference, even though they're not shielded, as there is no interference effect when the RCA cables (the black ones in the previous picture) are plugged in.
    [​IMG]

    Finally, here's a trace from the ecg, as recorded by my computer's sound card. The QRS is clearly visible, but the S & T are pretty much obscured by that lovely 50hz (i think it's 50hz) hum. Our power in australia is 240v/50hz, so this would make sense.
    [​IMG]



    So, i've put the electrics in a tin box. I've shielded the wire (although this may not be the correct procedure). I've earthed all the circuit earths to the main earth. I've even earthed the tin box to my computer's case. The noise persists.

    I'm totally out of ideas - and would love any input on how to reduce this interference! ECG's are really prone to noise (especially $7 ones) because of their design - amplifying a tiny signal many times.

    If you can't help - I hope you enjoyed the brief project outline anyway
     
  2. link1896

    link1896 Member

    Joined:
    Jul 28, 2005
    Messages:
    366
    Location:
    Melbourne
    What lever are the peaks? If no where near clipping, and are way down in level, you are probably using 18 to 24db of your sound cards ADC input range.
    A half decent sound card that has 16 bit ADC's MIGHT have 72-84db of dynamic range, older on board realtek's under 50db of wideband noise. (50/100hz noise can sometimes be less then 20db down)

    Add more gain to your adc until the peaks are near -0dB full scale on the sound cards ADC input if the above is true
     
  3. evil-mooo

    evil-mooo Member

    Joined:
    Jun 12, 2003
    Messages:
    503
    Location:
    Perth, WA
    You should be able to source the location of the noise by a bit of trial and error. Have you run a sample without the ECG connected? Have you run a sample without the electrode connected?
     
  4. OP
    OP
    mhgarage

    mhgarage Member

    Joined:
    Feb 22, 2005
    Messages:
    1,080
    Not sure what you mean regarding the peaks. The amplitude is fully adjustable using the potentiometer - however as the amplitude of the QRS increases, so to does the amplitude of the noise. My sound card is a 16 bit excel super-crapola one.

    Do you think it is sound card related noise given the following:

    Normally (no ECG connected) no noise, or a very slight 50hz function visible.
    Ecg connected, but no leads plugged in to the RCA plugs - no noise
    Ecg connected, leads connected - lots of noise.

    Seems to be rather related to the cables that you connect to the electrodes. But how could it be - given that they're shielded?
     
  5. OP
    OP
    mhgarage

    mhgarage Member

    Joined:
    Feb 22, 2005
    Messages:
    1,080
    Yes, without the ECG connected it's a flatline
    Yes, without the electrode leads i get a flatline
    With the electrode leads, i get a LOT of noise until it's connected to the electrodes - then the level of noise reaches the level you can see in the trace picture.

    Is the shielding correct? Audio cable with the outer braid connected to ground?
     
  6. evil-mooo

    evil-mooo Member

    Joined:
    Jun 12, 2003
    Messages:
    503
    Location:
    Perth, WA
    What are you using for electrodes? What do you get if you connect the two electrodes to each other and run a sample?
     
  7. OP
    OP
    mhgarage

    mhgarage Member

    Joined:
    Feb 22, 2005
    Messages:
    1,080
    I'm using proper electrodes - 3M red dot ecg electrodes. I get the same result if i use my copper coin electrodes as well.
    [​IMG]

    This is the noise from all three leads connected together. If i unplug them all, i get a flatline.

    EDIT:
    This is incorrect. I connected the wrong leads. When they're all connected together there is a flatline.
     
    Last edited: Nov 13, 2007
  8. zenturio

    zenturio Member

    Joined:
    Aug 23, 2003
    Messages:
    146
    Location:
    Perth 6060
    A home-made ECG? Can you make shock-paddles? Might come in useful someday.:shock:
     
  9. OP
    OP
    mhgarage

    mhgarage Member

    Joined:
    Feb 22, 2005
    Messages:
    1,080
    Naw - it's a diagnostic tool. It can't shock you unless you build it incorrectly! The home made defibrillator (or perhaps fibrillator?) comes next.
     
  10. Goth

    Goth Grumpy Member

    Joined:
    Jun 22, 2002
    Messages:
    9,228
    Location:
    /dev/null
    Connect the shield to the shield pin on the RCA plug, leave it isolated at the other end, of course.

    Keep the two electrode wires the same length if you can.
     
  11. OP
    OP
    mhgarage

    mhgarage Member

    Joined:
    Feb 22, 2005
    Messages:
    1,080
    Not sure what you mean.

    The braiding in the audio cable is connected to the outer ring of the RCA plug (Earthed to box in turn) and the inner core is connected to the ECG circuitry at the appropriate place. At the other (person) end of the electrode cable, the shielding terminates (without touching anything), and the core has a crocodile clip attached.

    There are 3 electrode wires - all the same length. Do you mean something different to the status quo?
     
  12. Odje

    Odje Member

    Joined:
    Jun 27, 2001
    Messages:
    2,290
    Location:
    Sydney
    Are you using an instrumentation amp in the circuit? I can't seem to find a schematic at the referred website. A discrete instrumentation amp would have a terrible CMRR.
     
  13. Goth

    Goth Grumpy Member

    Joined:
    Jun 22, 2002
    Messages:
    9,228
    Location:
    /dev/null
    Nope, I meant exactly what you just said, so what you've got is fine.

    I think the schematic can be improved - a dedicated Instrumentation Amplifier chip would be good.

    You know, there's a USB-interfaced ECG kit available from the usual electronics suppliers, right?
     
  14. OP
    OP
    mhgarage

    mhgarage Member

    Joined:
    Feb 22, 2005
    Messages:
    1,080
    Right. When all three are connected together there's no noise. I connected the wrong leads last night, giving an incorrect result!
    As for changing the fundamental circuit - i'd rather not as it's complete. I know it works without noise, as i used it with a laptop away from a desktop pc & other power supplies and it was perfect. Hence, i'm just trying to reduce interference, but am having trouble.

    Would a ferrite choke or anything work?

    Also, i know a USB kit exists, but i've never seen it for sale.
     
    Last edited: Nov 13, 2007
  15. OP
    OP
    mhgarage

    mhgarage Member

    Joined:
    Feb 22, 2005
    Messages:
    1,080
    3 op amps. The schematic is located here:
    http://www.eng.utah.edu/~jnguyen/ecg/bigsch.gif

    A better schematic is here:
    http://static.flickr.com/46/136265424_8781c4ef38_o.jpg

    This same circuit should give this result
    http://php.scripts.psu.edu/jem443/ForFun/ECG/
    (see the bottom of the page)

    I wonder - could my noise be caused by a faulty connection in the circuit? Hmm. I'll also try it on a notebook computer, even in a noisy environment.

    Any input gratefully received.
     
  16. wabbit

    wabbit Member

    Joined:
    Sep 9, 2003
    Messages:
    406
  17. OP
    OP
    mhgarage

    mhgarage Member

    Joined:
    Feb 22, 2005
    Messages:
    1,080
    Electrodes are placed correctly - the noise persists regardless of the lead i'm using.
     
  18. wabbit

    wabbit Member

    Joined:
    Sep 9, 2003
    Messages:
    406
  19. moscoe

    moscoe Member

    Joined:
    Nov 1, 2006
    Messages:
    38
    If you're not having any luck with the hardware you could always implement a band-stop filter in software.
     
  20. OP
    OP
    mhgarage

    mhgarage Member

    Joined:
    Feb 22, 2005
    Messages:
    1,080
    Sorry, what's the output jacket? Do you mean the audio cable outer shielding for the cable between ecg & computer? Hence also, what's the ring? Do you mean the - battery connection?
     

Share This Page