What you’ll be doing
This getting started guide is aimed at folks who want to get started making; You’ll be making a garment that has a microcontroller that controls LED via a circuit made of conductive thread. At the end, you’ll have a unique piece of wearable art that lights up the night. You’ll also be able to later customize the colors and animations of the LEDs.
Inspiration projects
Some tutorials online to help inspire. They’re a little more advanced (requiring additional components), but once you get started here, they’re just a tutorial away.
Components
What comprises a basic wearable:
Microcontroller (see Picking the right microcontroller)
Some lights (either sewable NeoPixels, NeoRings, or LED strips)
Wires or conductive thread to connect the circuit (Picking the right conductive thread)
A power source(see Picking the right power source)
And any sensors to enhance controls (see Other sensors for wearables)
Some optional things, depending on what you make:
Where to buy:
Chinese sites - There are a number of Chinese sites that will sell you components for cheap. However, I choose to buy from the above sites since LEDs are sometimes unreliable and I prefer something with a return policy that I trust.
Some additional tools you will want to have on hand:
Sewing pins and needles
Sewing chalk
Multimeter
Pliers
Soldering iron (maybe)
Before you get started
I’ve chosen to build wearables running on the Arduino + Adafruit NeoPixel platform since I think it’s easy to get up and running and the hardware is specialized to wearable use cases. Here are some step-by-step instructions about how to get it all up and running on this Platform, but there are plenty of other variations you could explore with different LED setups or microcontroller options.
Download and install the Arduino IDE
Configure Adafruit Flora and Neopixel Libraries and Boards
Under "Preferences" --> Additional Boards Manager URLs, copy and paste: https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
Go to “Sketch” → Include Library → Manage Libraries, and search for and Install:
Adafruit Flora Pixel Library
Adafruit NeoPixel Library
Go to “Tools” → Board → Board Manager, and install Adafruit AVR Boards
Making the wearable
For the microcontroller, my preferred microcontroller is the Adafruit Flora, since it has a lot of flexibility with the number of contact points, processing power, and you can upload new programs to it quickly.
Before you get started, make sure you test all your components using your microcontroller of choice. You’ll basically need to create a connection between your microcontroller and your components to test.
Plug the Flora into your computer using a USB cord. From here, you'll need to do a couple more things to ensure you can upload code from your computer to the Flora microcontroller:
Make sure your test code is ready:
For a NeoPixel ring or individual NeoPixels, you can just hook it up to the strandtest (Launch the Arduino IDE. From the File menu, select Sketchbook→Libraries→Adafruit_NeoPixel→strandtest).
For NeoPixel strands, the traditional strand test will draw too much power, so use this NeoPixel Strip test here instead.
You may need to save the sketch before you can finish uploading it.
Then configure the IDE to send the code to your Flora:
"Tools" → Board → Select "Adafruit Flora"
"Tools" → Programmer → Select "AVR ISP"
"Tools" → Port → Select the one that has “(Adafruit Flora)” in the title
Test uploading your code to the Flora by pressing the Upload button in the upper right hand corner
Next, map out your circuit using some sewing chalk or pencil. It’s important to map out your whole circuit so that you can pre-empt any short circuits (places where the conductive thread might overlap causing the circuit to misbehave or kill components). For individual NeoPixels, you can use a single thread for connecting all the ground (-) pads, and you can use a single thread to connect all the power (+) pads, but you’ll need to have individual threads between the data pins (-->). For example:
Here are some other resources for making wearable creation a little easier:
Flora + snaps - To make your Flora usable on multiple wearables, you can apply snaps as your primary way of fastening the flora to your garment (and makes washing way better, too!)
Conductive thread tips
To help with unravelling, I also dab the tips of the thread in clear nail polish and twist the end of the thread before threading it through the needle
Definitely use an embroidery ring. It’ll make things a lot faster and easier, since you want a lot of precision with the sewing of the LEDs.
Think ahead of time how you want the thread to appear on the outside of the garment. If you want to show the thread on the outside, just go for it! But if you want little thread to be externally visible, you’ll probably need two layers of fabric (i.e. outer and lining). Then you can do you primary stitching in the lining, and then only sew through the outer fabric when you attach an LED.
If your fingers get sore from pulling the needle through tough material with this thick thread, consider using pliers to help you move the needle and thread through.
Checking for shorts - Before powering up, make sure that you double check to make sure no thread in your circuit overlaps. You can also use a multimeter to check for shorts.
If you want to weatherproof it or make it more durable, check out this tutorial https://blog.adafruit.com/2014/07/02/how-to-rugged-ize-wearable-electronics-wearablewednesday/
Making it go blink!
You can check your circuit as you go, but this step is all about connecting your circuit up to power and making sure your wearable has cool looking LEDs lighting up.
A couple of final steps:
Upload final code - While the test strip code is cool, experiment with other programs to make your wearable blink up in a cool way! You can usually use online searches or Github to find alternatives, or even code your own if you understand the NeoPixel Library.
Attach your power source - Your microcontroller has been relying on the USB for power, and now you can transition over to your final power source. Once you’ve IDed the right power source, connect it up to the microcontroller.
Adjust any on-board switches - Some microcontrollers have an on-board on/off switch. The microcontroller may not light up from your non-USB power source without it switching to “on”. Switch to on!
Troubleshoot any issues
Extra things to make your piece shine
You can do all sorts of other things to make your wearable have a little extra sparkle! A couple of ideas:
Screen printing - You can make your piece interact with other prints. I’ve personally enjoyed designing a screen-print and then sewing LEDs into logical parts of the pattern (see this disco vest). You can also take screen printing paint and just hand-paint designs onto your wearable.
Buttons / capacitive fabric to change logic - Capacitive fabric is pretty awesome, and you can use it so that when someone touches a part of your garment with their skin or capacitive gloves, you can have your wearable change (e.g. LEDs blink white, but when someone touches you, they can blink pink or a rainbow). Buttons can also achieve similar effects, and some button switch logic for Arduino can be found here, and using the Flora, I’ve cribbed some of the code from this tutorial since the button is nicely across the D10 ←→ GRD pins.
Other components - See the list of other components to see how you can use other components to make your wearable do fun things.
Appendix
Picking the right microcontroller
As you think through picking the right microcontroller, think about what other components you want as part of your circuit, how much computing power you’ll need, size of microcontroller and how often you’ll be changing the code of the wearable.
Flora - The most flexible microcontroller to use for wearables is the Adafruit Flora; it’s got more computing power than the Gemma, and it’s also easy to upload new programs (just simply upload via USB). It also has the ability to connect multiple components, like a GPS module, compass, button and LEDs at the same time. It’s about $20, so more expensive than the Gemma, but if you use snaps, you can reuse in multiple circuits.
Gemma - The Gemma is a bit cheaper at ~$10 and smaller in size, but it’s a little more challenging. It has a bootloader, which you need to invoke in order to upload new code. The bootloader is a little finicky, but as long you don’t plan on changing code often, this could be a cheap, small option. It also has fewer pads, so can only power LEDs + maybe one other component. Some people use the Gemma for jewelry.
Other Arduino - The Guggenhat in the inspiration project, it uses the Micro Arduino controller. In this particular project, the project required a microcontroller with more computing power. It also didn’t require sewable LEDs. But there are lots of other Arduino boards that you can use to power wearables, as long as you think about how you’re going to connect the LEDs and where you’re going to hide the microcontroller within your wearable (some people don’t want their microcontrollers peeking out from flowy garments).
Raspberry Pi? - Honestly, I don’t have any experience with Raspberry Pi for wearables, but I’m sure it can be done.
Picking the right conductive thread
I’m aware of 3 different types of conductive thread. This article does a great job of explaining the pros and cons of the different thread types, and this video walks you through what kind of thread to pick, but here’s a quick summary:
Stainless steel - Good for larger projects; very low resistance (so electrons can flow freely) but a little hard to work with. A nice description of Adafruit’s two options.
For less than 5 LEDs - Use 2-ply stainless steel. It can still be used by sewing machines.
For less than 20 LEDs - Use 3-ply stainless steel. Needs to be done by hand due to being thicker, but can be used with projects that require more power.
For 20+ LEDs - Use Silicone Cover Stranded-Core Wire. You’ll need to solder with this option.
Silver thread - Good for smaller projects, and easier to work with. It has high-resistance, meaning that long distances of this thread aren’t very good.
Picking the right power source
There are two main options to thinking about power-source: Li-po batteries or battery holders:
Battery holders are good for when you know you’re going to be out-and-about and want to be flexible in replacing power, esp. if you know you can care extra batteries on you. But they are a little bulky if you’re powering a larger wearable (like a coat). If you want to go the battery route, but are powering a very small wearable (think hair piece or purse-light), you can use something like a Sewable CR2032 Battery Holder.
Li-poly batteries are smaller, rechargeable batteries that come in multiple sizes, but need to find a power source to be recharged. You’ll also need a special charger unit for them, like this one that works with MicroUSB. If you’re out on the desert, you could get a solar powered USB charger and charge your batteries during the day, but harder to do than just having a bag of batteries on hand.
The right battery will also be a function of what you plan to power with your circuit. I don’t know enough here to offer great advice, but finding similar tutorials should be able to guide you in the right direction.
Other sensors for wearables
There are SO many options to choose from here. Listing a few just for reference, but it’s really a playground for you to decide what you want to do with them.
Or get the Flora sensor pack for exploration.