joey120373
Well-known member
I want to build a controller that will allow me to read and then simulate a multi toothed wheel on an engine for the purpose of advancing or retarding the signal seen by the actual engine computer.
Ultimately, the signal would be read by the teensy as a frequency in, and the teensy will then output a copy of that signal to the engines computer, but delayed a percentage ( to retard the ignition timing) or calculated/predicted and sent out in advance of the actual incoming signal ( to advance the ignition timing ).
There are a few things that complicate this task;
First, the toothed wheel , sometimes called a tone ring, has 34 evenly spaced teeth, and one large tooth that is twice as wide as the others, this is used as an indexing mark for the engines computer. But what this means is that one cannot simply measure the time between each tooth to calculate delays or predict when to output a signal, the wide tooth needs to be accounted for.
second is the fact that the frequency of the signal will constantly be changing as the engine speed changes so the math would seem to get fairly complicated.
A project like this is way outside my humble hobbyist skill set, but i would like to do it anyway, both as a practical matter and a learning exercise.
I am assuming the best way to start would be to use a pin interrupt on the incoming signal, do some comparing and math based on that interrupt, and then use an internal timer to trigger an output.
Much past that though i am in very unfamiliar territory. So i thought i would ask some of you more advanced programmers if this seems feasible, and were you to try such a thing how you might get it done.
the signal coming in will vary from about 60hz ( engine cranking ) to about 3600hz ( engine at 6000rpm ) so nothing terribly fast.
Any advice/guidance you could give would be greatly appreciated.
joe
Ultimately, the signal would be read by the teensy as a frequency in, and the teensy will then output a copy of that signal to the engines computer, but delayed a percentage ( to retard the ignition timing) or calculated/predicted and sent out in advance of the actual incoming signal ( to advance the ignition timing ).
There are a few things that complicate this task;
First, the toothed wheel , sometimes called a tone ring, has 34 evenly spaced teeth, and one large tooth that is twice as wide as the others, this is used as an indexing mark for the engines computer. But what this means is that one cannot simply measure the time between each tooth to calculate delays or predict when to output a signal, the wide tooth needs to be accounted for.
second is the fact that the frequency of the signal will constantly be changing as the engine speed changes so the math would seem to get fairly complicated.
A project like this is way outside my humble hobbyist skill set, but i would like to do it anyway, both as a practical matter and a learning exercise.
I am assuming the best way to start would be to use a pin interrupt on the incoming signal, do some comparing and math based on that interrupt, and then use an internal timer to trigger an output.
Much past that though i am in very unfamiliar territory. So i thought i would ask some of you more advanced programmers if this seems feasible, and were you to try such a thing how you might get it done.
the signal coming in will vary from about 60hz ( engine cranking ) to about 3600hz ( engine at 6000rpm ) so nothing terribly fast.
Any advice/guidance you could give would be greatly appreciated.
joe