Archive | August 2012

Testing CapSense

Although Arduino has many fun programs in its library, I was in search of something a little more touchy-feely.  To be more specific, something that is touch sensitive.  I found out that someone had written a CapSense program for Arduino here.  This program gives the user the ability to create an object that when touched, will trigger an event.  Think of those lamps that when you touch the base, they act as a switch adjusting the brightness of the lamp or turning it on/off.  Sounds useful, right?  So, I set about uploading the program and doing a test.

The Lilypad Arduino has what is called pins around the outside circle.  That is a very electronic term, but basically they are the little holes you see on the edges that allow you to attach parts.  I’m just going to call them petals because the whole thing looks like a flower anyway.  Leah has a great diagram here to show what these petals are called.  Notice that some of them are marked “D” and some of them are marked “A” — this means Digital vs. Analog.  More on that when it is appropriate.

The way this capacitive sensing works is that it measures the electrical capacitance of skin as it touches or nears a pin.  In fact, it is similar to what a lie detector test is doing when you are hooked up — except the detector is looking more at changes from emotional stimuli rather than touch vs. no touch.  For my project, all I need is the second.  It takes two pins for each touch sensitive area, so I first had to connect a 1 M resistor between two of the petals that are used in the program.  I didn’t want to solder or use conductive thread since this was just an experiment, so I utilized a breadboard (not to be mistaken for my cutting board).  A breadboard allows you to connect various parts of a circuit and just use alligator clips to connect to your project for testing.  Once I had the resistor in place, then I needed something to act as the conductive metal to “touch” in order to trigger change in the program.  Some people make simple piano keys using some copper tape, but I decided to use conductive yarn.

So, here you have the setup, the alligator clips lead to the breadboard with the resistor and then there is the conductive yarn ready to be touched.  Remember the power is actually coming from the USB connector attached to my PC.  There’s one other thing that I want to point out here, I’m also using a circular yellow piece of craft foam as a coaster underneath the Lilypad.  This coaster allows you to clip things on without the whole thing sliding around — quite handy.  So, now it’s time to do the test.  First I have to turn on the Arduino monitor to allow me to see live data flowing, which  in this case will be numeric values for the petals in operation.  This particular CapSense sample program uses three possible touch sensitive areas, but I’ve only hooked up one for the test.  So, that means there will be three columns of values with only one column actually activated.  Let’s see what happens when I touch the yarn…

As you can see in the first column, there is a string of relatively low numbers which then shoot up at line 3907.  That is where I touched the yarn — success!  Notice they drop down again a few lines later once I’ve released the yarn.  This is exactly what I was hoping for.  So, in my case, I want the project to sense when I’ve touched yarn, in order to trigger a sound.  However, I won’t be able to get to that until I’ve done another round of testing with CapSense with more inputs.  I would really like to figure out how to have six to eight touchable areas instead of just three.  That will probably take some minor code hacking, but I’m not worried as it’s already been a great day.  Now I have to plan a visit to Radio Shack in order to get more 1M resistors.  I used to work at Radio Shack a very long time ago, and it’s still funny that I remember codes for some of the part items.  So geeky.  Sayonara!

Hello Lilypad Arduino!

After tinkering with some stitchable LED’s or soft circuits, I decided to move on to something a bit more serious — the Lilypad Arduino.  This beautiful microcontroller was designed to be used in textile arts by one of my faves, Leah Buechley.  Notice the red gizmo?  That device allows it to connect by USB to a computer to utilize a software called Arduino, which is C based for fellow geeks.  Arduino has many programs stored in a library, and the one you see running now is called “blink”.  It’s making the LED turn on and off.  Yes, this is exciting stuff!  As long as the unit receives power, the program is stored.  That means you are free to stitch this baby into a dress sans cord.  However, for my first project, I have something different in mind.  Like the geisha I am, I do not wish to reveal all my knowledge at once.  So, you will have to be patient as I unravel the threads (hint).  Notice the wood slab?  It’s important to work with electronics on a surface that will not create a static charge, and since I enjoy cooking, I decided to use an old cutting board.  I think it’s a nice female touch.

Hello world!

There are more females than you know working with technology and their uses may surprise you.  Tech is part of our art, clothing and even food.  Let my adventures in circuits and interactive design be an inspiration for you to follow your own passion.  Like you, I discovered most of the things I’m exploring from the web.  What started with meeting a few guys at a hacker space has now ended up with me exploring soft circuits, teaching a felt LED flower class, attending an AdaCamp DC, and now doing art of my own.  Where will you end up?  That’s all part of the mystery.  Be a geisha and dance your own work.