GSR, standing for galvanic skin response, is a method of measuring the electrical conductance of the skin. Strong emotion can cause stimulus to your sympathetic nervous system, resulting more sweat being secreted by the sweat glands. Grove – GSR allows you to spot such strong emotions by simple attaching two electrodes to two fingers on one hand, an interesting gear to create emotion related projects, like sleep quality monitor.

Dependencies:   mbed

Description

GSR, standing for galvanic skin response, is a method of measuring the electrical conductance of the skin. Strong emotion can cause stimulus to your sympathetic nervous system, resulting more sweat being secreted by the sweat glands. Grove – GSR allows you to spot such strong emotions by simple attaching two electrodes to two fingers on one hand, an interesting gear to create emotion related projects, like sleep quality monitor.

Specifications

  • Input Voltage: 5V/3.3V
  • Sensitivity adjustable via a potentiometer
  • External measuring finger cots

Use

Load code onto mbed, plug GSR into an Analog port and buzzer (optional) into a digital port. Make sure to change to ping mapping in the code to match the pin mapping you select. Put on finger cuffs. Reset the board. The program will take a baseline and then start running. when it detects a change in GSR > 5% the buzzer will go off. The results are also printed to the terminal for debugging / fine tuning.

Further Description

See the Seed Grove GSR Wiki Page

Files at this revision

API Documentation at this revision

Comitter:
mbedAustin
Date:
Tue Sep 23 21:31:04 2014 +0000
Parent:
0:8c2f6da73612
Commit message:
Ran Code Cleanup Magic Wizard

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 8c2f6da73612 -r e760cc1fdf24 main.cpp
--- a/main.cpp	Tue Sep 23 21:10:56 2014 +0000
+++ b/main.cpp	Tue Sep 23 21:31:04 2014 +0000
@@ -8,14 +8,15 @@
 int on = 1, off = 0;
 
 // calculate baseline to compare against
-void Get_Baseline(void){
+void Get_Baseline(void)
+{
     double sum = 0;
     buzzer = off;
     wait(1);
-    for(int i=0; i<500;i++){
+    for(int i=0; i<500; i++) {
         gsrValue = gsr;
         sum += gsrValue;
-        wait(0.005);    
+        wait(0.005);
     }
     baseline = sum/500;
     printf("baseline = %f\n\r", baseline);
@@ -23,17 +24,18 @@
 
 // main loop, compare against baseline
 // sound buzzer if a >5% change happens
-int main() {
+int main()
+{
     float delta;
     Get_Baseline();
-    while(1){
+    while(1) {
         gsrValue = gsr;
         printf("gsrValue = %f\n\r",gsrValue);
         delta = baseline - gsrValue;
-        if(abs(delta) > 0.05){ // check for > 5% change
+        if(abs(delta) > 0.05) { // check for > 5% change
             gsrValue = gsr;
             delta = baseline - gsrValue;
-            if(abs(delta) > 0.05){ // double check
+            if(abs(delta) > 0.05) { // double check
                 buzzer = on;
                 printf("YES!\n\r");
                 wait(3);