Sparkplug Wire Sensor & Digital Tachometer – Getting Started

How fast is a lawn mower engine?

I’m working on a project that will be a universal digital tachometer

for mower engines. A Tachometer is a gauge on a vehicle that tells you how quickly the

crankshaft of the engine is turning. It is typically a unit of measure called revolutions per minute (RPM).

There are countless circuits on the web designed for this. The simplest method of measuring the RPM of a petrol-powered small engine leaf blower or a lawn mower is by counting the sparks of its sparkplug. This is shown by many makers.

The speed at which the crankshaft revolves is the fundamental source of input for my project, and the direct way to obtain that is to ‘enter’ into the ignition system. The approach is to build a spark plug wire sensor to monitor the pulses produced by the ignition coil. But how can I obtain the pulses safely?

Luckily, there is already some available information. Let me share my thoughts, together with a blueprint of the proposed project. The main purpose of this article is to explain how to build a simple spark plug wire sensor from scratch. I don’t have the resources nor the expertise to get into how to build a luxurious mower tachometer.

Quick Hook – The Timing Light

While Googling, I came across several cheap timing lights for automotive applications. A timing light or stroboscopic light is a tool used to determine what angle a spark event is occurring. It should also have an inductive clamp, which is the part that clips over a spark plug lead in order to trigger the timing light.

Wikipedia says “The timing light is connected to the ignition circuit and used to illuminate the timing marks on the engine’s crankshaft pulley or flywheel, with the engine running. The apparent position of the marks, frozen by the stroboscopic effect, indicates the current timing of the spark in relation to piston position…”

Further reading https://en.wikipedia.org/wiki/Timing_light

Since I want to avoid interfering with the engine itself and even more to modify the engine’s electrical system, I consider the possibility of making a ‘non-contact’ probe for my project, similar to the pickup (inductive clamp) coming with the retail timing light kit. On the below picture, you can see that the pickup opens its jaw so we can easily place a wire inside it.

→ But I need to buy a new timing light. Or I need to get hold of an old timing light and salvage the inductive clamp!

Little Spark – A Stiff Wire Loop

I didn’t stop there because I came across some forum discussions pointing to the possibility of replacing the inductive clamp with a stiff piece of wire (wrapped around the spark plug cable a few times to obtain the pulses of current from the coil) that might work for me too.

→ Essentially, I need to convert the wire loop output to a clean square wave signal of TTL level, which I can then read with a microcontroller to obtain sensible data!

The next thing is to then build an adapter circuitry like the one depicted below. The basic (and adaptable) setup runs on an independent power supply. It can provide a galvanically-isolated open-collector output ready to be interfaced with the I/O of any common microcontroller for further execution.

The pulse width from IC1 output is fixed regardless of the trigger frequency. So, when the trigger period is above the default pulse width, IC1 keeps retriggering and its output won’t change state. There are great online 555 timer calculators that help you set the correct R6-C6 values.

Note that the 555 output can sink or source up to 200mA (maximum depends on supply voltage) – in output low state the voltage will be close to 0V, and in output high state the voltage will be 1.7V lower than the supply voltage.

At Hand – The Split-Core CT

Current transformers (CTs) are sensors that measure alternating current (AC). Below is the photograph of a split-core current transformer I bought online which conveniently ends up in a 3.5mm stereo jack plug with around 1metre of cable.

As you may have noticed, the YHDC SCT013 series is widely used in energy monitor projects. What I’ve in hand is the SCT013-015 (https://robu.in/wp-content/uploads/2019/11/SCT013-015-0-15A-0-1V.pdf) which is a 15A/1V non-invasive current transformer with built-in burden/sampling resistor. Since this a split-core type, it can be clipped on the sparkplug cable well.

→ So far, I have not had a viable idea to use a current transformer (with built-in burden resistor) here. Also, I don’t have a plan to buy anew CT without an integrated burden resistor at this time. Therefore, it might take a while to get off the ground because I need to prepare a hardware interface to handle the feeble voltage output of the current transformer and to translate it into a sensible logic-level signal so that it can be routed to the I /O of a microcontroller.

Side note: On the below scheme you can see a general idea to use a non-invasive current transformer (without inbuilt burden resistor) as the sparkplug wire sensor. This little circuitry can hopefully convert the potentially feeble current peak into a usable voltage peak.

Getting back into the wire-loop trick

I want to know when the spark plug fires and translate it into a logic-level signal at that very point. Now I have three great ideas to start with, all of which seem to be practical if handled well. The next thought is how do I proceed?

To be honest I like the wire-loop concept more because it is simpler and cheaper and better for a lazy trial. If that idea works as expected, I can move on to a serious project with expensive components.

I rigged up this hardware, and connected the output of the final assembly to the interrupt pin (INT0/D2) of an Arduino Uno.

This is an example test code (Arduino Sketch):

[code]

#include

const byte intPulse = 2;

const byte pinLamp = 13;

int clickCount = 0;

volatile byte lampState = LOW;

volatile unsigned long timeLastInt = 0;

void setup()

{


pinMode(pinLamp, OUTPUT);


pinMode(intPulse, INPUT);


attachInterrupt(0, count, FALLING);

}

void loop()

{

if
(clickCount>=5 {


clickCount = 0;


lampState = !lampState;


digitalWrite(pinLamp, lampState);

}

}

void count() {

unsigned
long currentTime = micros();

if
(currentTime>timeLastInt+100 || currentTime


timeLastInt = currentTime;

++clickCount;

}

}

[/code]

This experimental code (which is in fact the patch of a well-tried code copied from the web) is simple, straight forward and self-explanatory. The pulses from the pickup coil (wire loop) coming through the hardware interface to D2 of Arduino triggers an interrupt upon falling. The interrupt is linked to a count process which includes a very simple trick to introduce at least 100µs delay between two successive counts. Then the main loop toggles the onboard indicator (D13 LED) state every five clicks – just to ‘see’ the clicks better. Note, this is not meant to be used for the small engine tachometer project itself but just for a mere demonstration.

Before the coffee gets cold…

It took a while to get around this experimental setup, and it’s still not installed in a mower. When testing on a 4-stroke mower engine (https://www.briggsandstratton.com/na/en_us/support/videos/browse/4-stroke-theory.html), it’s noticed that the Arduino microcontroller was often disturbed. It seems that more studies are needed for this.

In any case, I am planning to continue my project since I need to build a digital tachometer for mowers. This short break will give me some time to learn something more about sparkplug wire sensors before I can prepare the final part of the project.

I am grateful for the time and effort of all my predecessors. I learned (and still learning) a lot from their amazing projects available across the web!

Afterword

I really don’t know much about automotive oscilloscope probes. I have never had the pleasure of owning one yet. Since I want to retain my experiments, I will buy an automotive oscilloscope probe when I have enough funds – the specific choice may be a Hantek HT25 (http://www.hantek.com/products/detail/70).

Leave a Comment