Introduction: Bike Turn Signal & Brake Light Handlebars

Picture of Bike Turn Signal & Brake Light Handlebars
This project was inspired by a very cool kickstarter called Helios Bars. Essentially what this project does, is put an arduino, LEDs, and buttons into your bike handlebars. The LEDs can be used as turn signals, brake lights, or display ambient colors while riding. It's fun, cheap, and a good introductory to LEDs and arduino. The coolest thing though is that the project can be completely enclosed in the handlebars and even waterproofed! This is because the Arduino Micro will fit inside handlebars with an inner diameter of 0.7 inches or greater! It is also a cheap project with a cost of around $30-$40 to buy everything. The best way I can explain it is by showing it, SO CHECK IT OUT BELOW!

Step 1: Parts List

Picture of Parts List

To modify your handlebars this project uses a 'kit', all the pieces of which can be bought at a place like Radioshack. It's a fairly simple and cheap project, with few components.

Parts:
Arduino Micro - You could also use Arduino Uno or any others, but they would have to be externally mounted to the bike. If you have a choice, get the version of the Micro without headers.
2x Pushbuttons - I used 12mm ones seen in the picture, and they work awesome.
2x RGB LED's - These need to be common anode to work with my code. I recommend 2, but the number is up to you. You should probably get more just in case.
Resistors - These are needed for the pushbuttons and the RGB LED's, so they will be specific to what you use. I used four 2k ohm resistors. 
Batteries - Anything 6V or greater works but I will discuss this a lot more in the 'Custom Battery' step.
Wire - Lots and preferably thin and flexible.

Tools:
Soldering Iron
Drill
Metal Files

Additionally if you want to waterproof the bars be sure to get some sugru. More on this in Step 7.

Step 2: Basic Circuit

Picture of Basic Circuit

Circuit Description:
So the design of this project boils down to the schematic for the LEDs and the buttons in the pictures. It's much easier to see the circuit from the pictures but I will describe it just to be safe. There are three things that need to be connected to the arduino: the LEDs, buttons, and battery. The LEDs are hooked up to 5V through a resistor (resistance value depends on your LED) and three signal wires. The buttons will have a 5V, ground (through a resistor, once again the resistance depends on your button), and signal wire. You will also need V-in and ground wires connecting your battery to the arduino. That's the extent of the circuit! To keep things simple I used a central ground and 5V wire that ran the whole length of the bar so I could solder all the components onto them wherever they were needed (I used this ground wire to connect the battery as well).

Extra Info:
Once you have all your parts I recommend breadboarding your components into the circuit to do some testing and make sure the program runs properly. Note that the way to hook up your RGB LEDs may be different depending on what kind you have (I have common anode RGBs). I control the RGBs using the PWM pins on the arduino so be sure you hook up the LEDs to the exact same pins I do (you can use other PWM pins but you will have to modify the code). Once you have it set up then you are ready to test it with my program, or your own!

Step 3: Program

Picture of Program

The arduino IDE for writing code and programming any arduino can be found HERE. You can grab my program in the word file I have attached to this step and copy paste it into a new arduino sketch. Then, connect the arduino micro using a Micro B/USB cable to your computer and click the upload button on the arduino program. If you are having trouble uploading or don't know how try HERE or HERE

NOTE: if you don't have common anode RGB LEDs then you will have to modify my code. Try switching the values for the variables 'off' and 'on' and it should work. 

Step 4: Soldering the Components

Picture of Soldering the Components

Laying Out Circuit:
When soldering your circuit make sure you leave a little extra wire length for the LEDs and arduino, for the buttons though, the wire distance between them must be EXACTLY the same as the distance between their mounting holes (or quite close). It is very difficult to push the wire together of it is too long. I can't help you with exact lengths of wire because depending on LED placement, number of LEDs, handlebar shape, and button placement, the lengths of wire used change dramatically. I recommend pushing just one wire through certain sections of the bars to find exact lengths of wire. I planned on having the battery opposite the end of the handlebars with the arduino so you'll also need to measure out lengths of wire the length of the handlebars for the ground and V-in wires.

