Skip to content

Wearables

Lecture

How to make an object interact continuously with the user through wearables. Wearables are electronic devices worn on the body; they can range from smartwatches to custom-designed, intelligently engineered devices.

2. References, research & inspiration

Please check out Liza Stark Presentation:

get inspired!

Check out and research alumni pages to betetr understand how to document and get inspired

Add your fav alumni's pages as references

During the lecture, I learned how to make fabric speakers, which reminded me a lot of the ñandutí embroidery technique. I had already practiced that technique a few times, so I was excited to use it in this project.

What is Ñandutí?

Ñandutí is a type of traditional lace originating in Paraguay, a country located in south-central South America.

“Ñandú” means “spider” and ‘tí’ means “white,” which translates to “White Spider.” It is also sometimes called “spider web” in Spanish.

First, the fabric is secured to the frame, and a base is created using thread. Next, the design is created by weaving and knotting with another thread. After weaving the pattern, a gummy liquid is applied to the lace and allowed to dry. Then, the lace is carefully removed from the fabric.

Asociación de Ñandití en Japón

Some of the principles behind the fabric speaker designed to produce louder sound were:

Keeping the voice coil tight.

Minimizing the space between each circle.

Using lightweight material.

Using a bigger magnet.

Voltage diagram





FABRIC SPEAKER

This is another caption





Tools


This is another caption



Tips

Since my audio cable only included one red wire, one blue wire, and one copper wire on each end, I had to burn the cable and clean it to expose the wire so it would make contact. In my case, I used a strip of copper tape to ensure better contact with the amplifier.

Results

I thought that having two speakers connected would make the sound louder, but it turned out not to be any louder than in the previous examples.



ACTUATOR

Thinking of actuators as components of a circuit that control another part based on their input, I wanted to focus on performances—on garments that would react to sound, but above all, generate movement.

I started with small tests.

Here are the steps I recommend for moving from simple to complex when generating code with the help of AI.

  • Specify your components: List all the data they contain (numbers, outputs, etc.)

  • Ask it to specify the connections; add one or two components at a time between each one to see how they interact with each other.

  • Ask for a test code to see if the components work (turning on a light, simple movement, etc.).

  • Add another component.

  • Specify what you want to achieve.

  • Modify the code based on the results.

Step. 1 Volume change color

Code


#include 

#define PIN_LEDS  D10
#define PIN_MIC   D2

#define GANANCIA  10.0    // súbelo si nunca llega al rojo, bájalo si siempre está en rojo

Adafruit_NeoPixel tira(3, PIN_LEDS, NEO_GRB + NEO_KHZ800);

// Colores de cada nivel: {rojo, verde, azul}
const float paleta[4][3] = {
  {  0,   0,  40},   // silencio: azul tenue
  {  0, 255,   0},   // bajo: verde
  {255, 150,   0},   // medio: amarillo
  {255,   0,   0}    // fuerte: rojo
};

int reposo;
float nivel = 0;   // 0.0 = silencio, 1.0 = máximo

void setup() {
  pinMode(PIN_MIC, INPUT);
  tira.begin();
  tira.show();
  delay(500);
  reposo = digitalRead(PIN_MIC);    // no hagas ruido al encender
}

void loop() {
  // 1. Durante 20 ms, mide qué fracción del tiempo hay sonido
  int activo = 0, total = 0;
  unsigned long t = millis();
  while (millis() - t < 20) {
    if (digitalRead(PIN_MIC) != reposo) activo++;
    total++;
    delayMicroseconds(100);
  }
  float objetivo = (float)activo / total * GANANCIA;
  if (objetivo > 1) objetivo = 1;

  // 2. Transición: sube rápido, baja despacio
  float velocidad = (objetivo > nivel) ? 0.30 : 0.04;
  nivel += (objetivo - nivel) * velocidad;

  // 3. Mezcla los dos colores vecinos según el nivel
  float pos = nivel * 3;
  int i = (int)pos;
  if (i > 2) i = 2;
  float f = pos - i;

  int r = paleta[i][0] + (paleta[i + 1][0] - paleta[i][0]) * f;
  int g = paleta[i][1] + (paleta[i + 1][1] - paleta[i][1]) * f;
  int b = paleta[i][2] + (paleta[i + 1][2] - paleta[i][2]) * f;

  tira.fill(tira.Color(r, g, b));
  tira.show();
}

      

Video result

GIF resultado



Step. 2 Music note color change

Code


#include 

#define PIN_LEDS  D10
#define PIN_MIC   D2

Adafruit_NeoPixel tira(3, PIN_LEDS, NEO_GRB + NEO_KHZ800);

// Frecuencia de cada nota (Hz) y su color {rojo, verde, azul}
const float frecNota[6] = {261.6, 293.7, 329.6, 349.2, 392.0, 440.0};
const float colorNota[6][3] = {
  {255,   0,   0},   // Do  - rojo
  {255,  80,   0},   // Re  - naranja
  {255, 200,   0},   // Mi  - amarillo
  {  0, 255,   0},   // Fa  - verde
  {160,   0, 255},   // Sol - morado
  {  0,   0, 255}    // La  - azul
};

int reposo;
int notaAnterior = -1;
float r = 0, g = 0, b = 0;          // color que se muestra ahora
float objR = 0, objG = 0, objB = 0; // color al que se dirige

// Mide la frecuencia del sonido. Devuelve 0 si no hay una nota clara.
float medirFrecuencia() {
  const int N = 12;
  unsigned long pulsos[N];
  int n = 0;
  int previo = digitalRead(PIN_MIC);
  unsigned long inicio = micros();

  while (n < N && micros() - inicio < 60000) {
    int estado = digitalRead(PIN_MIC);
    if (estado != previo) {
      unsigned long ahora = micros();
      // Guarda el inicio de cada pulso, ignorando rebotes muy seguidos
      if (estado != reposo && (n == 0 || ahora - pulsos[n - 1] > 700)) {
        pulsos[n++] = ahora;
      }
      previo = estado;
    }
  }
  if (n < N) return 0;

  // Calcula los periodos y toma el del medio (mediana)
  unsigned long periodos[N - 1];
  for (int i = 0; i < N - 1; i++) periodos[i] = pulsos[i + 1] - pulsos[i];
  for (int i = 0; i < N - 2; i++)
    for (int j = i + 1; j < N - 1; j++)
      if (periodos[j] < periodos[i]) {
        unsigned long tmp = periodos[i]; periodos[i] = periodos[j]; periodos[j] = tmp;
      }
  return 1000000.0 / periodos[(N - 1) / 2];
}

// Convierte una frecuencia en número de nota (0 = Do ... 5 = La)
// Devuelve -1 si no es ninguna de las seis
int buscarNota(float f) {
  while (f >= 508) f /= 2;   // lleva cualquier octava a la misma escala
  while (f < 254)  f *= 2;
  int mejor = -1;
  float menorDif = 0.035;    // tolerancia: qué tan afinada debe estar la nota
  for (int i = 0; i < 6; i++) {
    float dif = fabs(log(f / frecNota[i]));
    if (dif < menorDif) { menorDif = dif; mejor = i; }
  }
  return mejor;
}

void setup() {
  pinMode(PIN_MIC, INPUT);
  tira.begin();
  tira.show();
  delay(500);
  reposo = digitalRead(PIN_MIC);    // no hagas ruido al encender
}

void loop() {
  float f = medirFrecuencia();

  if (f > 0) {
    int nota = buscarNota(f);
    if (nota >= 0 && nota == notaAnterior) {   // nota válida y repetida = confirmada
      objR = colorNota[nota][0];
      objG = colorNota[nota][1];
      objB = colorNota[nota][2];
    }
    notaAnterior = nota;
  } else {
    notaAnterior = -1;              // silencio: se apaga poco a poco
    objR *= 0.97; objG *= 0.97; objB *= 0.97;
    delay(10);
  }

  // Transición suave hacia el color de la nota
  r += (objR - r) * 0.25;
  g += (objG - g) * 0.25;
  b += (objB - b) * 0.25;
  tira.fill(tira.Color((int)r, (int)g, (int)b));
  tira.show();
}

      

Video result



Step 3. The servo moves in response to the intensity of the sound, and the LEDs change color.

Code


#include 
#include 

#define PIN_LEDS   D10
#define PIN_MIC    D2
#define PIN_SERVO  D0

#define GANANCIA   10.0   // súbelo si nunca llega a fuerte, bájalo si siempre llega

Adafruit_NeoPixel tira(3, PIN_LEDS, NEO_GRB + NEO_KHZ800);
Servo servo;

// Para cada nivel: color {rojo, verde, azul} y ángulo del servo
const float colorNivel[4][3] = {
  {  0,   0,   0},   // 0 silencio: apagado
  {  0, 255,   0},   // 1 bajo: verde
  {255, 200,   0},   // 2 medio: amarillo
  {255,   0,   0}    // 3 fuerte: rojo
};
const int anguloNivel[4] = {0, 60, 120, 180};

int reposo;
float nivel = 0;                 // 0.0 = silencio, 1.0 = máximo
int categoria = 0;               // 0 silencio, 1 bajo, 2 medio, 3 fuerte
unsigned long ultimoMov = 0;     // cuándo se movió el servo por última vez
float r = 0, g = 0, b = 0;       // color que se muestra ahora

void setup() {
  pinMode(PIN_MIC, INPUT);
  tira.begin();
  tira.show();
  servo.attach(PIN_SERVO);
  servo.write(0);
  delay(1000);
  reposo = digitalRead(PIN_MIC);    // no hagas ruido al encender
}

void loop() {
  if (millis() - ultimoMov < 400) {
    // El servo se acaba de mover: no escuchar, para no oír su propio ruido
    delay(20);
  } else {
    // 1. Durante 20 ms, mide qué fracción del tiempo hay sonido
    int activo = 0, total = 0;
    unsigned long t = millis();
    while (millis() - t < 20) {
      if (digitalRead(PIN_MIC) != reposo) activo++;
      total++;
      delayMicroseconds(100);
    }
    float objetivo = (float)activo / total * GANANCIA;
    if (objetivo > 1) objetivo = 1;

    // 2. El nivel sube rápido y baja despacio
    float velocidad = (objetivo > nivel) ? 0.30 : 0.04;
    nivel += (objetivo - nivel) * velocidad;

    // 3. Decide la categoría según el nivel
    int nueva = 0;
    if (nivel > 0.10) nueva = 1;   // bajo
    if (nivel > 0.40) nueva = 2;   // medio
    if (nivel > 0.75) nueva = 3;   // fuerte

    // 4. Si cambió, mueve el servo
    if (nueva != categoria) {
      categoria = nueva;
      servo.write(anguloNivel[categoria]);
      ultimoMov = millis();
    }
  }

  // 5. Transición suave de los LEDs hacia el color del nivel
  r += (colorNivel[categoria][0] - r) * 0.15;
  g += (colorNivel[categoria][1] - g) * 0.15;
  b += (colorNivel[categoria][2] - b) * 0.15;
  tira.fill(tira.Color((int)r, (int)g, (int)b));
  tira.show();
}

      

Video result


As I researched, I began to realize what was actually more achievable, and I came across shebuildsrobots, with these feathers that moved in response to a servomotor. This also led me to think: when you sing or hear someone else sing, you get goosebumps.

I thought, why not make a garment that reflects what one feels when singing that sense of flying?

Process and workflow

Step 1

I started by measuring the sleeve of a shirt I had, took notes, and transferred them to Illustrator1.

Based on the previous video, I noticed that she used a base for the feathers; in my case, I won't cut the leaves all the way through—I'll leave a small tab that will help hold them in place.

This is another caption This is another caption











Step 2

Then, I got to work by laser-cutting the pattern and printing the leaves on 2mm to provide support for the tulle.

Imagen izquierda Imagen derecha

parameters for laser cut

  • Max. Power(%): 25
  • Min. Power(%): 35
  • Work Speed(mm/s) 80
  • Fabric material: Tulle

Result

Step 3

Once it was working, I tested the circuit while it was still connected to the breadboard, with the sleeve already in place.

Step 4

I think this was the most challenging part of the process: moving on from using the breadboard and starting to make direct connections.

My initial idea was to use wire, but some components required jumpers, so I had to continue making connections that way. This resulted in a lot of loose connections on the XIAO RP2040.

This is another caption

This is another caption

This is another caption

Results

Weekly reflection & critical thinking

I learned new ways to use the components; I discovered new power sources so I wouldn’t have to rely on connections to the computer; I was surprised by my progress and how I was able to turn my projects into more complex products; I feel more and more familiar with the process and more confident.

It would definitely take me more time to make permanent connections—whether by soldering or using wire—and to find alternatives to foam so that the circuits can be easily removed and reattached. I think the unstable connections caused problems with my project.

To be honest, I really enjoyed testing different inputs and seeing how the actuators would react to voice commands. I like working on projects that involve mechanisms and movement.

However, I think you have to think much more carefully when it comes to a wearable: on the one hand, it needs durable connections, but on the other, what if one of the components gets damaged? It should be possible to replace it without affecting the entire circuit.


7. Fabrication files & References


  1. File: sleeve file ↩

  2. File: 3d model  ↩