Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

ECG/Nerve impulses and filtering 50HZ best way?

Status
Not open for further replies.

large_ghostman

Well-Known Member
Most Helpful Member
Ok slightly complicated what I want to do, so I will take it stages.

Very brief overview......

Hook your self upto a Oscilloscope and mainly you see all the noise from lights and the mains etc etc etc. So lets say I want to look at the electrical activity of the heart and electrical impulses from nerves (say in the arm etc when you move them).
I have a filter box, it plugs it can be battery powered/mains powered or passive. It has various types of filtering on it and you can pick the frequency to filter.
But for a start it can only do one frequency at a time.

1) So what would be the best filter topology to use to filter out the 50Hz mains the body picks up?

If I start there I can then look at the other swamping frequencies and deal with them. But before I try and look at amplifying other signals from the body I am interested in the filter of unwanted signals. I have read up on filters but I cant work out the best starting Topology to get rid of the 50Hz first.

End goal is a bit odd, so lets just stick with looking at heart activity first. I would really appreciate any help with this, I am not looking for the cheapest way, mainly the best way at the moment.

Thank you very much and I will try and not ask too many questions :D.
 
Which type of low pas filter though? The heart is essential just a start point, once I can get a clean signal I can move on to my main target signal.
 
You should be using an instrumentation amplifier with differential input; otherwise, with a single-ended amplifier you'll pick up so much mains interference no amount of filtering will yield a clean signal.

To see how, check out Figure 109 on page 67 of this appnote by Linear Technology.
 
For the mains frequency you can use a notch filter which has a deep signal rejection notch at the design frequency.
 
An ECG device uses shielded cables to the probes. Then instead of grounding the patient they feed him out-of-phase common mode interference to his right leg to cancel interference he picks up.
 

Attachments

  • ECG circuit.png
    ECG circuit.png
    23.6 KB · Views: 147
Wow thanks guys! Plenty of reading there to get me started! I picked the heart as its a strong and recognisable signal, once I can do that I can move on to the main target.

Interesting info on the leg AG thanks, this is something I might have to take a close look at. If I draw a notch filter etc in LT spice how do I do a frequency sweep in it? I am after filtering more than one frequency, but for now 50Hz will do as a start point. I wont know the target frequency for a while.
 
If I draw a notch filter etc in LT spice how do I do a frequency sweep in it?
That's a .AC analysis (under Simulation Command), and set up a driving source with a nonzero magnitude under its "AC" parameters (think that's a right-click for the "Advanced" properties).

I can't believe how many projects you have on the go!
 
That's a .AC analysis (under Simulation Command), and set up a driving source with a nonzero magnitude under its "AC" parameters (think that's a right-click for the "Advanced" properties).

I can't believe how many projects you have on the go!
I have to have a minimum of 4 or 5 on the go, I get them done quicker that way. What I do is work on one or two at a time, then if I hit a problem I leave it, i go work on one of the others while thinking the problem through. Once I think of a solution I go back to the stuck project.

No idea why it works that way for me but it just does. If I have say just 1 or 2 on the go, then if I get stuck on one, I tend to sit and brood and wrack my brain, the solution normally takes longer, because I then tend to over think it. So having 4 or 5 saves me time and stops me getting bored with a single project, also I hardly sleep. I dont watch much TV, I hate games consoles, Girls are just a complete enigma to me. So that leaves me with my hobbies............. :D

Thanks for the info, I am slowly getting the hang of spice. Really steep curve to start with, but slowly starts making sense.
 
A "tight" notch filter can be a pain to construct from normally available parts.

TI makes an IC specifically designed for this function (others as well):
upload_2017-4-24_9-37-31.png

A -20dB reduction might not be deep enough for you. I'm pretty sure you could cascade additional, similar circuits.

UAF42 info.
 
A "tight" notch filter can be a pain to construct from normally available parts.

A -20dB reduction might not be deep enough for you. I'm pretty sure you could cascade additional, similar circuits.

I don't think a notch is required, such devices are usually just low-pass, as the frequencies in question are low.
 
The classic twin-T (or bridged-T) notch filter can be a royal PITA to set up because it requires three precision resistors and three precision capacitors; to get good notch depth they must all be precisely matched, and to tune the filter the three resistors all have be adjusted in unison while maintaining the exact ratio between them.

There are other notch filter topologies you might look into:

The Wien bridge notch filter
The Fliege notch filter
The bridged-differentiator notch filter, which is very easy to tune, and
An interesting notch filter I can't find a name for (see 1st diagram on page).

The Q of the bridged-differentiator notch filter can be increased by buffering its output with a unity-gain follower, and connecting the junction of Ra and Rb to the follower's output instead of to ground.

One caution about notch filters: a 50 Hz notch filter will ONLY remove the 50 Hz fundamental frequency, leaving its harmonics, and all other high-frequency noise, unaffected.
 
I don't think a notch is required, such devices are usually just low-pass, as the frequencies in question are low.
Yes but later on I want to be able to pick frequencies and hammer those specific ones. A notch would give me the advantage of tight control, while this is 50Hz at the moment, some of the frequencies later on will be fairly close to each other.
 
The classic twin-T (or bridged-T) notch filter can be a royal PITA to set up because it requires three precision resistors and three precision capacitors; to get good notch depth they must all be precisely matched, and to tune the filter the three resistors all have be adjusted in unison while maintaining the exact ratio between them.

There are other notch filter topologies you might look into:

The Wien bridge notch filter
The Fliege notch filter
The bridged-differentiator notch filter, which is very easy to tune, and
An interesting notch filter I can't find a name for (see 1st diagram on page).

The Q of the bridged-differentiator notch filter can be increased by buffering its output with a unity-gain follower, and connecting the junction of Ra and Rb to the follower's output instead of to ground.

One caution about notch filters: a 50 Hz notch filter will ONLY remove the 50 Hz fundamental frequency, leaving its harmonics, and all other high-frequency noise, unaffected.
At the moment the Harmonics wont be a problem, I will end up with other frequencies to go after as well anyway. I will see if I can model the different types of filter in spice. See if I can get a feel for how to handle them, I was aware from the start it wouldnt be easy. The end goal is not easy but worth the effort to me.
 
I just found the LT filter CAD, it has a custom option. Might be worth looking at...........
Thanks for the links, Would make sense to have a go and build some. I also like AG's idea of the cancelling via the leg, as its for nerves etc that might be a good option.
 
A notch filter to reduce 50Hz does nothing about its harmonics. Hold the live input wire of your 'scope to see that 50Hz mains interference is not a perfect sinewave.
The circuits with the right leg cancellation of interference do not show a notch or lowpass filter, maybe because it is not needed.
 
A notch filter to reduce 50Hz does nothing about its harmonics. Hold the live input wire of your 'scope to see that 50Hz mains interference is not a perfect sinewave.
The circuits with the right leg cancellation of interference do not show a notch or lowpass filter, maybe because it is not needed.
Yeah good point AG.
So first step try the circuit shown for ECG, from there I can start looking at what I am really after, my assumption being the cancelling part should work for most signals I am after?

Having said the Notch filter may well be useful for some of the other frequencies I want to cancel out. Sorry its all a bit vague, but the project itself is a bit 'out there'.

So for now until I get the first couple of bits done, I am better of not mentioning it, I dont want to get into pages of WHY'S :D.
 
The cancelling circuit cancels all signals picked up by both inputs of the instrumentation amplifier at the same time including some DC from breathing.
 
The cancelling circuit cancels all signals picked up by both inputs of the instrumentation amplifier at the same time including some DC from breathing.
So it will work for the heart, but not for some nerves. Or put a better way I can only go after one frequency at a time. Not a problem for now, I want to get the first bit done. Then I will worry about the other parts. Apart from the heart most of the other frequencies I am likely to get hold of are all under 40Hz. Unless I take a scalpel to someone.... ANY Volunteers??
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top