14
\$\begingroup\$

I want to create some project which uses an Arduino to collect and display ECG data. It uses two electrodes which are attached to the body (on the chest). The signal is then transmitted through op-amps to an Arduino ADC pin. The Arduino is connected just to a PC. Is it safe for both the human and the Arduino board to be connected this way?

Should I make some safety pracautions and if so, which?

\$\endgroup\$
  • 3
    \$\begingroup\$ Good on your for recognizing the situation was not as simple as it seemed, and asking before doing. Related: electronics.stackexchange.com/questions/120596/… \$\endgroup\$ – Matt Young Jul 15 '15 at 17:10
  • 1
    \$\begingroup\$ The use of a PC connected to an Arduino for ECG measurement is very dangerous. This question should be closed. \$\endgroup\$ – Leon Heller Jul 15 '15 at 17:18
  • \$\begingroup\$ I would like to use laptop (running on batery), is it safer? \$\endgroup\$ – Garnagar Jul 15 '15 at 18:00
  • 43
    \$\begingroup\$ @LeonHeller If your goal is to keep people safe, closing the question is one of the worst things you could do. Good information keeps people safe, not the lack thereof. \$\endgroup\$ – Lily Finley Jul 15 '15 at 18:38
  • 3
    \$\begingroup\$ @LeonHeller Consider contributing to this Meta question: What is our policy on dangerous stuff? As far as this question goes, I believe it should remain open. Note that as of yet we do not have a close reason "Too dangerous - such information should be withheld from the public and only provided in secret to those who we've deemed worthy." \$\endgroup\$ – Adam Davis Jul 15 '15 at 19:26
25
\$\begingroup\$

It's not advisable unless the entire project is low voltage and battery operated. Anything mains operated could be dangerous even if transformer isolated. There are specific safety requirements for mains operated patient attached equipment to protect against excessive leakage currents and potential safety hazards due to equipment or component failures.

Those regulations apply to professional medical equipment, but they are there for a reason. You shouldn't assume that it's safe to ignore them even if it's just a hobby project.

\$\endgroup\$
  • 12
    \$\begingroup\$ A small addition: even if the project is battery powered it still might be dangerous to connect the board via uart-usb converter without galvanic isolation. \$\endgroup\$ – Ashton H. Jul 15 '15 at 16:50
  • 5
    \$\begingroup\$ ^^This. On a desktop, the USB ground is earth, on laptops, who knows... Overall, a USB connection should be treated as mains in these types of applications. electronics.stackexchange.com/questions/120596/… \$\endgroup\$ – Matt Young Jul 15 '15 at 17:08
  • \$\begingroup\$ Practical recommendation: use a small fuse on the high side, e.g. 50mA or so (this much current shouldn't be flowing in an ECG!!) at a location which would kill all current flow. It will add some resistance so you may or may not need to take that into consideration. \$\endgroup\$ – Hugh Nolan Jul 16 '15 at 13:57
  • \$\begingroup\$ @AshtonH.:Not just "might be", it most definitely is. USB is not isolated and although it would involve multiple simultaneous failures, it could zap the test subject. \$\endgroup\$ – whatsisname Jul 16 '15 at 16:43
7
\$\begingroup\$

When doing an ECG test, the electrodes are much more conductive than dry skin, so the possibility of triggering fibrillation or other arrhythmia from small voltages is present and needs to be taken very seriously. Most pacemaker pulses for implanted pacemakers are from 2mV to 250mV. That's not a whole lot of voltage, and if your device accidentally drives that to the heart, you could be in a great deal of trouble.

Short answer: Read IEC 60601-2-25.

Medium answer: To do it these days, you need to have all your digital signals opto-isolated across a physical isolation boundary, and your power source has to be isolated (i.e. transformers). There are very detailed and strict requirements on what kind of protection those need to be capable of, which involves being able to withstand being zapped with many kiloVolts and not crossing the boundary.

All your amplification and data processing needs to take place upstream of your isolation boundary, with basically nothing but a UART crossing it. In short, you basically have to make a custom PCB to do it properly.

Use something like the TI ADS1298 as an analog front end, which you can communicate to through SPI.

\$\endgroup\$
  • \$\begingroup\$ "All your amplification and data processing needs to take place upstream of your isolation boundary" Not true at all, you will just need to do it in an electrically safe way. You could easily make a raspberry pi like device (with safe power supplies) do data processing and display safely off a 9V and have no isolation anywhere. It's probably just cheaper to isolate as close to the probe as possible. \$\endgroup\$ – Sam Jul 16 '15 at 20:06
  • 1
    \$\begingroup\$ "Short answer: Read IEC 60601-2-25." Isn't that the long answer? IEC 60601-2-25 is over 60 pages long. \$\endgroup\$ – Ajedi32 Jul 16 '15 at 21:10
  • \$\begingroup\$ @Ajedi32: short for me to write :) \$\endgroup\$ – whatsisname Jul 16 '15 at 21:22
  • \$\begingroup\$ @Sam: the requirements of the isolation boundary include minimum physical spacing and a variety of other requirements. Your wall wart won't fulfill the requirements. \$\endgroup\$ – whatsisname Jul 16 '15 at 21:27
  • \$\begingroup\$ @Sam I too disagree with all in "all your amplification and data processing needs to take place upstream of your isolation boundary." It's true that it would be darn impractical (if at all possible) to try to make the unamplified EKG signals cross the isolation boundary. However, there is more than one option for where to arrange galvanic isolation. It's even possible to do the mechanical design of the battery-powered device such that USB (for charging and readout of logged data) can't be plugged in at the same time as the electrode cable. \$\endgroup\$ – Nick Alexeev Jul 16 '15 at 22:45
