Skip to content

5. E-textiles

Research

Ideation

Fabric sensors

Digital switch

A snapfit/ press button attached using either fine copper wire or with conductive thread acts as an On-Off digital switch.

text

Pressure sensor 1 - Squeezee

A steel mesh pot-scrubber, when squeezed, increases contact between it's strands, and drops in resistance. This change in resistance can be used to infer pressure.

text
text
text
text text text
text

Pressure Sensor 2 - Velostat

text text text

text

text

Slider 1 - Bead with conductive fabric

(pressfit buttons version)

text

Slider 2 - Bead with conductive fabric

(aglet version)

text

Basic Analog Sensor code

Can be used for any analog sensor. The sensor creates a voltage drop between the 5V and the A0 input pin, and the 10k resistor prevents noise on the A0 pin by grounding it when not receiving an input.

// Analog Sensor Read

int sensorPin = A1;
int sensorValue = 0;

void setup() {
  Serial.begin(9600);
    pinMode(sensorPin, INPUT);

}

void loop() {
  sensorValue = analogRead(sensorPin);
  // Serial.print("Sensor value: ");
  Serial.println(sensorValue);
  delay(500);
}

Analog Sensor Connections

text

Sensor terminals - 5V and A0
10k resistor - A0 and Gnd

Serial output

text text

This is fairly random, I am still trying to debug what is wrong here.

Hard soft connections

  • Pressfit buttons + Conductive thread text

  • Pressfit buttons + Fine Copper wire text

  • Copper tape + Pressfit buttons + Conductive thread

  • Copper tape + Jumper wires
    text

  • Copper wire + Conductive Thread
    text

  • Conductive thread + Perf-board
    text

Project

Pressure sensor based NeoPixel lightup I wanted to use the squeeze or pressure sensor as an input, and based on the level of the input, light up neoixels.

The mapping would be Pressure -> Brightness OR Pressure -> Number of LEDs

Eventually I settled on creating the White Tree of Gondor, defined by Neopixel LEDs.

The tree motif would be on a forearm covering vambrace, while the sensor would be in the palm of the glove, to be activated by squeezing. The microcontroller, currently an Arduino Uno, would be the Xiao RP2040, stitched onto the back of the hand.

The vambrace would have aglets to easily lace it up onto the forarm.

Concept

text text text text
I found the image at the very end of the week, of the same concept but in leatherwork ! Image credits : Grommet's leathercraft, Black Raven Armoury

text text text

Neopixel Tree sketch
XIAO on fabric
neopixels on perfboard 0 attachment plan

Process

text text text text text text text text text text text

text text text text text text

Code for basic Neopixel test :

#include <Adafruit_NeoPixel.h>

#define LED_PIN     6      // Pin connected to the NeoPixel data line
#define LED_COUNT   4      // Number of NeoPixels in the strip

Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);

void setup() {
  strip.begin();           // Initialize the NeoPixel strip
  strip.show();            // Turn OFF all pixels at startup
  strip.setBrightness(100); // (optional) set brightness 0–255
}

void loop() {
  // Simple color cycle: red → green → blue
  colorWipe(strip.Color(255, 0, 0), 100);  // Red
  colorWipe(strip.Color(0, 255, 0), 100);  // Green
  colorWipe(strip.Color(0, 0, 255), 100);  // Blue
}

// Helper function: fill the strip color by color
void colorWipe(uint32_t color, int wait) {
  for (int i = 0; i < strip.numPixels(); i++) {
    strip.setPixelColor(i, color);
    strip.show();
    delay(wait);
  }
}

Final

Issues, Conclusions and Reflections

Files