This instructable will tell you how to make and connect a soft potentiometer to a microcontroller, in particular we will connect it to a Lilypad Arduino. In our case soft potentiometer means a potentiometer made of a textile conductive ribbon.

What you need:

1. soft conductive textile ribbon. The important thing here is that the tape must have some resistance along its leght. So if you apply a multimeter you should be able to measure a value like 3 Kohm per 10 inches of lenght or something similar.  You can make your own tape, or buy it on www.plugandwear.com. You can also buy the complete kit on www.plugandwear.com.

2. One metal necklace toggle clasp (we will use only the ring). Check if it is conductive before using it. We will call this item 'cursor'. A cursor is the sliding part of a potentiometer.

3. A lilypad Arduino, or another type of microcontroller.

Step 1: Assembling the Soft Potentiometer

Cut a 5" (12 cm) piece of resistive tape. If you want your cursor (the toggle clasp) to travel longer, cut a longer piece. Insert one end of the smaller piece of tape it into the larger ring of the toggle clasp and wind it twice around the ring.
Sew very tight, for best conductivity.

Now insert one end of the longer piece of tape into the smaller ring of the toggle clasp. The tape surface must touch the inside of the ring. 

Your potentiometer is now ready to be connected to a microcontroller!

Step 2: Connecting the Potentiometer to a Lilypad Arduino

Now connect three aligator clip cables to the potentiometer as shown in the picture. It is better if you'll use three cables of three different colors. At least one red, one black and one of a different colour for the cursor of the potentiometer. Connect one end of red and black cables to the extremities of the long piece, and one end of the other one to the end of the short piece going to the cursor.

Connect the other aligator end to the Lilypad as indicated in the picture: the red on the + pin of the Lilypad, the black one on the - pin of the Lilypad and the other cable, to the input pin of the program you will be running on the Lilypad (a0 in our case).

We used this configuration so that the Lilypad will 'see' a resistor between pin a0 and ground and another resistor between a0 and +5V. By sliding the cursor the values of the resistors will change and you will generate a voltage on a0 pin from 0V to +5V. You can use this input to change the flashing of an LED, or to control the sound of a loudspeaker. Watch a video here

See Arduino tutorials for more information on how to connect potentiometers. 

Step 3: Theory

Let's now see more in detail how it works. A microcontroller analog input is able to detect a variable voltage. Analog means that it is not just a mere HIGH or LOW value, 0 V or 5 V, like in digital inputs, but it can be anything between 0V or 5V. As the world around us is analog and not digital having the possibility of reading continuous values it is very handy.

Sometimes, instead of a measuring sensor, we want to be the ones that want to create an analog signal, maybe to control the volume of our headphones, or to adjust the light level of our room. How do we achieve this?   With a potentiometer. A potentiometer is just a long resistor with a sliding cursor able to touch the resistor in one point only. This point can be moved, giving different readouts.

A potentiometer has three terminals (see right part of the picture), one (1) must be connected to i.e. 5V, one (2) to 0V and the terminal connected to the sliding point to the input of the microcontroller (3). This is where we will measure the variable voltage. Now when we slide the cursor along the resistor very close to the terminal connected to 5V we will get voltage values close to 5V, when we will slide the cursor close to the terminal connected to 0V on the third terminal we will get voltages near 0V.  
In the picture we suppose to have a resistor with a total resistance of 15Kohm. According how we place the cursor we can obtain a situation where, for example, we have one resistor of 5Kohm and one of 10kohm.
We will now consider equal to zero the current flowing into the Lilypad through its input pin, and as a result we will have that both resistors are crossed by the same amount of current. Applying Ohm's Law we calculate the current flowing I = 5V / 15k Ohm = 0.0003 Amp. The voltage drop across R1 will then be V = R1 * I = 5000 * 0.0003 = 1.66 V.   That means that our input pin will be at 5V - 1.66V = 3.34 V.

Interesting! It might be a little clearer to those with an electronics background if you referred to at as the &quot;wiper&quot; (the name of the equivalent bit on a &quot;hard&quot; potentiometer) rather than the &quot;cursor&quot;.<br> <br> You also need to take into account the resistance of the conductive tape that you're using in the wiper as it will affect how your pot interacts with what you connect it to. The real circuit diagram of your widget is:<br> <br> |<br> |<br> \<br> /<br> \<br> /&lt;---/\/\/\/\----<br> \<br> /<br> |<br> |<br> <br>
Sorry, I'm not English mothertongue.. I'll use wiper next time.<br>Of course you need to take into consideration the resistance of the conductive tape of the wiper, but I didn't want to make too difficult and I decided not to mention it. Also, that is constant and doesn't change with wiper movement.
You've got an empty &quot;Step 1,&quot; which you might want to just delete :-) This is very nice. I was a bit confused by what you meant by &quot;cursor.&quot; It might help to have a step where you show the pot in use, connected to a multimeter, perhaps? Show the sliding ring (cursor) in different positions, with the meter reading for each position.
thank you for your 'publishing' help! In the description of the materials I added that when we use the toggle clasp in the potentiometer, it works as a cursor (the sliding part) of the potentiometer. It should be clear now. I put a video on how it works connected to an Arduino. I'm thinking to add some theory, too, but I'm always scared to go too much deep in theory..
Theory is great! Thanks very much for adding the information; I think it will help people understand bette what's going on. If you are open to more additions, you might consider putting the &quot;theory of operation&quot; stuff in a separate step, either right after the intro, or better, at the very end (so people can skip it easily if they want to).
Very amazing!

About This Instructable




Bio: Electronic engineer with 25 years experience in textiles. Currently working on interactive fabrics.
More by rmarchesi:Connecting a textile analog sensor to Arduino How to connect solar cells to fabric How to make (and connect) a soft potentiometer 
Add instructable to: