Alright...
The goal here was to implement a Gear Indicator for my ZX-12R motorcycle
inside the speedometer cluster and to add a shift light functionality too.
*Note that this schematic and this code can only be used on motorcycles
that have a gear position sensor that grounds 6 leads according to the gear selected.
However the shift light functionality is quite universal
Here is the schematic...
Pin 7 of the "gear sensor" connector is the tacho pusle input.
Pin 8 of the "gear sensor" connector outputs the Reset pin of the ATmega for programing.
As you can see component count is as low as possible to fit in the tiny box.
The Switching PSU is a very nice small one I found on E-Bay.
The seller ID is "sureelectronics1"
http://cgi.ebay.co.uk/AX3022-Based-Switching-Regulator-Adapter-Step-Down-/350395213885?pt=LH_DefaultDomain_0&hash=item51952ea83d#ht_2402wt_957
You can see it in this photo:
Next to the PSU you can see the optocoupler IC that is used to convert the 0-12V pusle
of the tachometer signal (from the bike) to a nice 0-5V pulse for the ATMEGA input.
It is hardwired on top of the PSU
Tha ATMEGA 168 mcu is loaded with the ARDUINO bootloader to make reprogramming easier
and is set (via the fuse bits) to use the internal 8Mhz clock to minimize components.
Connection from the gear sensor (main ECU wire loom) and to the in-cluster display (7-Segment)
are made using 8pin PC connector (they are used in modern computers, can be found as "EPS" or "PCI-X" 8pins).
They are perfect as they have a latch to secure the connection, they are ready-made, cheep,
and also they can't be plugged in backwards...
(but they dont have color coded wires so you must "label" them)
For the power supply (taken from the taillight supply) a fairly standard watertight AMP connector is used.
(also called a "Ford Connector" around here, don't know why)
The programing of the "black box" can be done easily because the necessary pins of the ATmega
(Tx, Rx and Reset) all come out in the external 8-pin connectors.
To make the job even easier a quick "interface" board was made, that links the Black Box with a FTDI USB/TTL converter.
This came in handy a lot in the final "smoothing out" of the code done on the bike down at the garage.
As for the code, I'll have to refine it a bit, and I'll post it asap
