How to measure engine rpm with a microcontroller coil

Written by steve aycock
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to measure engine rpm with a microcontroller coil
A coil (or inductor) senses eletrical signals indirectly through induction. (macro electronics image by Tony Durose from

Some electrical signals in an engine, such as the ignition signals, change frequency in proportion to the RPM of the engine. A microcontroller, connected to a coil wrapped around an ignition wire of an engine, can be programmed to measure engine RPM by sensing the frequency of ignition pulses. Microcontrollers offer a variety of input types, flexible programming and built-in peripherals that make a microcontroller-based engine RPM circuit relatively easy to build with few external electronic components required.

Skill level:

Other People Are Reading

Things you need

  • Microcontroller
  • Circuit components
  • Wire for coil
  • Oscilloscope (optional for testing)

Show MoreHide


  1. 1

    Build a coil circuit to sense engine ignition signals. The voltage on an ignition wire is typically too high to be directly measured by a microcontroller, which is a low voltage device. So, the ignition signals need to be sensed indirectly by induction using a coil. A coil is an inductive electrical component that can be as simple as a piece of wire coiled around the engine ignition wire. The signal produced by a coil can be conditioned by a simple circuit prior to being measured by a microcontroller. The output of the conditioning circuit is fed into the microcontroller.

  2. 2

    Connect the coil circuit to your microcontroller. The coil circuit can be built to provide a signal to the microcontroller in the same voltage range as the microcontroller operates in. This signal will indicate a low voltage (or logic low) when the ignition wire is not active and will indicate a high voltage (or logic high) when the ignition wire is active.

  3. 3

    Connect a display to your microcontroller. A variety of display types can be used with a microcontroller. There are LED segment displays, LCD displays and others. Some microcontrollers come with built-in display drivers, which can make interfacing to a display easy and fast. You'll need a display with enough digits to display RPM values in the range you are trying to measure.

  4. 4

    Program the microcontroller. The microcontroller will need to monitor the input pin, count the frequency of ignition pulses and display the frequency. The microcontroller program can use an interrupt technique, where the processor is idle until it senses a change on the input pin, or a polling technique, in which the program code executes in a loop to check the pin status repeatedly. The program will need to be compiled and transferred to the microcontroller according to the manufacturer's instructions.

  5. 5

    Test the circuit. Connect the coil circuit to an ignition wire (or a bench simulation of an ignition wire) and then power up the microcontroller circuit. Activate the engine and attempt to measure and display the RPM value. If there are problems, check the circuit and microcontroller software and retest.

Tips and warnings

  • You can test your circuit on a bench by using an adjustable signal generator to generate a signal similar to that produced by the coil circuit.
  • It can be easier to troubleshoot a circuit when you test it in sections. First example, test the coil circuit separately before you connect it to the microcontroller.
  • Engine ignition wires can carry dangerous high voltages and/or high currents. Use caution when working around these wires and do not connect them directly to microcontroller circuits.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.