One of CodeClub’s sponsors is Orion Health so I have been evaluating sensors suitable for health focused projects. We already use the SeeedStudio Grove Heart rate sensor and Grove EMG Detector, so I purchased a Grove GSR sensor for testing. Galvanic Skin Response(GSR) is a method of measuring the electrical conductivity of the skin, which depends on the amount of sweat on the skin.
The GSR detector outputs a single analog signal which I connected to A0. For the evaluation I averaged the first 3000 samples to determine the initial offset, then sampled roughly every 100mSec.
I’m a bit worried about the robustness of the wires connecting the two probes to the black cable so it will be interesting to see how long they last at Code Club.
I also updated the Minimum and Maximum values with each sample as this appeared to make the display more reliable.
I found the display responded well to me holding my breath for as long as I could.
Pulse rate + EMG + GSR = Polygraph or DIY lie detector maybe a project for next term.
for (int sampleCounter = 0; sampleCounter < calibrationSampleCount; sampleCounter++)
{
double value = gsr.Read();
sampleSum += value;
}
offset = sampleSum / calibrationSampleCount ;
I then displayed the magnitude of the adjusted signal on a Seeedstudio LED bar using code written by Famoury Toure
while(true)
{
double value = emg.Read() - offset;
if (value < valueMinimum)
{
valueMinimum = value;
}
if (value > valueMaximum)
{
valueMaximum = value;
}
range = valueMaximum - valueMinimum;
if (value < 0)
{
value = value / valueMaximum * 10.0;
}
else
{
value = value / valueMinimum * 10.0;
}
Debug.Print("Val " + value.ToString("F3") + " Max " + valueMaximum.ToString("F3") + " Min " +valueMinimum.ToString("F3"));
int bar = 1;
value = 10.0 - value;
bar = bar << (int)value ;
ledBar.setLED((uint)bar);
Thread.Sleep(100);
}
Bill of Materials (Prices as at October 2014)

