You can measure engine RPM using the negative terminal of the coil, however you need to isolate the 12v circuit of the coil, from the 5v levels used in the Arduino. This can be done using an optical isolator circuit as detailed below.

The following schematic shows how to connect the circuit:

RPM Module Schematic

Assembly List

The following components, or their equivalent are required to build the RPM module.

Label Part Type Properties
4n25 DIP – 6 pins package DIP (Dual Inline) [THT]; hole size 1.0mm,0.508mm; true; chip label IC; pins 6; pin spacing 300mil
Arduino Arduino Uno (Rev3) type Arduino UNO (Rev3)
C1 Ceramic Capacitor package 100 mil [THT, multilayer]; capacitance 100nF; voltage 6.3V
C2 Ceramic Capacitor package 100 mil [THT, multilayer]; capacitance 100nF; voltage 6.3V
D1 Rectifier Diode package 300 mil [THT]; type Rectifier; part # 1N4001
D2 Zener Diode package Melf DO-213 AB [SMD]; breakdown voltage 5.1V; type Zener; power dissipation 0.5W; part # 1N4732A
R1 390 Ω Resistor package THT; tolerance ±5%; bands 4; resistance 390Ω; pin spacing 400 mil
R2 4.7k Ω Resistor package THT; tolerance ±5%; bands 4; resistance 4.7kΩ; pin spacing 400 mil

Example Code

volatile unsigned long timePointsOpen, timePointsClosed, lastChange;
volatile unsigned int numBangs;

void pointsOpening(){
    unsigned long t;
    t = millis();
    if (lastChange > 0){
        timePointsClosed += (t - lastChange);
    }
    lastChange = t;
    ++numBangs;
}

void setup(){
  pinMode(3, INPUT);
  digitalWrite(3, HIGH);
}

void loop(){
  // Number of coil pulses
  numBangs = 0;
  attachInterrupt(0, pointsOpening, RISING);
  delay(50);
  detachInterrupt(0);
  numBangs = ((60000/50)*numBangs)/2;
  Serial.print("RPM: ");
  Serial.println(numBangs);
}

4 thoughts on “Measuring engine RPM with Arduino

  1. Hi,
    Great article – but one question, there is “Coil – 5V Terminal”. But car ignition coil gives max ~500v from output?

    Reply
    • The high tension side of the coil does indeed generate a high voltage, however that is triggered by a nominal 12v circuit, which is what is used in this. The low tension side still has a bunch of interference, and the voltage can vary quite a bit hence the zeners, and optical isolator circuit.

      Reply
      • Hi David,
        ¿Do you have the Fritzing proyect? I need the protoboard view and looking to your “schematic.png” I assume you done with Fritzing.
        Thanks!

        Reply
  2. Sir !!

    I just made up ur circuit design and i tested it ,.,its working fine,,but my problem is when i get result from the serial monitor its just only

    RPM 220 ,
    RPM 280 ,
    RPM 320 ,
    RPM 330 ,
    RPM 480 , Like that ..

    But i need it like counting numbers like

    RMP 221
    RMP 237
    .
    .

    .
    RPM 1223
    RpM 1224

    like array

    please help me with this sir

    thank you

    Reply

Leave a reply

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

required