Measuring RPM via spark plug lead
How fast is the mower engine going?

Measuring RPM

The RPM of an engine can be measured by counting the sparks of any of the spark plugs.

But why?

There are several reasons to do this.

Firstly you need to know when the engine stops. It might have run out of fuel, might have malfunctioned, or might have hit a thick patch of vegetation and stalled.

When a mower hits a clump of thick grass, it will slow down (obviously), and may even stall. There are two protections for this.

  1. If you are using swing blades then they will swing back, and simply stop cutting (or cut less).
  2. The governor will kick in, and turn up the throttle.
But this may not be enough - the engine may still stall, or the thick clump may not be mown properly. Ideally the rover should slow down when it detects that the engine is in danger of stalling, or even to ensure a full even cut.

Some feedback about exactly how far the governor has opened the throttle would be handy too.

Another possibility is to replace the governor with a software-controlled throttle, which does the work of the governor. This adds complexity, but would provide excellent feedback in such situations. In principle it should be possible for a software controlled throttle to do better than a spring-based governor, but this would be an entire project in itself.

Components

Arduino NanoCheap and expendable.
Various componentsVarious components for the circuit board.

Hardware

This little connector (available on eBay) wraps around the spark plug cable.

But I didn't end up using this. You can could just try a stiff piece of wire wrapped around a few times.

All my circuits

There are many circuits on the interweb designed for this. These three pictured seem to be designed to input into an Arduino (or similar 5V input line). [Apologies to the designers of these circuits - google will find the origins and authors very quickly. They all deserve a beer.].




Construction

I liked the look of the first circuit because of simplicity (less soldering) and the safety diode.

.. so I built that one (note I assumed the unlabelled resistor was a 4K7) , and here it is is in all its badly soldered glory (the black alligator clip is the ground for the oscilloscope). The probe to the spark-plug was picking up the fluros, and a bunch of (mains-AC) 50Hz other stuff, so used some co-axial cable. Much better.


And the outer end was wrapped around the spark plug lead. Ideally this should be more turns, and tighter, but this was a test ..

Trigger warning ..

The output from the circuit to the Arduino interrupt pin was as snapshotted with the trusty Picoscope.
Well, that's a mess. Clearly the motor is spinning a little faster than 6000 RPM, but

  • Exactly how many times per cylinder firing will the Arduino be triggered? Some de-bouncing code will fix this problem (switches bounce for up to 80ms, but these only seem to bounce for around 6. Simples.)
  • Will the dips be slow enough to be detected by the Arduino? Yes. Well, it worked in the tests.

  • Great! Now all we need is ..

    Result

    I have a nasty burn on my hand from the mower exhaust. But I also have a working Arduino RPM counter.

    Issues

    It took a while to get around to completing this project, and it's still not integrated into the GizMow .. that's an issue.
    Double or nuthin: just remember that some four-strokes activate the spark plug every revolution even though they only actually ignite fuel every second revolution (Google for wasted spark). It may be necessary to double the the output to get actual RPM. Your mileage (or at least your RPM) may vary.
    During testing the Nano crashed a number of times. Not sure is this a voltage dip problem or some other issue to do with the interrupts. This requires more investigation.

    The future

    Conclusion

    This is a viable method, but there are other approaches which might be worth trying. A Hall effect sensor on some spinning part or a photo sensor reacting to some silver tape?

    Leave a comment

    Something I'm doing wrong? Solved my problems? Got a better idea? Got a similar problem?
    Think I might have solved your problem? Ninety-nine problems, but your robot ain't one? Say so ..