MotorCycle Gear Indicator

About: I am an Engineer in the field of Embedded system & Robotics.

Intro: MotorCycle Gear Indicator

This is a new design for gear indicator that can be fitted to any motorcycle . Its main advantage is that its operation depends entirely on the gear shift lever movement, instead of connecting to speedometer and tachometer sensors (found in expensive commercial devices), which are rarely available in older motorcycles. It consists of a main circuit including a 7‑segment LED indicator, two Hall sensors that are attached to the motorcycle frame, and a small magnet placed on the gear shift lever.

Step 1: Parts List

R1 =10 to 220 Ω ½W Depending on preferred LED brightness

R2, R3 = 10 ΚΩ ¼W

Arduino Uno

Hall sensor

7805 5V Regulator TO-220

C1,C2 =220 uf

7 segment LED display (common anode)

9-12 v battery (otherwise connect the device with your bike battery supply).

connecting wires, general purpose pcb.

Step 2: Working Principle

The main working principle is based on an AVR Arduino UNO.

which reads the signals of the two Hall sensors and the neutral switch and outputs the current gear number to a 7‑segment LED indicator, through arduino.

At maximum output power there is significant heat produced by sensors and for that reason we mounted it directly on the ground plane to achieve maximum heat radiation.

Step 3: Circuit Diagram

int ledPinA =  13;    // LED connected to digital pin 3<br>int ledPinB =  12;    // LED connected to digital pin 4
int ledPinC =  11;    // LED connected to digital pin 5
int ledPinD =  10;    // LED connected to digital pin 6
int ledPinE =  9;    // LED connected to digital pin 7
int ledPinF =  8;    // LED connected to digital pin 8
int ledPinG =  7;    // LED connected to digital pin 9


#define BUTTON_DOWN 4<br>#define BUTTON_UP 6
<br>

Step 4: Source Code

#define BUTTON_DOWN 4
#define BUTTON_UP 6

int ledPinA = 13; // LED connected to digital pin 3 int ledPinB = 12; // LED connected to digital pin 4 int ledPinC = 11; // LED connected to digital pin 5 int ledPinD = 10; // LED connected to digital pin 6 int ledPinE = 9; // LED connected to digital pin 7 int ledPinF = 8; // LED connected to digital pin 8 int ledPinG = 7; // LED connected to digital pin 9

int val_down = 0; int old_val_down = 0;

int val_up = 0; int old_val_up = 0; int state = 0; int gear = 0;

// The setup() method runs once, when the sketch starts

void setup()

{ pinMode(BUTTON_DOWN, INPUT); pinMode(BUTTON_UP, INPUT); // initialize the digital pin as an output: pinMode(ledPinA, OUTPUT); pinMode(ledPinB, OUTPUT); pinMode(ledPinC, OUTPUT); pinMode(ledPinD, OUTPUT); pinMode(ledPinE, OUTPUT); pinMode(ledPinF, OUTPUT); pinMode(ledPinG, OUTPUT);

}

void led0() { digitalWrite(ledPinA, LOW); digitalWrite(ledPinB, LOW); digitalWrite(ledPinC, LOW); digitalWrite(ledPinD, LOW); digitalWrite(ledPinE, LOW); digitalWrite(ledPinF, LOW); digitalWrite(ledPinG, HIGH); }

void led1() { digitalWrite(ledPinA, HIGH); digitalWrite(ledPinB, LOW); digitalWrite(ledPinC, LOW); digitalWrite(ledPinD, HIGH); digitalWrite(ledPinE, HIGH); digitalWrite(ledPinF, HIGH); digitalWrite(ledPinG, HIGH); }

void led2() { digitalWrite(ledPinA, LOW); digitalWrite(ledPinB, LOW); digitalWrite(ledPinC, HIGH); digitalWrite(ledPinD, LOW); digitalWrite(ledPinE, LOW); digitalWrite(ledPinF, HIGH); digitalWrite(ledPinG, LOW); }

void led3() { digitalWrite(ledPinA, LOW); digitalWrite(ledPinB, LOW); digitalWrite(ledPinC, LOW); digitalWrite(ledPinD, LOW); digitalWrite(ledPinE, HIGH); digitalWrite(ledPinF, HIGH); digitalWrite(ledPinG, LOW); }

void led4() { digitalWrite(ledPinA, HIGH); digitalWrite(ledPinB, LOW); digitalWrite(ledPinC, LOW); digitalWrite(ledPinD, HIGH); digitalWrite(ledPinE, HIGH); digitalWrite(ledPinF, LOW); digitalWrite(ledPinG, LOW);

}

void led5() { digitalWrite(ledPinA, LOW); digitalWrite(ledPinB, HIGH); digitalWrite(ledPinC, LOW); digitalWrite(ledPinD, LOW); digitalWrite(ledPinE, HIGH); digitalWrite(ledPinF, LOW); digitalWrite(ledPinG, LOW); }

void led6() { digitalWrite(ledPinA, LOW); digitalWrite(ledPinB, HIGH); digitalWrite(ledPinC, LOW); digitalWrite(ledPinD, LOW); digitalWrite(ledPinE, LOW); digitalWrite(ledPinF, LOW); digitalWrite(ledPinG, LOW); }

void led7() { digitalWrite(ledPinA, LOW); digitalWrite(ledPinB, LOW); digitalWrite(ledPinC, LOW); digitalWrite(ledPinD, HIGH); digitalWrite(ledPinE, HIGH); digitalWrite(ledPinF, HIGH); digitalWrite(ledPinG, HIGH); }

void led8() { digitalWrite(ledPinA, LOW); digitalWrite(ledPinB, LOW); digitalWrite(ledPinC, LOW); digitalWrite(ledPinD, LOW); digitalWrite(ledPinE, LOW); digitalWrite(ledPinF, LOW); digitalWrite(ledPinG, LOW); }

void led9() { digitalWrite(ledPinA, LOW); digitalWrite(ledPinB, LOW); digitalWrite(ledPinC, LOW); digitalWrite(ledPinD, LOW); digitalWrite(ledPinE, HIGH); digitalWrite(ledPinF, LOW); digitalWrite(ledPinG, LOW); }

void setLed(int number) { switch (number) { case 0: led0(); break; case 1: led1(); break; case 2: led2(); break; case 3: led3(); break; case 4: led4(); break; case 5: led5(); break; case 6: led6(); break; case 7: led7(); break; case 8: led8(); break; case 9: led9(); break; } } // the loop() method runs over and over again, // as long as the Arduino has power

void oldloop() { // wait for a second led0(); delay(1000); // wait for a second led1(); delay(1000); // wait for a second led2(); delay(1000); // wait for a second led3(); delay(1000); // wait for a second led4(); delay(1000); // wait for a second led5(); delay(1000); // wait for a second led6(); delay(1000); // wait for a second led7(); delay(1000); // wait for a second led8(); delay(1000); // wait for a second led9(); delay(1000); // wait for a second }

void loop() { val_up = digitalRead(BUTTON_UP); if ((val_up == HIGH) && (old_val_up == LOW)&&gear<7 ) { gear += 1; delay(100); } old_val_up = val_up; val_down = digitalRead(BUTTON_DOWN); if ((val_down == HIGH) && (old_val_down == LOW)&&gear>1 ){ gear -= 1; delay(100); } else if ((val_down == HIGH) && (old_val_down == LOW)&&(gear<1))

{ gear += 1; delay(100); } else if ((val_down == HIGH) && (old_val_down == LOW)){ gear += -1; delay(100); } old_val_down = val_down; if (gear >= 6) { gear = 6; } setLed(gear); }

Step 5: Installation

After putting it all together the circuit is now operative and ready to be installed on the motorcycle.

in my pics i used this indicator for my car which is based on duke bike engine

therefore installation technique is similar for bike...

NOTE: gear mechanism is same as bike.

THANK YOU SO MUCH FOR WATCHING AND READING IT.........LIKE IT & SUBSCRIBE US.

Share

    Recommendations

    • Tiny Home Contest

      Tiny Home Contest
    • Fix It! Contest

      Fix It! Contest
    • Furniture Contest 2018

      Furniture Contest 2018

    21 Discussions

    0
    None
    kumar5robopathshala

    Reply 13 hours ago

    I'm a beginner, I don't know how to connect with all pins in 7 segment display. Can you share complete circuit diagram with each pin connection.

    0
    None
    BenH261

    Question 6 weeks ago

    In your schematic it says we need a 12pF capacitor, whereas is in the parts list at the beginning it says we need a 220uF. Which one is it??

    0
    None
    BenH261

    6 weeks ago

    Though this person has stolen the images and idea from another person, he has changed the code from ATTiny to Arduino

    0
    None
    said19

    9 months ago

    does this code saves last gear in eprome

    1 reply
    1
    None
    erox66ghz

    1 year ago

    Really awesome instructable

    0
    None
    billybouy1

    1 year ago

    sorry alok014, but I can't give you credit for something that is not completely yours. if you had put the link in for the original site then that would have been acceptable.

    3 replies
    0
    None
    robopathshalabillybouy1

    Reply 1 year ago

    wait wait there are 3 pics that i used from Google for making my instructable attractive and i think that my code is very advanced and 100 percent better than any code for any universal indicator.i will show u my design. installation method is similar that's y i use in my step but if u are challenging than look at this

    0
    None
    billybouy1robopathshala

    Reply 1 year ago

    I'm not disputing the fact that you've made this instructble and manipulated the code to work on arduino. as for yours being advanced as you put it. I don't think so.
    like I said I've built this for my bike following the instuctions on www. electronics lab.com and it works perfect. I used arduino to program the attiny85 both the 8pin dip and the smd.
    Anyway that's it I've said my piece. people can either build your version or the can follow the link and build the original version.

    0
    None
    robopathshalabillybouy1

    Reply 1 year ago

    this is my original version not yours if you want to show your version then show it on you instructable not on my wall u don't have any copyright and patent for your image that's y m using from Google Image other wise i don't know who are u and ur original version.This is made by me nd this is my version..

    0
    None
    rebeltaz

    Reply 1 year ago

    Awesome. Thank you!

    0
    None
    robopathshalarebeltaz

    Reply 1 year ago

    For that indiactor u need a programmer..

    and that is not true code but it's your choice and one more thing

    this is very simple and advanced instructable as comparision of that..

    0
    None
    rogermyers

    1 year ago

    This is brilliant, and I want to do this. I get the gist, but can you please take a picture and post it so I can see your shift lever and how it is all set up, it's not clear, for me at least, from the pictures. Sorry if I sound needy, but I really want to do this and just need that little bit more info....

    Cheers

    Roger

    1 reply
    0
    None
    billybouy1rogermyers

    Reply 1 year ago

    hi Roger. go to,
    www.electronics-lab.com
    in search box type in
    motorcycle universal gear indicator.
    There you will find full instructions on how to build this project on an attiny85.

    0
    None
    billybouy1

    1 year ago

    This has been done before using attiny 85.... This is the Web links for it. www.electronics-lab.com/. when you go to the website in the search box type motorcycle universal indicator.
    I built it for my bike 3 years ago. It gives you the full code for the attiny85 .
    also gives you the board layout so you can make your own boards.
    I'd recommend this site for this project it has the full instuctions on how to build it along with videos. that's where this instructsble comes from as do all the pics.

    0
    None
    rebeltaz

    1 year ago

    I do want to ask, though... in step 5 you said you aren't using the neutral wire to sense neutral because that is done in code, yet you do show a connection to neutral in the schematic in step 3. If you do not use the neutral connection, how does the software know which gear it is in?

    1 reply
    0
    None
    robopathshalarebeltaz

    Reply 1 year ago

    i used algo in my code according to my bike gear just leave the neutral connection if u r not facing problem...