Skip to content
Snippets Groups Projects
week05.md 56.27 KiB

5. E-Textiles and Wearables I

##Results

An analog capacative sensing swatch with a black conductive alum crystal I grew in week 9 (documentation from the future!), Loes Bogers, 2019

  • I used hard/soft connections with conductive thread and perfboard, pushbuttons and conductive fabric.
  • I made and documented a switch using snap button
  • I made and documented an analog sensor using capacative crystal I grew in week 9
  • I worked out the Soft Serial communication to read an analog sensor with an FTDI cable (I'd done this before)
  • I made and documented a digital sensor using a bikini clip which I integrated into a project: a choker that sounds an alarm when you try to take it off.

Swatch with a digital switch using snaps, Loes Bogers, 2019

A choker that beeps when you try to take it off (using a switch made of a bikini clip), Loes Bogers, 2019

Basics, research, inspiration

I'm so excited about this week! I have worked with electronics before but have little experience with soft circuitry and e-textiles. So am very happy about the opportunity to learn more this week (by doing!).

I went through my sewing kit looking for some textile related hardware that might be conductive. I found this nice metal bikini clip, checked it with the multimeter and BOOM! Found my switch.

potential switches from my sewing box that didn't make the cut. Loes Bogers, 2019

Other learning yearnings

Atmel ATtiny for programming

I would like to try building and programming the circuit using an Atmel ATtiny85 chip instead of the bulky Arduino UNO. I have all the materials for it and would like to practice being able to solder such a chip onto textile. I've seen the ATtiny chips used in a lot of wearable projects, so even though it's not part of the assignment, I figured it will come in handy to know how to do this later. I have a TinyProgrammer tick i can use: just plug the DIP chip's legs into the programmer. More below.

Home-made and bought lilypad stuff lying around

I previously used some of the open source Lilypad designs by Leah Buechley and recreated them in our lab. It would be nice to reuse some of those, like the TinyLily's I made - using ATtiny chips - with the sewing holes, or the one with the snap-on buttons, or the little LED lights I made with on-board resistors. Oh and I even made some battery clips that I could use now! Let's see. I also have some Lilypad components I bought, like this buzzer. Oooh I want to work with the buzzer as an output.

Tools we want

And I found this page via the Kobakant website where soft circuiteers imagine and share ideas for tools they'd like to have for their practice! Ohhhhh man that is so inspiring! Because I'm not a designer, but I do have maker skills and affinity with these kind of practices I've been thinking about the option of making tools during this course. On this page there are so many ideas! Some of them are built already, others are just sketches.

Screenshot of the Tools We Want website, 2019.

I think I might be able to make a better contribution there because I enjoy solving problems, learning about technical stuff and working on concrete things. It gives me more grip on understanding why I'm doing something that makes me feel comfortable. This is my applied streak I suppose. I also love working with artists because they tend to make very weird problems to solve that I'd never come up with but that are very interesting to work on.

##Digital 1: Digital switch made with snap buttons

I made a simple circuit and added a switch to it that I made with snaps you can hammer together. Conductive materials used: conductive thread, conductive textile, the snap buttons, a coin cell holder, and a big LED. Dielectric materials: felt and neoprene. I used clear nailpolish to set the ends of the conductive thread. These were my tools: snap buttons, a hammer, a multimeter, needle, conductive thread, pins, pliers and a pair of scissors.

Tools used (minus pliers and scissors) Loes Bogers, 2019

Front and back of the swatch, Loes Bogers, 2019

I did some tests to check whether the snap buttons would be conductive and laid out the circuit and started sewing it together.

  • I pushed the LED through the fabric and bent the holes into circles with pliers for sewing at the back.
  • I pushed through the legs of the coin cell holder and bent them flat, I then sewed through the holes while passing the connections (this was a bad idea!)
  • I hammered in the snap button on the back: I wound conductive thread around the circle a few times before hammering the back snap onto the fabric to be able to make a connection to the LED
  • I hammered in the snap button on the front: I made sure the legs went through a long piece of conductive fabric, before hammering it to the felt.
  • I sewed the felt/conductive fabric switch to the neoprene backing and made a trace to the battery holder.
  • I sewed the LED on and the other end of the coin cell holder.
  • I checked all the connections with the multimeter, seems great
  • I put in the battery and.....nothing.

Short caused by the battery holder

I checked the anatomy of the coin cell and the coin cell holder. The + side of the battery is the smooth side AND the entire edge along the side of the disk. Only the textured back is GND.

Fixing the short caused by the batteryclip with a bit of electrical tape, Loes Bogers, 2019

So I realized that the way I sewed on the coin cell holder was connecting to both the + and the - part of the battery, causing a short. I fixed it by putting a littl bit of tape on the side of the battery to make sure the GND part of the circuit was not accidentally also connected to the + side on the edge of the coin cell. Succes!!

Digital switch swatch working, Loes Bogers, 2019

##Digital 2: Bikini clip switch

###Testing a bikini clip/switch

I found this metal bikini clip that I cut off a bikini once. It's really nice! My multimeter says I can use it (beep beep). Great! Off I go to prototype the digital circuit. Emma Pareschi, our electronics miracle worker at the Amsterdam lab provided us with the basic schematics that helped me quickly put together a circuit with a the digital switch and an LED. I'm not sure why she's opted for a pullup resistor here, maybe because the Arduino has an internal pullup so it's easy to switch between. But I'd say it makes more sense to use a pulldown that keeps the buttonState LOW unless pressed. I know you can change it in the code too, so whatever. But basically it would mean putting the resistor on the other end of the button, the one that connects to GND. @Emma can you explain why you use a pullup and not a pulldown? Does it matter?

###Using Arduino Uno

Prototyping this with an Arduino was a breeze. I started with a Blink sketch, and then added the code from the Button example that come with the standard install of the Arduino IDE under File >> Examples.

tone() and noTone()

Then I proceeded to try get some sounds from the buzzer. I looked up the Lilypad Buzzer hookup guide on Sparkfun and learned about the tone() and noTone(functions). Copied the code, and added my blink and button code to the sketch. I found out later that these functions are not supported on ATtiny however. I has a sad.

LilyPad Buzzer Example, modified by Loes Bogers
SparkFun Electronics

This example code shows how to hook up a LilyPad Buzzer to play a simple song 
using the tone() function and setting variables for each note.

Buzzer connections:
   * + pin to 5
   * - to -
 
const int buttonPin = 8;     // the number of the pushbutton pin
const int ledPin =  10;      // the number of the LED pin > has PWM
const int buzzerPin = 5;    // the number of the buzzer pin
int delayTime = 100; 
int delayTime2 = 150; 
int delayTime3 = 200; 


// Notes and their frequencies
const int C = 1046;
const int D = 1175;
const int E = 1319;
const int F = 1397;
const int G = 1568;
const int A = 1760;
const int B = 1976;
const int C1 = 2093;
const int D1 = 2349;

int buttonState = 0;         // variable for reading the pushbutton status

void setup() {
  // initialize the LED pin as an output:
  pinMode(ledPin, OUTPUT);
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin, INPUT);
  // Set the buzzer pin as an OUTPUT
  pinMode(buzzerPin, OUTPUT);
}

void loop() {
  // read the state of the pushbutton value:
  buttonState = digitalRead(buttonPin);
  
  // check if the pushbutton is pressed. If it is, the buttonState is HIGH:
  if (buttonState == LOW) {
    
      //To use LED uncomment sentence below
     digitalWrite(ledPin, LOW);

     //play notes (delayTime in this case is how long it's played)
     tone(buzzerPin, C);
     delay(delayTime);
     tone(buzzerPin, E);
     delay(delayTime2);
//     tone(buzzerPin, C);
//     delay(delayTime);
//     tone(buzzerPin, G);
//     delay(delayTime3);
//     tone(buzzerPin, F);
//     delay(delayTime);
  }else{
//stop sound
     noTone(buzzerPin);
     digitalWrite(ledPin, HIGH);
  }
}

The entire circuit prototyped with an Arduino Uno

###Using an ATtiny85 DIP and Sparkfun TinyProgrammer