2
\$\begingroup\$

You are not going to be able to read ECG signals with the on-board A/D, it does not amplify enough or have enough common mode gain rejection. You are going to have to use an instrumentation amplifier. With proper design (opto-coupler) it should be fairly safe to connect a battery powered instrumentation amplifier to an arduino, at least that is how I would do it. (I would wall power the instrumentation amplifier, but I'm a risk taking idiot)

\$\endgroup\$
  • 9
    \$\begingroup\$ For bonus risk use one of those $1 fake Apple wall plug adapters from eBay, but please let me take out some life insurance on you. \$\endgroup\$ – Spehro Pefhany Jul 15 '15 at 19:36
0
\$\begingroup\$

It is safe if you connect Arduino to the laptop and run it only using batteries (then the highest voltage that could shock you is the laptop's battery voltage - that should be safe enough).

I made a similar project some time ago using different parts - I chose to power the whole device from batteries and use Bluetooth to send data to the computer.

\$\endgroup\$
  • 1
    \$\begingroup\$ No, it is not safe even using a laptops battery. Implanted pacemaker pulses can be from 250mV to as low as 2mV. If that's enough to signal a heart beat, 5 volts or more from your laptop is definitely capable of it. \$\endgroup\$ – whatsisname Jul 16 '15 at 16:51
  • \$\begingroup\$ @whatsisname The front amplifier end of every EKG in the world is powered by +5V (it has to be). Neither it is galvanically isolated from the patient (it can't be). \$\endgroup\$ – Nick Alexeev Jul 16 '15 at 22:55
  • \$\begingroup\$ @NickAlexeev: yes, but they have far, far more stringent engineering requirements for safety met than any laptop power supply. \$\endgroup\$ – whatsisname Jul 17 '15 at 2:59
  • \$\begingroup\$ @whatsisname References and details for the "far more stringent requirements for safety [for the front amplifiers in the EKG front ends]", if you please? Keep in mind, we are still talking about DC supply rail voltages. \$\endgroup\$ – Nick Alexeev Jul 17 '15 at 3:27
0
\$\begingroup\$

The easiest, and safe, design would be to use a battery powered amplifier to amplify the electrodes signal, connect the amplifier to a battery powered Arduino to capture, process and store the information.
After disconnecting the electrodes from the patient, connect Arduino to PC any way you want (can), and transfer the data to the PC.
Obviously, you don't use this apparatus on anyone that has (wears) a "pace maker"!

\$\endgroup\$

protected by W5VO Jul 16 '15 at 12:19

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.