by Tony » Tue Apr 22, 2008 7:03 pm
O/k I have the user manual open at page ten, which has details of input pulse counter number two. This has limitations that are going to make it very difficult to use for directly reading engine rpm.
It can certainly count up individual input pulses, provided they are each greater than 2mS wide, and arrive no faster than 2 KHz.
There are two problems.
The first is that the inductive pickup circuit does have a pulse stretcher, but the pulses will still be far too narrow to be detected by your K8055 interface board. This can be fixed by replacing the 47nF capacitor with something much larger, 470nF should work. That should at least get the pulse counter counting individual ignition pulses. For this to work the "debounce" setting for counter two will need to be set to zero.
Now suppose the engine is running at 6,000 rpm, and you clip your inductive pickup onto a spark plug lead. There will be 3,000 plug firings per minute.
If you reset your counter to zero and wait six seconds before reading the result, the counter will have counted up to 300 (at 6,000 rpm). You can then multiply that 300 x 20 in software to get 6,000. That will give an rpm resolution of 20 rpm, but you can only take a new rpm reading every six seconds, which is far too slow.
Speeding up the readings, so you reset, and then measure every 0.6 seconds, will produce a count of only 30 in the counter (at 6,000 rpm). That will give nice fast readings, but the rpm resolution will only be 200 rpm, and it will jump backwards and forwards one count, with an uncertainty of 200 rpm. That is going to produce some very lumpy rpm readings.
If you clip onto the ignition coil wire, that will multiply the resolution by the number of cylinders, and will certainly help. But the software multiplication factor will need to change for different numbers of cylinders. If your engine has no distributor and multi ignition coils, this will not be possible.
Anyhow Sandra, try increasing that 47nF capacitor first, and see if that helps. You will also need to set the "debounce" factor in software to zero from the original default value.
Also known as the infamous "Warpspeed" on some other Forums.