2

I am making a project of Real-time ECG monitoring device using Raspberry Pi 3B+, Heart monitor AD8232 sensor by Keyes, MCP3008 ADC and 7" HDMI LCD. I am giving supply to RPi using 5V DC charger connected to power supply of 220V AC. The code and circuitry I'm using are working and I have tested all the analogue sensors. But when I use AD8232 Heart monitor sensor, it doesn't give the right ECG data but only the noise. When I used the same sensor on Arduino UNO and Nano, the sensor was behaving the same. Just noisy data on the serial plotter of Arduino IDE. Unintentionally, I placed my hand on my laptop's body and the ECG started coming on the serial plotter. Exact ECG peaks were detected. Then I again lifted my hand from the laptop and the real ECG went away and noise started coming. I tried this process many times and also tried 3 different heart monitor sensors but the response was the same. Arduino Serial plotter - ECG SENSOR VALUES - (when I put hand on my  laptop's body.)

In Above figure: Arduino Serial plotter - ECG SENSOR VALUES - (when I put the hand on my laptop's body.)

After observing this, I realized that it's the electrostatic charge of my body which get mixed with ECG and the noisy signal comes. When I put the hand on the laptop body, my body gets discharged through the laptop body and the laptop body is always connected to Earth and the Arduino is also connected to USB port of the same laptop.

Now the question is, How can I discharge my body when the sensor is directly connected to Raspberry Pi?I have also tried power supply of RPi from power bank giving output of 5V DC, 2100mA

tlfong01
  • 4,665
  • 3
  • 10
  • 24
Umer Farooq
  • 29
  • 1
  • 5

1 Answers1

2

Question

1. How can I discharge my body?
2. I have also tried power bank, ... 

Short Answer

  1. Ah, you body acts like an antenna (sort of radio set antenna) picking up the mains electromagnetic wave signal near by. It is different from static electric charge. In other words, you cannot "discharge" your body. You use the Einthoven Triangle connection of your single lead to cancel out the mains noise on your body. It is similar to the use of differential input or twisted pair wires to cancel out the noise. I recommend to read the two references below for more details.

ecg lead connection

  1. Yes, using power bank is good idea, because it is almost any noise free. I just use batteries, keeping it very near the AD8232, and decoupled anything with Rpi. (For MCP3008, you might also like to use batteries very near by.)

AD8232 on battery

I don't use the 3.5mm plug and long wire. I keep the wires out to the AD8232 very short by directly connecting to the duPont male header.

ad8232 short wiring

You might like to look at the AD8232 ECG of my own faint heart. :)

my ecg

Long Answer

Yes, noise is the most common ADC newbie sorrow.

The most trouble making noise comes from the 220/110 50/60Hz mains noise, which is picked up by the PSU, through EMI and through connecting and grounding wires.

In your ECG case, your little body is picking up huge mains noise, so you are in the biggest trouble.

On the other hand, the ADCs themselves also generate noise, though somewhat smaller, inside the chip, when they are doing high frequency chopping in analog to digital operation, and switching between analog and digital channels.

Before I move on, you might like to skim the posts referred at the bottom, where I discussed the noise problem using the very old SPI 10/12 bit MCP3x0y, ACS712/723, INA219/221, and how I have been trying to solve the problem using new type of low noise I2C/SPI 16/24 ADCs using HX711, ADS1025/1115, ADS1256, ...

You might notice that the new generation of ADCs almost always say their chip is very low noise, mains noise rejection, and selectable gain (to adjust the full scale for low resolution loss).

hx711

And if you are using MCP300x or MCP3204, do not use Vcc or resistor divided Vcc as the Vref, because Vcc is noisy. Use a good Vref chip such as KA431.

ka431

And it is a good idea to use a dedicated PSU, with adequate by pass caps, placed near the ADC. This way you can use this rather stable PSU as voltage reference, in case you do not want to use a zener or volt ref chip.

psu for adc

/ to continue, ...

References

Forum Posts

Raspberry Pi Current & Voltage Sensors (10A rating and ~40V respectively)

Waveshare ADC Board negative value issue

ECG Realtime Noise Filtering (MCP3008, ADS1015/ADS1115) - Rpi Forum

Datasheets and Application Notes

ADC8232 Datasheet - Analog Devices

ADC Single-Lead, Heart Rate Monitor Front End - Analog Devices

Multiphysiological Parameter Patient Monitoring -Bill Crone Analog Devices

SparkFun AD8232 Single Lead Heart Rate Monitor Module - US$19.95

SparkFun AD8232 Single Lead Heart Rate Monitor Module Schematic

SparkFun AD8232 Single Lead Heart Rate Monitor Module Features

The AD8232 SparkFun Single Lead Heart Rate Monitor Board is used to 
measure the electrical activity of the heart. 

This electrical activity can be charted as ECG or output as an analog 
reading. 

ECGs can be extremely noisy, the AD8232 Single Lead Heart Rate Monitor 
acts as an op amp to help obtain a clear signal from the PR and QT 
Intervals easily.

The AD8232 is an integrated signal conditioning block for ECG and other 
biopotential measurement applications. It is designed to extract, 
amplify, and filter small biopotential signals in the presence of noisy 
conditions, such as those created by motion or remote electrode placement.

The AD8232 Heart Rate Monitor breaks out nine connections from the IC that 
you can solder pins, wires, or other connectors to. 

SDN, LO+, LO-, OUTPUT, 3.3V, GND provide essential pins for operating 
this monitor with an Arduino or other development board. 

Also provided on this board are 

RA (Right Arm), LA (Left Arm), and RL (Right Leg) pins 

to attach and use your own custom sensors. 

Additionally, there is an LED indicator light that will pulsate to 
the rhythm of a heart beat, ... 

ECG Signal Interpretation Learning Notes

Introduction to ECG Interpretation - FG Yanowitz 2018

How to use 1-lead ECG recorders to obtain 12-lead resting ECGs - JW Grier 2008

CJMCU-30100 MAX30102 MAX30100 Pulse Oximeter Heart Rate Sensor

tlfong01
  • 4,665
  • 3
  • 10
  • 24