Cleaning Up Wiring:
To keep the wiring clean I would twist certain sections together, such as the three signal wires for the LEDs or the 2 signal wires for the buttons. I then took these 4 or so braided wires and arranged them how they should be to attach to component and taped them all together every 6 inches or so. I also laid out all the components to keep myself from getting confused. This kept things as clean and organized as possible.

Soldering:
Next I soldered the wires to my components, leaving the arduino for last. Use plenty of solder to ensure strong, durable connections. After soldering make sure to wrap all exposed solder joints and metal with electrical tape or something similar to prevent accidental circuit changes/shorts.

Testing:
Double check your circuit schematic with mine and test to make sure it works before moving on.

NOTE: If your arduino micro has headers you may need to desolder them so they will fit inside the bike bars. An awesome guide for desoldering can be found HERE.

Step 5: Preparing the Handlebars

Picture of Preparing the Handlebars

This step seems long but really you are only drilling holes in your handlebars and endcaps.

Removing Handlebars:
Take your handlebars off your bike by undoing the allen screw(s) holding them in place at the top of the fork. There are many possibly ways they could be attached so I'll let you figure that out. Next, remove your handlebar grips/tape and brakes. After you have the bar completely off and bare, remove the end caps by prying with a screw driver. Next, use a marker and plot where you want to make holes for the LEDs and buttons. I placed the buttons 4 inches on either side of the center of the handlebars and the LEDs in the end caps.

Drilling Endcaps:
Now you will need to find two drill bits. One that is the size of the LED "bulb" and another the size of the button part of your pushbutton. First take your end caps and use a clamp to hold them in place. Fix your LED drill bit into your drill and make a hole clean through the center. Test to see if your LED is able to protrude from the outside end so will be visible when mounted. If not widen the hole by wiggling the drill bit or trying a larger bit. Repeat for the other LED.

Drilling Handlebars:
I recommend putting the bars in a vice. On the spots you've marked on your handlebar, use a hammer to pound a nail to make a small mark that the drill bit can grab. Then fix your button drill bit and drill each of the holes. You will also need to make another hole on the back part of the handlebar for each hole you just drilled (so you will have a hole going completely through both sides of the bar). This allows you to push from the back of the button and stick something in to keep the button pressed up against the handlebar so it can be clicked without falling back into the bar. I recommend doing 4 holes in the same spot (2 holes going completely through both sides of the bar). This is because it is extremely difficult to twist a button so it can be pushed through the holes you have drilled.

Finishing Touches:
Use a metal file to smooth the holes drilled in your handlebars. If you have a de-burring tool or a small file, then use those to smooth the inside of the holes as well.


Step 6: Assembly

Picture of Assembly

Helper Wires:
You are ready to assemble the device! To make it as easy as possible I used what I call 'helper wires', which are just one strand of wire that I pulled through a section of the handlebar. I used three: one from the end of the tube to the right button, one from the right to the left buttons, and a third from the left button out to the other side of the tube (see first picture).

Assembly:
I would tie the helper wire to the V-in and ground wires of my circuit since they were longest and put tape over the knot to reduce the chance it snagged on something. Then I would slowly pull the helper wire and push in the part of my circuit entering the handlebar so the long circuit would slowly inch its way into the handlebars. Once the helper wire pulled out the right button hole I would untie it and attach the next helper wire to the V-in and ground wires again, repeating the process until the circuit was completely through the handlebars. Be careful to not tug or push too hard if it isn't moving, it might be caught on the inside burs  of one of the holes. Look into the holes and if you see wires near them take a paperclip or wire and poke them away from the opening before pulling again.

Securing Buttons:
Once you have it completely through line up the buttons with their holes. You will need to find something that you can stick in the back side (opposite the hole that the button part of the pushbutton will stick through) to secure the button so it won't fall back into the handlebars when pushed. I used a tapered plastic piece (it's a plastic drywall screw anchor) I found in the basement that fit snugly in the hole and held the button well but screws or other parts should work fine.

