Skip to content
digifant edited this page Aug 18, 2015 · 1 revision

Introduction

Its a lame copy from here: http://www.fda-technology.de/ (under Download, there are the circuits)

it Converts the Frequency from the Ignition Coil to a Voltage.

Details

This is the Circuit:

Pinout:

K2: 2 = Signal in from Injector 1 = Ground

K1: 3 = 5V Supply 2 = Output 1 = Ground

The Input (K2) is taken from an Injector, the Output (K1) is 0-5V

For my VR6 (6 zylinder) engine the selection is R4 at 133k and C3 at 47nF. What gets about 0,5209mV/RPM.

Means the max RPM is at about 9500, whats more than i need...

To get this running for your engine you need to know how many zylinders you have, and how you injection system works. It would also work with the Ignition system, but only if its electronical...

Lets say we want to calculate for a 4 zylinder engine, with a injector for every zylinder. So at every revolution of the engine, one injector (or sparkplug) will fire. Thats due to our 4 stroke engine designs ;) Further this means we have at 1000RPM a frequency of 16,67Hz.

If you would choose the ignition, and have a wasted spark setup with 2 ignition coils, you would get 2 ignitions per revolution, so 33,33Hz. A 1 ignition coil with distributor setup would get you also 16,67Hz.

Warning! When using the ignition system, always take the signal to the ignition coil, NEVER the signal to the spark plug!!!

So with our 16,67Hz and R4 (on Google Code) at 133k and C3 at 47nF you can calculate the Voltage resulting at K1.

Take a look at the Datasheet from the LM2907: http://www.ti.com/lit/ds/symlink/lm2907-n.pdf On Page 7 at the bottom left you find the Formula, just C1 = C3 and R1 (on Google Code) = R4 (on Google Code).

With 16,67Hz and 133k and 47nF it will get a 0,52V.

We read it with a 12 Bit ADW (MCP3208) so the 0,52V gets into Digital: 427.

Now, we have 427, but our RPM was 1000, divide 1000 by 427 and you get the RPMFactor, in this case its 2.34.

With R at 133k you will be limited to 158Hz (9500RPM at our sample), with reducing it to 75k you can go up to 283Hz (17000RPM) but with less resolution.

If you are not shure how your engine works, take a frequency counter and check the frequency of your signal at 1000RPM, and then just do the calculation with that :)

In the end you need to fill YOUR RPMFactor into the Code!

Working Setups

Please send us your Setup so we can add it and help other users getting a start right away :)

Car Engine Signal Source R4 (on Google Code) Value C3 Value RPMfactor Result
VW Golf 3 VR6 (ABV) Ignition 133k 47nF 2.34 Works well
VW Corrado G60 Digifant ECU Signal for Dashboard 75k 47nF 2.34 applys to every vw 4-cylinder engine
VW Corrado VR6 ECU Signal for Dashboard 50k 47nF 2.34
Opel Astra G 1.6 16V ECU Signal for Dashboard 100k 33nF 1.0 Works well

Code

The Setup

  #define RPMsmooth 5                 //how many readings will be taken for the smoothing (5 is quick and smooth, 10 would be supersmooth but its getting slow)
  #define RPMfactor 2.34              //Calibration for RPM (its 2.34!
 //RPM Smoothing:
 int RPMreadings[RPMsmooth];                // the readings from the analog input
 int RPMindex = 0;                            // the index of the current reading
 int RPMtotal = 0;                            // the running total
 int RPMaverage = 0;                          // the average

  //RPM Smoothing init:
  for (int i = 0; i < RPMsmooth; i++)
  {
   RPMreadings[i] = 0;                      // initialize all the readings to 0
  }

The smoothing Function:

  //RPM
  //(from the smoothing example)
  RPMtotal -= RPMreadings[RPMindex];               // subtract the last reading
  RPMreadings[RPMindex] = AnaIn[RPMPin];           // read from the sensor (This is reading the MCP3208)
  RPMtotal += RPMreadings[RPMindex];               // add the reading to the total
  RPMindex = (RPMindex + 1);                       // advance to the next index
  
  if (RPMindex >= RPMsmooth)                       // if we're at the end of the array...
  {
    RPMindex = 0;                                  // ...wrap around to the beginning
  }
  
  RPMaverage = RPMtotal / RPMsmooth;               // calculate the average

And to get a good Value out of it:

  CalRPM = RPMaverage*RPMfactor;                   // apply the factor for calibration

Clone this wiki locally