The racing team needed help realizing a reliable measurement device which would output the currently inserted gear on a large, bright led display.
The biggest challenge to overcome was that the existing mechanical sequential gearshift would only allow enough room for a small potentiometer to be attached to its main axis, but the mounting mechanism is highly subject to vibrations, therefore after some time the readings would become unreliable or jittery.
Another problem was that when shifting from R until the 5th gear, the potentiometer would output identical readings both for R and 5 (as in, the axis would turn 360 degrees), making the first and the last gear undistinguishable.
This required to implement a dedicated calibration procedure, which is activated by switching oen jumper on the board.
Whenever the jumper is set, a calibration routine is started, which requires the driver to put all the gears, in no particular order, in sequence. The firmware takes care of sorting out the correspondences of the various readings with the inserted gear, and then stores the new values in the EEPROM.
The general firmware behavior is:
The firmware to operate the device can be downloaded from here as an Arduino IDE project:
For more detail: Rally Gearshift Display