cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

alsec_4003696
New Contributor II

Hey everyone, I am kind of new here so if any mistake sorry about that .

Currently I am using PSoC5 LP - CY8C5888LTI-LP097. I am trying to get ECG signal by using ADC. The chain i have used in my schematic is shown below.

pastedImage_0.png

First of all i tried 3 LEAD measurement. I have connected probes on my wrists(which is not problem because i have tested with real ecg device it is working on 2 wrists and one on the left waist). I get really good data on the oscilloscope. One day after, I can't see any good data on the oscilloscope, looks a lot of noise. However, whenever i apply some pressure on the probe on my left wrist or move it to find best contact i can see the data but with some noise. I don't know why i have this problem. It is really weird that sometimes i had really pure data just like in the real ecg device, sometimes i don't. By the way, my left waist is connected to GND of the PSoC5 and i am triying to measure (differential) left-right or vice versa.

Lastly, i am using AD8232 PCB board only for connections jack and probes. I don't even power it up.

If anyone  have idea about this issue I would be happy to hear answer. Thanks a lot!.

ADC config:

pastedImage_1.png

0 Likes
Reply
1 Solution
AnDu_1277466
New Contributor II

I attached detail of an equivalent circuit developed by hardware. It was designed as a low consumption circuit, which also does not use CPU. What you are interested in is the integrator part, as it is designed. I observe that you make the voltage reference to GND in the integrator (RL), possibly you have the problem at this point. If you want to use only two electrodes you should derive the integrator to the RA and RL inputs, but the filtering of the noise is always better with three leads.

The ECG of surface of the heart can be around 500uV to 3 mV, and depends on the capacity of the cardiac muscle, the volume and if it is in perfect conditions. Depending on what you want to detect, you can design the band pass filter between 0.5 Hz to 45 Hz or up to 200 Hz.

Study and practice with these designs and you will find the solution to your problem, the input signals must have a reference voltage, and that is RL.

I hope you can solve your problem.

a greeting

Te adjunto detalle de un circuito equivalente desarrollado por hardware. Fué diseñado como circuito de bajo consumo, que además no utiliza CPU. Lo que te interesa es la parte del integrador, como está diseñado. Observo que haces la referencia de voltaje a GND en el integrador (RL), posiblemente tengas el problema en este punto. Si quieres utilizar solamente dos electrodos deberías derivar el integrador a las entradas RA y RL, pero el filtraje del ruido siempre es mejor con tres derivaciones.

El ECG de superficie del corazón puede estar alrededor de 500uV a 3 mV, y depende de la capacidad del musculo cardiaco, del volumen y de si está en perfectas condiciones. Según lo que desees detectar puedes diseñar el filtro pasabanda entre 0,5 Hz a 45 Hz o hasta 200 Hz.

Estudia y practica con estos diseños y encontraras la solución a tu problema, las señales de entrada deben tener un voltaje de referencia  , y ese es RL.

Espero que puedas resolver tu problema.

Un saludo

View solution in original post

0 Likes
Reply
12 Replies
EmHo_296241
Contributor II

Hi,

This looks like a hardware issue. Is the input to MCU is proper when your result is not correct ? Please confirm that. Please confirm you are able to get proper signal from the sensors all the time.

0 Likes
Reply
alsec_4003696
New Contributor II

Well, i have soldered the cables from AD8232 to PSoC5 inputs with cable and it is looks quite good soldering. Do you have any idea about the problem? I don't think that is the major problem. Because when i had really pure data, i saw data on the oscilloscope screen even i move the cables.

0 Likes
Reply
odissey1
Honored Contributor II

Ali,

My best guess that something simple is going on, like the wrist electrodes dried up. I believe that weak salt solution must be applied to improve electrical contact with the skin.

/odissey1

0 Likes
Reply
alsec_4003696
New Contributor II

Hey,
Thank you for your answer, it might be salt solution on the wrist but as i said , i have tested it with real ecg device on the same time . Maybe filtering of the real ecg device is much better then my implementation(digital filter block). That is why i am totally confused.

0 Likes
Reply
odissey1
Honored Contributor II

Ali,

From your description of the issue: the Sparkfun board worked well, and PSoC5 project with same electrodes didn't perform as good as Sparkfun board. If this is the case, I recommend to look into several ECG projects on this forum.

https://community.cypress.com/thread/10987#39904

The issue is that AD8232 has 24-bit resolution, and you set DelSig_ADC resolution to 16-bit, so it is hard to expect same performance. Try using 20-bit resolution and increase buffer gain. Connect electrodes directly to PSoC board, bypassing Sparkfun board.

/odissey1

0 Likes
Reply
AnDu_1277466
New Contributor II

First of all I start by the contacts of the signal input between your device and the skin, if you use professional electrodes that adhere to the skin, you must first clean the skin with alcohol and let it evaporate. Then you can stick these electrodes to the skin. To have good ECG vectors, I recommend making a triangle between the left man - right shoulder and right side right between the first rib and the right arm.

If you use conductive metal plates, it is good to put between the plate and the skin a piece of fine sponge soaked in alcohol, it is a good conductor of the electrical signal

Second part, in your electrical diagram you do not see the connection of the RL electrode that is just the one that should be connected to the base of the right rib or foot, right or left, this is not important if what you want to see is simply the ECG , but it is important for the rejection in common mode of the input signal.

Look at the AD8232 and you will see how it works.

En primer lugar empiezo por los contactos de la entrada de señal entre tu dispositivo y la piel, si utilizas electrodos profesionales que se adhieren a la piel, primero has de limpiar la piel con alcohol y dejar evaporar. Despues puedes pegar estos electrodos a la piel. Para tener buenos vectores de ECG te recomiendo hacer un triangulo entre hombre izquierdo - hombro derecho y lateral derecho justo entre la primera costilla y el brazo derecho.

Si utilizas placas de metal conductor, es bueno poner entre la placa y la piel un trozo de esponja fina empapada en alcohol, es un buen conductor de la señal electrica

Segunda parte, en tu esquema electrico no se vé la conexión del electrodo RL que es justamente el que debe ir conectado a la base de la costilla derecha o pié, derecho o izquierdo, esto no es importante si lo que quieres ver es simplemente el ECG, pero si es importante para el rechazo en modo común de la señal de entrada.

Fijate en el AD8232 y comprobarás como funciona.

0 Likes
Reply
alsec_4003696
New Contributor II

Hey,
Thank you very much your detailed reply. Let me tell you what i have tried and what i get as a resul.st

First of all , I have tried same configuration (RA, LA  and GND connected to my right side of the stomach)  with alcohol  cleaning. Looks like it affected a little bit and after some time (stabilization) i get really good data on the screen as i showed below. pastedImage_0.png

The weird thing is  it looks almost perfect on my body. However, with same configuration i have inserted probes on my friend at the same part of the body with cleaning, it doesnt work(a lot of noises on around 100hz or something like that, but i can see the peaks only).
I still don't know why sometimes i see really good data and why it just get noise when sometingh happen.

Secondly, I have changed probes, instead of using AD8232 sensor jack and probes, I have cut real ecg probes with (12 lead measurement) and connected the corresponding outputs to  PSoC5 pins. Then i tried same configuration (RA,LA  and direct GND of PSoC to my right side of stomach) and this time result was more noisy and it was affecting by anyone who is near to me when he moving on the air

Lastly, i have tried RL Driver circuit as your recommendation, i have used this schematic ( I am not sure if i used correctly) . And result was the worst one. I can't even see peaks. Looks a lot of frequently noise on my oscilloscope screeen.
Schematic i have used here:
ECG_DENEME.png

Well, hope I explained my experiments clearly.
I would really appreciated if any help

Good works.

AnDu_1277466
New Contributor II

Img1.jpgImg3.jpgImg4.pngImg6.png

AnDu_1277466
New Contributor II

I attached detail of an equivalent circuit developed by hardware. It was designed as a low consumption circuit, which also does not use CPU. What you are interested in is the integrator part, as it is designed. I observe that you make the voltage reference to GND in the integrator (RL), possibly you have the problem at this point. If you want to use only two electrodes you should derive the integrator to the RA and RL inputs, but the filtering of the noise is always better with three leads.

The ECG of surface of the heart can be around 500uV to 3 mV, and depends on the capacity of the cardiac muscle, the volume and if it is in perfect conditions. Depending on what you want to detect, you can design the band pass filter between 0.5 Hz to 45 Hz or up to 200 Hz.

Study and practice with these designs and you will find the solution to your problem, the input signals must have a reference voltage, and that is RL.

I hope you can solve your problem.

a greeting

Te adjunto detalle de un circuito equivalente desarrollado por hardware. Fué diseñado como circuito de bajo consumo, que además no utiliza CPU. Lo que te interesa es la parte del integrador, como está diseñado. Observo que haces la referencia de voltaje a GND en el integrador (RL), posiblemente tengas el problema en este punto. Si quieres utilizar solamente dos electrodos deberías derivar el integrador a las entradas RA y RL, pero el filtraje del ruido siempre es mejor con tres derivaciones.

El ECG de superficie del corazón puede estar alrededor de 500uV a 3 mV, y depende de la capacidad del musculo cardiaco, del volumen y de si está en perfectas condiciones. Según lo que desees detectar puedes diseñar el filtro pasabanda entre 0,5 Hz a 45 Hz o hasta 200 Hz.

Estudia y practica con estos diseños y encontraras la solución a tu problema, las señales de entrada deben tener un voltaje de referencia  , y ese es RL.

Espero que puedas resolver tu problema.

Un saludo

View solution in original post

0 Likes
Reply
alsec_4003696
New Contributor II

Hey again,
Thank you very much your long answer. Unfortunately, I have tested my circuit( I still used PSoC5 with external RL circuit that you have posted on above) as I have showed in below, It does not work I have changed PGA's reference voltage as 1.024 volt  and used this Vref on the RL circuit as well.

pastedImage_1.png

Am I doing something wrong? I connect my RL Probe directly to the right waist of my body. I only changed the 40M ohm resistors with 1 M ohm since I don't have 40 M. Rest of the circuit for RL schematic is same.

Also My ADC input range is 0.512 V selected

Thanks for your kind reply.
If any help, i would be appreciated,
Regards.

0 Likes
Reply
AnDu_1277466
New Contributor II

Another very important thing, do you have the RA and RL registration cables shielded to GND?

if they are not shielded you should do it to eliminate any kind of interference to your circuit.

If you have difficulties, you can publish your project.

Regards

Otra cosa muy importante, tienes los cables de registro RA y RL apantallados a GND?

si no los tienes apantallados deberías hacerlo para eliminar cualquier tipo de interferencia a tu circuito.

Si tienes dificultades, puedes publicar tu proyecto.

Saludos

0 Likes
Reply
alsec_4003696
New Contributor II

pastedImage_0.png
Hey again,
I think I have made mistake and I realise that I should get the op-amp (RLD circuit) inputs from the Vref input of the PGAs . When  I get them from there instead of directly to RA and LA pins, I can see at least some noisy signal, however again when I apply some pressure or move a little bit probes then I am able to see signal properly and sometimes it does not look good at all on other people. Here schematic I have used. I would be really appreciated can you give me a hand about this situation if I am doing sometihng wrong. Thank you very much.
Regards.

0 Likes
Reply