Skip to main content

Knitted Stretch Sensors

Knitted fabrics that integrate conductive yarn will have different amounts of resistance, depending on the size of the sample, the density of the stitches, and the yarns used. Yarns that are partially made up of metal have the unique property that their resistance changes under tension. This happens as the metal fibres in the yarn are pulled together, meaning that the current is able to flow more easily. This essentially creates a variable resistor which can then be used as a stretch sensor.

In the circuit below, the knitted stretch sensor is being used to control the brightness of an LED:

These sensors can be used anywhere a potentiometer would be used instead. Typically the signal is much noisier and harder to control, but you can still get some interesting results! One example project is the knitted synthesisers workshop.

Measuring Change in Resistance with a Voltage Divider

We can't directly measure resistance with an Arduino but we can use a circuit called a voltage divider to measure a specific voltage which we can then use to calculate resistance. Below is the circuit diagram for a voltage divider where R2 is the resistor we are trying to measure and R1 is a resistor of fixed value that we must choose (more on this later).

A voltage divider divides up the input voltage, Vin, proportional to the values of the two resistors, R1 and R2. You can essentially think of it as the resistors sharing the voltage out between the two of them according to their value. The higher the value of the resistor, the bigger the share of the voltage it gets.

For example, if we have a circuit with Vin=5V, R1=10kΩ, and R2=10kΩ, then the input voltage would be split in half, giving us Vout=2.5V.

We can calculate the value of Vout using the voltage divider equation below:

We measure the voltage over R2 to get Vout.

We can then calculate the value of R2 as we know the values of R1, Vin, and Vout.

Choosing R1

If you are using the voltage divider to measure the change in resistance over R2, the the value of R1 must be fixed. We want to choose this value so that we have the biggest change in Vout as R2 moves from its minimum to its maximum value to make the sensor as sensitive as possible.

For example, let's say we have Vin=5 and a variable resistor, R2, that varies between 1k and 10kΩ.

First lets try the value of R1=20kΩ. Using the voltage divider equation from above we can calculate the values of Vout for the max and min values of R2.

R2 Vout
1kΩ 0.2V
10kΩ 1.7V

This give us a total range of 1.7-0.2 = 1.5V. Now let's try R1=5kΩ

R2 Vout
1kΩ 0.8V
10kΩ 3.3V

This gives us a much better range of 3.3-0.8 = 2.5V.

Voltage Dividers and Arduino

This is a circuit that turns a voltage into a smaller one depending on the values of two resistors, R1 and R2.

Measuring the Resistance

When trialling knit stretch sensors, it's important to know the range of resistances you are working with. You can measure their resistance using a multimeter

Attach the crocodile clips to the edge of the sample, and connect the other ends to the multimeter. Move the wheel of the multimeter to the setting with the Ω symbol, and press the 'mode' button until you also see a Ω on the screen.

Once the system is connected, you should see a reading of the sample's resistance on the multimeter. Try stretching the sample and the number should decrease! Note that the letters next to Ω refer to the magnitude: k stands for 'kilo' (x1000), and M stands for 'mega' (x 10,000). You want your sample to be at least a few kΩ for this to work.

Making a Voltage Divider

To be able to measure the change in resistance of your knitted sensor, you need to use a circuit called a voltage divider. This consists of two resistors placed in series, meaning that the voltage applied is divided between the two, relative to their resistance. For example, in a voltage divider circuit with two resistors of equal value, the voltage would be evenly split in half between the two. If one resistor had a vastly larger value, it would take up the majority of the voltage and the other would have very little.

We can then measure the voltage between the two resistors. If we know the value of one resistor and the voltage being applied across both, we can determine the value of the other resistor. Therefore, if we have a variable resistor (like a conductive knitted swatch), we measure the change in resistance.

We can do this by wiring the knitted swatch in series with a resistor and connecting the point between them to an analog pin on an arduino like the diagram below. You can then use analogRead() to measure the value.

To determine the value of the non-variable resistor, first measure the resistance of your conductive swatch as described in the section above. You need to have the range of resistances, so do this with the fabric not stretched then with it stretched. Choose a value for the resistor that is approximately in the middle of these two values (e.g. if your swatch varies between 100 and 200 ohms, your resistor would need to be 150 ohms).

For more information on voltage dividers, click here.