Introduction: The Flickering Unicorn
Unicorns are gloriously magical animals with a rich folkloric and symbolic history. They are endowed with many entrancing traits - purity, hope, mystery, healing, and adorability comprising only a few of their properties. So who wouldn't want to dress up as a unicorn for Halloween or any other costumed event?!
This Instructable will transform you from ordinary human to a flickering unicorn with one stroke of a mane. You will learn various e-textile techniques: sensor creation, embedding circuits into clothing, and how to translate touch into a rainbow of lights.
Should you choose to undertake this enchanting endeavor, there are a few skills you should have some experience with: basic crochet and handsewing techniques, how to solder, and a basic understanding of simple circuits. While this is not a beginner project, it is a great way to apply and synthesize soft circuit techniques you already know.
Here's an overview of our order of operations:
- Make the sensor and test it
- Make the horn and secure it to an external base
- Attach the sensor to the hood, sew the sensor traces to the Flora, and add a resistor
- Attach the horn's base and sew the RGB LED traces to the Flora
- Insulate with fabric glue
- Test and debug the circuit
Step 1: Materials
- Hoodie, vest, onesie with a hood (I made mine but it's just as good to repurpose something old!) I highly recommend a garment with a tight hood. People will want to touch you and you might find yourself annoyed at the constant readjustment!
- 10 RGB LEDs ( I used common anode. This means there are three leads for each color and the fourth goes to power, not ground like a regular LED)
- Conductive thread
- Conductive yarn (I use SilverSpun yarn from LessEMF based out of New York state. Here are a bunch of other options in Europe and the US.)
- Regular yarn (I used Landscapes Yarn by Lion Brand. I love the weight, texture, and feel, and it comes in a ton of colors.)
- Crochet hook (I used size 4.5)
- Heavy white fabric for the horn (I used thin white neoprene)
- Hot glue gun
- Fabric glue
- 10K Ohm resistor
- Needle nose pliers
- Adafruit Flora
- Micro usb cord
Step 2: What Is a Stroke Sensor?
One of my main goals for this project was to explore ways a stroke sensor works on the body. Technically speaking, this sensor can sense movement in multiple directions.
A stroke sensor consists of a sequence of patches alternating between conductive and non-conductive thread or yarn strands. When you pass your hand over the sensor, the strands from two separated conductive patches make contact and allow electrical current to flow between them and close the circuit. This means we have a switch!
There are two ways you can create a stroke sensor: (1) sewing with conductive thread and (2) crochet/knitting with conductive yarn (I’m sure if you got creative you could think of many more!). The technique using conductive thread and fabric is similar to carpet making and tends to be a much more time consuming process. We will not cover this technique here, but KOBAKANT has a wonderful set of tutorials if you’re interested.
Step 3: Knit Stroke Sensor With a Loop Stitch
Instead, we’re going to make a stroke sensor using the crochet loop stitch. From an aesthetic, interaction design perspective, yarn is a material that calls to be touched and felt. The loops only enhance this affordance, giving everyone who sees it an incontrollable desire to ruffle and caress it. Overall, there is something intrinsically playful about the loop stitch. This is a lovely little technique that adds a ton of texture and looks like a horses mane.
How to make a Loop Stitch
To make the loop stitch, it’s helpful if you already know the basics of crochet. If you’re a n00b, never fear. Check out a few beginner tutorials online and get comfortable with the process. If you’ve already got the basics down, then move on.
Below are a great set of tutorials to get you going on the loop stitch. Make a few swatches before starting the sensor so you get a solid feel for the procedure, then move onto the next step.
You will make your loops about the length of a finger, so use that as a guide.
Remember: You have to do a single crochet row in between the loop rows. If you to all loop rows, you'll have loops coming out on both sides, which we don't want.
Step 4: Our Pattern
The above simple stroke sensor is great for smaller areas, but we want to detect interaction over a larger surface area. To do this, we are going to interlace the patches as shown in the image above.
We will connect the patches of conductive yarn later with conductive thread, so when you finish a patch of conductive yarn, you can cut the yarn before starting your next patch. (If we were making a stretch sensor, for example, we would want all of the conductive patches to be connected with one piece of conductive yarn for continuity.)
1 Row 1-3: Single crochet (SC) with non-conductive yarn
Row 4: Loop stitch (LS) with non-conductive yarn
- Row 5: SC with conductive yarn
- Row 6: LS with conductive yarn
- Row 7: SC with non-conductive yarn
- Row 8: LS with non-conductive yarn
- Row 9: SC with conductive yarn
- Row 10: LS with conductive yarn
- Row 11: SC with non-conductive yarn
- Row 12: LS with non-conductive yarn
- Row 13: SC with conductive yarn
- Row 14: LS with conductive yarn
- Row 15: SC with non-conductive yarn
- Row 16: LS with non-conductive yarn
- Row 17: SC with conductive yarn
- Row 18: LS with conductive yarn
- Row 19: SC with non-conductive yarn
- Row 20: LS with non-conductive yarn
- Row 21: SC with conductive yarn
- Row 22: LS with conductive yarn
- Row 23: SC with non-conductive yarn
- Row 24: LS with non-conductive yarn
- Row 25: SC with conductive yarn
- Row 26: LS with conductive yarn
- Row 27: SC with non-conductive yarn
- Row 28: LS with non-conductive yarn
- Row 29: SC with conductive yarn
- Row 30: LS with conductive yarn
- Row 31: SC with non-conductive yarn
- Row 32: LS with non-conductive yarn
- Row 33: SC with conductive yarn
- Row 34: LS with conductive yarn
- Row 35: SC with non-conductive yarn
- Row 36: LS with non-conductive yarn
- Row 37: SC with conductive yarn
- Row 38: LS with conductive yarn
- Row 39: SC with non-conductive yarn
- Row 40: LS with non-conductive yarn
- Row 41: SC with conductive yarn
- Row 42: LS with conductive yarn
- Row 43: SC with non-conductive yarn
- Row 44: LS with non-conductive yarn
- Row 45: SC with conductive yarn
- Row 46: LS with conductive yarn
- Row 47: SC with non-conductive yarn
- Row 48: LS with non-conductive yarn
- Row 49: SC with conductive yarn
- Row 50: LS with conductive yarn
- Row 51: SC with non-conductive yarn
- Row 52: LS with non-conductive yarn
- Row 53: SC with conductive yarn
- Row 54: LS with conductive yarn
- Row 55-61: SC with non-conductive yarn (this is where we’ll place the horn)
- Row 57: LS with non-conductive yarn
Continue alternating between SC and LS using non-conductive yarn until you have your desired length of the front mane.
Step 5: Test It Out!
STEP 1: Connect a few of your purple patches together using alligator clips. This is just a test, so you don't have to connect them all. Connect this batch of patches to D12 on the Flora with a 10k Ohm resistor going to ground (more on what this is later). See image.
STEP 2: Connect a few of your gray patches together using alligator clips and connect those to the 3.3 V pin (power).
STEP 3: Upload the code and open the serial monitor. Stroke the sensor. If you see a change in readings on the monitor, you are good to go!
Step 6: LED Horn Skeleton
The horn is made of 10 RGB LEDs soldered together in parallel, one on top of the other. Follow the images above.
If you want to test it what the fading will look like, upload the code and connect it to the Flora as shown above.
Step 7: Filling the Horn With Polymorph
To make this horn super strong AND well diffused, we’re going to add polymorph. Polymorph is a non-toxic, biodegradable polyester with a low melting temperature of about 60°C (140°F). Basically it is a magical substance. Submerge the beads in hot water (a tea kettle or boiling water should do the trick) and watch in awe as they turn from white to transparent. Carefully (it’s hot!) remove the mass and begin to shape it. After a few minutes cooling, it will return to its original white, solid state. And you can even remold it again if you need! (Insert gleeful, giddy nerd smile.)
Polymorph is also a beautiful diffuser. Allow me a quick rant: all too often, we insert LEDs into projects and onto clothes assuming their illumatinating quality will be enough to incite delight and beauty. WRONG. LED light can be harsh depending on the viewing angle and their prevalence in popular culture makes them kitschy and tacky when just “stuck” on something. When you add a diffuser to soften and enhance the light, it provides a soft glow and allows you to treat light as more of a material to be sculpted. Wool and polymorph are pros at this. Ok, back to making.
We want the horn to be sturdy and glowing, so polymorph is our best bet. Here are the steps:
- Heat up your polymorph.
- Grab a medium size chunk of it and begin wrapping it around each LED in the tower, starting at the top of the tower at the top of the LED.
- Work your way down, covering the entire LED and tower. Be sure to fill the entire space in between the legs - this is your biggest hazzard for any breaking points.
- When you get to the last LED, be sure NOT TO COVER YOUR BOTTOM LOOPS. We will use these to connect our conductive thread.
Step 8: Making the Horn
Polymorph is great, but it doesn’t look like a real horn. For this step, you’ll need a thicker, sturdy white fabric (again I love thinner white neoprene) and a sewing machine or needle and thread.
We'll attach it to the horn in the next step.
Step 9: Stabilizing the Horn
We are going to sew the horn onto a sturdy piece of fabric (like neoprene) as a stabilizing base. We will attach this stabilizing base to the mane.
Note: I found this to be the most challenging since inserting a rod or other stabilizing accessory would have shown through and effected the horn aesthetic. If you have suggestions for improvements, please leave them in the comments!
Step 10: Upload the Code and Test It!
Grab your swatch and alligator clips so we can test this with the RGB LED horn. Upload the code and connect the horn and sensor to the Flora as shown in the image above.
A little bit about this sketch if you want to know more:
FADING. To fade an LED, most sketches use the delay() function. BUT we want to read any incoming input (i.e. strokes) at any time. Having a delay() in our sketch will prevent us from listening to an incoming stroke. Oh, what to do!? Use a snippet of fade code that doesn’t use delay()!
This is a wonderful little chunk of code created by Christian Liljedahl using sine and cosine (we won’t get into the math here) that gives us a wonderfully smooth fade without delay. Try adjusting the period and displace variables to change the speed and effect of the fade.
DIGITAL VS ANALOG. While stroke sensors are usually used as digital (i.e. on/off) switches, I found it more helpful to read analog values coming in and use a conditional statement to determine whether or not to trigger the fading behavior. Since the threads can get caught on each other and it may take a moment to get back to its resting state, this allowed me more control over the sensor. Try playing around with both. This is the beautiful thing about creating your own sensors!
Step 11: Attaching the Stroke Sensor
Adhere the sensor down the middle of the hood using a hot glue gun. Glue down one edge first, then the middle, then the other edge. You can of course sew it into place, but I found the glue sturdier and less time consuming.
Step 12: Sewing the Sensor Traces
Finally we have reached the fun part - sewing the traces, or lines of your circuit, of the sensor to create the actual circuit (we’ll deal with the horn later).
Traces are the lines of conductive material that connect compenents of the circuit together There are many ways you can do this depending on (1) how you want the aesthetics of your unicorn hood to look and (2) where you want to place the Flora. I chose to place the Flora on the front to have easy access to the power switch and decided to go for a less ornate, more functional look for my traces. The most important part of this step is to make sure none of your traces touch each other. If they touch, you will get a short circuit and it will not work properly. The only exception is your ground lines: these can all touch because they are going to the same pin.
I’m going to outline my approach below, but if you are more experienced with these materials and technique, feel free to create your own design (then share it back!).
STEP 1: Mark with a piece of tape or other indicator every other row of conductive loops. All of these will be connected together to create one side of the sensor - let’s say these are the purple rows in the diagram. The other, nonmarked rows will be connected together to form the other side. We’ll refer to these as the gray rows.
STEP 2: Let’s start with the gray rows first. Beginning with row P25 at the top of the head, come up through the bottom of the hood so the needle comes up through the conductive yarn near the edge of the sensor. Insert your needle back down about an 1/8th inch away into the same row conductive yarn. Do this 3-4 more times to create a small patch. This to make sure there is a strong connection. If the connection is loose, you won’t get a good reading.
STEP 3: Once you’ve done this, it’s time to venture forth onto the hood. Sew a straight line using a running stitch (https://www.instructables.com/id/sewing-how-to-running-stitch/) out onto the hood that is perpendicular to the sensor. It should extend at least 1.5 inches away since we don’t want loops to touch where and when they shouldn’t. I did about 2 inches to be safe.
STEP 4: Now turn your stitch 90 degrees and sew down towards the bottom of the hood until you reach the next row. When you are in the middle of the next row, turn again and sew up to the row. As with the first row, make 4-5 stitches to create a strong connection, then sew back out onto the hood. Make another 90 degree turn toward the bottom of the base and follow your original line. Keep doing this until you reach the base of the hood.
Now do the exact same thing with the purple rows on the other side of your sensor.
Step 13: Add the Resistor
We need to add a 10K Ohm (orange, black, brown) resistor connecting the purple sensor line to ground. This is called a voltage divider and it ensures we have functioning, smooth, non-noisy sensors. If you’re interested in learning more about them and how they work, check this out.
Step 14: Attaching the Horn
Now time to add the horn. Place a dallop of hot glue underneath the base of the horn and secure it in the middle of section P27 - the rows of single crochet stitches at the top of the head. Next glue down the outer strips. You can also sew a line of stitches around the outer edge of each strip for better stability.
Step 15: Sewing the RGB LED Horn Traces
Above is the final circuit diagram. Think about how you want you want your traces to look on the hood. As with the sensor traces, you can sew them in however you like as long as they don’t touch another trace (this would create a short circuit or alter the behavior of the circuit).
STEP 1: To connect these traces, tie a knot to connect the conductive thread coming off of the traces to the new piece on your needle. Make sure the knot is secure so your connection is secure.
STEP 2: Chances are you will come across another line of conductive thread that you need to cross over. Never fear! Just jump over it as shown in the illustration above.
STEP 3: Sew it down until you reach the Flora, then connect it to the appropriate pin. Sew at least three loops into the Flora pin to make sure you have a strong connection.
STEP 4: Do this for the rest of your RGB LED horn traces.
Step 16: Testing Your Circuit and Insulating Any Rogue Traces
Once you’ve tested your circuit and know it works, paint clear fingernail polish or fabric glue over ALL of your knots and connections. This will keep them secure and avoid short circuits.
If you see that any of your conductive thread traces are touching when you put it on, break out the fabric glue and apply it to the traces (it dries clear).
Not working? Try these:
- Are any threads touching that shouldn't be? This is your most likely bet. Make sure you have cut off any long hanging threads and insulated any threads that might touch when you wear it.
- Upload the code again.
- Replace the battery.