Brake & Turn — Innovative switches for bike signaling

I used the innovative switch project to create a signaling mechanism for bikers. Traffic safety would be greatly improved if bikers had the same communication devices that an automobile has: brake lights and turn signals.

I had 4 actions I wanted to signal:

  1. Brake lightly
  2. Brake hard
  3. Turn right
  4. Turn left

I decided to translate “brake lightly” as a half-brightness of one LED when only one hand was braking, and full brightness with two LEDs if both hands are braking.

I began by writing the code. I set up a circuit with 4 inputs and 4 LED outputs, 2 red LEDs for the brake lights, 2 green LEDs for the turn signals. Because I wanted half brightness in the brake lights, I used analogWrite with the red LEDs. I wanted the turn signals to blink, so I used digitalWrite with delay. I used a series of if statements to declare the different states of the LEDs depending on the conditions read from the 4 inputs. Here’s the code:

Screen Shot 2015-11-04 at 4.44.38 PMScreen Shot 2015-11-04 at 4.45.04 PM

Access the live text of my code here.

I tested it all at my desk just touching wires and troubleshot a few errors.

Lindpaintner_0

Then I headed over to use Josh’s bike (thanks Josh!) to test it all out installed. I mounted my Arduino board to the middle of the handlebars with some gaffers tape.

Lindpaintner_1

I set up the brake lights such that the lights would turn on when the brake was pulled, because that broke the circuit between the tips of the brake.

Lindpaintner_3

I set up the turn signals so that a simple piece of fabric on a glove, or a ribbon around the palm would create a bridge and close the circuit. That way, there are no wires connected to the person, and everything could be hardwired to the bike handlebars.

Lindpaintner_2

I used
2 red LEDs
2 green LEDs
4 10K Ohm resistors
4 560 Ohm resistors
a bunch of wires
copper tape

Here’s the demo!

Next step is to make my hand straps a bit more attractive and draw up my circuit diagrams!

This prototype uses LEDs on the Arduino Uno board, but in the final manifestation, the LEDs would be mounted to the bicycle itself, and all the wiring would be built into the handlebars. Obviously it is also not ideal for the board to be mounted to the middle of the handlebars and connected to the computer… but one step at a time!

One thought on “Brake & Turn — Innovative switches for bike signaling”

Comments are closed.