Post a new topicPost a reply Page 1 of 1   [ 8 posts ]
Author Message
 Post subject: Problem with gSR measurement
PostPosted: Wed Oct 04, 2017 5:40 pm 

Joined: Sun Oct 01, 2017 8:01 am
Posts: 18
Hi everyone

I'm trying to measure GSR by the script below.

But, the broad returns values around 23-27 micr siemens even when sensors are attached NOWHERE!

When sesors are attached to skin surface, values with similar rage are recorded.

So, it seems to me that e-health sensor is measuring nothing.
The pins are connected to right sockets.

What should I do?

Some Japanese characters are included in the script below.
**********************
#include <eHealth.h>

int inByte; // 受信するシリアル通信の文字列
float ECG;
float conductance;
float temperature ;
unsigned long sTime = 0;
#define SF 20
long ms;
int count;

void setup() {
// 9600bpsでシリアルポートを開始
Serial.begin(9600);
// 受信する文字列を初期化
inByte = 0;
// 通信を開始
establishContact();
ms=millis();
}

void loop() {
// もしProcessingから何か文字を受けとったら
if ((Serial.available() > 0)&(millis()>=ms+SF)) {
ms=millis();
// 受信した文字列を読み込み
inByte = Serial.read();
// センサーの値を計測
ECG = eHealth.getECG();
conductance=eHealth.getSkinConductance();
temperature=eHealth.getTemperature();

// コンマ区切りでセンサーの値を送出
Serial.print(millis());
Serial.print(",");
Serial.print(ECG, 3);
Serial.print(",");
Serial.print(conductance, 3);
Serial.print(",");
Serial.println(temperature, 3);
}
}

void establishContact() {
// Processingから何か文字が送られてくるのを待つ
while (Serial.available() <= 0) {
// 初期化用の文字列
Serial.println("0,0");
delay(300);
}
}


Top
 Profile  
 
 Post subject: Re: Problem with gSR measurement
PostPosted: Thu Oct 05, 2017 8:22 am 

Joined: Mon Sep 28, 2009 12:06 pm
Posts: 11292
Hello hhhddd,

could you post some photos of your hardware connection? Are you using Arduino Uno?

Regards


Top
 Profile  
 
 Post subject: Re: Problem with gSR measurement
PostPosted: Mon Oct 09, 2017 2:39 pm 

Joined: Sun Oct 01, 2017 8:01 am
Posts: 18
Hi everyone

Yes, I'm using Arduino UNO.

And here is the image of connection.
http://tinypic.com/view.php?pic=2dj3y86 ... dt6_Gi0PIU

Best


Top
 Profile  
 
 Post subject: Re: Problem with gSR measurement
PostPosted: Tue Oct 10, 2017 7:19 am 

Joined: Mon Sep 28, 2009 12:06 pm
Posts: 11292
Hi hhhddd,

Please test the sensors with the basic code and post here the output.

Code:
/* 
 *  eHealth sensor platform for Arduino and Raspberry from Cooking-hacks.
 * 
 *  Copyright (C) Libelium Comunicaciones Distribuidas S.L.
 *  http://www.libelium.com
 * 
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *  a
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 * 
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see http://www.gnu.org/licenses/.
 * 
 *  Version:           2.0
 *  Design:            David Gascón
 *  Implementation:    Luis Martin & Ahmad Saad
 */

//Include eHealth library
#include < eHealth.h >

void loop() {

  float conductance = eHealth.getSkinConductance();
  float resistance = eHealth.getSkinResistance();
  float conductanceVol = eHealth.getSkinConductanceVoltage();

  printf("Conductance : %f \n", conductance);
  printf("Resistance : %f \n", resistance);
  printf("Conductance Voltage : %f \n", conductanceVol);

  printf("\n");

  // wait for a second
  delay(1000);
}

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


Regards


Top
 Profile  
 
 Post subject: Re: Problem with gSR measurement
PostPosted: Thu Oct 12, 2017 4:58 am 

Joined: Sun Oct 01, 2017 8:01 am
Posts: 18
Hi everyone

I'm not sure, but in my undestanding, printf function itself does not display anything anywhere.
And actually, i couldn't find the output of your script after writing it to arduino.

Do I have too modify this script by myself, or am I totally misguided?

By the way, I tried GSR measurement again using my script.
Currently, it's returning "-1" when sensors are detached from the skin.

