Introduction: Turn Signal Biking Jacket

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

.
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.

Step 5: Sew on Your Turn Signal LEDs

.
Sew in your left and right signals.

Using the same techniques you used to sew the power supply to the LilyPad, attach all of the + petals of the lights for the left turn signal together and to a petal on the LilyPad (petal 9 for me) and all of the + petals for the right signal together and to another LilyPad petal (11 for me). Attach all of the - petals of the lights together and then to either the - petal on the LilyPad or another LilyPad petal (petal 10 for me). Refer back to my design sketches if any of this is confusing.

Remember to seal each of your knots with fabric glue to keep them from unraveling. Be careful to avoid shorts; don't let one sewn trace touch another. In this case, the - traces for the LEDs are all connected, but you want to make sure that the + traces for the left and right signals do not touch the - trace or each other.

Test your turn signals.

Load a program onto your LilyPad that blinks each turn signal to make sure all of your sewing is correct.

Note, if you don't know how to program the LilyPad, work through a few of these introductory tutorials before proceeding.

Here's my test program:

int ledPin = 13; // the LED on the LilyPad
int leftSignal = 9; // my left turn signal is attached to petal 9
int rightSignal = 11; // my right turn signal is attached to petal 11
int signalLow = 10; // the - sides of my signals are attached to petal 10

void setup()
{
pinMode(ledPin, OUTPUT); // sets the ledPin to be an output
pinMode(leftSignal, OUTPUT); // sets the leftSignal petal to be an output
pinMode(rightSignal, OUTPUT); // sets the rightSignal petal to be an output
pinMode(signalLow, OUTPUT); // sets the signalLow petal to be an output
digitalWrite(signalLow, LOW); // sets the signalLOW petal to LOW (-)
}

void loop() // run over and over again
{
delay(1000); // wait for 1 second
digitalWrite(leftSignal, LOW); // turn the left signal off
delay(1000); // wait for 1 second
digitalWrite(rightSignal, HIGH); // turn the right signal on
delay(1000); // wait for 1 second
digitalWrite(rightSignal, LOW); // turn the right signal off
delay(1000); // wait for 1 second
}

If your layout is the same as mine, you can just copy and paste this program into your Arduino window.

If your turn signals don't work, use your multimeter (and the instructions from the last step) to test for shorts or bad connections and make sure that your program matches your physical layout.

insulate your turn signal stitches

Cover your traces with puffy fabric paint. Remember, you don't want to cover traces until you're sure that everything works! Use good judgment in when to coat traces.

Step 6: Sew in Your Control Switches

.
Place your switches

Find a spot for your switches where they'll be easy to press when you're riding your bike. I mounted mine on the underside of my wrists. I found a good spot by trying out different places. Check out the photos to see what I mean.

Once you've found a good position, push the legs of the switch through the fabric and bend them over on the inside of the fabric.

Sew in your switches.

Sew your switches into the garment. Sew 1 leg to the switch input petal on the LilyPad and another leg, one that is diagonally across from the first , to ground or another LilyPad petal. I used petal 6 for the switch input on the left side and petal 12 for switch input on the right side. I used - for the - connection on the left side, but petal 4 for the - connection on the right side. Refer back to my design drawings if any of this is confusing.

When you're done sewing, go back and reinforce the switch connections with glue. You don't want your switches to fall out of their stitching.

Step 7: Sew in Your Indicator LEDs

.
Sew a single LED onto the sleeve of each arm.

These will give you essential feedback about which turn signal is on. They'll flash to tell you what the back of your jacket is doing, so make sure they're in a visible spot. Sew the + petals of each LED to a LilyPad petal and the - petals of each LED to the - side of the switch (the - trace you sewed in the last step). I used petal 5 for the LED + on the left side and petal 3 for the LED + on the right side. Again, refer back to my design drawings if any of this is confusing.

As always, remember to glue and trim knots and be careful not to create any shorts.

