Introduction: 10-minute Sewable IPod Remote

There are a lot of really cool iPod remote control projects: some have simple buttons, some react to  heartbeat or body motion, and others are designed to interface directly with software running on a computer.

However, not one of them is truly wearable, or speaks to the unique needs of e-textiles designers.  They have been mostly prototypes, and are seldom intended for serious, daily use.

With this in mind, we took our time to design a system that is tiny, robust, and very easy to incorporate into your project.  The end result has three components:

1. a tiny, complete circuit that sits *inside* the dock connector
2. four pieces of conductive fabric that form the two buttons of the remote
3. two-channel conductive yarn to connect the sections (we spin it ourselves)

These components empower beginning and professional e-textile enthusiasts to make a truly useful, wearable, interactive craft project that can be sewn into a favorite jacket or scarf. One could also build it into a car, into a floor mat, a shower curtain, or an interactive art project.

The point is, this is *not* yet another prototype. We actually use it everyday, and so would you. I have one hanging from my backpack, a friend has it on her handbag, and another has it clipped to her jackets. Soon, we'll make one  gloves. Even our non-techie friends and family build and use them. That's the point.


This instructable shows how you could make your own fabric-based remote control in 10 minutes using our pieces. There's also a simple (but neat) section on how to read many resistor values using only two wires (instead of multiple wires).


When the project is done, the remote has two soft buttons:
Play/Pause: Single click
Next/Previous Track: Double click 
Next/Previous Album: Triple click
Volume Up/Down: Press and hold

It works with any iPod or iPhone with a dock connector.

*The cat pattern is from 'the cute book' by Aranzi Aronzo, whom we really love*
Magic dock connector, conductive fabrics, yarn & thread available at the Aniomagic store.
You can also get conductive fabric and 3M velostat from lessemf.com

Step 1: Minutes 1&2: Conductive Fabric

Conductive fabrics are a wonderful thing, and there are quite a few instructables on how to use them. 
Some of them are really conductive, and act like plain wires, and some are not so conductive, and act like large resistors.

We use both kinds in this project: depending on which pair you press, the combined resistance can vary from a few hundred ohms to 100,000 ohms. The tiny circuit reads the difference in resistance and translates them to pulses sent to the iPod.

The light gray one (zelf) is very conductive. It's used for the Forward/Volume UP actions.
The darker one (velostat) is not so conductive. It's used for the Back/Volume DOWN actions.
You can get these from the Aniomagic store, or from lessemf. You can also substitute any material or actual resistors as long as one of them is less than 1kOhm, and the other is around 50kOhm.
You're essentially building a circuit with two resistors in parallel, which manifest themselves when  you squeeze either pair of fabrics together.

We encourage you to use this technique in other projects when you want to differentiate between two  (or more) different presses, but keep the wire count at two. The caveat is you need to calculate all the resistance combinations and use an analog input pin on your controller.

You want to make two switch sandwiches: cut the conductive fabrics to the shape you want, and place some felt in between. You'll need holes in the felt through which the conductive fabrics contact when you squeeze.

Experiment with the right size holes in the felt:
    - too small requires a hard squeeze
    - too large means you might activate the remote just by holding it.

Use plain cotton thread to sew the three pieces together.


Step 2: Minute 3: Conductive Thread

After making the two different switches, use a multimeter to measure the resistance you get when you squeeze each one. The zelf one should be a virtual short circuit, and the velostat one should be between 30kOhms and 100kOhms, depending on size of fabric, size of hole, and pressure applied.

Now you're ready to attach your pieces with conductive thread. Arrange them so that you have enough spacing, and figure out how the conductive yarn will connect to your project.
Because of the nature of the circuit, the  yarn must be connected to the more conductive material. In this case, it's at the top. If you do it the other way (connect it to the velostat), the total resistance will always be dominated by the velostat, because it's much higher than the resistance of the zelf.

First sew through the zelf fabric on the top side with conductive thread.  Stitch several times hrough the top only. Do not go through the felt to the other side. Now stitch to the black material. Again,  through the top only.  If it helps, tie a knot in the thread to keep the spacing between the zelf and velostat portions.

Flip over, and repeat the previous process with a fresh piece of conductive thread.

