9. Wearables¶
Research¶
Hussein Chalayan
Since my student years, I have admired the work of Hussein Chalayan. For me, he is a designer who brings together deep philosophical ideas and the technologies of the future in his collections.
Below are some of his collections with embedded electronics, which still look innovative even 15 years later.
Social Body Lab
I first learned about the projects of Social Body Lab through a presentation by Liza Stark. Social Body Lab is an art, design, and research group at OCAD University in Toronto, Canada, dedicated to exploring body-centric technologies within their social and cultural context.
One of their key projects is Prosthetic Technologies of Being.
This project looks at how wearable technologies can extend or shift the way we experience ourselves and others. Instead of focusing on medical prosthetics, the team explores “prosthetics” as poetic or expressive tools — objects that reveal emotions, highlight social dynamics, or reshape personal boundaries. These pieces often sit between fashion, performance, and technology, inviting us to rethink what it means to inhabit a body in a technologically rich world.
Also, they have a YouTube channel with very detailed and easy-to-understand tutorials on e-textiles.
Here is a detailed guide on creating a capacitive sensor from Social Body Lab.
https://www.instagram.com/livingpod/reel/CifTqtatntM/
Capacitive Touch Sensor With a Servo Motor Using XIAO RP2040 on a Fabrixiao¶
The full workflow for creating a capacitive touch sensor and adding a servo motor reaction using a XIAO RP2040 integrated into a Fabrixiao soft circuit board is below.
Tools and Materials Used in the Project¶
1. Tools and Materials Used for Testing¶
| Tool / Material | Description |
|---|---|
| XIAO RP2040 | Microcontroller used as the core of the circuit; first tested via USB power. |
| Fabrixiao textile PCB | Soft PCB used as a base to connect components during early testing. |
| Alligator clips | Used to make temporary connections between the sensor, resistor, and board. |
| USB cable (USB-C) | Used to power the board from a laptop and upload the code. |
| Laptop with Arduino IDE | Used for programming and observing sensor values in Serial Monitor. |
| Multimeter | Used to verify continuity, detect soldering errors, and ensure there were no shorts. |
| Test LED | Soldered or connected temporarily to confirm that the board and pins worked. |
| Conductive fabric or conductive textile piece | Used as the temporary capacitive sensor pad during testing. |
| Resistor (1 MΩ or similar) | Tested between the two pins used for capacitive sensing. |
| Jumper wires | Used for flexible testing setups. |
2. Additional tools and Materials Used for the Final Project¶
| Tool / Material | Description |
|---|---|
| Felt base | A textile foundation where the Fabrixiao and other parts were sewn. |
| Insulated thin wire | Used to connect the sensor, resistor, servo motor, and battery to Fabrixiao. |
| Servo motor | Mechanism used to animate the rabbit ears through rotation. |
| Thin fishing line (леска) | Connected the rabbit ears to the servo horn, enabling movement. |
| Lithium-ion polymer battery (LiPo) | Final portable power source. |
| Snap button | Originally intended to separate external and internal components. |
| Needle + non-conductive thread | Used to sew Fabrixiao, servo motor, pocket, and decorative elements. |
| Textile rabbit character | The final soft sculpture whose ears are controlled by the servo motor. |
1. Soldering XIAO RP2040 to the Fabrixiao Board¶
We began by attaching the XIAO RP2040 directly to a Fabrixiao textile PCB.
This step required careful soldering because:
- Fabrixiao uses conductive fabric traces, which are more heat-sensitive than copper.
- We soldered the pin headers of the XIAO RP2040 onto the textile pads with minimal heating time.
- We also soldered a resistor (used for the capacitive sensor) and a LED to the board.
This created a stable hybrid of a microcontroller and a soft circuit.
After soldering the XIAO RP2040 onto the Fabrixiao textile board, we verified all electrical connections using a multimeter. We checked continuity between each RP2040 pin and the corresponding fabric trace on the Fabrixiao, ensuring that every joint was properly connected. We also tested for unwanted shorts by placing the multimeter in continuity mode and confirming that adjacent pads or traces were not accidentally bridged with solder. This step guaranteed that the board was electrically safe and ready for further testing.
2. Testing the Basic Circuit With the LED¶
Before building the sensor, we verified the connections using a simple LED test.
LED Test Code:
void setup() {
pinMode(D10, OUTPUT); // Use any pin where the LED is soldered
}
void loop() {
digitalWrite(D10, HIGH);
delay(500);
digitalWrite(D10, LOW);
delay(500);
}
This confirmed that:
- power was stable,
- pins were mapped correctly on Fabrixiao,
- the solder joints were solid.
By Mariam Baghdasaryan
3.Building and Testing the Capacitive Sensor¶
We constructed a CapacitiveSensor using conductive fabric.
Because the XIAO RP2040 does not support external Arduino libraries in our setup, we did not use the CapacitiveSensor library. Instead, we wrote a minimal direct-measurement capacitive sensing code using a resistor between two analog pins (A1 and A3). All codes were generated with the help of ChatGPT.
Capacitive Sensor Test Code
// send pin = A3
// receive pin = A1
const int sendPin = A3;
const int receivePin = A1;
void setup() {
pinMode(sendPin, OUTPUT);
pinMode(receivePin, INPUT);
Serial.begin(9600);
}
long readCapacitiveValue() {
long counter = 0;
pinMode(receivePin, INPUT);
digitalWrite(sendPin, HIGH);
while (digitalRead(receivePin) == LOW) {
counter++;
}
pinMode(receivePin, INPUT);
digitalWrite(sendPin, LOW);
return counter;
}
void loop() {
long value = readCapacitiveValue();
Serial.println(value);
delay(100);
}
This verified that the capacitive fabric pad responded to touch.
By Mariam Baghdasaryan
Adjusting the threshold based on Serial values
When testing, we observed the raw sensor output in the Serial Monitor. This helped us determine:
-
the baseline value when not touched,
-
the peak value when touched.
We then selected a threshold slightly above the baseline. This step is essential because every conductive fabric sensor produces different values depending on material, humidity, size, and user.
4. Adding the Servo Motor¶
Only after confirming that the capacitive sensor worked did we add a servo motor, connected to pin A2.
Since we could not install external libraries, we used the built-in Servo library.
Final Code: Capacitive Touch + Servo Reaction
#include <Servo.h>
// --- Пины ---
const int sendPin = A3; // зарядный пин (через резистор)
const int sensePin = A1; // сенсорный пин
const int servoPin = A2; // серво мотор
Servo earServo;
int basePos = 0; // стартовая позиция серво
int touchMove = 120; // на сколько градусов двигать
bool wasTouched = false; // фиксируем предыдущее состояние
// --- Функция измерения ёмкости ---
long readCapacitiveSensor() {
pinMode(sensePin, INPUT);
pinMode(sendPin, OUTPUT);
// разряд
digitalWrite(sendPin, LOW);
delayMicroseconds(5);
// заряд
digitalWrite(sendPin, HIGH);
long count = 0;
while (digitalRead(sensePin) == LOW && count < 3000) {
count++;
}
// разряд перед следующим циклом
digitalWrite(sendPin, LOW);
return count;
}
void setup() {
Serial.begin(115200);
Serial.println("Capacitive Sensor + Servo One-Move Test");
earServo.attach(servoPin);
earServo.write(basePos); // изначальная позиция
}
void loop() {
long value = readCapacitiveSensor();
Serial.print("Sensor value: ");
Serial.println(value);
bool touched = value > 110; // порог чувствительности
// --- Выполняем движение только при ПЕРВОМ касании ---
if (touched && !wasTouched) {
Serial.println("TOUCH DETECTED — MOVE!");
earServo.write(basePos + touchMove); // движение на 90°
delay(300); // пауза
earServo.write(basePos); // возврат
delay(100); // стабилизация
}
wasTouched = touched; // обновляем предыдущее состояние
delay(200);
}
By Mariam Baghdasaryan
Summary
-
We soldered XIAO RP2040, a resistor, and a LED onto a Fabrixiao textile PCB.
-
We confirmed electrical connections using an LED blink test.
-
We built and tested a capacitive touch sensor using analog pins A1 and A3.
-
After verifying correct sensor behavior, we added a servo motor on pin A2.
-
Because we could not load external libraries, we used only:
-
minimal custom capacitive sensing code
- the built-in Servo library
Making Project
After testing the circuit using alligator clips, I assembled the project in the following way:
-
I stitched the Fabrixiao with the RP2040 onto a piece of felt (using non-conductive thread).
-
Using thin insulated wire, I attached the resistor and the sensor to the Fabrixiao. I originally made the sensor from two separate parts so I could detach the outer part of the project (the bunny) from the inner electronics using a snap button. Later I decided to abandon this idea and kept the sensor as a single button.
-
I stitched the servo motor onto the fabric and connected it to the corresponding pins on the Fabrixiao.
-
I sewed a small pocket to hold a lithium-ion polymer battery. Then I soldered the battery leads to the Fabrixiao: the black wire goes to –, and the red wire goes to +.
-
I stitched the bunny and attached its ears to the rotating horn of the servo motor using very thin nylon fishing line. After several attempts, I found the correct positioning where the tension was right, and the ears moved smoothly when the servo rotated.
-
At first, I tested the system by powering it through a USB cable connected to my laptop. Later, I will install the battery permanently.
By Mariam Baghdasaryan






