9. E-Textiles and Wearables II#

This week we went further into e-textiles, learning about ATtiny and actuators.

What I Made#

I made a bunch of different e-textile swatches ( ಠ◡ಠ )

ATtiny soft breakout and touch sensor

Flexinol curling paper

Magnetic flip-dot

A second flip-dot

Thermochromic ink on a conductive thread heating element

More tests with thermochromic ink

AtTiny#

Last time we did e-textiles we used an Arduino Uno, which is a great place to start when working with electronics! this time around we moved on to the ATtiny, a much smaller microcontroller which is slightly less powerful than the Uno, but can still do a lot and only takes a few extra steps to work with.

Setting up#

There are a couple of steps to getting the ATtiny set up and ready to use! We followed Emma Pareschi’s instructions, and all the information you need is there.

Arduino as programmer#

The ATtiny can’t be connected directly to a computer to upload sketches, but we can use the Arduino Uno as a programmer This just means putting the ATtiny onto a breadboard, and using a few jumper cables to connect it to the Uno. Like this:

attiny programmer schematic

Within the Arduino IDE, you need to go to the Tools dropdown menu:

If you have trouble uploading, you may need to add a capacitor between the Uno’s Ground and Reset Pins. I didn’t need to do this with my ATtiny, but others at TextileLab Amsterdam (who were using different variations of ATtiny) did, and they used 10 microFarad electrolytic capacitors, with the + side in Reset and the - side in Ground.

Also, before you upload a sketch to the ATtiny using the Arduino for the first time, go to Tools, and click ‘Burn bootloader’! You only need to do this the first time.

Making a Soft Breakout#

Using a breadboard to program the ATtiny is fine, but as one of the benefits of the ATtiny is its small size, having it stuck in a big rigid breadboard isn’t the ideal scenario for wearable applications. I decided to make a soft breakout for the ATtiny! A breakout is basically small circuit board that makes the pins of your microcontroller easier to access (more on that here), and I wanted something that would make it easier to make connections with alligator clips. For this I used:

finished breakout

Lighting an LED by touch#

To test my ATtiny breakout, I adapted a sketch by David Mellis from the website of the MIT’s High Low Tech group. I used his code with no alterations, and it’s available at the link above!

Preparing to use actuators: MOSFET Circuit#

For most of this week we were making actuators, and pretty much all of these needed a bit of extra circuitry, as they use more current than the Arduino pins can provide on their own. Thankfully it’s not too hard to do this!

Instead of turning a motor, say, on and off by directly connecting it to an Arduino pin, the motor is connected to a separate power supply, and we use a MOSFET - a kind of transistor - to switch on and off the current that flows from the power supply to the motor. We can control the MOSFET using the Arduino!

At TextileLab Amsterdam we built this on a breadboard first, but then a few of us decided to recreate the paper circuit version from the class notes. To do this you need:

If you’ve never used copper tape before, I highly recommend this Chibitronics guide, which has some useful tips on how to get it to look nice, make neat corners, and more.

This is the circuit:

mosfet circuit diagram

And to make it:

soldering the circuit

Actuator 1: Shape Memory Alloy#

The first kind of actuator I experimented with was some flexinol wire. Flexinol is a thin nickel-titanium alloy that contracts when heated, and you can use this to create motion! I took a lot of inspiration and practical advice from Jie Qie’s flexinol origami crane project, where she uses flexinol wire to create origami cranes that have flapping wings.

My most successful experiment was a paper rectangle that I sewed flexinol wire onto in a v-shape. Powered with a 9V battery for a couple of seconds at a time, this curls up nicely (or weirdly, depending on your opinion!). Jie’s method of stitching the wire onto the paper, and soldering the edges to copper tape, works really well in containing the wire while still allowing it to stretch and contract.

First I just powered it with a 9V battery:

And then I controlled it using the ATtiny, contracting it for 1 second, and letting it rest for 3 seconds:

I also tried a couple of experiments to make self-folding origami, using the miura-ori pattern (which I’ve become mildly obsessed with from previous weeks’ projects). So far I haven’t come up with a configuration that works well, but I did learn that if you use too short a piece of wire, and have it sewed in just the right configuration, you can use it to melt cotton stitches. Not exactly what I had planned, but interesting to know (ʘ‿ʘ)

origami experiments

Arduino code#

I used a simple sketch to turn the flexinol actuator on and off. It’s an adaptation of the classic ‘blink’ sketch, but with a longer ‘off’ time to give the flexinol some time to cool down, because we don’t want it to overheat!

void setup() {
  //Initialise pin 1 for output
  pinMode(1, OUTPUT);
}

void loop() {
  digitalWrite(1, HIGH);   // On - contract the flexinol
  delay(1000);                       // wait for a second
  digitalWrite(1, LOW);    // Off - let the flexinol relax
  delay(3000);                       // wait for 3 seconds
}

Actuator 2: Thermochromic ink#

At TextileLab Amsterdam we had a thermochromic pigment that is black at low temperatures, but goes transparent above 27 C. Irene and I experimented with this on cotton canvas - one plain piece, one that had been dyed with hibiscus, and one dyed with madder (from the natural dyes portion of week 4!).

preparing the thermochromic ink

And it works! I made a few different heating elements to try it out.

Conductive thread heating element#

I made two heating elements with stainless steel conductive thread (total resistance approximately 15 Ohms). One I stiched to a piece of card, the other I taped. Powered via the MOSFET circuit using a 9V battery, these gave these results:

Eeontex heating fabric#

I also had some heating fabric from Eeontex. This requires a higher voltage (minimum 12V for good results!) to heat up properly, and there’s some great documenation here on Adafruit about how to use it. I just tested a small square, but would like to go back to this and try different things.

Actuator 3: Flip-dots#

The third actuator I tried this week was a flip-dot: creating a coil of wire that becomes an electromagnet when current is passed through it, and using this to flip a magnetic bead, depending on the direction of the current through the wire.

Making the coil#

I made a coil of enamelled wire - 60 loops - by wrapping it around a marker and then sliding it off carefully. I secured the coil by wrapping the ends of the wire around it a couple of times. Next it’s important to remove the enamel (which is an insulating layer) from the ends of the coil, so that we can connect them to a circuit. The easiest way to do this is to get a lighter and heat the wire until it turns black. Then wipe off this black residue with your hands, and you’re done!

I made one coil where I just stitched it onto a piece of fabric with purple cotton thread. And another one where I did a kind of blanket stitch around the coil with pink embroidery floss, then used thin copper thread to secure it and the end wires to a piece of fabric.

picture of coils

Making magnetic beads: a first attempt#

As for beads, I tried making my own by lodging a magnet inside a piece of foam, and a blob of hot glue, but these weren’t particularly nice looking. But then Wendy went to a local bead shop and brought back hematite beads! But they turned out to not be particularly magnetic, unfortunately!

diy bead attempts

But I can at least show that the coils are working:

Making magnetic beads: a second, more successfull, attempt#

A couple of weeks after doing this assignment, I was Christmas shopping in Dublin and came across Formcard - a mouldable, biodegradable bioplastic, that comes in handy card shapes, and becomes malleable when dropped in boiling water. In other words, perfect for making magnetic beads for flipdots!

formcard

Formcard turned out to be pretty easy to use. I knew I’d only need a little bit of material, so I cut off a small section. First I tried scoring the material with a craft knife and bending it to snap a piece off. But as the material is slightly flexible, this didn’t work super well. However, using a scissors to cut off a piece of material worked just fine!

I dropped the cut piece of Formcard into a cup of freshly boiled water and left it to soften for about ten seconds. Then I fished it out with a pliers (later switching to a spoon, because that was much easier), placed a small magnet in the centre, and rolled it into a ball with my hands. Then when it was cool, I painted one side black (after testing it to see roughly which part would face directly up/down when current goes through the coil!)

process

Things I learned while doing this:

testing

To test my new magnetic ball, I used an adjustable power supply, but you can also use a 9V battery (or maybe even AA batteries, depending on the strength of your magnet, the number of windings your coil has, and the weight of your magnetic ball, among other things!). I tried a couple of different voltage / current settings, but got good results with the voltage set to 6V, and the current to 400mA.

It would be interesting to: