====== WEEK 05 | 24.10.17 ======
===== E-Textiles & Wearables I =====
This week we learned about electronics applied in textiles. The **Kobakant** team was invited to explain the main topics of this field and they gave us some sample work as an introduction to this magic world of circuits, microcontroller, conductive fabric, and threads.
[[http://www.KOBAKANT.at|Here]] is the Kobakant page for more exploration.
==== Electricity: The basics ====
It is very important for people who have never worked on this field to explain basic concepts of electronics.
[[https://itp.nyu.edu/physcomp/lessons/electronics/electricity-the-basics/|Here]] I found a good explanation about it.
===== Application 01 | Making a circuit =====
In this exercise I wanted to explore a basic circuit without using a micro controller so I based my experience on [[http://highlowtech.org/?p=1653|this]] previous example.
=== Tools: ===
* Sellotape
* Soldering iron
* Scissors
* Multimeter
=== Components: ===
* Red Axial LED (or Green or yellow)
* CR2032 Coin Cell Battery Holder
* CR2032 Coin Cell Battery
* Copper Tape (1/4″)
* Copper flexible piece
* A garment
{{:fabricademy2017:students:eldy.lazaro:week05:components01.png?nolink&1200}}
=== Schematic: ===
[[https://vimeo.com/90280008|Related Video: Intro to Schematics]]
After I saw this short video, I draw my first schematic circuit for this exercise.
{{:fabricademy2017:students:eldy.lazaro:week05:thumb_img_7366_1024.jpg?400|thumb_img_7366_1024.jpg}}
{{:fabricademy2017:students:eldy.lazaro:week05:thumb_img_7365_1024.jpg?1190|thumb_img_7365_1024.jpg}}
=== Process: ===
1. Paste the copper tape into the garment in the shape of the design.
2. Cut the circular pieces of the push-up button
3. Solder the copper tape circuit where is necessary
4. Use the multimeter to check electrical continuity along the process.
5. Just after that, start soldering the components. Firstly, the coin cell battery holder and secondly the circuit made with the copper tape.
6. Finally, I checked if it was working as I expected.
{{:fabricademy2017:students:eldy.lazaro:week05:process01.png?900|process01.png}}{{:fabricademy2017:students:eldy.lazaro:week05:thumb_img_7369_1024.jpg?400|thumb_img_7369_1024.jpg}}
=== Tips: ===
Use sellotape to protect the copper tape when crossing circuit lines.
=== Troubles: ===
In my first attempt, I started working without drawing a schematic on paper so I made a closed circuit forgetting to leave the negative line open to close the circuit by the push-up button so the circuit doesn't work.
After that, I draw the schematic circuit on paper making sure that I was not missing any detail. So then, my circuit finally worked!
===== Application 02 | ATtiny 45 - 1st Attempt =====
In this exercise I planned to use a microcontroller ATtiny45 in my circuit. This was my first attempt and it only worked for a while, so that I tried a new circuit as I will explain some lines below.
=== References: ===
[[http://highlowtech.org/?p=1695|http://highlowtech.org/?p=1695]] (Programming an ATtiny with arduino)
[[http://highlowtech.org/?p=1706|http://highlowtech.org/?p=1706]] (Arduino board as ATtiny programmer)
[[https://www.youtube.com/watch?v=Z5flBzWltVE|https://www.youtube.com/watch?v=Z5flBzWltVE]] (ATtiny 45/85 programming | Spanish tutorial)
=== Components: ===
* 02 ATtiny 45
* 02 CR2032 Coin Cell Battery Holder
* 02 CR2032 Coin Cell Battery
* Copper flexible piece
* 06 LilyPad LED White
* 06 LilyPad LED Orange
* 02 Pin header 1×6
* 04 Pin header 2×2
* 04 Resistor 10K
* 04 Push button
* Ribbon cable
* 12 embellishment pieces
* A garment
* Thread and needle
=== Tools: ===
* Soldering station
* Soldering iron
* Soldering paste and tin
* Scissors
* Multimeter
=== Machine: ===
* Roland CAMM-1 Pro GX Vinyl Cutter
{{:fabricademy2017:students:eldy.lazaro:week05:vinyl_cutter.jpg?1200|vinyl_cutter.jpg}}
=== Software: ===
* Eagle
* Fab Modules (Vinyl machine program to cut the flexible PCB)
* Editor to edit the PCB board image
=== Note: ===
It is super necessary to [[https://drive.google.com/open?id=0BytMIdVNQV2GTlRaV0d1aWhuSVE|download]] the **ATtiny library** and add it to **Eagle**, otherwise the components we are going to use will not be available in the current library that the program already has.
[[https://www.youtube.com/watch?v=D8pHKHV7xqc|This tutorial]] is for people who have never used **Eagle** software. It has a nice program explanation.
=== Inspiration: ===
I was inspired by the octopus and its luminescence under the water, so that I decided to use some LEDs as a representation of the octopus sucker that would be controlled by push buttons located on the sides of the garment.
{{:fabricademy2017:students:eldy.lazaro:week05:inspiration-01.png?1300|inspiration-01.png}}
=== Some ideas: ===
Here are some sketches of the garment design. Finally, I decided to develop the first sketch.
{{:fabricademy2017:students:eldy.lazaro:week05:thumb_img_7336_1024.jpg?350|thumb_img_7336_1024.jpg}}{{:fabricademy2017:students:eldy.lazaro:week05:thumb_img_7335_1024.jpg?350|thumb_img_7335_1024.jpg}}{{:fabricademy2017:students:eldy.lazaro:week05:thumb_img_7334_1024.jpg?350|thumb_img_7334_1024.jpg}}
=== Process: ===
**For the circuit**
1. Design the schematic circuit in Eagle program.
2. Design the PCB very accurate to fit into the vinyl cutter machine. Flexible copper width: 12 cm.
3. Edit the PCB image you got from Eagle for cutting. The image of the board would be always a **//positive//** image as you will see lines below.
4. Cut the circuit on the machine.
5. Transfer the circuit on a paper and put sellotape to keep it durable.
6. Solder the circuit components very carefully, specially the ATtiny 45.
7. Use the multimeter to check electrical continuity along the process.
9. Just after that, finish soldering the rest of components.
10. Finally, I checked if it was working as I expected.
**For the design of the garment**
1. Design the shape of the embellishment pieces in a 2D program (Rhinoceros, Autocad, etc.)
2. Cut this pieces on the laser cutter machine.
3. Sew the embellishment pieces on the garment.
4. Solder the lilypad LEDs on the garment
5. Use the multimeter to check electrical continuity along the process.
=== Schematic: ===
{{:fabricademy2017:students:eldy.lazaro:week05:pre01.png?1200|pre01.png}}{{:fabricademy2017:students:eldy.lazaro:week05:pre03.png?1200|pre03.png}}
=== Board: ===
{{:fabricademy2017:students:eldy.lazaro:week05:pre02.png?800|pre02.png}}{{:fabricademy2017:students:eldy.lazaro:week05:pre04.png?800|pre04.png}}
=== PCB Images for cutting: ===
{{:fabricademy2017:students:eldy.lazaro:week05:pcb01.png?1000|pcb01.png}}
=== Development: ===
{{:fabricademy2017:students:eldy.lazaro:attiny01-01.png?1300|attiny01-01.png}}
=== Files: ===
[[https://drive.google.com/open?id=0BytMIdVNQV2GcHo4OFluZlI2cFU|Download programming]]
int led1 = 1; //Definimos el diodo led en el pin 13 \\ int boton1 = 4; //Definimos la entrada del pulsador en el pin 2 \\ int numeropulsaciones; \\ int contador; \\ int i=0;
void setup () {
pinMode(led1,OUTPUT);
pinMode (boton1,INPUT);
//Serial.begin (9600);
}
void loop () {
int espera=50;
int time=0;
i=0;
if (digitalRead (boton1) == LOW && millis() - time> espera) // He empleado la funcion millis para evitar el antirrebote
{
numeropulsaciones ++;
//Serial.println (numeropulsaciones); // Imprime el numero de pulsacion en el Serial Monitor de Arduino//
}
if (numeropulsaciones == 6)// En el momento que se encuentre en el Case 6 vuelve a 0.
numeropulsaciones = 0;
switch (numeropulsaciones) // Dentro del switch he definido 6 cases, que cambiaran en funcion de las pulsaciones dadas.
{
case 0:
digitalWrite(led1,LOW);// Apagamos todos los leds
break;
case 1:
digitalWrite(led1,HIGH);// Encendemos todos los leds
break;
case 2:
digitalWrite(led1,HIGH);//Encendido tira led 1
delay(80);
digitalWrite(led1,!HIGH);
delay(80);
digitalWrite(led1,HIGH);//Encendido tira led 1
delay(80);
digitalWrite(led1,!HIGH);
delay(80);
break;
case 3:
digitalWrite(led1,HIGH);//Encendido led 1
delay(400);
digitalWrite(led1,!HIGH);
delay(400);
digitalWrite(led1,HIGH);//Encendido led 1
delay(400);
digitalWrite(led1,!HIGH);
delay(400);
break;
case 4:
time = millis();
}
delay (100);
}
===== Application 03 | ATtiny 45 - Final Attempt =====
After the last experience using the flexible copper and cutting the circuit in a Vinyl cutter, I decided to modify my circuit by choosing a better board for my circuit, so that I made my PCB in a harder and conventional material hoping this time it will work better.
=== References: ===
[[http://archive.fabacademy.org/archives/2016/fablabesan2016/students/67/assignment_04.html|Here]] is a good documentation about preparing the files and using the milling machine (Roland MDX-20)
=== Components: ===
* 04 Layer PCB
* 02 ATtiny 45
* 02 Pin header 1×6
* 02 Pin header 1×4
* 06 Pin header 1×3
* 02 Pin header 1×2
* 02 Resistor 10K
* 02 Push button
* 06 LilyPad LED White
* 06 LilyPad LED Orange
* Ribbon cable
* 12 embellishment pieces
* A garment
* Thread and needle
=== Tools: ===
* Soldering station
* Soldering iron
* Soldering paste and tin
* Scissors
* Multimeter
=== Machine: ===
* Milling machine (Roland MDX-20)
{{:fabricademy2017:students:eldy.lazaro:modela.jpg?1200|modela.jpg}}
=== Software: ===
* Eagle
* Fab Modules (milling machine program to cut the PCB)
* Editor program to edit the PCB board image
=== Note: ===
It is super necessary to [[https://drive.google.com/open?id=0BytMIdVNQV2GRDctSlBhRVp3U28|download]] the **ATtiny library** and add it to **Eagle**, otherwise the components we are going to use will not be available in the current library that the program already has.
[[https://www.youtube.com/watch?v=D8pHKHV7xqc|This tutorial]] is for people who have never used **Eagle** software. It has a nice program explanation.
=== Process: ===
**For the circuit**
1. Design the schematic circuit in Eagle program.
2. Design the PCB to be cut on the milling machine.
3. Edit the PCB image you got from Eagle for cutting. The image of the board would be always a **//negative//** image as you will see lines below.
4. Prepare the file to be mill on the machine. [[http://archive.fabacademy.org/archives/2016/fablabesan2016/students/67/assignment_04.html|Here]] are some steps to follow.
5. Mill the PCBs.
6. Clean them by using a paintbrush or similar.
7. Solder the circuit components very carefully, specially the ATtiny 45.
8. Use the multimeter to check electrical continuity along the process.
9. Just after that, finish soldering the rest of components.
10. Finally, I checked if it was working as I expected.
**For the design of the garment**
1. Design the shape of the embellishment pieces in a 2D program (Rhinoceros, Autocad, etc.)
2. Cut this pieces on the laser cutter machine.
3. Sew the embellishment pieces on the garment.
4. Solder the lilypad LEDs on the garment
5. Use the multimeter to check electrical continuity along the process.
=== Schematic: ===
{{:fabricademy2017:students:eldy.lazaro:week05:schematics0.png?1200|schematics0}}{{:fabricademy2017:students:eldy.lazaro:week05:schematics02.png?1200|schematics02.png}}
=== Board: ===
{{:fabricademy2017:students:eldy.lazaro:week05:schematics01.png?800|schematics1.png}}{{:fabricademy2017:students:eldy.lazaro:week05:schematics03.png?800|schematics3.png}}
=== PCB Images: ===
**For milling** {{:fabricademy2017:students:eldy.lazaro:week05:pcb_01_invertido.png?479x350|pcb_01_invertido}}{{:fabricademy2017:students:eldy.lazaro:week05:pcb_02_invertido.png?400x350|pcb_02_invertido}}
**For cutting** {{:fabricademy2017:students:eldy.lazaro:week05:pcb_01_corte.png?500x374|pcb_01_corte.png}}{{:fabricademy2017:students:eldy.lazaro:week05:pcb_02_corte.png?420x365|pcb_02_corte.png}}
**Preparing files** [[http://archive.fabacademy.org/archives/2016/fablabesan2016/students/67/assignment_04.html|Here]] is a good documentation about preparing the files and using the milling machine (Roland MDX-20)
{{:fabricademy2017:students:eldy.lazaro:week05:screenshot-01.png?1500|screenshot-01.png}}
=== Development: ===
{{:fabricademy2017:students:eldy.lazaro:attiny02.png?1500|attiny02.png}}
=== Files: ===
[[https://drive.google.com/open?id=12O13zV8dMOvAJ7PAN_3-i2vM08QCtX8j|Download programming]]
int led = 1; //Definimos el diodo led en el pin 1 \\ int boton1 = 3; //Definimos la entrada del pulsador en el pin 3 \\ int numeropulsaciones; \\ int contador; \\ int i=0;
void setup () {
pinMode(led,OUTPUT);
pinMode (boton1,INPUT);
}
void loop () {
int espera=50;
int time=0;
i=0;
if (digitalRead (boton1) == LOW && millis() - time> espera) // He empleado la funcion millis para evitar el antirrebote
{
numeropulsaciones ++;
//Serial.println (numeropulsaciones); // Imprime el numero de pulsacion en el Serial Monitor de Arduino//
}
if (numeropulsaciones == 5)// En el momento que se encuentre en el Case 5 vuelve a 0.
numeropulsaciones = 0;
switch (numeropulsaciones) // Dentro del switch he definido 6 cases, que cambiaran en funcion de las pulsaciones dadas.
{
case 0:
digitalWrite(led,LOW);// Apagamos todos los leds
break;
case 1:
// Endendemos y apagamos los led por intensidad
for(int i=0;i<250;i++)
{
analogWrite(led,i);
delay(10);
}
for(int i=250;i>0;i--)
{
analogWrite(led,i);
delay(10);
}
break;
case 2:
// Hacemos una que los leds se enciendan y haga intermitencia
for(int i=0;i<5;i++)
{
digitalWrite(led,HIGH);
delay(80);
digitalWrite(led,LOW);
delay(80);
}
break;
case 3:
// Encendemos todos los leds
digitalWrite(led,HIGH);
break;
case 4:
time = millis();
}
delay (100);
}
----
[[http://wiki.textile-academy.org/fabricademy2017/students/eldy.lazaro|«« Back to Assignments]] \\
[[http://wiki.textile-academy.org/fabricademy2017/students/eldy.lazaro/week04|Week04 - E-Textiles & Wearables I << BACK]]___[[http://wiki.textile-academy.org/fabricademy2017/students/eldy.lazaro/week06|NEXT >> Week06 - Computational couture]] \\
[[http://wiki.textile-academy.org/fabricademy2017/students|«« Back to Students]]