5. E-Textiles and Wearables I¶
For my first swatch, I built two sensors: one analogue and one digital.
References¶
I started by looking at some references from open source circular fashion
Losange by valentine fruchart
And
Fractal Zero Waste By Roberto Gallo
I look for a modular system so I can integrate this module latter on. Based on an input/output logic, thi is how I will connect the module in order to generate a complex modular system that can stand other sensors, actuators, power sources…
Analogue sensor¶
I used:
Copper adhesive tape (1 square inch)
Conductive thread
Fabric clasps
Arduino IDE.
Lets start with the program. I installed a library called ADCTouch, this library will allow me to use une arduino pin to sense electromagnetism through the cupper surface. Go to Tools/Manage libraries
Search for ADCTouch library, by Martin 2250. I installed another one previously and I struggled for a while with it’s examples. I find out Martin’s library is simpler to use.
Open the example called buttons.
This will be the base where you can build upon, you can add other sensors and actuators to this example.
Code
Here is the Code. David Arias helped me to understand the logic within the following lines
Fabrication
I sewed a piece of copper tape and a conductive thread on the fabric module. The conductive thread should touch the copper surface and reach the fabric clasp
*Remember to call the correct pin number.
** Use ans “Analogue” pin input in your board.
Here is a short video of Arduino sensing analog values.
In the first row of the Arduino plotter, you can see values that float around 9 and 12, then when I get closer and even before y touch the copper tape, values start to increase. When I touch the sensor, values float round 300 and 400.
Digital Sensor¶
Materials
I used:
Velostat (1 square inch)
Copper adhesive tape (1 square inch x 2 pieces)
Conductive thread
Clasps
10k Ohm resistor
Led
Resistor 10 k (Colour code: Brown, Black, Orange, Gold)
Fabrication
For this sensor I used two small pieces of copper adhesive tape, I cut them as you can see in the photo and stick them to the fabric module and a little fabric square. I cut a small piece of velostat and put it in between the two copper tape pieces. This will work as a push button. As soon as you press the components, the force and movement in the velostat fabric should modify its resistance and the program should recognize enough electrons jumping from one copper tape piece to the other.
Schematics
Code
I used a "push button" code you can find as an Arduino Turorial
/* Basic Digital Read
* ------------------
*
* turns on and off a light emitting diode(LED) connected to digital
* pin 13, when pressing a pushbutton attached to pin 7. It illustrates the
* concept of Active-Low, which consists in connecting buttons using a
* 1K to 10K pull-up resistor.
*
* Created 1 December 2005
* copyleft 2005 DojoDave <http://www.0j0.org>
* http://arduino.berlios.de
*
*/
int ledPin = 13; // choose the pin for the LED
int inPin = 8; // choose the input pin (for a pushbutton)
int val = 0; // variable for reading the pin status
void setup() {
pinMode(ledPin, OUTPUT); // declare LED as output
pinMode(inPin, INPUT); // declare pushbutton as input
}
void loop(){
val = digitalRead(inPin); // read input value
if (val == HIGH) { // check if the input is HIGH (button released)
digitalWrite(ledPin, HIGH); // turn LED OFF
} else {
digitalWrite(ledPin, LOW); // turn LED ON
}
}
Video