Overclockers Australia Forums

OCAU News - Wiki - QuickLinks - Pix - Sponsors  

Go Back   Overclockers Australia Forums > Specific Hardware Topics > Electronics & Electrics

Notices


Sign up for a free OCAU account and this ad will go away!
Search our forums with Google:
Reply
 
Thread Tools
Old 12th November 2007, 10:59 PM   #1
mhgarage Thread Starter
Member
 
mhgarage's Avatar
 
Join Date: Feb 2005
Posts: 1,074
Default Home made ECG - Issues with interference - guru required!

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.



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.



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.


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.




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
mhgarage is offline   Reply With Quote

Join OCAU to remove this ad!
Old 12th November 2007, 11:24 PM   #2
link1896
Member
 
link1896's Avatar
 
Join Date: Jul 2005
Location: Melbourne
Posts: 351
Default

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
link1896 is offline   Reply With Quote
Old 12th November 2007, 11:26 PM   #3
evil-mooo
Member
 
evil-mooo's Avatar
 
Join Date: Jun 2003
Location: Perth, WA
Posts: 503
Default

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?
evil-mooo is offline   Reply With Quote
Old 12th November 2007, 11:31 PM   #4
mhgarage Thread Starter
Member
 
mhgarage's Avatar
 
Join Date: Feb 2005
Posts: 1,074
Default

Quote:
Originally Posted by link1896 View Post
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
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?
mhgarage is offline   Reply With Quote
Old 12th November 2007, 11:33 PM   #5
mhgarage Thread Starter
Member
 
mhgarage's Avatar
 
Join Date: Feb 2005
Posts: 1,074
Default

Quote:
Originally Posted by evil-mooo View Post
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?
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?
mhgarage is offline   Reply With Quote
Old 12th November 2007, 11:39 PM   #6
evil-mooo
Member
 
evil-mooo's Avatar
 
Join Date: Jun 2003
Location: Perth, WA
Posts: 503
Default

What are you using for electrodes? What do you get if you connect the two electrodes to each other and run a sample?
evil-mooo is offline   Reply With Quote
Old 12th November 2007, 11:43 PM   #7
mhgarage Thread Starter
Member
 
mhgarage's Avatar
 
Join Date: Feb 2005
Posts: 1,074
Default

Quote:
Originally Posted by evil-mooo View Post
What are you using for electrodes? What do you get if you connect the two electrodes to each other and run a sample?
I'm using proper electrodes - 3M red dot ecg electrodes. I get the same result if i use my copper coin electrodes as well.


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 by mhgarage; 13th November 2007 at 8:40 AM.
mhgarage is offline   Reply With Quote
Old 12th November 2007, 11:45 PM   #8
zenturio
Member
 
zenturio's Avatar
 
Join Date: Aug 2003
Location: Perth 6060
Posts: 146
Default

A home-made ECG? Can you make shock-paddles? Might come in useful someday.
zenturio is offline   Reply With Quote
Old 12th November 2007, 11:49 PM   #9
mhgarage Thread Starter
Member
 
mhgarage's Avatar
 
Join Date: Feb 2005
Posts: 1,074
Default

Quote:
Originally Posted by zenturio View Post
A home-made ECG? Can you make shock-paddles? Might come in useful someday.
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.
mhgarage is offline   Reply With Quote
Old 13th November 2007, 12:02 AM   #10
Goth
Grumpy Member
 
Goth's Avatar
 
Join Date: Jun 2002
Location: /dev/null
Posts: 9,228
Default

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.
__________________
"How is anyone supposed to know that this isn't just a bunch of crap?" - Richard Feynman.
Goth is offline   Reply With Quote
Old 13th November 2007, 12:09 AM   #11
mhgarage Thread Starter
Member
 
mhgarage's Avatar
 
Join Date: Feb 2005
Posts: 1,074
Default

Quote:
Originally Posted by Goth View Post
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.
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?
mhgarage is offline   Reply With Quote
Old 13th November 2007, 12:38 AM   #12
Odje
Member
 
Odje's Avatar
 
Join Date: Jun 2001
Location: Sydney
Posts: 2,290
Default

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.
__________________
FOR SALE: unRAID Server Pro Registration Key $75

There are only 2 reasons why you should run,
1. If you are being chased or
2. If you are on fire
Odje is offline   Reply With Quote
Old 13th November 2007, 12:57 AM   #13
Goth
Grumpy Member
 
Goth's Avatar
 
Join Date: Jun 2002
Location: /dev/null
Posts: 9,228
Default

Quote:
Originally Posted by mhgarage View Post
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?
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?
__________________
"How is anyone supposed to know that this isn't just a bunch of crap?" - Richard Feynman.
Goth is offline   Reply With Quote
Old 13th November 2007, 8:42 AM   #14
mhgarage Thread Starter
Member
 
mhgarage's Avatar
 
Join Date: Feb 2005
Posts: 1,074
Default

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 by mhgarage; 13th November 2007 at 9:00 AM.
mhgarage is offline   Reply With Quote
Old 13th November 2007, 8:47 AM   #15
mhgarage Thread Starter
Member
 
mhgarage's Avatar
 
Join Date: Feb 2005
Posts: 1,074
Default

Quote:
Originally Posted by Odje View Post
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.
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.
mhgarage is offline   Reply With Quote
Reply

Bookmarks

Sign up for a free OCAU account and this ad will go away!

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +10. The time now is 1:47 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
OCAU is not responsible for the content of individual messages posted by others.
Other content copyright Overclockers Australia.
OCAU is hosted by Micron21!