Introduction: MotorCycle Gear Indicator

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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.

Comments

erox66ghz (author)2017-01-17

Really awesome instructable

billybouy1 (author)2017-01-14

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.

alok014 (author)billybouy12017-01-14

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

billybouy1 (author)alok0142017-01-15

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.

alok014 (author)billybouy12017-01-15

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..

sumondigi (author)2017-01-14

hey Alok
really praiseable project I've done.

alok014 (author)sumondigi2017-01-14

thans bro

alok014 (author)2017-01-14

now that is completely mine

rogermyers (author)2017-01-14

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

billybouy1 (author)rogermyers2017-01-14

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.

billybouy1 (author)2017-01-14

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.

rebeltaz (author)2017-01-13

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?

alok014 (author)rebeltaz2017-01-13

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

rebeltaz (author)2017-01-13

Amazing. Just today riding my bike I was thinking this exact same thing, except in my head I used leaf switches instead of hall sensors and I used old school counters and a BCD decoder instead of a microprocessor. The collective consciousness is an amazing thing! Awesome instructable!

About This Instructable

2,649views

33favorites

Bio: can't say about my self it's totally depends on ur behavior
More by alok014:Diwali SpecialGesture Controlled MouseGetting Started With ARDUINO
Add instructable to: