I would like to add brake lights on my bicycle. Ideally, the brake lights would turn on when a brake is applied, as with an automobile. Unfortunately, fixed gear bicycles complicate the question of when the brake lights should turn on. In addition to one or more brakes, a fixed gear bicycle can be slowed down by applying reverse pressure on the peddles. Unlike bicycles with coaster brakes the rider does not peddle backwards to slow down the bicycle. Since the gear and crank arm are fixed to the rear hub and wheel, slowing down the rotation of the peddles slows down the bicycle.

I would like to measure the speed of the crank arm or rear wheel at certain intervals to determine the change in speed of the bicycle. If the change is negative the brake lights should turn on.

An issue with consumer bicycle computers is their relatively low sample interval. They commonly use a sensor and magnet to the determine the speed of the bicycle for every rotation of the wheel. Typically a hall effect sensor is used in favor of a reed switch.1 My bicycle, like most adult size road bicycles, hybrids and some mountain bikes has a pair of 700x23C wired-edge tires.2 The circumference of the tire is approximately 220cm ≈ Π × 700mm. If I am traveling at 1km/h the speed will be updated every 7.92 seconds. Similarly, every 1.58 seconds at 5km/h and 0.358 seconds at 22.1km/h.3

This delay can be decreased by mounting a gear-tooth speed sensor (e.g. Cherry GS102301) on a seat stay to measure the teeth of a sprocket on the unused side of the rear hub (see: Variable reluctance sensor). Notably, this would not require the machining of additional parts, since a normal sprocket could be used. My current sprocket has 16 teeth, which would increase the sample interval by a factor of 16 over a normal bicycle computer. For example, when traveling at 1km/h the speed would be updated every 0.495 seconds. Ideally, the gear-tooth sensor would measure the front chain ring, which have many more teeth than the rear sprocket. However, mounting the sensor on on a chain stay would provide less protection and ground clearance. Also the sensor may have trouble reading the chain ring since it is often positioned very close to the chain stay. Mounting the gear-tooth sensor on the seat stay still provides several problems. Most sensors available to consumers are relatively large and could prove difficult to mount to a seat stay. Additionally, the mount has to be flexible to allow for movement, which will compensate for the change in position of the sprocket due to varying chain tension.

An alternate method suggested on the Sprout discussion group is to use an accelerometer (see: Fixie Brake Lights). A similar project was posted on the Instructables website (see: Bar End Brake Light: BEBL).

Accelerometers

Title Price† Store Stock
ADXL 103CE $17.24 Digi-Key
MMA7660FCR1 $1.44 Mouser 21,323

† All prices reflect quantity of one unit

Breakout boards

The Arduino Pro Mini, which is available on SparkFun for $18.95, would work well as a controller. The draw-back of lacking a USB port and FTDI chip, is also a benefit since it reduces the size of the board when compared with a Arduino Uno. The absence of a USB port means a FTDI board needs to be purchased seperately (i.e. FTDI Basic Breakout, $14.95). Also note that the Arduino and FTDI breakout boards are low-voltage boards, namely 3.3V, which means no interfacing circuitry is required to connect to the accelerometer.

Title Accel. Price† Store
LilyPad Accelerometer ADXL335 $25.95 SparkFun
Triple Axis Accelerometer Breakout MMA7361L $19.95 SparkFun
Adafruit - 3-Axis Accelerometer ADXL335 $20.00 Adafruit Industries
Liquidware - 3-Axis Accelerometer Module MMA7260QT $19.73 Liquidware
- - $0.00 Pololu

† All prices reflect quantity of one unit

Arduino shields

Shields were all found on the Arduino Shield List.

Title Accel. Price† Store
AeroQuad - Shield v2.0 BMA 180 $29.95 AeroQuad
Critical Velocity - Accelerometer Shield ADXL335 $19.95 Critical Velocity
Critical Velocity - IMU Shield ADXL335 $69.95 Critical Velocity
Liquidware - GeoShield - Lite LIS302SG $97.73 LiquidWare
Rugged Circuits - Gadget Shield MMA7660FC $29.95 Rugged Circuits

† All prices reflect quantity of one unit

Future considerations

Additional resources


  1. Hall effect sensors can be considered a solid-state component when compared to a reed switch, which consists of two contacts within an airtight glass envelope. When a magnet is near the switch the two contacts touch and the switch is actuated.

  2. Tire size is still commonly referred to with the classic French system. An attempt to standardize the numerous systems led to the international ISO 5775 standard, which in this case corresponds to 23-622. Unfortunately, the 622mm diameter referenced in this case is the bead seat diameter and not the tire outer diameter, which is the value necessary to accurately calculate sample interval. Although less accurate the above example will use the French system and therefore assume the tire outer diameter is equal to 700mm. Further information is available on Sheldon Brown's Tire Sizing Systems page.

  3. 22.1km/h was the average speed of a 39.61km ride on my old bicycle computer.