Turn signal biking jacket using microcontroller

This tutorial will show you how to build a jacket with turn signals that will let people know where you’re headed when you’re on your bike. We’ll use conductive thread and sewable electronics so your jacket will be soft and wearable and washable when you’re done. Enjoy!
A version of this tutorial is also on my website.

Step 1: Supplies

Get your supplies. You need:
LilyPad Arduino main board
FTDI connector
mini USB cable
LilyPad power supply
16 LilyPad LEDs (note: these aren’t available from SparkFun yet, but will be soon)
2 push button switches
a spool of 4-ply conductive thread
— a digital multimeter with a beeping continuity tester. This is the one I have.
— a garment or a piece of fabric to work on
— a needle or two, a fabric marker or piece of chalk, puffy fabric paint, a bottle of fabric glue, and a ruler
(Available at your local fabric shop or Joann Stores.)
— a pair of scissors
— double sided tape (optional)
— a sewing machine (optional)
disclosure: I designed the LilyPad, so I’ll make some $ if you buy one.

Step 2: Design

Plan the aesthetic and electrical layout of your piece.
Decide where each component is going to go and figure out how you will sew them together with as few thread crossings as possible. Make a sketch of your design that you can refer to as you work. The photos below show the sketches for my jacket. Stitching for power (+) is shown in red, ground (-) in black, LEDs in green, and switch inputs in purple.
Important note about the power supply
As you design, plan to keep your power supply and LilyPad main board close to each other. If they are too far apart, you are likely to have problems with your LilyPad resetting or just not working at all.
Why? Conductive thread has non-trivial resistance. (The 4-ply silver-coated thread from SparkFun that comes with the LilyPad starter kit has about 14 ohms/foot.) Depending on what modules you’re using in your construction, your LilyPad can draw up to 50 milliamps (mA) of current, or .05 Amps. Ohm’s law says that the voltage drop across a conductive material–the amount of voltage that you lose as electricity moves through the material–is equal to the resistance of the conductive material times the amount of current that is flowing through it.
For example, if your LilyPad is a foot away from the power supply, the total resistance of the conductive material that attaches your LilyPad to your power supply is about 28 ohms. (14 Ohms in the conductive thread that leads from the negative terminal of the power supply to the negative petal on the LilyPad and 14 Ohms in the conductive thread that ties the positive terminals together). This means we can expect a drop of 1.4 Volts (28 Ohms * .05 Amps.) This means that while 5 Volts is coming out of the power supply, the LilyPad will only be getting 3.6 Volts (5 Volts – 1.4 Volts). Once the voltage at the LilyPad drops below about 3.3 Volts, it will reset. The resistance of the traces from + on the power supply to + on the LilyPad and – on the power supply to – on the LilyPad should be at most 10 Ohms. Plan the distance accordingly.
If all of this was confusing, don’t worry! Just keep the LilyPad and power supply close to each other in your design.
Transfer the sketch to your garment.
Use chalk or some other non-permanent marker to transfer your design to the garment. If you want, use a ruler to make sure everything is straight and symmetrical.
Use double sided tape to temporarily attach LIlyPad pieces to your garment. This will give you a good sense of what your final piece will look like. It will also keep everything in place and, as long as the tape sticks, make your sewing easier.

Step 3: Sew your power supply and LilyPad to your jacket

