5. E-textiles¶
Exploration¶
Throughout this week, we are exploring E-Textiles, which I understand as the systems where the electronics stop being an external element and become part of the textile structure. The main goal is to explore how a textile can conduct, feel or react, all while being flexible, soft and deformable.
Textiles protect and cover, while electronics speak in pulses, signals; In E-textiles these both worlds merge, the thread stops being structure and transports information, the stitch stops being a joint and becomes a circuit. Tech becomes soft and textile responds.
The emphasis is the material integration, not in electronics complexity. We are introducing electronics in the textile world through: * Integrating conductivity through threads or textile materials. * Creating flexible and functional circuits. * Develop sensors or actuators directly on the fabric. * Keeping the electrical functions under flexing and movement.
References & Inspiration¶
For this assignment I really wanted to experiment with this material called Velostat, which is a carbon-infused plastic that changes it's electrical resistance when flexing or stretching. I read about Gestr, a smart glove for speech impariments. It converts the finger movement into pre-programmed phrases.
So I figured I could try this experiment with the Velostat.
Materials and tools¶
The materials and tools we need for this assignment are the following:
- A piece of Velostat
- A piece of cloth (i will be using denim)
- Conductive tape
- Xiao RP2040 Microcontroller
- Conductive thread
- 2 velcro cable straps
- 1 1kΩ resistor
- 3 LEDs: Green, yellow and red
Work Process¶
In theory this is how it is supposed to work: * A finger glove with the Velostat sandwiched is conected to the Xiao RP2040 Microcontroller via the analogue pins. * The microcontroller recieves the changes in resistance from the flexing of the finger glove. * This signal is then mapped into values and each value represents one of three cases, which turn each of the LEDs.
The first part is to build the finger glove respecting the principle of the Velostat, which goes sandwiched between two conductive strips, and it all goes sandwiched between cloth, in this case i will be using denim.
The software used here is Arduino IDE, which I believe is probably the best programming software for amateurs like myself. The first thing to do is adding the microcontroller, this is done on the File>Preferences menu. We have to add the following URL on the Additional boards manager URLs so the software can find them:
https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
Then I wrote a small code for mapping the resistance values from the finger glove flexing, this will be our input for turning the LEDs afterwards. This is the code and the results from the serial plotting.
const int sensorPin = A0; // This selects which pin is recieving the data
void setup() {
Serial.begin(115200);
while (!Serial);
}
void loop() {
int sensorValue = analogRead(sensorPin); // This reads the data from the defined pin
// This sends the value it is reading
Serial.println(sensorValue);
delay(200); // This controls how fast the graphic scrolls.
}
Having our minimum and maximum values for the flexing, which go from ~0 up to ~300, now it's time to power the LEDs, which are plugged into the D1, D2, and D3 pins.
// Pins
const int sensorPin = A0;
const int led1 = D1;
const int led2 = D2;
const int led3 = D3;
void setup() {
Serial.begin(115200);
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3, OUTPUT); // This defines the LED pins as output
}
void loop() {
int sensorValue = analogRead(sensorPin);
digitalWrite(led1, LOW);
digitalWrite(led2, LOW);
digitalWrite(led3, LOW); // LOW means the pin remains powered off until something changes
// Mapeo por rangos
if (sensorValue >= 1 && sensorValue <= 99) { // This means that, if the sensor reads a value between 1 and 99, it will turn the 1st LED on.
digitalWrite(led1, HIGH);
}
else if (sensorValue >= 100 && sensorValue <= 199) { // For values between 100 and 199, the 2nd LED will turn on.
digitalWrite(led2, HIGH);
}
else if (sensorValue >= 200 && sensorValue <= 300) { // For values between 200 and 300, the 3rd LED will turn on.
digitalWrite(led3, HIGH);
}
Serial.println(sensorValue); // This sends the values of the sensor to the serial plotter, so we can take a look at it.
delay(200);
}
And now we just have to integrate it into a piece, I will also be using denim for that.
What went right?¶
The logic behind how to do this is very basic, and has very little space for failure, we get a reading from the "sensor" and it is interpreted by the microcontroller, and then turns the LED 1, 2 or 3. The code was very simple and didn't need a lot of tweaking.
What went wrong?¶
The velostat is a strange material and got a lot of noise from the readings, so the best solution i came up with is to insulate as much as I could with electrical tape and connect it with a 1kΩ resistor.
The frayed ends of the conductive thread are very unpredictable, and very easy to short the circuit, my instructor recommended to use some nail polish to insulate them before something bad happened.
The conductive thread doesn't behave at all like regular thread, it untangles, frayes and shorts everything, I would recommend to use an alternative like thin copper wire, not my best work.
Adjustments¶
It is possible to use two different pieces of Velostat each with their own conductive tape, for better readings.
Conclusion¶
This week's assignment allowed me to understand electronics not as an add-on, but a material inside of the textile ecosystem.
Results¶
I'm pretty happy with the result, there is a sweet spot where it blinks too much between the two LEDs, but i don't think its a real issue.