My question is, why does this board behave in a wildly different way.

best


Top
 Profile  
 
 Post subject: Re: Problem with gSR measurement
PostPosted: Mon Oct 16, 2017 7:37 am 

Joined: Mon Sep 28, 2009 12:06 pm
Posts: 11292
Hello hhhddd,

sorry, our mistake, this is the basic code for GSR, please post the results:

Code:
/*
 *  eHealth sensor platform for Arduino and Raspberry from Cooking-hacks.
 *
 *  Description: "The e-Health Sensor Shield allows Arduino and Raspberry Pi
 *  users to perform biometric and medical applications by using 9 different
 *  sensors: Pulse and Oxygen in Blood Sensor (SPO2), Airflow Sensor (Breathing),
 *  Body Temperature, Electrocardiogram Sensor (ECG), Glucometer, Galvanic Skin
 *  Response Sensor (GSR - Sweating), Blood Pressure (Sphygmomanometer) and
 *  Patient Position (Accelerometer)."
 *
 *  In this example we use the skin sensor to measure some
 *  parameters like the skin resistance and coductance.
 *
 *  Copyright (C) 2012 Libelium Comunicaciones Distribuidas S.L.
 *  http://www.libelium.com
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/> .
 *
 *  Version 2.0
 *  Author: Luis Martin & Ahmad Saad
 */

#include <eHealth.h>

// the setup routine runs once when you press reset:
void setup() {
  Serial.begin(115200); 
}

// the loop routine runs over and over again forever:
void loop() {

  float conductance = eHealth.getSkinConductance();
  float resistance = eHealth.getSkinResistance();
  float conductanceVol = eHealth.getSkinConductanceVoltage();

  Serial.print("Conductance : ");       
  Serial.print(conductance, 2); 
  Serial.println("");         

  Serial.print("Resistance : ");       
  Serial.print(resistance, 2); 
  Serial.println("");   

  Serial.print("Conductance Voltage : ");       
  Serial.print(conductanceVol, 4); 
  Serial.println("");

  Serial.print("\n");

  // wait for a second 
  delay(1000);           
}





Regards


Top
 Profile  
 
 Post subject: Re: Problem with gSR measurement
PostPosted: Thu Oct 26, 2017 8:15 pm 

Joined: Sat Mar 18, 2017 7:58 pm
Posts: 8
This is the sample reading that I am getting for GSR on eHealth platform. The connection is ok and there is firm contact with my fingers. I used the GSR example code provided by cooking hacks and I am running Arduino 1.0.6
What could be going wrong and how can i fix it? The picture of the connection is shown in

http://tinypic.com/r/9r51mq/9

Thanks.

Resistance : 6017652.50
Conductance Voltage : 0.4888

Conductance : -1.00
Resistance : -1.00
Conductance Voltage : 0.4888

Conductance : -1.00
Resistance : -1.00
Conductance Voltage : 0.4888

Conductance : -1.00
Resistance : -1.00
Conductance Voltage : 0.4985

Conductance : -1.00
Resistance : -1.00
Conductance Voltage : 0.4888

Conductance : -1.00
Resistance : -1.00
Conductance Voltage : 0.4888

Conductance : -1.00
Resistance : -1.00
Conductance Voltage : 0.4888

Conductance : -1.00
Resistance : -1.00
Conductance Voltage : 0.4839

Conductance : -1.00
Resistance : -1.00
Conductance Voltage : 0.4839

Conductance : -1.00
Resistance : -1.00
Conductance Voltage : 0.4936

Conductance : -1.00
Resistance : 14614300.00
Conductance Voltage : 0.4888

Conductance : -1.00
Resistance : -1.00
Conductance Voltage : 0.4888

Conductance : -1.00
Resistance : -1.00
Conductance Voltage : 0.4888

Conductance : -1.00
Resistance : -1.00
Conductance Voltage : 0.4888

Conductance : -1.00
Resistance : -1.00
Conductance Voltage : 0.4888

Conductance : -1.00
Resistance : -1.00
Conductance Voltage : 0.4888


Top
 Profile  
 
 Post subject: Re: Problem with gSR measurement
PostPosted: Fri Oct 27, 2017 7:40 am 

Joined: Mon Sep 28, 2009 12:06 pm
Posts: 11292
Hello TFK,

in order to check if there is variations in the readings, please try to wet your fingers, or place different THD resistors between the two terminals.

Regards


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 8 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.