Don't worry if you need to take out and re-insert the circuit into the handlebars a few times to readjust things, it doesn't take too long and my circuit worked fine even after several times of pushing and pulling on it.


Step 7: Waterproofing

Picture of Waterproofing

When adding bike tape, I found that if you lightly tape over the buttons (so they aren't pressed) then they are completely hidden and are waterproof! Also, with a little sugru you can waterproof the endcaps and LEDs as well! You'll only need one package, so open it up and roll the sugru into a long cylinder. You need four of these rolled segments, two to wrap around the LEDs and two for the end caps. Push your LEDs through the end caps and right at the base where the LED touches the end cap wrap the sugru string around it and smooth it to both surfaces. Next, push the end caps almost completely into the bars, but just enough to wrap sugru between them and the edge of your handlebars. Push the handlebars completely in and smooth the sugru around the outside. Your handle bars are now impenetrable!

Step 8: Reattach to Bike

Picture of Reattach to Bike

Now the last step is just to attach the handlebar back to the bike. Also don't worry if you plan on making a custom battery you can insert it once the handlebars are attached to the bike. Try it out! I used a 9V taped to the bars for testing.

Step 9: Custom Battery (optional)

Picture of Custom Battery (optional)

You can skip this step by externally mounting a larger battery, such as a 9V, and just having V-in and ground wires attached outside of the handlebars.

Custom Battery:
To make this project completely fit inside the handlebars you will need to make a skinny battery pack! The largest battery that I found would fit with wires is AAs.Originally I decided I would use 6 rechargeable AAs soldered in a line with little pieces of wire between each battery so it could flex, but I decided that would be too difficult and expensive, so I just used rechargeable coin cells instead. Feel free to make whatever works best for you, it just has to be 6V or more.

Connecting the Battery:
Connect the negative (-) terminal of the battery to your ground wire and the positive (+) terminal of the battery to your V-in wire. Then just stuff the wires and batteries down the handle and plug it back up. If you have questions let me know.

Battery Life:
As for battery life, during testing I used an old 9V and it is still working great after 18 hours. Power requirements for the battery is quite low.

Step 10: Enjoy

Picture of Enjoy

This is a great learning project with an awesome end product! I hope to see this evolve, I mean once you have two buttons and an arduino in your bike handlebars there's plenty of things you can do from there. Let me know if you have questions or do anything awesome with it!

Comments

HRISHIKESHB3 (author)2015-11-02

superb this idea would help me a lot !!!!!!!!! inovative:)

markgrecowork (author)2014-12-31

Mizchief, wondering if you thought adding an automatic on off type of sensor? I have been using my rig for 4 months or so and I have to unplug each time I'm done. Wouldn't it be great with 5 minutes of inactivity it turns off and a touch of the button (right or left ) it turns back on? I'm using a micro exactly as you have it.

Philanthrop (author)2014-09-30

can you upload the wordfile for the arduino again, i cant find it

markgrecowork made it! (author)2014-05-17

I Made It !!!!

I will be adding limit switches in the brake levers.

THANKS FOR YOUR HELP

Patrick S (author)markgrecowork2014-05-19

Awesome! Post a pic of the finished product, I'd really like to see it!

markgrecowork (author)2014-05-17

Thanks for your reply the difference is is that I ride a cargo bike, it looks like you are a fixie rider. Sometimes it's difficult to remove your thumbs from the grips. I could incorporate microswitches into both the front and rear brake levers. I have my prototype breadboard complete and it works flawlessly pressing both buttons. As I said I can follow directions but the programming is beyond my skill set.

Patrick S (author)markgrecowork2014-05-17

Ok yeah I didn't quite understand what you were getting at before. If you want to have buttons in the grips and in the brake levers you could wire them in parallel (have all the same wires go to both buttons) and then when either is pressed it will work like normal. Or of course you can just put them in the brake levers if that's easiest.

markgrecowork (author)2014-05-13

Would you be willing to add code to actually have RED brake lights? I would connect a micro switch to the brake lever

I can follow directions but writing code is beyond my skill set.

Patrick S (author)markgrecowork2014-05-14

