I wanted to start experimenting with microcontrollers, and thanks to a great instructible by Justin Shaw, came across this project for a Arduino based Bicycle Brake Light. Group riding would probably be safer, without having to shout out “stopping” or “slowing” to the person behind you. Putting a Brake Light on a cycle usually involved fixing a sensor or switch coupled to either the brake levers or brake pads. With different brake and brake lever types, getting it installed right could turn out to be a task.
Justin's original design was for the lights to be mounted at the ends of the drop handle bars (bar end) on a road bike. I had a hard tail. Also, I figured a more obvious mounting position would be under the seat post. So, here's a Brake light that you just plug in to its mounting bracket on the seat post (just like a regular rear light), and that's it. Why did I build it - if people always “bought” what they wanted, the word DIY would never have made it to the dictionary !
So, here's how it turned out. First, some brief specifications :
+> Atmel ATMega 328P microcontroller based design – this controller has it all – 32k Flash program memory, 1k EEPROM, 2k internal SRAM, timers, counters, six PWM channels, A-to-D ports, Digital IOs, Serial interface etc etc.
+> The microcontroller is loaded with the Arduino environment, with a built in Bootloader (so, basically, this Brake Light has to “boot up”, when you switch it on :-) - takes less than a second though).
+> A three axis Accelerometer sensor, to detect deceleration (braking) – so no wires or cabling required.
+> Plug and Play – just fix it to the mounting bracket, and its ready to go - the power switch is also the mounting bracket.
+> Adjustable sensitivity – from 1.5g for the slow folks to 6g for the speed demons.
+> Works on three AAA cells.
+> One Blinky flashing LED in the center to act as tail light (attention getter).
+> Four red LED's to indicate Braking.
+> Saddle post mounting.
I modified Justin's schematic, as well as the software (The Arduino environment is open-source), and went about designing the PCB. This turned out quite well, even though I was using KiCAD for the first time. Emailed the gerber plots to the PCB Fab house, and a week later, I got back 10 brake light PCB's. Justin's version was made from regular prototyping board.
The assembly took less than an hour, 'cause there are just a few parts, apart from the microcontroller, the sensor breakout board, and the LED's.
Programming and calibration was a jiffy, thanks the the USB port that I managed to build in, coupled to a Arduino Duemilanove development board.
The tough part was the mechanical assembly. After some bit of hunting, I managed to get a suitable plastic housing.
Then, I had to fabricate a battery holder for the 3xAAA – using a thick piece of bakelite, some laminated copper board, and the milling machine, I managed to carve out a decent battery holder.
Milled another slot in the plastic case for the LED's to stick out (my mistake though – should have drilled five independent openings for the LEDs).
Next step, power switch and mounting. I couldn't find any small switch lying around, and kept the project aside for a whole day, before I got a flash of imagination. I found a couple of 4mm jacks lying around, so these were used to hold the plastic housing closed, and were also wired up to the two terminals for the switch. So, I now have the box complete, with the two 4mm jacks sticking out. Just short these two, and the unit is turned On.
Then I had to get the mounting bracket done. I rummaged around, and found the right size of 10mm thick aluminum slabs lying around in my workshop. Three separate pieces, with lots of cutting, milling, drilling, and some lathe work to bore out the big hole for the seat post, and I had the mounting bracket ready. Phew !
So, all in all, a DIY project successfully completed. I didn't have anyone around to help me video this, so I just put the camera on the work bench and did the best I could. (Video uploaded separately on cyclists.in
video : http://cyclists.in/video/brake-light-for-bicycles)
Nest step, I'm colloborating with Justin to build another version that will have a Gyro sensor added to it, and the unit will be helmet mounted. Basically, measure acceleration and rotation simultaneously to detect braking from any head angle. This would be mighty useful to all those riding peloton. We're calling it the Sharkfin.