ProtoCentral tinyGSR GSR/EDA digital output sensor board – Qwiic / STEMMA QT
ProtoCentral tinyGSR is a Galvanic Skin Response (GSR) / Electrodermal Activity (EDA) measurement breakout board that allows you to measure and track your physiological responses in real time. GSR measures the changes in electrical conductivity / Electrodermal activity of the skin, providing valuable insights into a person’s emotional state and stress levels. When a person is emotionally aroused or stressed, their sweat gland activity increases, which can be measured as changes in the electrical conductivity of the skin.
Product Overview
tinyGSR contains onboard analog op-amps to measure this change in resistance and helps you to easily interface this with your microcontroller system using just a digital interface. tinyGSR can be a powerful tool for anyone looking to better understand their body and emotions. The tinyGSR has Qwiic compatible connector, in addition to standard breakout headers to just plug it into any compatible board with no soldering required.
Interface Connectors
- Qwiic connectors: Both of these connectors are internally connected together and you can connect your Qwiic board to either of these
- Breakout Header: If you do not want to use Qwiic and would like to directly connect this to a breadboard, you can solder standard 2.54 mm (100 ml) pins to this header.
Address Select
- The default 7-bit I2C address for this board is 0x49 (which is what is provided in the sample code).
- By desoldering this solder jumper and connecting it to the left side, you can select 0x49 as the address.
- This is usually required if you want to chain two of these boards together to use on the same I2C bus.
Baseline adjust pot
- Before using the board to get GSR, you will have to adjust this pot to bring your signal into the measurement range.
Wiring the board to your Arduino or other board
If you have a Qwiic Connect System or STEMMA QT compatible board, you can just plug it in directly directly to the Qwiic/StemmaQT port. No soldering required !
If you want to wire the breakout board directly to an Arduino or compatible board without using a Qwiic connector, please follow the following table.
tinyGSR pin label | Arduino Connection | Pin Function |
---|---|---|
VCC | +5V | Supply voltage |
SCL | A5 | Serial clock |
SDA | A4 | Serial data |
GND | GND | System Ground |
Programming
Prerequisites
- Download and install the Arduino IDE according to your platform. Checkout Sparkfun’s great guide about how to install the IDE.
- Using the Arduino IDE, download our ProtoCentral TLA20xx Arduino library from the Arduino Library Manager. For more information about how to install an Arduino library, checkout this great guide, again from Sparkfun.
Install the supporting Libraries
ProtoCentral tinyGSR uses the following Arduino libraries:
- TLA 2022 ADC for Analog to digital conversion of the GSR signal. We provide the Arduino library for TLA2022 to make it easier to use the
- FIR Filter library
It can be found in the ‘Sketch’ menu under ‘Include Library’, ‘Manage Libraries’, and then enter the keyword ‘ProtoCentral TLA202x’ & ‘FIR Filter’ to see the library. When you click on the library, the ‘Install’ button will appear. When you click that button, the library should be installed automatically. When the installation is complete, close the Library Manager.
Running the Arduino Example
Download the Arduino sketch for the basic example from Github here.
Look inside “firmware/tinygsr” for a basic example. Here is the setup code. This starts the TLA2022 ADC in continuous mode, sets the data rate to 128 samples per second (SPS) and the full scale voltage range to 512 mV (which is recommended for the analog circuit).
void setup() {
delay(3000);
Serial.begin(57600);
Serial.println("Starting ADC...");
float coef[8] = { 1., 1., 1., 1., 1., 1., 1., 1. };
// Set the coefficients
fir.setFilterCoeffs(coef);
Wire.begin();
tla2022.begin();
tla2022.setMode(TLA20XX::OP_CONTINUOUS);
tla2022.setDR(TLA20XX::DR_128SPS);
tla2022.setFSR(TLA20XX::FSR_0_512V);
}
In the Arduino loop function, we simply read the ADC value continuously and keep transmitting the results through a serial port, adding the ProtoCentral OpenView header and footer formats for proper visualisation
void loop() {
val = fir.processReading(tla2022.read_adc());
data = (int16_t)val;
.. Code to send data through serial port.
}
Connecting the Electrodes
A 2-electrode cable along with a standard stereo jack is provided along with the kit to connect the electrodes to the board. The other side of the electrode connector would connect to standard snap-on biopotential electrodes attached to the palm (although the electrode can be connected to other conducting parts of the body too).
Important Warning: When connecting the electrodes to the body, it is safer to disconnect the mains power source to the Arduino. For example, if you are using the Arduino along with a laptop, disconnecting the battery charger from the laptop would be a safe option.
Output in OpenView
The GUI for visualizing the skin response is written in Processing, based on Java and is cross-compilable across platforms. Visit the Openview GitHub releases page to download the most recent version for your platform.
Once you have opened the OpenView GUI, make sure to select “tinyGSR” under the “Board” dropdown. If everything goes well, you will be able to see the output.
Responding to Eyeblink & breathing
One interesting application of tinyGSR for detecting emotional responses is based on eyeblink and respiration. The two leads (RA, RL) attached along with disposable electrodes can be placed to the palm of one hand to measure SCR, and the data can be viewed in openview to show variations in SCR that correspond to specific events, such as an eyeblink or a change in breathing.