Home made ECG - Issues with interference - guru required!

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

  1. LethalCorpse

    LethalCorpse Member

    Joined:
    Mar 23, 2003
    Messages:
    3,749
    Location:
    Cambridge, Massachusetts
    The capacitor types are very important. You're using 3x 3kv caps in parallel with 3xceramics, this will not work out for the best, and will take up a huge amount of board space. DSE sells a 330n as R3031, and if they're out of that you can use an R3027 in parallel with an R3028. Stick to the MKTs where possible - monos would be better, but hard to get any decent range of values. Use the R3027 in parallel with the R3012 for the 160n. R3019 in parallel with R3012 for 43n. Otherwise looks okay, assuming those resistors are all 1/2W 1% tolerance.
     
  2. OP
    OP
    mhgarage

    mhgarage Member

    Joined:
    Feb 22, 2005
    Messages:
    1,080
    I've bought all polyfilm except for the 160n, where i bought R2629 and R2055 - before seeing your reply.
    Is this likely to stuff up the circuit?

    EDIT: On further testing, the R2629 tests out at 162nf - it should be ok just to use it by itself right?
     
    Last edited: Nov 16, 2007
  3. LethalCorpse

    LethalCorpse Member

    Joined:
    Mar 23, 2003
    Messages:
    3,749
    Location:
    Cambridge, Massachusetts
    Can't hurt, just might not work
     
  4. OP
    OP
    mhgarage

    mhgarage Member

    Joined:
    Feb 22, 2005
    Messages:
    1,080
    Right, well i've built it.
    I get no output from the low pass filter, but if i draw an output from the notch filter, i get more - not less - noise than before.
    I've checked & rechecked the circuit, and am out of ideas. I can't see any dry solder joints, incorrect placements or anything else :(

    Any ideas for troubleshooting?
     
  5. LethalCorpse

    LethalCorpse Member

    Joined:
    Mar 23, 2003
    Messages:
    3,749
    Location:
    Cambridge, Massachusetts
    Can you give us a photo of the board front and back? It might also be worthwhile measuring the exact values of the components you used, though you'd have to take them off the board.
     
  6. OP
    OP
    mhgarage

    mhgarage Member

    Joined:
    Feb 22, 2005
    Messages:
    1,080
    Sure, i'll dig it up and take some photos.

    Carefull, these are moderately large photos.

    [​IMG]
    Click to view full-sized image!
    Hosted by UGBox Image Store

    [​IMG]
    Click to view full-sized image!
    Hosted by UGBox Image Store

    [​IMG]
    Click to view full-sized image!
    Hosted by UGBox Image Store

    Sorry about the fugliness of my soldering/construction - i just did what fitted in.
     
    Last edited: Nov 19, 2007
  7. pippin88

    pippin88 Member

    Joined:
    Jul 26, 2001
    Messages:
    7,396
    Location:
    Newcastle
    I have nothing to contribute to the thread except to say that building an ECG at home is bloody cool. :thumbup:

    You mentioned trying it on a laptop - did you get a good tracing from that? P + T waves? Q?
     
  8. eugene259

    eugene259 Member

    Joined:
    Jul 13, 2004
    Messages:
    27
    Location:
    Hobart
    Audio amplifier people deal with hum all the time, usually it has to do with amps amplifying ground loops which are some artifact resulting from all ground in the cct being slightly different. I am not sure if it applies to input leads picking up interference at all but:

    The first golden rule of amplifier layout I think is 'star ground' - all grounds should come out of (or come into) one point as much as possible. Not sure if it is feasible in your case - the back of the veroboard looks hellish. Maybe you can try moving the shielding connection around different ground points in the cct and see if it makes a difference?

    Also how does the noise get into the system? Does the shielding pick up the noise and it is carried through the ground and gets amplified from there? Is there any difference to the signal if you disconnect the shielding from cct ground completely? Is there any difference if you connect the shielding to ground through a small resistor or small cap maybe?
     
  9. m4dd0g

    m4dd0g Member

    Joined:
    Apr 8, 2003
    Messages:
    62
    Location:
    Central Coast
    As a seller of ECG/EKG machines for the past 13 years I can safely say that no ECG on the market today can exist without a 50hz mains filter unless its being run in a room without flouresecnt lighting or other electrical devices and from a laptop or similar source with a battery and absolutely no mains hookup.

    We recomend all ECG testing to be done on stand alone machines that are fully charged and disconnected from mains or at least turned off.

    For all PC Based ECG we recomend using a laptop, if thats not possible then you must fall back on software or hardware filtering which can remove some part of the ECG that you need to see.

    I cant help you with how to build the filter, but I know that it is a necessary evil. There are a lot fo noisy appliances around, moving the device away from these is a must, fridges, air cons, PC screens, also make sure your patient is not laying near any of these items either. Especially so dont try running an ECG in a room next to a dentist, detnal drills on the same power circuits as an ECG totaly screw a tracing!

    There is a Japanese company called SUZUKEN and their brand of ECG is KENZ, the Australian Navy used their devices almost exclusively for years due to the quality of the build and reduced noise (50hz and electromagnetic) in the hulls of ships, the big steel hull was causing a lot of crap (echoed effect or somthing as it was described) that these devices were able to either do well themselves or filter out where necessary. But that still doesnt help you build your filter....

    Your electrodes, 3M Littmann, are most often referred to as the gold standard, but the electrode is only as good as the skin prep, shave, light abrade with high grit sand paper, before application. Around the 800 - 1000.
    The tracing in your picture though isnt poor leads its definately picking up the mains cycle, we refer to it as saw teeth, which Drs hate.
     
  10. OP
    OP
    mhgarage

    mhgarage Member

    Joined:
    Feb 22, 2005
    Messages:
    1,080
    Thanks for all your comments and suggestions. I won't have time to work on the ECG until next year unfortunately, but I do get an identifiable trace. If you cross your eyes enough one can even see the P&T waves :)
    I'm thinking of purchasing an ex hospital ecg for comparison purposes - but in all likelihood i'll have to use home brew electrode leads for that as well.

    And eugene, thanks for the suggestions - it is a pretty hellish mess & one i'll have to clean up. Unfortunately no time at the moment!
     
  11. Odje

    Odje Member

    Joined:
    Jun 27, 2001
    Messages:
    2,290
    Location:
    Sydney
    Just out of curiosity, why are you making an ECG? Home made can't really be used for any medical purpose. Is it for your own curiosity? I have made one for a uni project.
     
  12. OP
    OP
    mhgarage

    mhgarage Member

    Joined:
    Feb 22, 2005
    Messages:
    1,080
    I'm making it for curiosity. I've learned to read them for ambulance stuff, but i thought it could be fun to make my own, especially as commercial ones tend to be expensive. It's also a learning process.

    That looks like a cool ECG - have you got a trace from it?
     
  13. Odje

    Odje Member

    Joined:
    Jun 27, 2001
    Messages:
    2,290
    Location:
    Sydney
    Its for an educational exercise, so the quality is not all the important, as long as you learn from it. There is noticeable 50Hz noise, as we did not include a 50Hz filter due to board space, but we were going to add a software one, just did not get around to it.
    [​IMG]
     
  14. i7r7

    i7r7 Member

    Joined:
    Feb 14, 2004
    Messages:
    343
    Location:
    Brisbane
    I'm a bit of a latecomer to this thread but here it goes.

    My study is an absolutely horrible place to test an ECG because I'm sitting several centimetres away from a 6 outlet powerboard. Also, I'm using 3M Red Dot electrodes connected with unshielded alligator clips. So keep in mind that the 50Hz mains noise here is worse than the norm.

    This my electrocardiogram made using the DSE USB ECG graphed in Excel (with moving average trend-line in red):
    [​IMG]
    Click to view full-sized image!
    Hosted by UGBox Image Store

    There is quite a lot of 50Hz noise despite the circuit using a proper instrumentation amplifier with very high CMRR and 35Hz low pass filtering. Still, the P and T waves are well preserved.

    This the ECG I made last semester for a uni project:
    [​IMG]
    Click to view full-sized image!
    Hosted by UGBox Image Store

    This is the output waveform on my oscilloscope:
    [​IMG]
    Click to view full-sized image!
    Hosted by UGBox Image Store

    This circuit uses an op-amp based instrumentation amplifier, 0.1Hz to 80Hz filtering, right leg driver, QRS detector and heart rate display. If it weren't for the inappropriately chosen timescale the P and T waves are also well preserved. In fact, if you look closely you can see the U waves as well.

    This is the bit relevant to the OP:
    The problem with the P and T waves not showing up is to do with the sound card you're using to capture the waveform. The filtering before the ADC is removing the relatively low frequency P and T waves.

    The two ECGs shown above show very pronounced P and T waves since the digitizing units (R-2R ladder comparator and oscilloscope) do not have any inherent low frequency filtering.
     
  15. Odje

    Odje Member

    Joined:
    Jun 27, 2001
    Messages:
    2,290
    Location:
    Sydney
    Side note:
    May I ask how much and where from you got your scope? I am thinking about buying one the Owon ones as they are cheap and DSO. What do you think of it?
     
  16. OP
    OP
    mhgarage

    mhgarage Member

    Joined:
    Feb 22, 2005
    Messages:
    1,080
    That's quite a good trace. But you're right about the noise - that would make AF very hard to diagnose. Assuming you don't have AF it's a pretty healthy trace though - great job on the project!
     
  17. OP
    OP
    mhgarage

    mhgarage Member

    Joined:
    Feb 22, 2005
    Messages:
    1,080
    Great trace (well, the averaged one). Still a lot of noise, just like mine - would be great to eliminate it.
    I'll definitely be giving it another go again asap.
     
  18. i7r7

    i7r7 Member

    Joined:
    Feb 14, 2004
    Messages:
    343
    Location:
    Brisbane
    Mini-review of the Owon PDS6062:

    Has all the same functions as the entry level Tektronix. The large colour screen is heaps easier on the eyes than the smaller B+W screens on the entry level Tektronix. It has 250Ms/s sampling rate which it can be used for "one-shot" and digital waveforms (up to around 20Mhz before the filter distorts badly).

    Only gripe is that the buttons need a firm push to register so occasionally it will miss a button press but I find this happens the Tektronix ones as well.

    I bought mine from Boughen because they're very close to where I live and they have fairly reasonable prices. They advertised on a uni noticeboard the 20MHz version for $629 but ended up buying the 60MHz version. It normally costs around $1400 but I got mine for $1200 since it was a demo but was in perfect condition anyway.
     
  19. wabbit

    wabbit Member

    Joined:
    Sep 9, 2003
    Messages:
    406
    There's a nice design for a portable ECG in the October 2007 edition of the British mag, Electronics World. Instrumentation op-amp (AD624) front end feeding a 50 Hz notch filter (UAF42). Both chips available from Futurelec. Signal digitised by a PIC16F877 to drive a graphical LCD display. Shouldn't be too hard to change it to a serial interface driving a wireless or optically isolated PC connection.
     
    Last edited: Nov 27, 2007

Share This Page