Introduction: Direction Indicators for Bikes

Picture of Direction Indicators for Bikes

I made this project for my father on Father's Day. He bikes to his work every morning. There are a lot of cars on the road so I wanted to make biking safer. Cars have Direction Indicators, I wanted to give my dad's bike Direction Indicators too. To light up the right direction indicator just push the button on the right side of your handlebar, to light up the left direction indicator just push the button on the left side of your handlebar. I hope you like my project & you want to build yourself one too.

The one thing that can be a little challenging is wiring the cables of the lights. I included a wiring diagram for the push buttons, but not a wiring diagram for the indicator lights. This is because there are a lot of wires, and they can be "converted" into 3 wires: ground, right indicator light, left indicator light. Because you don't want to lose track of some wires, you may want to give ground one color wires, right indicator light one color wires, and left indicator light one color wires.

I have the same tutorial on the Arduino project hub .

To make it work, just attach the USB cable to the Powerbank & enjoy the Direction Indicators for Bikes!

Step 1: Gathering the Materials

For the Direction Indicators for Bikes, you need:

Step 2: Building the Lights

Picture of Building the Lights

Follow the photos, there is one of each step

  • Dril 4 holes into one of the boxes
  • Put the 10 LED's into the same box (look at the photo for the pattern)
  • Make sure you can still close the box
  • Wire it all up. Push your cables through the holes. Make sure you keep track of your cables. I labeled each hole(right Direction Indicator Ground, Left Direction Indicator Ground, etc) I put a drinking straw in the middle to make it neater.
  • Make sure you can still close the box
  • Get a new box. Put the 55 tie points breadboard into it
  • Turn around the box with the LED's and put the box with the 5 holes on top of it.
  • Get the wires from the box beneath and push them through the four holes. Keep the fifth hole free. Wire this up too and make sure you have three wires left: Ground, + Left, and + Right. Push these 3 cables through the fifth hole, these are going to go to the Arduino.
  • I put a rubber band around the two boxes to keep them together.

Step 3: Setting Up the Arduino

Picture of Setting Up the Arduino
  • Get a new box for the Arduino
  • Drill 1 hole for the wires into it.
  • Drill 1 hole for the USB cable into it.
  • Make sure you can close the box and put the USB cable into the Arduino

Step 4: Building the Pushbuttons

Picture of Building the Pushbuttons

  • Make the 2 circuits on the photo (or look in the Fritzing attatched)
  • One for the right side of the handlebar (blue breadboard)
  • One for the left side of the handlebar (green breadboard)

Step 5: Wiring the Arduino

Picture of Wiring the Arduino

  • Put all the wires into the Arduino & make sure you can still close

I put the push buttons to pin 2 & 3

The lights to 12 & 13

The grounds to ground

Step 6: The Code for the Direction Indicators

Add this code to the Arduino console:

const int button1 = 2;
const int button = 3;

void setup() { // put your setup code here, to run once:

pinMode(13, OUTPUT);

pinMode(12, OUTPUT);

pinMode(button, INPUT_PULLUP);

pinMode(button1, INPUT_PULLUP); }

void loop() { // put your main code here, to run repeatedly:

if (digitalRead(button1) == HIGH) { digitalWrite(12, LOW); }

if (digitalRead(button1) == LOW) { digitalWrite(12, HIGH); }

if (digitalRead(button) == HIGH) { digitalWrite(13, LOW); }

if (digitalRead(button) == LOW) { digitalWrite(13, HIGH); } }

It may work better when using the file I attached:

Step 7: Attaching Everything to the Bike

Picture of Attaching Everything to the Bike

  • Attach the push buttons to the handlebar
  • The Arduino behind the lamp
  • The direction Indicator box to the luggage carrier

Comments

dr4004 (author)2018-01-08
SasaM3 (author)2017-12-27

Why Arduino for it? it's a simple circuit, just need to light a couple of led when a switch is on, Arduino is overkill.

RosalieTech (author)SasaM32017-12-27

Yeah, you could use something other than an Arduino if you want to. That would make it more compact. I used an Arduino Uno for it because I had one:)

SasaM3 (author)RosalieTech2017-12-28

You really don't need anything, just two resistors to limit current thru LED when you push switch...

Swansong (author)2017-12-26

That's a really kind thing to do for your dad!

About This Instructable

921views

20favorites

Bio: I am excited about the Arduino and 3d printers! If you like my instructables, would you mind voting for my instructables for one of the ... More »
More by RosalieTech:Direction Indicators for Bikes
Add instructable to: