Libelium is offering new technical support channels, to contact with de Technical Support team to solve any issue our doubt please contact with your sales agent or visit our contact site



Post a new topicPost a reply Page 1 of 1   [ 10 posts ]
Author Message
 Post subject: ECG values and wrong display on KST
PostPosted: Sun Mar 26, 2017 5:26 am 

Joined: Sat Sep 17, 2016 11:23 am
Posts: 15
Hi there,

here is my ECG values :

http://textuploader.com/dtys2

and here's the code :

https://paste.ofcode.org/Ei699JXLVEWLKjD8Mt3ZUT

And here is what I get from KST and the details :

http://imgur.com/a/7RGpS

Why am I getting that display on KST ?

Thank you


Top
 Profile  
 
 Post subject: Re: ECG values and wrong display on KST
PostPosted: Mon Mar 27, 2017 7:50 am 

Joined: Mon Sep 28, 2009 12:06 pm
Posts: 11366
Hi SandCat,

Try to use the ECG adhesives with a conductive gel.

Are you powering the device with a external power supply?

Please post some photos about the hardware connection.

Regards.


Top
 Profile  
 
 Post subject: Re: ECG values and wrong display on KST
PostPosted: Wed Apr 05, 2017 7:05 pm 

Joined: Sat Sep 17, 2016 11:23 am
Posts: 15
Hi

Thank you for replying
And to answer your question
No I'm not using an external power supply and here are some photos

http://imgur.com/a/PnKdl

As you can see I used ECG adhesives and of course I took the plastic cover off
And I cannot buy a conducive gel

Thank you


Top
 Profile  
 
 Post subject: Re: ECG values and wrong display on KST
PostPosted: Thu Apr 06, 2017 8:08 am 

Joined: Mon Sep 28, 2009 12:06 pm
Posts: 11366
Hello SandCat,

we see that you are in a Raspberry Pi. ECG is read in ADC channel 1 (A1 in connection bridge). Please could you test if your ADC is working correctly with a basic ADC code and taking GND and 5V to the ADC inputs with a wire?

Here is connection bridge tutorial:
https://www.cooking-hacks.com/documenta ... on-bridge/

Please run this code in order to test your ADC:

Code:
//Include arduPi library
#include "arduPi.h"

char selected_channel[1];
char read_values[4];

int channel_0 = 0;
int channel_1 = 0;
int channel_2 = 0;
int channel_3 = 0;
int channel_4 = 0;
int channel_5 = 0;
int channel_6 = 0;
int channel_7 = 0;

float analog_0 = 0.0;
float analog_1 = 0.0;
float analog_2 = 0.0;
float analog_3 = 0.0;
float analog_4 = 0.0;
float analog_5 = 0.0;
float analog_6 = 0.0;
float analog_7 = 0.0;

void setup()
{
  Wire.begin(); // join i2C bus (address optional for master)
}

void loop()
{
  // channel 0
  Wire.beginTransmission(8);
  selected_channel[0] = 0xDC;
  Wire.read_rs(selected_channel, read_values, 2);
  Wire.read_rs(selected_channel, read_values, 2);
  channel_0 = int(read_values[0])*16 + int(read_values[1]>>4);
  analog_0 = channel_0 * 5.0 / 4095.0;
  printf("Channel 0:\n");
  printf("Digital value = %d / Analog value = %fV\n\n", channel_0, analog_0);


  // channel 1
  Wire.beginTransmission(8);
  selected_channel[0] = 0x9C;
  Wire.read_rs(selected_channel, read_values, 2);
  Wire.read_rs(selected_channel, read_values, 2);
  channel_1 = int(read_values[0])*16 + int(read_values[1]>>4);
  analog_1 = channel_1 * 5.0 / 4095.0;
  printf("Channel 1:\n");
  printf("Digital value = %d / Analog value = %fV\n\n", channel_1, analog_1);
 
 
  // channel 2
  Wire.beginTransmission(8);
  selected_channel[0] = 0xCC;
  Wire.read_rs(selected_channel, read_values, 2);
  Wire.read_rs(selected_channel, read_values, 2);
  channel_2 = int(read_values[0])*16 + int(read_values[1]>>4);
  analog_2 = channel_2 * 5.0 / 4095.0;
  printf("Channel 2:\n");
  printf("Digital value = %d / Analog value = %fV\n\n", channel_2, analog_2);
 
 
  // channel 3
  Wire.beginTransmission(8);
  selected_channel[0] = 0x8C;
  Wire.read_rs(selected_channel, read_values, 2);
  Wire.read_rs(selected_channel, read_values, 2);
  channel_3 = int(read_values[0])*16 + int(read_values[1]>>4);
  analog_3 = channel_3 * 5.0 / 4095.0;
  printf("Channel 3:\n");
  printf("Digital value = %d / Analog value = %fV\n\n", channel_3, analog_3);
 
 
  // channel 4
  Wire.beginTransmission(8);
  selected_channel[0] = 0xAC;
  Wire.read_rs(selected_channel, read_values, 2);
  Wire.read_rs(selected_channel, read_values, 2);
  channel_4 = int(read_values[0])*16 + int(read_values[1]>>4);
  analog_4 = channel_4 * 5.0 / 4095.0;
  printf("Channel 4 (vertical header):\n");
  printf("Digital value = %d / Analog value = %fV\n\n", channel_4, analog_4);
 
 
  // channel 5
  Wire.beginTransmission(8);
  selected_channel[0] = 0xEC;
  Wire.read_rs(selected_channel, read_values, 2);
  Wire.read_rs(selected_channel, read_values, 2);
  channel_5 = int(read_values[0])*16 + int(read_values[1]>>4);
  analog_5 = channel_5 * 5.0 / 4095.0;
  printf("Channel 5 (vertical header):\n");
  printf("Digital value = %d / Analog value = %fV\n\n", channel_5, analog_5);
 
 
  // channel 6
  Wire.beginTransmission(8);
  selected_channel[0] = 0xBC;
  Wire.read_rs(selected_channel, read_values, 2);
  Wire.read_rs(selected_channel, read_values, 2);
  channel_6 = int(read_values[0])*16 + int(read_values[1]>>4);
  analog_6 = channel_6 * 5.0 / 4095.0;
  printf("Channel 6 (vertical header):\n");
  printf("Digital value = %d / Analog value = %fV\n\n", channel_6, analog_6);
 
 
  // channel 7
  Wire.beginTransmission(8);
  selected_channel[0] = 0xFC;
  Wire.read_rs(selected_channel, read_values, 2);
  Wire.read_rs(selected_channel, read_values, 2);
  channel_7 = int(read_values[0])*16 + int(read_values[1]>>4);
  analog_7 = channel_7 * 5.0 / 4095.0;
  printf("Channel 7 (vertical header):\n");
  printf("Digital value = %d / Analog value = %fV\n\n", channel_7, analog_7);
 
 
  printf("***********************************\n");



  delay(1000);

}


int main (){
   setup();
   while(1){
      loop();
   }
   return (0);
}
               


Regards


Top
 Profile  
 
 Post subject: Re: ECG values and wrong display on KST
PostPosted: Wed Apr 19, 2017 10:59 pm 

Joined: Sat Sep 17, 2016 11:23 am
Posts: 15
Thank you for your concern
Please see the result :

Code:
Channel 0:
Digital value = 2375 / Analog value = 2.899878V

Channel 1:
Digital value = 23 / Analog value = 0.028083V

Channel 2:
Digital value = 398 / Analog value = 0.485958V

Channel 3:
Digital value = 2647 / Analog value = 3.231990V

Channel 4 (vertical header):
Digital value = 1809 / Analog value = 2.208791V

Channel 5 (vertical header):
Digital value = 1740 / Analog value = 2.124542V

Channel 6 (vertical header):
Digital value = 1669 / Analog value = 2.037851V

Channel 7 (vertical header):
Digital value = 1741 / Analog value = 2.125763V

***********************************
Channel 0:
Digital value = 3361 / Analog value = 4.103785V

Channel 1:
Digital value = 20 / Analog value = 0.024420V

Channel 2:
Digital value = 406 / Analog value = 0.495726V

Channel 3:
Digital value = 2692 / Analog value = 3.286935V

Channel 4 (vertical header):
Digital value = 1810 / Analog value = 2.210012V

Channel 5 (vertical header):
Digital value = 1775 / Analog value = 2.167277V

Channel 6 (vertical header):
Digital value = 1691 / Analog value = 2.064713V

Channel 7 (vertical header):
Digital value = 1762 / Analog value = 2.151404V

***********************************
Channel 0:
Digital value = 3245 / Analog value = 3.962149V

Channel 1:
Digital value = 31 / Analog value = 0.037851V

Channel 2:
Digital value = 397 / Analog value = 0.484737V

Channel 3:
Digital value = 2638 / Analog value = 3.221001V

Channel 4 (vertical header):
Digital value = 1823 / Analog value = 2.225885V

Channel 5 (vertical header):
Digital value = 1788 / Analog value = 2.183150V

Channel 6 (vertical header):
Digital value = 1711 / Analog value = 2.089133V

Channel 7 (vertical header):
Digital value = 1778 / Analog value = 2.170940V

***********************************
Channel 0:
Digital value = 1875 / Analog value = 2.289377V

Channel 1:
Digital value = 34 / Analog value = 0.041514V

Channel 2:
Digital value = 403 / Analog value = 0.492063V

Channel 3:
Digital value = 2639 / Analog value = 3.222222V

Channel 4 (vertical header):
Digital value = 1815 / Analog value = 2.216117V

Channel 5 (vertical header):
Digital value = 1780 / Analog value = 2.173382V

Channel 6 (vertical header):
Digital value = 1692 / Analog value = 2.065934V

Channel 7 (vertical header):
Digital value = 1760 / Analog value = 2.148962V

***********************************
Channel 0:
Digital value = 1536 / Analog value = 1.875458V

Channel 1:
Digital value = 34 / Analog value = 0.041514V

Channel 2:
Digital value = 397 / Analog value = 0.484737V

Channel 3:
Digital value = 2634 / Analog value = 3.216117V

Channel 4 (vertical header):
Digital value = 1813 / Analog value = 2.213675V

Channel 5 (vertical header):
Digital value = 1779 / Analog value = 2.172161V

Channel 6 (vertical header):
Digital value = 1696 / Analog value = 2.070818V

Channel 7 (vertical header):
Digital value = 1764 / Analog value = 2.153846V

***********************************
Channel 0:
Digital value = 2682 / Analog value = 3.274725V

Channel 1:
Digital value = 22 / Analog value = 0.026862V

Channel 2:
Digital value = 397 / Analog value = 0.484737V

Channel 3:
Digital value = 2641 / Analog value = 3.224664V

Channel 4 (vertical header):
Digital value = 1812 / Analog value = 2.212454V

Channel 5 (vertical header):
Digital value = 1780 / Analog value = 2.173382V

Channel 6 (vertical header):
Digital value = 1692 / Analog value = 2.065934V

Channel 7 (vertical header):
Digital value = 1761 / Analog value = 2.150183V

***********************************
Channel 0:
Digital value = 3558 / Analog value = 4.344322V

Channel 1:
Digital value = 26 / Analog value = 0.031746V

Channel 2:
Digital value = 397 / Analog value = 0.484737V

Channel 3:
Digital value = 2638 / Analog value = 3.221001V

Channel 4 (vertical header):
Digital value = 1820 / Analog value = 2.222222V

Channel 5 (vertical header):
Digital value = 1791 / Analog value = 2.186813V

Channel 6 (vertical header):
Digital value = 1713 / Analog value = 2.091575V

Channel 7 (vertical header):
Digital value = 1789 / Analog value = 2.184371V


Top
 Profile  
 
 Post subject: Re: ECG values and wrong display on KST
PostPosted: Thu Apr 20, 2017 9:04 am 

Joined: Mon Sep 28, 2009 12:06 pm
Posts: 11366
Hello SandCat,

could you post a photo of your hardware setup? in order to detect if the ADC (analogic to digital converter) is working please with a wire connect GND, 3v3 and 5V in A0, A1, A2....when you run the code and check de outputs.

Regards


Top
 Profile  
 
 Post subject: Re: ECG values and wrong display on KST
PostPosted: Tue Apr 25, 2017 7:33 pm 

Joined: Sat Sep 17, 2016 11:23 am
Posts: 15
Thank you for replying
but sorry my ignorance, do you want me to use multimeter and test GND, 3v3 and 0.5V ?
And what do you mean by A0, A1, A2 ? Are they some values in the multimeter ?


Top
 Profile  
 
 Post subject: Re: ECG values and wrong display on KST
PostPosted: Wed Apr 26, 2017 9:57 am 

Joined: Mon Sep 28, 2009 12:06 pm
Posts: 11366
Hello SandCat,

there is no need to have a multimeter. Here is Raspberry Pi to arduino shields connection bridge, are you using this bridge?

https://www.cooking-hacks.com/documenta ... on-bridge/

Image

Here you can see where A0, A1 is..they are analog inputs.

You only have to connect with a wire A0 and the different Power pins when you are running the ADC code, and check if it have sense.

Regards


Top
 Profile  
 
 Post subject: Re: ECG values and wrong display on KST
PostPosted: Fri Apr 28, 2017 1:26 pm 

Joined: Sat Sep 17, 2016 11:23 am
Posts: 15
Yes I'm using it
So I need to connect a wire between GND and A0, A1 ... etc and run the ADC code right?
But can you tell me what kind of wire do I need to use please?
Thank you for your patience


Top
 Profile  
 
 Post subject: Re: ECG values and wrong display on KST
PostPosted: Tue May 02, 2017 7:40 am 

Joined: Mon Sep 28, 2009 12:06 pm
Posts: 11366
Hello Sandcat,

yes, that is. You can use any single wire. For this type of connections is usually used a wire as one of those that can be seen in this photo:

Image

Regards


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 10 posts ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Libelium theme based on 610nm Style by Daniel St. Jules of http://www.gamexe.net


© Libelium Comunicaciones Distribuidas S.L. | Terms of use.