Once you sew both wrist LEDs, you're done with the sewing phase of the project! Now, on to programming...

Step 8: Program Your Jacket

.
Decide on the behavior you want.

I wanted the left switch to turn on the left turn signal for 15 seconds or so, and the right switch to do the same thing for the right signal. Pressing a switch when the corresponding turn signal is on should turn the signal off. Pressing both switches at the same time should put the jacket into nighttime flashing mode. The wrist mounted LEDs should provide feedback about the current state of the jacket. Here's the code I wrote to get that behavior.

Program your jacket

To program your garment, copy and paste my code into an Arduino window and load it onto the LilyPad. You may have to make some small adjustments first depending on where you attached lights and switches. Play with delays to customize your blinking patterns. Follow my LilyPad introduction instructions if you need more information on how to program the LilyPad or how to make sense of my code.

Plug your battery back in and see if it works and...go biking!

Insulate the rest of your traces

Cover the rest of your traces with puffy fabric paint. Again, don't coat anything until you're sure it works.

About washing

Your creation is washable. Remove the battery and wash the garment by hand with a gentle detergent.

Note: silver coated threads will corrode over time and their resistance will gradually increase with washing and wear. To limit the effects of corrosion, insulate and protect your traces with puffy fabric paint or some other insulator. You can also revive exposed corroded traces with silver polish. Try this on a non-visible area first to see what it does to your fabric!

Comments

author
armzh (author)2017-04-08

can we use other than LilyPad Arduino board like Arduino UNO board??

author
wizardwes (author)armzh2017-05-17

You can use other boards for this project, however, the liliypad, flora, and gemma boards (all very similar save for size) are designed for projects like this because none of the components stick out the bottom, preventing snagging anfdtearing, and have pads designed for use with conductive threads. The uno and others will be harder to mount, and may not be compatible with your thread if it is too thick orand/or can't be soldered. Feel free to experiment though. You might find new solutions.

author
Bobibo3 (author)2017-02-25

Will the atmega32 chip overheat when I would use leds of 2.2V and 50mA If (instead of the 3.3V and 30mA If lilypad leds) even though the the max. forward current of the chip is 40 mA?

author
rupl made it! (author)2017-01-13

Fantastic project idea! I made a jacket for my wife. I started with a windbreaker that had a thin inner fleece as recommended. The lining made for sturdy construction. If I had to change anything it would be the white LED I put at the tip of each arrow... Sticking with all yellow would have made for a clearer, more visible shape.

I ended up using standard DIP push-buttons instead of the LilyPad buttons in my first image. Using a dab of superglue after laying out components helps so much with sewing on a project with so many LEDs.

For my sleeve indicators there are actually three LEDs each: one at the top of the wrist for the driver, and two LEDs on the side which make an outstretched arm more visible if the biker uses traditional hand signals in addition to the turn signal.

I ended up having a lot more code to drive the jacket, so I could make the arrows fade in, blink rapidly, and fade back out. A simple push of either side makes the blink cycle run 5 times, and it's possible to cut a blink cycle short by holding the same button down. Like Leah's code, holding both buttons down started the hazard mode, which keeps running until you hold a button to stop it.

IMG_5340.jpgIMG_5341.jpgIMG_5342.jpgIMG_5418.jpgIMG_5468.jpgIMG_5768.jpg
author
rupl (author)rupl2017-01-25

More details here: https://chrisruppel.com/blog/lilypad-arduino-biking-jacket/

author
DavidM1119 (author)2017-01-12

Someone knows the code?

author
rupl (author)DavidM11192017-01-25

Standard disclaimer, the code is dependent on your wiring and so forth, but here's what I used to drive my jacket.

https://gist.github.com/rupl/bf05d1ad40131a21f16fb24fbef9c0e3

author
jamesr12 (author)2015-04-09

you have the code to turn the left signal off and the right on and off to flash but for the left signal do you just do the same have the right turned off and the left on and off for flashing and do you just input the code under the loop or what

author
KellyK78 (author)jamesr122016-12-04

Dude, just loop the codes for right signal to off and left signal on :)

author
zainulislam (author)jamesr122015-05-09

hello sir i am new here and in arduino so iwant to learn arduino programing and every thing about arduino so if you khow about programing so please help me to learn arduino sorry for my poor english thanks in advance i am very thankful to you please give me replay to my email

my email:-zainulislam23@gmail.com
skype id:-zainulislam49

author
jamesr12 (author)2015-04-07

is the info about the power supply all you need to know for the power requirements for all the components or is there more power reqs needed

author
KellyK78 (author)jamesr122016-12-04

The power supply is enough for 3-4 hours and if u buy a rechargeable lithium battery, you can recharged it . There is no more power supply require.

author
T0BY (author)2016-12-03

What a great idea!

author
KellyK78 (author)T0BY2016-12-04

Yup, indeed :)

author
T0BY (author)2016-12-03

Genius!

author
Loufourmountains (author)2016-09-22

is this waterproof (i'm buying it and i don't know)

author
Alejandro ManuelM (author)2016-09-01

Does anyone have had any luck on the full code, its not working for me, and thats kind of frustrating

author
twosocks (author)2016-08-28

Fantastic idea! I was wondering what use those Lilypads would be good for. Now I know.

author
annabelleolivier (author)2016-05-30

Hi Kelly,

This was a long time ago...In the end everything worked out. What I do remember is that there was a mistake in the code, but not sure if that was in the final code or just the test code.I'm not a programmer but if I look at the test code the loop starts and ends with a delay and the left light turns off but never on.So that could be causing the wonky behaviour. I don`t remember if there were other issues.
Also I don't see the final code. The links to her website produce and error message. I hope you can find it somewhere else. Good luck, I hope that helped. I made the jacket for my husband, he got good use out of it.

author
DucD2 (author)2016-03-02

Hello, can you please make me one and I will pay.. I want to give this to my son for high school project. Thank you (email me at: coachdukedo@gmail.com) Thanks

author
BenjamenS1 (author)2015-10-20

Can you make one for me let me know email is Benjamen.smith7@gmail.com

author
HendrikB7 (author)2015-10-20

Nice idea. However the link to your webpage gives a 404 Page Not Found error and why on earth do I need to pay for the instructable if you are already making money from the components?

author
nellypo18 (author)2015-10-05

I THINK THE JACKET IS VERY VERY NICE I MIGHT MAKE ONE CUSTMIED.

author
Yonatan24 (author)2015-09-29

Hi, I've added your project to the "Top 5 Incredible Bike Projects"

This is the link If you are interested:

https://www.instructables.com/id/Top-5-Incredible-B...

author
njimenezo (author)2015-09-16

compre el lilypad que tiene la fuente de alimentacion conectada como hago para las conexiones de los pulsadores y demas elementos, es de la misma manera?

author
Viniciusoh (author)2015-06-13

If there's anyone wondering about the links that aren't working, I've found them here:

http://web.media.mit.edu/~leah/LilyPad/build/turn_...

And for the code:

http://web.media.mit.edu/~leah/LilyPad/build/turn_signal_code.txt

Now the link is hosted at MIT.

Also, wonderful project! If here in brazil would be easy to buy those boards, for sure I would do it!

author
TheMaciej (author)2015-06-08

Okay, does it have street homologation or is it only for offroad ?

author
peinkc (author)2015-06-08

I haven't been on a bike for years but this is one of the best ideas yet.
Take it to Shark Tank ASAP

author
omikeo (author)2015-06-07

How far/often do you ride, what type of bike do u have ?

author
NonofYabiz (author)2015-06-07

A wonderful idea! :)

author
dalauner (author)2015-06-07

I've done a similar project only with a professional cycling shirt:

https://www.youtube.com/watch?v=UWFkxcJ9KR4

author
cowcrusher (author)2015-06-07

Did anyone already suggest adding reflective tape in a fashionable way so that drivers see you first? I noticed that these jackets used are dark which is for the contrasting "arrow board" to be noticed but not for instances of poor visibility such as rain or fog. Great project though.

author
zainulislam (author)2015-05-09

any one please help me to learn arduino i want to learn arduino i send you money of classes my email
is
:-zainulislam23@gmail.com

author
ArvinL (author)2015-03-31

Well, get one of these http://shooln.co.uk/bike-led-signal-jacket.html. Both the jacket and remote control are waterproof, wireless remote control, got 4 buttons (rather than 2 like in this article), and less hassle to buy stuffs, program and build. I bought one from them and couldn't be happier!

author
Claudia O (author)2015-03-17

FTDI serves to put the program in Lilypad

author
jamesr12 (author)2015-03-14

hi i am new to this stuff and just wondered what the FTDI connector is used for sorry ia m reserching for a project

author
Claudia O (author)2015-03-05

Hello, I was wondering if we can use a two ply conductive thread however a four ply one. Thaaaanks!!

author
DrWilliamHorriblePhD (author)2012-02-22

How do we make this project waterproof? I understand it not being machine washable, of course, but I need some way to clean it, some insurance that it's not going to short and burn me because it started raining...

author

I can't believe I had to scroll all the way down here to find this concern. I like the idea, but the first thing that came to mind when I saw it was rain.

author

I WAS going to suggest Liquipel (http://www.thedailyserge.com/2012/03/tech-tuesdays-vol-25-waterproof.html?spref=fb) until I remembered that Liquipel is more of a SERVICE than a product. Add to that I don't even know if the machinery is equipped for clothing. NEVER FEAR: The solution is once again back into the capable hands of the DIY-er:

http://www.floatingpath.com/2012/02/18/nano-tech-waterproof/

This Never Wet superhyrophobic stuff works great with clothing.

Hope that the product reaches retail soon.

author
jamesbrosuk (author)2015-02-09

Excellent, problem is with the battery pack

author
Snellingkorey (author)2015-01-06

highly practical, you couls sell a ton of these to the mountain biking and running world.

author
lamontc (author)Snellingkorey2015-01-14

We will see, a variation has already been productized. - http://www.visijax.com/

author
DeanGPotts (author)2013-01-27

i love this project, but how much did all these arduino bits cost to make the project? please dont think im having a go, but when i saw it i immedietly thought this kit would work just as well using a simple oscillator circuit, using a few capacitors and resistors with a rocker switch on each handle bar, maybe $4 worth of bits.

author
Dana LaBerge (author)DeanGPotts2014-11-21

The difference is that you can't program multiple results from the same button like in this ible. That requires some kind of small wearable computer like an arduino. Personally I'd like to see someone get a raspi hooked up with bluetooth ot wome other wireless tech to make it so there's a thing that sticks on your back or your backpack and permanently mounted buttons on the handlebars. That would be awesome.

author

That's a great idea dana, they could be placed on the handlebars

author
davidbarcomb (author)2014-11-15

What an awesome idea. Gotta try this

author
jason000 (author)2014-10-16

Hi everyone

can anyone do this project for some $? the person doesn't reply!.

author
Victor Does (author)2014-10-13

Every one on a bike should have this! Nice idea!

author
TylerB2 (author)2014-10-06

Is there a reason you didn't use interrupts and sleep mode? I think it would make some of the logic simpler(of course the interrupt registration code itself would add some more lines) and reduce power consumption. You could even put the processor to sleep between LED flashing state changes and use timers, if you were really looking to reduce power consumption...

About This Instructable

505,567views

1,796favorites

License:

More by leahbuechley:turn signal biking jacket
Add instructable to: