Electronic – continuously variable frequency doubler

frequency

I need a tachometer for a motorcycle that 'fires' the ignition every cycle (360 degrees). Tachs are cheap for 4 cylinder applications (fire twice per cycle, every 180 degrees) but very expensive for motorcycles. If I could double the frequency of the pulses from the ignition, it would appear to be a 4 cylinder ignition, and I could use an inexpensive automobile tach (which have a 4-6-8 cylinder setting). I see circuits for doubling a fixed frequency, but the ignition frequency is pretty continuously varying. Any ideas?

Best Answer

This is a easy problem for a microcontroller. The micro receives the tach pulses and measures the period between them. When it gets a pulse, it emits one right away, then another half way thru the interval. The new interval could be a little different, but I doubt most tachs are going to care that much. Besides, the motorcycle engine just can't change speed that fast.

If you really need smooth output pulses, you can do a phase error servo. The output pulses are produced from a firmware oscillator which can be tweaked up and down in period. A accumulated phase error is kept, which is used to slowly vary the output frequency up and down. For each incoming pulse, the phase error is bumped up by 2. For each output pulse, it is bumped down by 1. The result is a error value that tells you how far behind the output pulses are from the input. Periodically (can be based on just a internal timer), the output pulses period is decreased when the error value is positive and increased when it is negative. You adjust the increase and decrease value based on the maximum amount the engine can reasonably change speed.