Monday, 24 August 2015

Monster Mash-Up

I recently finished a project that I'm very proud of. It's a soft toy that "blinks" and "sings", thanks to a tiny Arduino board, a sewable LED and a small buzzer that can play musical notes. It comes from Sew Electric, an excellent introduction to e-textiles by Leah Beuchley. All of the DIY projects are available for free online, but if you're interested in this area I would highly recommend buying the book because 1) It's an awesome resource for beginners, and 2) Getting girls interested in technology is a cause that's well worth supporting financially. I think Sew Electric would be a great title to add to any library collection, but could be especially good for schools and libraries with their own makerspaces.

The details of the project are on the Sew Electric website, so I won't go into too much detail. Instead I'll show you some progress shots, and talk about the differences between my monster and the instructions - because of course I couldn't help improvising a bit.

Here's my basic circuit design. Yes, it looks like it was drawn by a primary school kid. My excuse is that I was only just learning to use the stylus paint program on my tablet:


Already there are some visible differences from the original design. All the Sew Electric projects are designed to be programmed through an Arduino Lilypad. I used a Beetle from DFRobot. I've found this little jewel of a microcontroller board is easy to work with, and it's much cheaper and easier to get hold of in Australia than the Lilypad. But there are some significant differences:

  1. The Lilypad is designed operate at 3.3v, and its associated components run on the same voltage. The Beetle is designed for 5v.
  2. The Lilypad has a built-in power source and on/off switch. The Beetle is... a little more bare-bones.
I spoke to some colleagues at my hackerspace about the voltage difference, and we had some concerns that the 5v power source required to run the microcontroller would blow up the other components, which are designed to operate at a lower voltage, and have different tolerances for how much electrical current they can take. This is why there are notes on the circuit design about resistors and transistors, which are used to regulate current in a circuit.  In the end though, I actually didn't end up using them, because some research into the specs of my LED and buzzer showed that they could happily operate from a 5v power source. Components often have a range of conditions under which they can operate, and it's always worth checking if you're unsure,

As for the power source itself, I found a neat battery pack made by the same manufacturer as the Beetle. It's actually a boost module - you put in two AA batteries (which are 1.5v each) and module boosts them up to 5v to power the device. Here it is sewn into my monster's butt:



I used conductive thread to "wire" everything together. Here's the connection between the Beetle and the LED:



I sewed in the buzzer under the monster's mouth, and had lots of fun coming up with tunes for it to play. The instructions suggest using a short, simple tune such as Hot Cross Buns or Mary Had a Little Lamb. Of course, I was having none of that. Each note is one line of code, so it took some time to program a song, but I think it was completely worth it - you can hear the final result in the video at the end of this post. I also programmed this alternate tune:




The final stage was to add touch pads to the monster's paws, which activate its "song" when pressed. Ingeniously, the instructions show you how to use applique backing and kitchen foil to make a cheap, easy-to-apply conductive surface. It works really well, but isn't particularly durable. If I were to make another monster, I'd probably use a conductive fabric like this one.

This project taught me so much, especially about how the code in the Arduino IDE works. Rather than just messing with numbers to change timings and colours, I've now got a basic understanding of how inputs and outputs work, the difference between analogue and digital inputs, the structure of programs and how all the different processes fit together. I also learned to think more critically about the advice I'm given on my projects, and where to look for device specifications and other important information.

So without further ado, here's the finished product. It was a lot of fun to make, and turned out pretty cute if I do say so myself: