Engine RPM Sensor

I am building a web-controlled lawn-mower. I would like to be able to read the RPM off the gas-engine. I would prefer to piggy-back off of the spark-plug if possible since it fires faster as the engine spins faster. Just started on this but would love suggestions. I have a Beaglebone Black running Angstrom and I am using NodeJS to control GPIOs.

an inductive pickup around the sparkplug wire should get you a nice pulse each time the spark plug fires but remember the phases of a 4 stroke engine (intake - piston down intake valve open, compression - piston up valves closed, power - piston down valves closed, exhaust - piston up exhaust valve open). The spark plug only fires every other revolution. Once you have the pulse from the inductive pickup it should be buffered to provide a nice square wave pulse of uniform voltage such that it’s easy for the processor to use and not a potential hazard to the processor due to spurious high voltages (cooking the buffer circuit while in development, sorta ok… cooking the processor, well not so much!)

. from there it’s just software and the incrementing of a counter with each pulse.

Thanks Eric for the suggestion. I’ll have to figure out the inductive circuit to use. Do I have to use interrupts or is there something better for capturing the signal from the pickup?

I might be inclined to use the pru for this and just setup the pru as escentially a hardware counter. There are likely ways to do so with timers and interrupts and such but being more of a hardware guy than software I’m inclined to use a more hardware approach and use the pru as a counter that gets read every so often. the software for that then is escentially a driver that creates /dev/rpm.

Eric

Eric, I apologize for my ignorance but what is the pru?

Programmable Realtime Unit. http://processors.wiki.ti.com/index.php/Programmable_Realtime_Unit_Subsystem

You can use this processors for realtime tasks.

Does anyone know of a good tutorial for the Beaglebone Black RPU? I tried the one from http://boxysean.com/blog/2012/08/12/first-steps-with-the-beaglebone-pru/ but that doesn’t seem to work.