Hall sensor - camshaft
By using a sensor on the crankshaft, precise information of the current crank degree is available. In conjunction with knowledge of current camshaft degree, it is easy to decide which cylinder is in the compression stroke.
The unipolar hall sensor TLE4905L is used for measuring the position of the camshaft.
A single 180 degree tooth requires max one engine revolution to get in sync. The difference in weight on the toothside/non-toothside of the cam wheel is ~8 grams, then cam will never exceed 2600 RPM; no problems will ever happen due to this added weight.
Shield + 2-wire cable securely mounted on sensor
Hall sensor glued to mounting bracket
Mounting bracket positioned such that the sensor will trig approximately 90 degrees BTDC on cylinder 1 compression stroke
Everything mounted
Testing the sensor
The sensor is connected to the secondary trigger input with a pullup resistor to vcc. The sensor is supplied from the same +12v/gnd as the board.
At approx 1000 rpm, the period between two rising edge events are calculated to 0x7000 (4 usec resolution). Since 60/(0x7000*4e-6) = 523 rpm, the epoxy still holds :)