Right now in the code if you click both turn signals at once it holds RED brake lights for four seconds.

sallonikaG4 (author)2014-01-21

Bravo for your project.. It is really awesome and pretty useful.

I am looking forward to start next week creating your project. I have only 1 question.

Is it ok if I select Arduino Pro Micro or Arduino Nano?

Mondonson (author)2013-08-15

Helios here we come!

Dana LaBerge (author)2013-07-27

I think that on flat bats like for a mountain bike you could mount it like this but put a couple of ping pong ball halves for light dispersion on the ends and just got glue them on the ends. Maybe fill them with the hot glue for even better light dispersion. That way it could be seen from the front, side, or rear of the bike.

Patrick S (author)Dana LaBerge2013-07-28

That'd be sweet! Try it out.

drascombe (author)2013-07-23

While it seems like a good idea, is it really useful? I mean a car has its turn signals lights about 6 feet apart with following cars directly behind it. With a bike, it is a bit different. At most those are 18 inches apart, and from 40 feet away in the dark, can you really tell whether it is signalling left or right? Maybe it should be more light boat running lights where port is red and starboard is green?

Patrick S (author)drascombe2013-07-23

In the dark they are visible from much further than 40 feet. After doing this instructable I actually flipped them over so they point out to the front now and use a blinking light in the back so there is no problem with them being blocked by my legs or body. Most importantly though, it is meant to be a fun project and not to solve every bike visibility problem.

--------------------- (author)2013-07-23

That is a great idea

pweintraub (author)2013-07-15

Yes! Thank you! Bikers need to be seen!!

Gorgus (author)2013-07-01

When trying to downkoad your code I just get: 403 Forbidden Request forbidden by administrative rules.

Patrick S (author)Gorgus2013-07-01

Thanks for letting me know, I will re-upload it shortly!

Patrick S (author)Patrick S2013-07-09

Fixed!

Gorgus (author)Patrick S2013-07-11

Thanks!

zach.karpinellison (author)2013-07-09

Just out of curiosity can you propose ways this might work with flat bars? Thanks so much and what an awesome tutorial!

It can definitely work with flat bars! The only thing slightly different would be LED placement, since they would point out to the side rather than straight front/back. You could just drill a hole in the bars near the end caps (rather than in the end caps) to fit the LEDs if you wanted them to point forward/backward, but the LEDs pointing to the side shouldn't be a problem. If you have any other questions feel free to message me.

andrea biffi (author)2013-06-29

this is awesome!
thumbs up for the great italian brand bike frame! ;-)

Patrick S (author)andrea biffi2013-06-29

Thanks, and yeah I love my Bottecchia!

rzprk (author)2013-06-29

hey. i see you put a lot of efford into this and agree that this is a great introduction to attaching electronics to otherwise analog devices. just some final touch ideas.
if you can sacrifice function over aesthetics, i'd recommend to feed an dc-plug out of the handlebar somewhere in the center, preferrebly glued into it entirely. this way, you could use a 9v battery velcroed to the upper tube when needed for power supply.
behaviour: I suppose you arranged the buttons in a fashion you would press the right one for going left and vice versa, so you'd still be able to use your arms for indicating direction.
sensorics: acc- & deceleration: a 3axis accelerometer could be a fun way to strobe the leds if decelerating rapidly. i dunno wheter there are pressuresenstive stripes, if existing, theyd be a great thing to be put underneath the grip so you'd just have to grab harder...

Patrick S (author)rzprk2013-06-29

Hey, thanks for the ideas! What I did to mount my 9V outside was cut a small notch in the handlebar plug and feed out the V-in and Ground wires to plug the battery into, but you could attach these to a dc-plug it would just be a little less universal. I thought about using an IMU because I've got one that would fit in the bars, but you gain very little, it about doubles the cost, and makes putting it into the bars more challenging but to take this project to another level it would definitely be worth it! I also tried to just use common electronic items people could find at electronics stores, but pressure sensitive strips would be cool for sure.

About This Instructable

53,900views

367favorites

License:

Bio: I hope to help people with the things I make.
Add instructable to: