Electronics ru
Advanced Search +


Motorcycle Universal Gear Indicator

Vassilis Papanikolaou


This is a new design for a universal gear indicator that can be fitted to any motorcycle as an aftermarket accessory. 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.

Motorcycle Universal Gear Indicator

The main circuit is based on an AVR ATTINY25/45/85 microcontroller, 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 a 4026 counter/decoder.

Motorcycle Universal Gear Indicator
Click to enlarge

The source code is written in AVR-GCC (WinAVR) and can be programmed with the default fuses using an AVR programmer (default : ATTINY25 microcontroller and USBTiny programmer). The constants TOP_GEAR (number of gears, default : 5) and N_WAIT_TIME (minimum time to pass until neutral gear is detected, default : 500 ms) can be modified for different needs.

The suggested implementation for the main circuit is a small size, double-sided PCB, with SMD packages for the microcontroller and the decoder ICs. The 7-segment LED is placed in a secondary PCB, connected vertically to the main one in a modular fashion (see pictures). Two PCBs for different Kingbright LED footprints (red and blue) are also provided. The voltage regulator can be used for mounting as shown in the pictures. Don't forget to solder the four small vias under the two ICs !

Motorcycle Universal Gear Indicator

Parts List 




Comments (for suggested PCB)


10 to 220 Ω ½W

Depending on preferred LED brightness

R2, R3

10 ΚΩ ¼W



220 μF / 35V

Electrolytic capacitor


100 nF

MKT/polyester capacitor



Mouser Part 556-ATTINY25-20SU



Mouser Part 595-CD4026BPWE4

IC1, IC2

Hall sensor

Melexis US5881LUA (available from adafruit)



5V Regulator TO-220


Kingbright 0.3"

Mouser part 604-SC03-11PBWA/A


Kingbright 0.3"

Mouser part 604-SC03-12EWA


Pin connectors

As shown in silkscreen and pictures


Motorcycle Universal Gear Indicator

Motorcycle Universal Gear Indicator

Motorcycle Universal Gear Indicator

Motorcycle Universal Gear Indicator


Motorcycle Universal Gear Indicator

Melexis US5881LUA Hall sensor

A successful circuit build will do a self-test when connected solely to 12V power (pins TO_POWER_1 and TO_POWER_2), by cycling through all digits on the 7-segment display (see video below). After the self-test, the current gear will be shown and can be changed by the shift lever movement. Note that a gear is changed when the magnet's south pole is drawn away from the sensor (north pole will not work). Moreover, if a neutral gear is detected (from the neutral switch connected to TO_POWER_4), the display resets to zero (also acting as a self-calibrating feature if anything goes wrong). Finally, when the power is turned off, the last shown gear is stored in the MCU's flash EEPROM and restored when the device is turned on again.

Motorcycle Universal Gear Indicator

The following video shows the initialization procedure of the gear indicator :

Circuit protection 

Due to special environmental conditions it is recommended to cover the circuit with plastic lacquer before installation.

Sensor cable 
The following photos show the construction of the 4-wire sensors cable that is plugged to the TO_SENSORS connector. The visible sensor pin parts should be covered with plastic lacquer for protection as well.

Motorcycle Universal Gear Indicator

Motorcycle Universal Gear Indicator

Motorcycle Universal Gear Indicator

After putting it all together the circuit is now operative and ready to be installed on the motorcycle. A video showing a simulation of gear shifting (by hand) is available below :

You may have to register before you can post comments and get full access to forum.
User Name

News on theme:

Slices ↓
Radiolocman facebook Radiolocman twitter Radiolocman google plus