Project tutorial

Direction Indicators for Bikes © Apache-2.0

Riding bike is a little dangerous. With the Direction Indicators for a bike, car's know if you want to turn right or left. Make biking safe!

  • 131 views
  • 0 comments
  • 5 respects

Components and supplies

Necessary tools and machines

About this project

Introduction

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. This project is an intermediate project, because you need to find out yourself how to wire the LED's.

Step 1; Design

I wanted to put the led direction indicators at the luggage carrier. At this place the direction indicators will be good to see if you're in a car. I wanted to attach the Arduino behind the lamp and the push buttons (to make the indicators light up) to the handlebar.

Step 2; Materials

You need:

  • Small Plastic Boxes (I used one which perfectly fits my breadboards)
  • 10 LED's (I used red ones)
  • A power bank or another USB connection on/for your bike
  • A USB cable (for your Arduino)
  • Lots of wires

Step 3; Building

  • Drill four holes into one of the boxes
  • Put the LED's into two 170 tie breadboards at the same manner as I did;
  • 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 Indicater Ground, Left Direction Indicator Ground, etcetera). I put a drinking straw in the middle to make it neater.
  • Make sure you can still close it
  • Get a new box and drill 5 holes into it
  • Put your 55 tie breadboard into it
  • Turn around your Led box and put the box with the 55 tie breadboard 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 for the whole box beneath; Ground, + Left, and + Right. Push these 3 cables through the fifth hole, these are going to the Arduino.
  • I put a rubber band around the two boxes to keep them together
  • Get a new box for the Arduino
  • Drill 1 hole for the wires into it
  • Drill another hole for the USB cable
  • Make sure you can close the box and put the USB Cable into the Arduino.
  • Now it's time to make the push buttons
  • Make these 2 circuits
  • The one for the right side of the handlebar
  • The one for the left side of the handlebar
  • Now put all the wires into the Arduino
  • Make sure you can still close it
  • I put the push buttons to pin 2 & 3
  • The lights to 12 & 13
  • The Grounds to Ground
  • Now attach it to the bike
  • The push buttons to the handlebar
  • The Arduino behind the lamp
  • The direction indicator box at the luggage carrier

Improvements/upgrades

  • Make the push buttons more stable
  • Make direction indicators at the front of your bike too

Schematics

Wiring Diagram
direction_indicators_fritzing_RQfthVAVze.fzz

Code

Code Direction Indicators for bikesArduino
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);
}
}

Comments

Similar projects you might like

Starry Night Prom

Project showcase by Maddy

  • 999 views
  • 8 comments
  • 7 respects

The Trump Button

Project tutorial by Louis Moreau and Aurelien Lequertier

  • 769 views
  • 3 comments
  • 6 respects

ArduRadio AlarmClock

Project tutorial by Tittiamo

  • 1,433 views
  • 4 comments
  • 2 respects

Third Eye for The Blind

Project tutorial by Muhammed Azhar

  • 643 views
  • 0 comments
  • 9 respects

One Button Restart of a Stalled Raspberry Pi Zero W

Project tutorial by Ray Burnette

  • 2,111 views
  • 0 comments
  • 15 respects

Remote Controlled Scoreboard/Soundboard

Project showcase by Scott Clandinin

  • 720 views
  • 2 comments
  • 5 respects
Add projectSign up / Login