Weavable Tech: sensors for stress and anxiety


A project by Chanel Luu and Ray LC.

When we are anxious or nervous, we often clutch our wrists, shake our legs, gnarl our teeth, or pull our clothes. For those both those who suffer from anxiety disorders and for normal individuals who must cope with stress, wearable technology currently attempts to sense distressed states using electrical means like the galvanic skin response or heart rate monitor, none of which are reliable in practical setting, and all of which are hard to wear.

Can we leverage our own tendencies to clutch, chew, bite, and pull to make comfortable and reliable cloth-based systems for sensing distress, unease, and anxiety? These sensors can then help us detect when digital systems like wearables and smart phones should intervene to help us cope with the situation.

Given the cozy, intimate, and fluffy nature of yarn, we decided to address the issue of detecting stress and anxiety using fabric-based sensors constructed out of weaved yarn on a hand loom.

Testing the Crumpler

We obtained conductive yarn from Silver Spun and first made a simple swatch using plain weave with a nonconductive yellow yarn and a nonconductive black warp. We included so much nonconductive material thinking that since the conductive yarn is never cut, it will be quite conductive, and more nonconductive material will be needed to render it innert, and human action (via crumpling and fisting) will be needed to increase the conductance. The resulting piece is mounted on the wrist and connected to an Arduino circuit that detects whether the front of the swatch is connected to the back. As the video below shows, the circuit conductance increases substantially when we crumple, creating a switch-like circuit for detecting forceful action. However, the level of resistance is always quite low to start with, and users wanted a more analog experience with gestures instead of simply crumpling vs. no crumpling.

Testing the Stroker

For the next prototype we decided to see if stroke motions, such as the ones people make when nervous, can be detected in an analog way by a conductive-yarn-based fabric. We took inspiration from another student working at the weaving lab to create cut pieces that are interspersed on the swatch itself. Notice here that the conductive yarn is not connected, so unlike the first prototype, going from one side to the other on the swatch requires connecting pre-cut pieces of yarn.

We connected the Arduino circuit together during construction, and found that unlike the previous prototype, this one requires more conductivity to have the circuit be connected even when stroking. The way we managed this is to increase the number of layers. As can be seen above, we create these hanging rug-like elements by crossing them between two adjacent warps. We interspersed conductive and nonconductive yarn on a single thread, whose weave stops before going into the hanging elements. Because the conductive yarn is never connected to each other, we decide to reverse the order, going nonconductive where it was previously conductive and vice versa on the next layer up. We kept doing this on higher and higher layers until we got the right level of conductivity associated with stroking vs. non-stroking.

Eventually users we tested wanted to have the swatch on their wrists as a device they can stroke and crumple. We converted the Arduino circuit to one using Adafruit Flora, a wearable computing platform. The left and right sides of the strokable wrist band are joined to 3.3V and #10 pins of the Flora, respectively. The right side is also connected to ground off of a 10k resistor. The circuit is connected using conductive thread, which is imperceptible on the swatch. When the circuit is stroked or crumpled to be connected, the Neopixel on Flora will turn on.

When we first tested it, the stroke actions are still very much binary. To make the experience truly analog, we average across 500 trials of reading response and turn on the blue Neopixel probabilistically. This means if the stroke is less consistent, the LED will turn on in fewer segments of time, making the Neopixel less bright. If the circuit is consistently connected, we decided to go with the red Neopixel, so as to indicate that the distress is persistent and grave. Thus, stroking means there’s some nervousness associated while crumpling indicate grave stress. Here’s the Arduino .ino code for Flora. The video above shows the user interaction.

Stroking lightly leads to graded brightness in blue indicating anxiety, while crumpling tightly leads to persistent red signaling acute distress. We have made an wearable analog stress sensor using yarn!

int sensorPin = 10;  //Select the input pin for the conductive yarn sensor.
int ledPin = 7;      //Select the pin for the LED
int NEO = 8;
int sensorValue = 0; //Variable to store the value coming from the sensor
int newSensorValue;  //For averaged response on Neopixel on stroke sensor.
int avg = 0;
int trials = 500;
int n = 0;
Adafruit_NeoPixel strip = Adafruit_NeoPixel(1, NEO, NEO_GRB + NEO_KHZ800);

void setup() {
  pinMode(ledPin, OUTPUT);
  pinMode(sensorPin, INPUT);

void loop() {
  // read the value from the sensor:
  sensorValue = analogRead(sensorPin);
  //map the values to something usable: value, fromLow, fromHigh, toLow, toHigh
  newSensorValue = map(sensorValue, 0, 1023, 0, 255);

  if(n < trials) {
    avg = avg + newSensorValue;
  } else {
    avg = avg/trials;
    Serial.print("averaged = ");
    n = 0;
  //Write to NeoPixel: blue when touched, red when held down for great stress.
  strip.setPixelColor(0, strip.Color(newSensorValue, 0, avg));

Testing the Stretcher

For our next challenge we wanted to see if motions using both arms can be translated to changes in conductivity as a sensor. To continue in the analog vein, we wove the Silver Spun conductive thread together with elastic yarn thread to a pre-warped white yarn to create a stretch sensor with fabric.

For the stretch prototype, we’ve gotten enough experience in weaving to create twill weave that makes a forward and backward pattern. This enhances the crumpled nature of the stretch sensor, although we would also like to experiment with elastic on the warp. When connected to the Arduino, you can see that resistance increases when stretched, presumably because the conductive yarn are separated better by the elastic yarn, and are less well in contact. Users tell us that this is the most satisfying of the prototypes because they can use two hands to indicate distress (a symptom often exhibited to autism suffering children who tear their clothes), and the weaving also has a crumpled but refined look that makes the sensor comforting. The video to the right shows how we constructed the prototypes and each of them in action.

Future Directions

Those suffering from anxiety disorders, PTSD, and other stress impairments, as well as normal folks who are nervous or bombarded with work often need to way to indicate their stress in order to alleviate them. Instead of using heavy and cumbersome electronic devices, we created and tested fabric-based weaved solutions for sensing user-impinged gestured actions like crumples, strokes, stretching, and shaking. These comfortable-to-wear fabric sensors are able to serve as analog sensors of emotional and physical stress , from mild discomfort to acute distress. The next step is to incorporate these woven sensors into wearable solutions with actuators that help people deal with stressful situations.

This slideshow requires JavaScript.

This work was exhibited at the Age of Super Sensing Conference at Japan Society, 2018.