Step 3: Minutes 4&5: Conductive Yarn

Aniomagic conductive yarn contains two channels of hand-spun combed merino wool. It's a two ply spin with nominal resistance over distances up to 30 yards, and no conductance between the two strands. The yarn looks and feels no different than conventional yarn, and takes well to gentle  handwashing. We're really proud of this, as we can now consider knitting entire scarves without worrying about short circuits.

Each one has a conductive core, so you'll need to peel back the yarn to expose it. Sew one to the top piece, and the other to the bottom. It doesn't matter which yarn goes to which (zelf) piece.

Carefully draw the yarn back to cover the cores. Make sure the conductive threads aren't touching.
This is a great time to use a multimeter to measure the resistance of your assembly as you squeeze the pieces.

This is also a good time to finish off this piece. You can spend minutes 6 7 8 on this. We'll wait :-)

Alternatively, you can finish the dock connection and come back to completing the fabric portion.

Step 4: Minute 9: Connecting the Dock

The Aniomagic dock connector is the smartest, smallest, and easiest way to connect an e-textile project to your iPod/iPhone. It takes two minutes to hookup, seriously.

For the curious, the dock connector is a tiny board with a PIC10F222 in SOT23 form. It uses an analog pin to detect the voltage between the two sewable holes. There's  a 50kOhm pullup to the left, and ground on the right. If you use your own microcontroller, simply provide 3.7, 1.5 or 0 volts to the left hole.

The chip also speaks the "Apple Accessory Protocol" which allows it to communicate with iPods and iPhones over the dock connection. You can find out more about this protocol, dock pinouts and other documentation at: 
http://stud3.tuwien.ac.at/~e0026607/ipod_remote/ipod_ap.html
http://pinouts.ru/PortableDevices/ipod_pinout.shtml 
http://www.ipodlinux.org/wiki/Apple_Accessory_Protocol

We appreciate the hard work of these communities.


Like you did in the previous step, pull back the other end of  yarn to expose the conductive cores.
It doesn't matter which thread one goes in which hole. Loop several times through each hole make a snug fit. Make sure the hole is completely filled. It helps to use a needle to pass the thread through.

After connecting both holes to the two strands, you'll find things in a tangle. Untangle the conductive thread, and make sure they are not touching.

Draw the wool back over the cores; retwist if needed. Remove any stray thread from the board.
Wrap clear tape over and under the board. This also helps secure the yarn and connections.


Step 5: Minute 10: Assembling the Dock

The dock connector comes in 7 pieces: 3 metal and 4 plastic. It's pretty hard in words to describe how to jiggle and slide the pieces, so here are some pictures to  tell the story.

Step 6: Minutes 11-60: Testing and Troubleshooting

Now that you've built it, time to test. Generally, if you've been careful about sewing and looking out for stray thread, your project should work right away.

Here are some debugging tips to help.

First rule of embedded electronics: test the simplest case first.

This means: 
- before attaching any thread/wires, first plug in the dock connector
- use a paper clip (or tweezers) to connect the two large sewable holes
- you should see the volume increase on your ipod.
- if you don't hear sound, unplug and plug back your headphone.


- Now remove the dock connector and test your switches. Do you get the right kinds of resistances?
- If you see anything other than infinity on your meter, you have  either
    a short circuit: crossing or stray conductive material  OR
    the holes in the felt are too big and so the conductive fabric are touching even when you're not squeezing.

- Third, attach yarn to dock connector, measure the resistance across the two holes. It should be very high (100s of kOhms or even  MegOhms).
- Press each switch and monitor the resistance *at the holes* on the board. If you don't register a change, there is a break in your circuit somewhere.

- Fourth, plug it into iPod and  click your soft fabric button. It should play/pause a song. Even if no sound is coming from the iPod, you should be able to see a visual change from play to pause.

Still Nothing?  You must have bad circuit mojo. Please turn in your credentials.
Seriously though, contact us: www.aniomagic.com/support  and we'll debug with you.


* Please be careful with your expensive electronics. This stuff works, it really does, and has caused no harm to any of the iPods/iPhones we've used with it.  That said, we can't be held liable for any damage that might occur to your device, so please use this guide for informational purposes only. Cool? *