Monday, August 31, 2009

Bar End Brakelight Working... kinda.

So the hardware on the bar end brake light prototype is complete.

I need to work on the software to get the sensitivity right (solution posted here). The initial code only used one axis of accel data. Better to use two and compare against a floating reference. If an absolute reference (say horizontal) is used, stopping on a hill might trigger the brake light. So more work to come.

I was definitely pleased with the package which slides right into the bar snuggly. I had to shave off some plastic on the DIP socket to get the oscillator to fit. The chipped part above (upper left of IC) is a testament to the snug fit. I used an unregulated 6V mini battery to power the circuit which is the max voltage rating for the Mega. The accel has its own 3V regulator. The accel reading seems to be coupled with the LED on/off state. Maybe I need larger caps on the digital and analog pins. Any ideas welcome.

I use the arduino environment to program the Mega. Below is my development board with the same accel plus a gyro that will eventually go on the SharkFin. After I program the chip, I pop it into the socket on the bar end unit.

Dev Env

This picture shows the unit installed. I found the perfect switch at Radio Shack (see bottom of picture).

Saturday, August 22, 2009

Bar End Brakelight

I've been making progress on integrating the gyro with the accel. When the electronics are done there is still the whole question of packaging! I decided to put togethere a simple bar end break light to get the most bang for the buck early on. Need to add the oscillator and a switch and I'll be up and running.

Here is a pic with a wine cork for size comparison.

And simplified schematic.