Overview
Group riding would be much safer if bikes had brake lights. The lack of brake lighting on bicycles has lead to the audio cues of "SLOWING" or "STOPPING" being shouted at every turn. While this may enhance safety, it certainly cuts into the serenity of a ride.
This project offers a viable solution that can increase both safety and serenity on a group ride. With embedded programming made easy by the Arduino integrated development environment, electronics getting smaller, more capable, and cheaper, this project is possible for the do-it-yourselfer.
BEBL Challenge! Be the first, and get your hardware cost reimbursed. I will award a $35 reimbursement, by mail or PayPal, to the first person to post a video online that demonstrates a functioning and mounted Bar End Brake Light made from these plans. Looking forward to seeing your project.
Design Criteria
Other than the obvious criterion -- light up when braking, I wanted this light to look cool, cool enough to mount on any expensive racing bike. This rules out any visible wiring. I also wanted the light to be portable, meaning it will work on more than one bike. Thus no brake-lever specific triggering should be used.
Solution
The final design is centered around a 3-axis accelerometer board provided by Pololu.com. This product is simple to use with an Arduino, small enough to fit inside the handle bars, and best of all cheap at $15. Also, this accel has an on-board voltage regulator that we will take advantage of to power the whole circuit.
The processing takes place in an ATmega328 programmed with Arduino. These chips can be also be programmed directly in C, but Arduino takes care of a lot of setup and generally makes programming less tedious. Arduino has everything this project needs. The ATmega168 would probably suffice for this project but the ATmeta328 at $1 more, provides 2X the program space.
Mounting the computer inside the handlebars provides an enclosure for the project.
Remove these ads by
Signing UpStep 1: Schematic, layout, and bill of materials
Let me know if you are interested in a printed board. We can combine orders and save!
Parts
Accel -- 3-axis accel breakout $15
6V battery -- Lithium 28L $5 each
SparkFun
S2 -- Surface mount right angle switch $1
IC1 -- AVR ATMega328 w/ arduino bootloader $5.50 (Consider getting this from ladyada.com, for her supped up bootloader)
LED1 -- Super bright LED red $1 each x 2
Osc1 -- 16 MHz oscillator $1
28-pin DIP socket $1.50
Radio Shack
C1, C2 -- .1 uF ceramic cap
R1, R2 -- 220 Ohm resistor
Project board $2
Bar tape and plugs.
Total cost around $35, battery included. I'm not including the cost of the bar tape, since you need to have that anyway.

















































Visit Our Store »
Go Pro Today »




https://docs.google.com/document/preview?id=1o03JNsczAHO_7AqnSu-AJvdP9GMzGC792b4w4MKlCio
Whenever trying to get a cord through any type of tube, get a vacuum cleaner at the other end and it will suck the cord trough! Done!
I once succeeded to pass a cord through 15 meters of plastic pipe like this. In case of long pipes it is better to do any type of not at the front end (or tie any light plastic part) to increase air resistance.
Justin
Coming soon: a helmet mounted version.
Thanks again!
Justin
Way to go winning the contest!
Justin
Instead of an arduino, (which I have NO experince with), would a small pressure xducer between the brake pad and its holder work to act as the switch?
... just thinkin'...
I think the best place for a switch is some where on an exposed piece of cable. You could attach a wire that will become disconnected when the cable is pulled for instance. Or if you could use a magnet and detector instead of a switch.
Justin
I like the lights in the bar ends idea, I wonder if you could do a combo brakelight/headlight and use the arduino for triggering the headlight(s) when it gets dark.
>Are the lights visible from the vantage point of different types of vehicles? With only one LED per BEBL the range of visibility might be limited because the levels of the eyes of other drivers might not be in a direct line of sight.
>Have you considered that lights brake lights on most vehicles are located on the rear of the vehicle? Brake lights located on the ends of the handlebars might give a false impression of location to other drivers on the road. Remember, your safety is important. A slightly different example: remember when the brake lights of vehicle were located on on the bumpers or vertical trunk area? I believe the rear window brake light was an addition that greatly improved the braking visibility to other drivers.
On the other hand, a BEBL is probabaly a good idea to keep so that when other vehicles draw near to the side of your bike, they can see you beside them.
>Dynamo vs battery - why not both? Recharge the battery with a dynamo.
Thanks reviewing this instructable. This is actually a early prototype of the SharkFin helmet mounted brake light, which will be visible from the back of a large pack of riders. I like the bars in the mean time to provide a ready made, free project case.
I agree, if your going to use a dynamo, use it to charge a battery!
dynamo + battery = awesome
Justin
Instead of powering it with a battery - why not use a small dynamo/generator that is powered by the bikes movement ?
- after all, this really good idea would only make real sense if/when the bike is moving.
Removing the need for a battery (that most likely have gone dead by the time you need it) would make this practically maintenance free.
You should try to make this a commercial product - lots of potential, mate !
I also think there is enough gadgets around that would allow enough charge to be stored so even if the bike comes to a stop it will still work for x time.
The point I tried to get across is that the battery would be the weakest link - try to find a way to make it almost maintenance free.
cheers
I guess the little wiring needed easily could be sitting inside a standard bike frame - no exposed wires.
I think you should try to make this commercial - if nothing else you ought to protect the the idea - then sell it to some rich Chinese company for big $$$$ - When you do I wouldn't mind getting a share :) - At least so I can send my kids to a good school or something :)
cheers
- You could create a small semi flexible rubber/plastic extension that would fit into a standard handle bar (standard bar i.e a straight one commonly used on most street bikes (non racing ones)
The bend should be pointing backwards once its inserted into the handle bar - Alternatively this could also be a complete replacement hand grip- I've tried to draw a rough sketch on what I am thinking.
I like your idea of using a dynamo. A friend had the same suggestion and I included it in the improvements section with a link to this power generating hub. This would be a great project to add this to BEBL!
Justin
Thanks, that's the best question I've had on the BEBL. There are actually 4 IIR filters running at about 650 Hz, all on that micro! Two really low pass filters (X1 & Z1 -- intrack & up) track the accel due to gravity. I know the unit is to be fixed to the bike so I don't expect any really rapid changes in the down direction relative to sensor. Slow changes like transitioning from uphill to down hill are in the pass band.
The other two low pass filters (X2 & Z2) filter out road vibration, bumps and accelerations from peddling but braking is in the pass band. This causes a slight, but acceptable delay in the trigger. You can probably trick the brake light into coming on with slow, hard pedaling.
Suppose we assume that down is given by the unit vector [X1, Z1], then forward will be orthogonal ~ F = [-Z1, X1]. We measure breaking by dotting [X2, Y2] against F.
B = [X2, Y2] . F. If this signed quantity exceeds a threshold of about .04 Gs we turn on the brake lights. Because it is signed we can distinguish between lowing down -- braking and speeding up -- accelating.
You may be correct about the flashing when not braking. Since this is still a proto-type I like to know that the unit is at least powered up. I could add a jumper for flashing vs not flashing.
Thanks for your comments!
Justin
I'd like to make one that attaches under the seat, like most bike lights. This would make switching back and forth between bikes a snap. I guess you were trying to avoid the issues with building/reusing an all-weather case that could be needed there.
Thank you very much. I'm glad you noticed the debugging section. You shouldn't have much trouble with your seat post mounted version. The bar ends were just easier and I didn't have to tear up a functioning light.
I'd like to get around to making a version that is helmet mounted which would be even more portable. Even more hardware is required for this solution.
Justin
I like the stepwise video ...
It seems like we are converging on to versions: a dynamo powered commuter version and a battery powered version. For the battery powered version, it seems like there is enough room to mount a mini usb port to charge a battery without dismounting the unit.
Thanks for commenting!
Justin
-Joe
Thanks for checking it out. I was actually pleased with the fact that you could see the LEDs at all, given the fact that the video was taken in broad daylight from a hand held camera from a trailing bicycle. TREK also used a single LED on each side in their light.
Thanks again.
Justin