Warp Weft Resistor

by Sheralyn Woon

My project for this week is focused on the difference in behavior of a stretch sensor following the direction of the yarn (weft) or perpendicularly across the direction of the yarn (warp). Knitting doesn’t really have a wrap or a weft but just to use familiar terms, I’ve chosen to use these.

I-cord, Basic Knit, Seed & Cable
I started with small samples of knitting, incorporating the conductive stainless steel thread or aluminum yarn. I used very simple basic patterns. And hooked up the samples to the Arduino in 2 ways: warp or weft. The I-cord was rather noisy, the signal was not consistent. For the basic knit pattern, it was difficult to see a difference in resistance at first as I had used the ellipse shape, but there seemed to be a difference in the size of the circle on the screen. I also found that when using the aluminum yarn the size of the circle was a bit larger. So I thought that I could exaggerate these differences by making a knitted resistor of a different shape using the aluminum yarn.

Warp Weft Resistor
Using garter stitch, wool & aluminum yarn are knit together. This knitted resistor has very clearly defined ribbing as a warp structure. Along the weft, small extensions were knitted in addition to original structure and helps us stretch out the more rigid ribbing in the center without displacing the alligator clips at the ends during testing. The extensions were also to make sure that warp and weft length were similar. I used the ellipse visualization. I was clear that along warp and weft this resistor was registering different resistances but somehow I couldn’t get a sense if my theory was correct.
After speaking to Leah about the Warp Weft Resistor and how it was reacting to the Arduino, I decided to change the programming and use a method of visualization that could let me see the magnitude of the resistance over time. I reverted back to the original programming but integrated some color by using code that Crystal had taught me. So now when the resistance is high, a long pink line registers. If the resistance is low, a short blue line registers.
Findings: Resistance along the warp is higher than that on the weft. The signal from the warp is steadier and varies less while the weft varies a lot and quite quickly. Range of resistance of the warp is slightly wider than that of the weft.
After playing with it for a while, I realized that when the resistor is hooked up along the weft, it can be used as a pressure sensor too.

Cable
I knitted this just to test the antithesis of my theory. Hence, using the stainless steel thread, I knitted a cable which has more rigidity than garter stitch. Resistance is generally low and doesn’t vary which might be caused by the cable which doesn’t stretch much.

Processing Code

// Graphing sketch

// This program takes ASCII-encoded strings
// from the serial port at 9600 baud and graphs them. It expects values in the
// range 0 to 1023, followed by a newline, or newline and carriage return

// Created 20 Apr 2005
// Updated 18 Jan 2008
// by Tom Igoe
// This example code is in the public domain.

import processing.serial.*;

Serial myPort; // The serial port
int xPos = 1; // horizontal position of the graph

void setup () {
// set the window size:
size(800, 600);

// List all the available serial ports
println(Serial.list());
// I know that the first port in the serial list on my mac
// is always my Arduino, so I open Serial.list()[0].
// Open whatever port is the one you’re using.
myPort = new Serial(this, Serial.list()[0], 9600);
// don’t generate a serialEvent() unless you get a newline character:
myPort.bufferUntil(‘\n’);
// set inital background:
background(0);
}
void draw () {
// everything happens in the serialEvent()
}

void serialEvent (Serial myPort) {
// get the ASCII string:
String inString = myPort.readStringUntil(‘\n’);

if (inString != null) {
// trim off any whitespace:
inString = trim(inString);
// convert to an int and map to the screen height:
float inByte = float(inString);
int changing = int(map(inByte, 0, 1023, 0, 255));
inByte = map(inByte, 0, 1023, 0, height);

// draw the line:
stroke(changing,34,random(255));
line(xPos, height, xPos, height – inByte);

// at the edge of the screen, go back to the beginning:
if (xPos >= width) {
xPos = 0;
background(0);
}
else {
// increment the horizontal position:
xPos++;
}
}
}