Press "Enter" to skip to content

Lilypad Arduino LightScarf

Working with Lilypad Arduino is something I’ve wanted to try for a while now – but simply haven’t found the time! Knowing that BarCampGeelong was only a few weeks away spurred me into action. First, I read up on the Lilypad Arduino tutorials from Leah Buechley. Running Ubuntu, I had already installed the Arduino IDE from the software manager, so I was good to go.

So, what sort of project was simple enough to allow me to get the hang of this new technology while still presenting enough of a challenge to be interesting? I decided on a scarf that would detect light levels, with the aim of turning on some bright white LEDs if light levels were too low.

First, I needed a scarf. I decided on this Dropped! lace openwork pattern so that the components could be sewn in with conductive thread and not look out of place. I also thought about what type of material to make the scarf out of – in case any of the electronic components overheated and melted or caught on fire. I chose a 98% wool blend – ‘Beulah’ by Sean Sheep – nice and cheap too in case the project didn’t work out.

Next, I needed some Arduino Lilypad components – which are now available in Australia from Little Bird Electronics. For this project, I used;

Then, I needed some Arduino code to read in the light sensor and do the logic for turning on the LEDs – you can get the code from my page on GitHub. Once the Arduino board was programmed, it was time to sew in the components with conductive thread. It was here that some problems arose. My original plan was to have 5 LEDs on the scarf, which all lit up at the same time. When sewing the conductive thread, I found that I could only sew in one LED to the -tive terminal (ground) petal on the Lilypad Arduino.
NOTE: Andy Gelme (@Geekscape) has since given me some advice on working around this, by finding alternative methods to ground the LEDs. I just haven’t implemented it yet!
The other problem was that due to the openwork design of the scarf itself, some of the conductive thread was prone to crossing – which meant that the circuit didn’t work as designed. I unpicked the thread and it was resewn, with care given to making sure the wire did not cross.
The presentation given to BarCampGeelong can be found on Slideshare here;

UPDATED: Photos!