9. Wearables¶
Research¶
I like how we tarted the presentation with the question why do we wear? what do we want to signal? To make them wearable we should always consider the hardware, material/construction and placement of the elements, this is how they interact. Some relevant questions to think about from Liza's lecture:
- application: how will it be used? is it a prototype? runway piece or final product?
- durability: how often will it be worn? by how many people? on a body or a mannequin?
- wearability: how should it feel? what textile is best? do we need a base layer to secure it or insulate them?
- washability: can it be washed? is it necessary? does the board need to be removable?
- power: how much is needed? do you need a battery or power source? what safety measures are needed? how long does it need to be powered for?
-
circuit layout: are components visible or hidden? where should the microcontroller be placed? where is the power source? does it need to be rechable?
-
visibility: does the user want to be visible? is it safe for them to be seen, heard felt? how will you determine this?
- privacy: do you need to protect, encrypt or secure any personal data we are collecting, using or generating? what consent protocols will you build into this?
- sustainability: what is the footprint of the project and process? how does it change at scale? how will you evaluate materials and hardware?
Actuator: a component of a circuit that moves or controls another part based on input. Actuators are not static as outputs. They can change states (visual, sound,motion)
-
visual:
-
LEDs: D for diode, meaning electricity can only flow through it in one direction. LEDs have viewing angles ideally get a wider viewing angle for wearables. The plastic casings can be clear or diffused. Some RGB LEDs are common cathode (-) or common anode (+) meaning the longer leg of the LED will either go to ground or power. Surface mount LEDs are tiny and great to embedding discreetely. Sewable LEDs (lily pad PEDS, micro LEDS, adafruit lequin, Lilypad RGB LED, diy sewable LEDs). If connecting to Arduino, use a 220 Ohm resistor for each one. Connect 3 LEDs max to one arduino pin in parallel. USe a transisstor and second power source if you need more.
-
neopixels: a lot of LEDs that can be controlled individually and only take up 3 pins on your microcontroller. They have drivers embeded in the chip. Downside: they do not light up on their own with a battery, you need a microcontroller like arduino to program them to light up. There are different types such as light strip, rings, matrices, sewable neopixels. Calculating power needs: Depending on the number of neopixels, you may need an external power source ref.. Install the NeoPixel Library in Arduino.
-
fiber optics: the light shines in one end, travels down the strand and emerges at the other ends. the quality of the fiber determines how much the light will degrade over distance. Consider LED intensity. You can have end emitting and side emitting fibers. Also consider how you connect the LED to the optic fiber. The most common methds are drill hole = heat shrink. Tubing + glue, 3D printed enclosure. Avoid superglue.
-
thermochroic ink: the higher the pigment ratio, the more time it takes to change color. consider the material and how to apply it, room temperature, the conductive material should have just the right amount of resistance.Calculate current. Heating takes a lot of power (current) you need a secondary power source with a transistor since the arduino cannot provide the power needed.
-
-
sound: textile speakers. Sound comes from the fabric.
- permanent magnets: those that generate a magnetic field without energy.
- electro magnets: only has a magnetic field when electricity flows through it. This happens with straight wires too but it's too small to even notice. We need to coil the wire to create a strong magnetic field. Connect a battery and an audio signal to your electromagnet to form a magnetic field, the field will fluctuate based on the electrical frequencies of the audio signal. We will also place a strong permanent magnet near the electromagnet s that the cone or membrane vibrates as the fields attract and repel, causing the air around it to move = sound. For this to work we will need the perfect combination of factors:
- coil tightness: the tighter the coil, the louder
- material: the sound waves vibrate off the material so the stiffness/thickness of it will affect sound. Felt and muslin work well, thick canvas or crochet are not, gauzy material will also loose the sound.
- magnet size: larger the magnet, large the sound.
- magnet placement
-
motion:
-
shape memory alloys: SMA's metals that change shape when they are heated t s acertain temp.
- untrained: will contract by 10% of its lenght when heat is applied, when no heat is applied it has a regular straight shape.
- trained: you train it into a shape through a heating process. Everytime you apply heat to it it will return to that shape. Some of the variables to consider when working with SMA's are:
- Material substrates: ligher paper or fabric works best like papaer, cotton, silk, etc but not polyester (it can burn/melt)
- Diameter size: the higher the diameter of the wire, the more power needed to change its state
- Lenght: the resistance increases as the lenght increases Some of the effects that you can achieve are:
- Folding
- Curling
- Smocking It's not possible to slder directly onto it since it has a layer of oxidation, but you can sew them using crimp beads.
- Flip dots: the electromagnetic field is creatd by the current, which attracts or repels the magnetic hematite beat, making it move. Variables to consider for the flip dots:
- bead size:
- securing the bead: not too tight or too loose.
- number of coils: at least 50
- gauge of the wire:
- coil wrapping material: ref 1:30:36 + example code
-
vibe motors + haptics: haptic sensoring includes touch and kynesthesia/proprioception which refers to the sends of limb positioning and movement. Haptic sensing is bidirectional. We can extract object properties based on the movements made to get them.
-
get inspired!
Check out and research alumni pages to betetr understand how to document and get inspired
-
Thermochromic screenprint - Ruby Lennox - FabLab Bcn
-
Led responsive glove - Marion Guillaud - Le TextileLab lyon
-
Thermochromic and sound research - Stephanie Johnson - TextileLab Amsterdam
-
Interactive glove - Stephanie Vilayphiou- Green Fabric
-
Neopixels - [Stephanie Johnson] (https://class.textile-academy.org/2024/stephanie-johnson/assignments/week08/)
- Fabric Speakers - Diane Wakim
References & Inspiration¶
Chromosonic by Judit Eszter Kárpáti - The project is an electronic textile that changes color, using the Arduino open-source platform. The dynamic changes in the textile color derive from processed sound files. Screen printing was used to cover the textile in a dye that changes with temperature. Sound makes the nichrome wires woven into the fabric heat up, changing the pattern.
Tools¶
- Velleman Projects nanopixels WMW103
- Multimeter
- Arduino UNO
- Arduino IDE
- Adafruit NeoPixel library
- Mosfet board
Process and workflow¶
A MOSFET board is a module that contains a MOSFET (Metal-Oxide-Semiconductor Field-Effect Transistor) - essentially an electronic switch that can control high-power loads using Arduino (actuators need more current)
There are three connections on a MOSFET board:
- Gate: Connected to Arduino control pin (receives the on/off signal)
- Source: Connected to ground (common ground with Arduino)
- Drain: Connected to your high-power component (speaker coil, heating element, etc.)
This allows to control power-intensive components safely without burning out the Arduino.
NeoPixels¶
Following Emma Pareschi's tutorial, we explored controlling Neopixels through Arduino circuits. There is tape around each of the exposed connections and I'm using a MOSFET board for this one. I installed beforehand the Adafruit NeoPixel library in the Arduino IDE.
- Connect a jumper wire to pin ~6 according to the script. Then, an alligator cable to the D-IN connector in the neopixel.
- Connect a jumper wire to 5V in Arduino. Then, an alligator cable to the VDD connector in the neopixel.
- Connect a jumper wire to GND in Arduino. Then, an alligator cable to the MOSFET S
- Connect a jumper wire to pin ~9. Then, an alligator cable, to Arduino and MOSFET G
- Connect NeoPixel GND to MOSFET POWER GND (on top)
Adding it to a swatch and to a MOSFET board:
#include <Adafruit_NeoPixel.h>
#define LED_PIN 6
#define MOSFET_PIN 9
#define LED_COUNT 3
// How many NeoPixels are attached to the Arduino?
#define LED_COUNT 3
// Declare our NeoPixel strip object:
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
uint32_t off = strip.Color(0, 0, 0);
int num_rainbow = 1;
void setup() {
pinMode(MOSFET_PIN, OUTPUT);
digitalWrite(MOSFET_PIN, HIGH); // TURN POWER ON
delay(5); // safety delay
strip.begin();
strip.show();
strip.setBrightness(50);
}
void loop() {
rainbow(10); // Flowing rainbow cycle along the whole strip
//strip.fill(off, 0, 10); // turn the strip off
//strip.show(); //display the color
//delay(1000);
}
// Rainbow cycle along whole strip. Pass delay time (in ms) between frames.
void rainbow(int wait) {
for(long firstPixelHue = 0; firstPixelHue < num_rainbow*65536; firstPixelHue += 256) {
for(int i=0; i<strip.numPixels(); i++) { // For each pixel in strip...
int pixelHue = firstPixelHue + (i * 65536L / strip.numPixels());
strip.setPixelColor(i, strip.gamma32(strip.ColorHSV(pixelHue)));
}
strip.show(); // Update strip with new contents
delay(wait); // Pause for a moment
}
}
Neopixels + Digital button¶
- Connect a jumper wire to pin ~6 according to the script. Then, an alligator cable to the D-IN connector in the neopixel.
- Connect a jumper wire to 5V in Arduino. Then, an alligator cable to the VDD connector in the neopixel.
- Connect a jumper wire to GND in Arduino. Then, an alligator cable to the GND in the neopixel.
- Connect one side of the button to an aligator cable. Connect this alligator cable to a jumper wire and into pin 2
- Connect the other side of the button to an aligator cable. Connect this alligator cable to a jumper wire and into GND in arduino.
Then I added it into a swatch and a MOSFET board, putting the button on the inside of the glove so that when I closed my fist the button would be pressed and the lights turn on. I modified the sketch a bit to include the button.
The connections:
- Connect a jumper wire to 5V on the Arduino. Then, an alligator clip to POWER (+) on top of the MOSFET board
- Connect a jumper wire to GND on the Arduino. Then, an alligator clip to GND on the MOSFET board (right side)
- Connect an alligator cable from the MOSFET OUT+ (LOAD+ on the bottom). Then, connect it to VDD (+5V) on the NeoPixels
- Connect a jumper wire from Arduino GND. Then, an alligator clip to GND on the NeoPixels
- Connect a jumper wire to pin 9 on the Arduino. Then, connect it with an alligator clip to the IN pin on the MOSFET board
- Connect one side of the button to an alligator clip. Then, to a jumper wire → plug into pin 2 on the Arduino
- Connect the other side of the button to an alligator clip. Then, connect this to a jumper wire → plug into GND on the Arduino
Credit: Emma Pareschi tutorial
#include <Adafruit_NeoPixel.h>
#define LED_PIN 6
#define LED_COUNT 5
#define BUTTON_PIN 2
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
void setup() {
strip.begin();
strip.show();
strip.setBrightness(80);
pinMode(BUTTON_PIN, INPUT_PULLUP);
Serial.begin(9600);
}
void loop() {
int buttonState = digitalRead(BUTTON_PIN);
Serial.print("Button: ");
Serial.println(buttonState); // Watch this in Serial Monitor
if (buttonState == LOW) { // LOW = pressed
rainbow(5);
} else { // HIGH = not pressed
strip.clear();
strip.show();
}
delay(100);
}
void rainbow(int wait) {
for(long firstPixelHue = 0; firstPixelHue < 65536; firstPixelHue += 256) {
if (digitalRead(BUTTON_PIN) == HIGH) {
strip.clear();
strip.show();
break;
}
for(int i=0; i<strip.numPixels(); i++) {
int pixelHue = firstPixelHue + (i * 65536L / strip.numPixels());
strip.setPixelColor(i, strip.gamma32(strip.ColorHSV(pixelHue)));
}
strip.show();
delay(wait);
}
}
One observation is that sometimes one of the pixels remains on even after releasing the button. Asking ChatGPT it mentioned that it usually comes from timing or residual color values in the strip. To fix this we can:
1️⃣ Clear the strip before and after every animation Update your rainbow() function:
#include <Adafruit_NeoPixel.h>
#define LED_PIN 6
#define MOSFET_PIN 9
#define BUTTON_PIN 2
#define LED_COUNT 5
Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);
int num_rainbow = 1;
void setup() {
pinMode(MOSFET_PIN, OUTPUT);
digitalWrite(MOSFET_PIN, LOW); // MOSFET OFF by default
pinMode(BUTTON_PIN, INPUT_PULLUP); // Button wired to GND
strip.begin();
strip.show(); // Ensure all LEDs start OFF
strip.setBrightness(50);
}
void loop() {
// Button pressed = LOW because pull-up
if (digitalRead(BUTTON_PIN) == LOW) {
digitalWrite(MOSFET_PIN, HIGH); // Turn power ON
delay(5); // stabilize power
rainbow(10);
} else {
digitalWrite(MOSFET_PIN, LOW); // Cut power → LEDs OFF
strip.clear();
strip.show();
}
}
// Rainbow cycle along whole strip
void rainbow(int wait) {
static long firstPixelHue = 0;
for (int i = 0; i < strip.numPixels(); i++) {
int pixelHue = firstPixelHue + (i * 65536L / strip.numPixels());
strip.setPixelColor(i, strip.gamma32(strip.ColorHSV(pixelHue)));
}
strip.show();
firstPixelHue += 256;
delay(wait);
// Immediate stop if button released mid-animation
if (digitalRead(BUTTON_PIN) == HIGH) {
strip.clear();
strip.show();
digitalWrite(MOSFET_PIN, LOW);
return;
}
}
2️⃣ Optional: Reduce delay to prevent residual glow Reduce delay(wait) from 10ms → 5ms Or use non-blocking rainbow (advanced) to check the button every frame
I tried option #1 and the light stayed on less frenquently, so it might need a bit more adjustments so it remains off.
Fabric Speakers¶
From Liza's lecture I learned that sound can be created through the interaction between an electromagnet (created by coiling conductive thread) and permanent neodymium magnets, it generates a fluctuating electromagnetic field that causes the permanent magnets to vibrate, which in turn vibrates the fabric membrane and produces sound waves. . Our instructor Diane, was here in Lyon this week to help us with our wearables tests and explain how she made the fabric speakers. .The process can be found on her page
From Diane's experience we learned that in order for the speakers to actually work, we need a good combination of all variables: the stiffness and thickness of the fabric, the coil/thread tightness and number of turns, and the magnet size. This is why it took her some tweaking with different sized magnets, proper placement of the fabric membrante, etc. For the sound, we saw in her code how it's possible to create a library to be referenced lated by the track number so that it plays the desired sound.
by Diane Walkim
/* Generating a melody with Arduino Tone() and the pitches library */
#include "pitches.h"
const int speaker = 3; //speaker to arduino pin 3
// notes in the melody:
int melody[] = {
NOTE_DS4, NOTE_DS4, NOTE_DS4, NOTE_DS4, NOTE_B3, NOTE_CS4, NOTE_DS4, NOTE_CS4, NOTE_DS4
};
// note durations: 4 = quarter note, 8 = eighth note, etc.:
int noteDurations[] = {
8, 8, 8, 2, 2, 2, 3, 8, 2
};
void setup(){
pinMode(speaker, OUTPUT);
}
void loop(){
noTone(speaker); // Stop sound...
delay(1000); // ...for 1sec
for (int thisNote = 0; thisNote < 9; thisNote++) {
// to calculate the note duration, take one second divided by the note type.
//e.g. quarter note = 1000 / 4, eighth note = 1000/8, etc.
int noteDuration = 1000 / noteDurations[thisNote];
tone(speaker, melody[thisNote], noteDuration);
// to distinguish the notes, set a minimum time between them.
// the note's duration + 30% seems to work well:
int pauseBetweenNotes = noteDuration * 1.30;
delay(pauseBetweenNotes);
// stop the tone playing:
noTone(speaker);
}
}
Next?¶
I was inspired by the TRON suits in the movies. I found an LED strip in the lab that I would like to test. The idea is that it can light on/off or fade to the beat of Daft Punk's Derezzed, which is about 120bpm. This would be coded directly onto the arduino sketch and will not be sound reactive (I'd need a sensor for that!).
For now, I noticed that I do not have available the 12V power source needed for it to light up. I did try to power it with a 9V battery expecting the light to be dim but it did not work. Here are the steps I followed for reference (the sketch still needed some testing and adjustments that I didn't get to do because it did not work with the battery)
Connect LED Strip to MOSFET board:
- Take the RED wire from the LED strip and clip it to the Power + terminal on the MOSFET board using an alligator clip
- Take the BLACK wire from the LED strip and clip it to the Drain terminal on the MOSFET board using an alligator clip
- Connect MOSFET Source to Arduino GND: Use a jumping wire to connect the MOSFET's Source pin to GND on the Arduino
- Connect MOSFET Gate to Arduino Pin 9: Use a jumping wire to connect the MOSFET's Gate pin to Pin 9 on the Arduino
- Connect MOSFET Power GND: Use a jumping wire to connect the MOSFET board's Power GND terminal to an additional GND pin on the Arduino
- Connect the 12V Power Supply: Connect the external 12V power supply's positive and negative wires to the MOSFET board's Power + and Power GND terminals respectively
- Connect Arduino to Computer: Plug your Arduino into your computer via USB


