ECG Front End Design - Page 1
Forum section: electronics / projects

author: Chryseus
author_rank: Regular Contributor
timestamp: August 21, 2014, 07:45:30 pm
content: I've been working on and off for the past month on a single lead ECG design using only analog filters.I'm using an AD620 instrumentation amplifier on the front, I've also successfully used an INA126 which is a good deal cheaper, the gain is set by R1 and R2 for around 3.5, U1 functions as a buffer with U3 being used as an inverting amplifier for the right leg drive to improve CMRR, on the output of the IA I have a 0.02Hz high pass filter and a preamp with a gain of 11, the main filter is a 8th order sallen key with a bessel response, the cutoff frequency is 40Hz, I've also included a 50Hz active twin-t notch filter to remove the remaining 50Hz.I'm currently testing this on a breadboard inside a shielded can, the results are fairly decent but I think they could be better so I'm looking for any advice on how to improve it.I could of course do most of the filtering digitally but for this design I want to keep it 100% analog.

author: German_EE
author_rank: Super Contributor
timestamp: August 21, 2014, 08:39:51 pm
content: How are you going to power this circuit? Please think carefully before you answer!

author: lewis
author_rank: Frequent Contributor
timestamp: August 21, 2014, 08:46:11 pm
content: Quote from: German_EE on August 21, 2014, 08:39:51 pmRectified mains should be fine.

author: Chryseus
author_rank: Regular Contributor
timestamp: August 21, 2014, 08:51:11 pm
content: Since I'm thinking of actually producing and selling it I would use battery just to make it idiot proof, currently I'm using a semi-isolated linear supply, it's not like I'm designing it for medical grade applications so some leakage is fine.

author: Maxlor
author_rank: Frequent Contributor
timestamp: August 21, 2014, 09:01:17 pm
content: I've used the circuit shown inTI App Note SLAA280Ain a battery-powered device with good success. I've used different opamps for OA1 and OA2 since I wasn't running the whole thing with an MSP430, but those don't matter much. The critical part is an Opamp with a high common mode rejection ratio. I stuck with their ina321, that worked well. It still picks up a lot of 50Hz noise, but that you can get rid of that with a (software) filter. The design seems to be simpler than yours, so if you compare the two, maybe you can find some optimization potential.

author: German_EE
author_rank: Super Contributor
timestamp: August 21, 2014, 09:01:57 pm
content: Here's the problem. You have an electrical device powered by the mains and you're connecting it to the human body via a conductive pad specially designed to make sure that there's a good connection. Apart from the electrical noise issues the safety problems are frightening, however, somebody has been kind enough to address the issue:http://www.mouser.de/applications/medical-power-supply/(it's in English).I've been working with electronics since 1975, I would not attach a mains powered device to my body that I had personally constructed, the risk is too great. A far better option is to power the front end off rechargeable batteries and then send the signals via isolation amplifiers to the CPU.

author: German_EE
author_rank: Super Contributor
timestamp: August 21, 2014, 09:04:43 pm
content: Correction, lewis suggested a rectified mains supply but I see that you are considering batteries. This is safer but as this might be considered a medical device I suggest that you take great care.

author: babysitter
author_rank: Frequent Contributor
timestamp: August 22, 2014, 07:42:52 am
content: Have a look at EU directive 93/42/EEC:Quote(Emphasis mine).You will need to word the intended use of the device carefully without touching this subjects when selling in the EU, then you are okay.Even if you get around this thing being a medical device but instead a fitness/wellness device (still possible by a little margin), I advise you to have a look at BS EN 60601-2-27 and 60601-1 for reference what are the requirements for a medical grade device. Fells better to make it so, still.At least I would suggest that you integrate series resistors above 100k into all leads except RLD, reconsider your R7/R8. The "perfect" isolation should withstand 6kV (optocouplers, DC DC converters) under all applicate climate conditions, this frees you from worries that if ever somebody will get defibrillated while wearing your stuff it conducts the shock to some poor bystander even under the worst conditions.(Still a risk but not completely neglectable. Forseeable abuse: A person with a cardiological condition might abuse your widget to monitor himself, gets into ventrilation and a household member might use the already-present AED! Even when you are not guilty, the court might require your presence for a while)Batteries and a thick fat high-IP plastics housing and creepage distances, and a radio link will fulfill that easily.Assess and note your risks and make your spec accordingly.EDIT: And you really want to go for AgCl Ag electrodes. The wet ones. And with conductive polymer body, giving some additional series resistance.

author: doktor pyta
author_rank: Frequent Contributor
timestamp: August 22, 2014, 09:52:34 am
content: I've designed several ECG amplifiers.Right leg drive loop will help, but IMO You have to be more concentrated on keeping CMRR as high as possible.1. R7 and R8 have low value (and have different values) and together with ECG leads impedance will completely degrade the CMRR of AD6202. the AD620 has low gain (x3,5) so You are not using it's full CMRR capabilities (see top of page 4/20 of AD620 datasheet)typically, the gain of 20...40 would be OK in this place. This will also allow to take advantage of the low noise of AD620.3. Biasing and protecting the inputs against RF and ESD is important.I can show You a great hint for biasing the inputs. When You use Instr AMP with high gain, electrochemical potentials can saturate Your amplifier. This can be a solution (It is not my idea):http://rfscientific.eu/ecg-inputs-biasingTry to explain how does it work

author: Chryseus
author_rank: Regular Contributor
timestamp: August 23, 2014, 03:11:55 pm
content: Thanks for the advice guys, I've implemented some of the suggestions and they certainly seem to improve the performanceAs for the safety issues I'm well aware of the concerns, if I'm going to sell it it will certainly not be sold as a medical device, regardless it will be battery only or powered with a certified medical grade power supply, I would also include defibrillation protection since there isn't really any reason for me not to, a little extra safety is worth the added cost.

author: Lukas
author_rank: Frequent Contributor
timestamp: August 23, 2014, 03:37:58 pm
content: I guess there'll be an ADC at the end of the signal chain?TI has a range of ADCs that have the frontend stuff integrated, all with programmable gain and so on.http://www.ti.com/product/ads1298On the one side, you connect the electrodes, on the other you get the data out via SPI. Doesn't get any simpler.

author: Chryseus
author_rank: Regular Contributor
timestamp: August 23, 2014, 03:50:56 pm
content: Quote from: Lukas on August 23, 2014, 03:37:58 pmThose look rather nice, I would certainly consider using something like that in the final design, my current design is more for the learning experience rather than actual usage.

author: eneuro
author_rank: Super Contributor
timestamp: August 24, 2014, 04:59:32 pm
content: Quote from: German_EE on August 21, 2014, 09:01:57 pmWhen we assume 300 Ohm human body resistance in a very bad scenario than 3V battery with current 3V/300R= 10mA looks like is below 20mA eclectrocut current, but is it a huge difference if we use transformer 230VAC with very good insulated output 3V?While we have >300 Ohm resistance is it possible to get more than 10mA current through human body from 3V isolated power supply?BTW: I've made 3V spot welder with currents close to 1000A using huge 230VAC transformer, but of course very low welded steel resistance allows such big currents to flow at 3V.What makes those medical power supply so special and more safe than 3VAC optoisolated output from 230VAC using transformer?