9. Wearables¶
Research¶
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. 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 3.3V 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.
#include <Adafruit_NeoPixel.h>
#define LED_PIN 6
// How many NeoPixels are attached to the Arduino?
#define LED_COUNT 4
// 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() {
strip.begin(); // INITIALIZE NeoPixel strip object (REQUIRED)
strip.show(); // Turn OFF all pixels ASAP
strip.setBrightness(50); // Set BRIGHTNESS to about 1/5 (max = 255)
}
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 3.3V 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.
#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);
}
}
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);
}
}


