RPM. Motorcycle Engine.

Hi,

I’m trying to read the RPM of my motorcycle engine. The ECM sends a 12v square wave signal to the clocks, one pulse per crank revolution. I have converted this 12v square wave to a 5v square wave and attached it to an Arduino Interrupt pin. I am using the following circuit.

I am able to get rpm readings, and they seem to aggree with the tachometer. Until the rpm reaches around 8,000 rpm. Once I get above this value my readings go haywire and I get very high readings, up to 30,000 rpm. I think that I must be getting false detection’s once the rpm gets so high.

I remembered that I had another Arduino board with a conditioning circuit already attached (For a VR crank sensor). I attached this to the bike to see if I had any issues with the Arduino, I increased the rpm to around 10,000 and it was reading fine. I didn’t increase the RPM any higher as it was getting late and a reving motorcycle is quite noisey. Here is the circuit that was attached to this other Arduino. Pretty much the same apart from it has a series capacitor (This circuit was used to condition an AC signal to a square wave).

I am going to add a capacitor to the first circuit, to see if that has the same effect.

Did I just get lucky or is this the way to remove noise from a square wave signal? If not, what should I be doing to remove the noise effectively?

At 8,000 rpm the Arduino should be recieving a signal with a frequency of around 135Hz (one pulse per crankshaft revolution). I believe the noise is coming from the ignition coils, so this is a 4 stroke engine, 2 ignition events per crankshaft revolution. So it should be a frequency of 270Hz.

Regards,
David

Any idea's?

You also need a small capacitor in parallel with the protection diodes to kill noise (it forms an RC filter with
the 10k). Suggest a value of 10nF will be a good compromise.

With that 10uF series capacitor there's no DC bias, but its not clear what the bias should be as that
depends on the pulse duty cycle. Not convinced the series cap is helping.

I will try adding a 10nF capacitor. I want to filter out the noise but not the actual square wave which can also operate at up to 270Hz

Check your meter with square wave generator , if it working ok connect your tachometer using shielded wire, power arduino not from motocykle. Tell the results.

Hi,

The signal I am tapping into, to get the tachometer signal, is part of the motorcycle wiring already, it does not have shielded cable, just an ordinary stranded automotive wire.

First you have check your RPM meter without motocykle.

The problem can be from tachometer cables or from power motocykle supply or from both, again use shielded cable and separate battery to power arduino