First, trim the leads off of the back of the power supply
Get out your LilyPad power supply piece and trim the metal parts that are sticking out the back of it. Small clippers like the ones shown in the photo work well, but you can also use scissors.
Stabilize your battery on the fabric.
Generally, you want to do everything you can to keep the power supply from moving around on the fabric. I recommend gluing or sewing the battery down before starting on the rest of the project. You may also want to glue or sew something underneath the power supply to help prevent it from pulling on the fabric and bouncing around as you move.
If you are working on a thin or stretch piece of fabric–first of all, reconsider this choice! It’s much easier to work on a heavy piece of non-stretchy fabric. If you are determined to forge ahead with a delicate fabric, choose the location for your power supply wisely. It’s the heaviest electronic module, so put it somewhere where it will not distort the fabric too badly. definitely glue or sew something underneath the power supply.
Sew the + petal of the power supply down to your garment.
If you are new to sewing, check out this great introduction before you start for info on how to thread a needle, tie knots and make stitches. Cut a 3-4 foot length of conductive thread. Thread your needle, pulling enough of the thread through the needle that it will not fall out easily. Tie a knot at the end of the longer length of thread. Do not cut the thread too close to the knot or it will quickly unravel.
Coming from the back of the fabric to the front, poke the needle into the fabric right next to the + petal on the power supply and then, from the front of the fabric, pull it through. The knot at the end of the thread will keep the thread from pulling out of the fabric. Now make a stitch going into the hole in the hole in the + petal on the power supply. Do this several more times, looping around from the back of the fabric to the front, going through the + petal each time.
Pay special attention to this stitching. It is the most important connection that you’ll sew in your project. You want to make sure you get excellent contact between the petals on the power supply and your conductive thread. Go through the hole several times (at least 5) with your stitching. Keep sewing until you can’t get your needle through anymore. Do not cut your thread, just proceed to the next step.
Sew from the battery to the LilyPad.
Once you’ve sewn the + petal of the battery down, make small neat stitches to the + petal of your LilyPad. I used a jacket with a fleece lining and stitched only through the inner fleece lining so that no stitches were visible on the outside of the jacket.
Sew the + petal of your LilyPad down, finishing the connection.
When you reach the LilyPad, sew the + petal down to the fabric with the conductive thread. Just like you were with the battery petal, you want to be extra careful to get a robust connection here. This stitching is making the electrical connection between your power supply and LilyPad.
When you are done with this attachment, sew away from the LilyPad about an inch along your stitching, tie a knot, and cut your thread about an inch away from the knot so that your knot won’t come untied.
Put fabric glue on each of your knots to keep them from unraveling.
Once the glue dries, trim the thread close to each knot.

Step 4: Test your stitching

Test your stitching
Measure the resistance of your stitching.
Get out your multimeter and put it on the resistance measuring setting. Measure from power supply + to LilyPad + and power supply – to LilyPad -. If the resistance of either of these traces is greater than 10 ohms, reinforce your stitching with more conductive thread. If you’re not sure how to measure resistance, check out this tutorial.
Put a AAA battery into the power supply and flip the power supply switch to the on position. The red light on the power supply should turn on. If it doesn’t and you’re sure you flipped the switch, quickly remove the battery and check for a short between your + and – stitches. (Most likely there is a piece of thread that’s touching both the – and + stitching somewhere.) You can test for a short between + and – by using the beeping continuity tester on your multimeter. See this tutorial for information on how to use the continuity tester.
Also check the resistance between the + and – stitching. If the resistance is less than 10K Ohms or so, you’ve got a mini-short (probably a fine conductive thread hair that is touching both + and -) that you need to find and correct.
If the power supply does turn on, look at your LilyPad. It should blink quickly each time you press its switch. Once these connections are working properly, turn off the power supply and remove the battery.
Insulate your power and ground stitching
So, your jacket is now full of uninsulated conductive stitches. This is fine when a body is inside of it. A body will prevent sewn traces from contacting each other. But when the jacket is off of a person and you bend or fold it, traces will touch each other and short out. To fix this problem, cover your traces with puffy fabric paint (or another insulator like a satin stitch in regular thread). But, you don’t want to cover traces until you’re sure that everything works! So, use good judgment in when to coat traces.
For more detail: Turn signal biking jacket using microcontroller

About The Author

Ibrar Ayyub

Ibrar Ayyub is an experienced technical writer with a Master's degree in computer science from BZU Multan University. He has written for various industries, mainly home automation, and engineering. He has a clear and simple writing style and is skilled in using infographics and diagrams. He is a great researcher and is able to present information in a well-organized and logical manner.

Follow Us:
Scroll to Top