Author Topic: Building an EKG analog front end circuit  (Read 5297 times)

0 Members and 1 Guest are viewing this topic.

Offline omair4ahmadTopic starter

  • Newbie
  • Posts: 5
  • Country: in
Building an EKG analog front end circuit
« on: October 24, 2016, 09:29:56 am »
I am trying to reproduce an EKG analog front end circuit. I have attached the schematics of the circuit.
In my design I have used instrumentation amplifier IC - INA128P and for quad op-amp IC - TL084CN.
The problem I am facing is that, when I am trying to acquire the EKG signal on the oscilloscope i am getting pretty distorted signal and it is no way near ideal ekg signal. please help me out with your suggestions.
 

Offline kxenos

  • Frequent Contributor
  • **
  • Posts: 284
  • Country: gr
Re: Building an EKG analog front end circuit
« Reply #1 on: October 24, 2016, 09:40:48 am »
What kind of distortion is there? Clipping? noise? Can you post a screenshot of the oscilloscope?
 

Offline tszaboo

  • Super Contributor
  • ***
  • Posts: 7390
  • Country: nl
  • Current job: ATEX product design
Re: Building an EKG analog front end circuit
« Reply #2 on: October 24, 2016, 09:51:30 am »
When they took my ECG, they used 7 leads to to it. I reckon, one of them is intentionally GND (on my leg?), the other 6 are inputs.
But this time, the issue is much simpler:
INA12x Precision, Low Power Instrumentation Amplifiers
Wide Supply Range: ±2.25 V to ±18 V
 

Offline omair4ahmadTopic starter

  • Newbie
  • Posts: 5
  • Country: in
Re: Building an EKG analog front end circuit
« Reply #3 on: October 24, 2016, 10:49:10 am »
thanks kxenos and nandblog for your replies.
i have taken 2 snapshots, one with no contact of any on the arm and another with both the arms in contact with the circuit.
 
The following users thanked this post: jonovid

Offline kxenos

  • Frequent Contributor
  • **
  • Posts: 284
  • Country: gr
Re: Building an EKG analog front end circuit
« Reply #4 on: October 24, 2016, 11:36:48 am »
It seems like the normal EKG signal is modulated on a sinusoidal signal. The common mode noise is not filtered.
Could this sine be 50Hz? If so, that means that your virtual ground subcircuit is not working properly and you need a 3rd wire to ground the patient (Right leg ground).
For testing you can just ground the patient to the circuit ground via a third wire and see if there is any change. Also, have in mind that your oscilloscope's probe is connected to earth ground.
 
The following users thanked this post: firewalker

Offline omair4ahmadTopic starter

  • Newbie
  • Posts: 5
  • Country: in
Re: Building an EKG analog front end circuit
« Reply #5 on: November 03, 2016, 05:51:31 am »
thanks kxenos for your advice. yes i agree with you it could be 50 hz sine as my line supply is 240V and 50Hz. pardon me if i sound stupid but i am provide a dc current of 8V to the circuit. When I connect my oscilloscope to the supply line it shows a smooth 8V DC, no sign of any sine wave there but i this circuit why am i getting a sine wave even when no limb is connected.
One more thing that I have observed here is that my quad op-amp IC TL084 might be drawing more than mcp6004 but due to the unavailability of mcp6004 i used TL084.
I am just a beginner and I desperately needs your expert advice. Please keep me posted,
 

Offline trophosphere

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: us
Re: Building an EKG analog front end circuit
« Reply #6 on: November 03, 2016, 06:08:39 am »
1) What are your time/div settings in your initial two images showing your waveforms without and with the leads attached?
2) Can you please attach pictures showing the output waveforms for the outputs of your instrumentation amplifier (pin 6 of IC1) and secondary gain stage (pin 8 of IC2)?
3) Try shorting your two inputs together and scoping the output of your circuit. Is the interference still present?
 

Online JPortici

  • Super Contributor
  • ***
  • Posts: 3461
  • Country: it
Re: Building an EKG analog front end circuit
« Reply #7 on: November 03, 2016, 07:29:29 am »
INA12x Precision, Low Power Instrumentation Amplifiers
Wide Supply Range: ±2.25 V to ±18 V
and this is still ignored..
« Last Edit: November 03, 2016, 07:31:27 am by JPortici »
 

Offline trophosphere

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: us
Re: Building an EKG analog front end circuit
« Reply #8 on: November 03, 2016, 08:04:59 am »
INA12x Precision, Low Power Instrumentation Amplifiers
Wide Supply Range: ±2.25 V to ±18 V
and this is still ignored..

I don't quite understand what you are hinting at. The OP seems to be feeding his instrumentation amplifier with VDD=8v, VSS=0v, and VGND=4v (from the buffered voltage divider so no problems sourcing/sinking reasonable amount of current). From the instrumentation amplifier's perspective it is being biased at ±4v which is within the acceptable range. In addition, he is biasing his instrumentation amplifier at VGND so no problems there.
 

Online nali

  • Frequent Contributor
  • **
  • Posts: 657
  • Country: gb
Re: Building an EKG analog front end circuit
« Reply #9 on: November 03, 2016, 08:54:46 am »
Although it's just some lecture notes this may give you some general pointers

http://www.realworldengineering.org/index.php?page=project&project=591
(click on the background lecture, for some reason the direct pdf link doesn't work)

Remember ECG signals are pretty tiny! Apart from power noise you'll also see plenty of interference from muscle movements so unless the person being monitored is lying still there will be plenty of noise artifacts, even after the differential measurement.

 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Re: Building an EKG analog front end circuit
« Reply #10 on: November 06, 2016, 12:15:35 am »
Page 30 shows a design -


http://www.ti.com/lit/ds/symlink/ina826.pdf


Regards, Dana.
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Offline trophosphere

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: us
Re: Building an EKG analog front end circuit
« Reply #11 on: November 06, 2016, 01:51:53 am »
Because IC1 V+ and V- go to a rail labeled +3.3V and a GND symbol....(from the first post)?
I guess I did not read the other schematic (?) where +/- 4V / 8V is shows.

That's what I initially thought first after seeing the schematic but in a subsequent post by the OP, the OP states:
Quote from: omair4ahmad
pardon me if i sound stupid but i am provide a dc current of 8V to the circuit. When I connect my oscilloscope to the supply line it shows a smooth 8V DC, no sign of any sine wave there but i this circuit why am i getting a sine wave even when no limb is connected.

Unless the OP decided to randomly change voltages on us without telling us his/her reason is I assumed the voltage in the schematic was a mistake. OP needs to clarify then if the rail voltage is 3.3v or 8v because his/her schematic says one thing and they say another which is quite confusing and not helpful at all.
 

Offline trophosphere

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: us
Re: Building an EKG analog front end circuit
« Reply #12 on: November 06, 2016, 02:28:30 am »
@evb149 You are certainly right about that. The right leg drive can be implemented by an amplifier that inverts the common-mode signal being fed into the instrumentation amplifier to increase the CMRR.

Another possible cause, if the voltage he is providing to his circuit is not the issue, would be if the negative voltage rail of the power supply is earth grounded as well in addition to the grounded oscilloscope probe: that could create a rather large ground loop.
 

Offline Seekonk

  • Super Contributor
  • ***
  • Posts: 1938
  • Country: us
Re: Building an EKG analog front end circuit
« Reply #13 on: November 06, 2016, 06:10:42 am »
I need to build one of these myself since I have serious heart issues.  The internet is full of plans and few are this complicated or expensive.  Just marking this for future reference.
 

Offline omair4ahmadTopic starter

  • Newbie
  • Posts: 5
  • Country: in
Re: Building an EKG analog front end circuit
« Reply #14 on: November 07, 2016, 02:27:01 pm »
thank you everyone for such in depth analysis. what i've drawn from above discussion is that i should add a right leg drive circuit.
I am thinking of using a 9V battery for supplying the dc supply voltage in this circuit to overcome the sine modulation from the 50hz mains. please assist me if i can do that.
 

Offline ian.rees

  • Contributor
  • Posts: 48
  • Country: nz
Re: Building an EKG analog front end circuit
« Reply #15 on: November 07, 2016, 09:00:25 pm »
I am thinking of using a 9V battery for supplying the dc supply voltage in this circuit to overcome the sine modulation from the 50hz mains.
My understanding is that the 50Hz (or 60Hz) that you're rejecting isn't from the power supply of your device, but instead is picked up from all the mains wires, equipment, etc. in the area.  In other words, even before your EKG is connected to the patient, the patient's electrical potential is modulating at the power line frequency to some degree.  So, using a 9V battery won't change the picture very much.
 

Offline Audioguru

  • Super Contributor
  • ***
  • Posts: 1507
  • Country: ca
Re: Building an EKG analog front end circuit
« Reply #16 on: November 08, 2016, 12:14:37 am »
Feeding the patient with the out-of-phase interference signal to his right leg cancels most interference. Using shielded audio cables feeding each probe also cancels most interference.
 

Offline kxenos

  • Frequent Contributor
  • **
  • Posts: 284
  • Country: gr
Re: Building an EKG analog front end circuit
« Reply #17 on: November 08, 2016, 06:01:23 am »
You can try the following:
Split R3 in your schematic into 2 resistors. Then from the center tap a wire. In this wire you will have the common mode voltage. Feed this signal into an inverting amplifier with gain more than one and then to the patient as ground.
 

Offline omair4ahmadTopic starter

  • Newbie
  • Posts: 5
  • Country: in
Re: Building an EKG analog front end circuit
« Reply #18 on: November 28, 2016, 05:54:41 am »
Thank you trophosphere.
1. The time div is 5 ms.
2. the pics of the output from inst amp as well as quad amp is the same and it is attached with this reply.
3. When I short both the inputs i got a linear dc line.
I gave it a swing of +8V to -8V and some how got rid of the line interference but still i didn't got the output as EKG signal. I haven't included any right leg drive circuit because i want to make this model handy. Please help me what should i do next.
 

Offline skrap

  • Contributor
  • Posts: 29
Re: Building an EKG analog front end circuit
« Reply #19 on: November 29, 2016, 03:52:15 am »
You might find this one interesting:
http://www.analog.com/en/analog-dialogue/raqs/raq-issue-110.html

An isolation amplifier between the oscilloscope and your ECG circuit might be a good idea for more than noise reasons.
 

Offline trophosphere

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: us
Re: Building an EKG analog front end circuit
« Reply #20 on: November 29, 2016, 06:37:31 am »
Hook up a function generator to the inputs of your EKG analog front-end and set the waveform to something like a sine-wave with the amplitude set at 100mVpp. The positive output of the function generator can go to the +IN and the ground of the function generator can go into -IN. Hook up your oscilloscope such that your probe is connected directly to the output of the instrumentation amplifier and connect the ground lead of your oscilloscope to your virtual ground.

NOTE
Make sure that your power supply's ground is not earth referenced. You will want to avoid shorting your circuit's virtual ground to your power supply's ground through your oscilloscope. In addition, make sure the function generator's ground is not earth referenced as well as it will result in clipping.

You should see, if the instrumentation amplifier is operating correctly, an amplified sine-wave of about 1.16Vpp on your oscilloscope.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf