Skip to content

Process

Ideation & sketches

Two Modes of Interaction​

*Exhibition Mode — The Bracelet​

In galleries, participants wear a discreet bracelet that captures biometric signals.​ As they stand in front of a screen or projection, their internal state generates a unique visual composition in real time.​

*Personal Mode — The Glove​

For intimate or customized use, the glove expands the system.

Bracalet


Glove


Design & Fabrication

Heartbit sensor

To connect the MAX30102 sensor involves an I2C interface, which allows the board to read oxygen saturation and heart rate data. The sensor is primarily designed to be used on parts of the body with thin skin and high blood flow, allowing the red and infrared light to effectively penetrate the tissue and reflect back to the photodetector, such as fingertip, wrist or earlob. It is required to use the SparkFun_MAX3010x_Sensor_Library in the Arduino IDE.

The circuit will be attached to a wristband to sense the heartbit of the user.

Pinout connection

MAX30102 Description Xiao ESP32C3 pinv
GND Ground GND
VIN Power 3.3v
SCL I2C Clock D5
SDA I2C Data D4

Code to read the heartbit signals

#include <Wire.h>
#include "MAX30105.h"
#include "heartRate.h"

MAX30105 particleSensor;

const byte RATE_SIZE = 4; // Increase for more averaging
byte rates[RATE_SIZE]; // Heart rates
byte rateSpot = 0;
long lastBeat = 0; // Time at which last beat occurred
float beatsPerMinute;
int beatAvg;

void setup() {
  Serial.begin(115200);
  if (!particleSensor.begin(Wire, I2C_SPEED_FAST)) {
    Serial.println("MAX30102 was not found.");
    while (1);
  }
  // Setup sensor to use red light for heart rate
  particleSensor.setup(); 
  particleSensor.setPulseAmplitudeRed(0x0A); // Turn red LED to low
}

void loop() {
  long irValue = particleSensor.getIR(); // Read IR value
  if (checkForBeat(irValue) == true) {
    // A beat is detected
    long delta = millis() - lastBeat;
    lastBeat = millis();
    beatsPerMinute = 60 / (delta / 1000.0);

    if (beatsPerMinute < 255 && beatsPerMinute > 20) {
      rates[rateSpot++] = (byte)beatsPerMinute;
      rateSpot %= RATE_SIZE;

      // Calculate average
      beatAvg = 0;
      for (byte x = 0 ; x < RATE_SIZE ; x++)
        beatAvg += rates[x];
      beatAvg /= RATE_SIZE;
    }
  }
  Serial.print("IR=");
  Serial.print(irValue);
  Serial.print(", BPM=");
  Serial.print(beatsPerMinute);
  Serial.print(", Avg BPM=");
  Serial.println(beatAvg);
}

The circuit will be attached to a wristband to sense the heartbit of the user.

Galvanic skin response sensor

Connecting a Galvanic Skin Response (GSR) sensor to the Seeed Studio XIAO ESP32S3 Sense involves connecting the sensor's analog output to an available ADC pin on the XIAO board and providing power. Since the XIAO ESP32S3 Sense operates at 3.3V, it is important to power the sensor with 3.3V and read from the appropriate analog pin.

The electrodes will be connected to the index and middle fingers.

Pinout connection

GSR sensor Description Xiao ESP32C3 pin
VCC Power 3.3v
GND Ground GND
SIG Analog Analog Signal A0 or any A0-A10

Code to read the changes in skin resistance

#define GSR_PIN A0 // Pin connected to SIG on the GSR sensor

const int GSR_PIN = A0; // Connect Grove-GSR to A0
int sensorValue = 0;

void setup() {
  Serial.begin(115200); // Start serial communication
}

void loop() {
  sensorValue = analogRead(GSR_PIN); // Read analog value (0-4095)
  Serial.print("GSR Value: ");
  Serial.println(sensorValue);
  delay(500); // Read every 0.5 seconds
}

Challenges

Errors encountered

Before using the ESP32C3, I tested with the ESP32. When installing the ESP32 library I received the error:

4 DEADLINE_EXCEEDED error when installing the esp32:esp32:3.3.5

I solved the issue adding the next line to the file

C:\Users\.arduinoIDE\arduino-cli.yaml

network: connection_timeout: 1200s

After that the library was installed succesfully, however I found another error when I tried to upload the program to the board.

Failed uploading: no upload port provided

The port option was disable which is why I could not select any.

In the device manager I found CP2102 USB to UART bridge controller unavailable.

I downloaded and installed the driver from the following link

https://www.silabs.com/software-and-tools/usb-to-uart-bridge-vcp-drivers?tab=downloads

The issue was solved and I could select the port

Then, the following error appeared:

A fatal error occurred: Failed to connect to ESP32: Wrong boot mode detected (0x13)! The chip needs to be in download mode. For troubleshooting steps visit: https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.html

Failed uploading: uploading error: exit status 2

References

Introducción a la Serie Seeed Studio XIAO ESP32S3

Getting started with XIAO-ESP32-S3-Sense

Getting Started With ESP32-C3 XIAO

How to Build a DIY WiFi Smart Oximeter Using MAX30102 and Arduino ESP32

Technical Specification datasheets

Seeed Studio XIAO ESP32C3 datasheet

Max30102 datasheet


Prototypes


GSR sensor output


Videos

Heartbit sensor test

GSR sensor test


## **Mentoring notes** _Mentors in all sessions may share with you their comments, notes, advise, projects and technical equipment to check out. This is good place to share those, so that you can find them later on when you need them the most!_ ## Half-fabrication files [^1]: Test file: 3d modelling test