Reading an Engine's RPM with Arduino

Hello,

I would like to read a GM engine's (chevy 350/5.7L) RPMs with arduino analog port. The signal I am getting originates from the ignition coil (the blue wire in pic below) and is a choppy square wave that alternates from 12.5V to ground. The frequency of the signal varies with the RPM.

Currently I am using a Faria Tachometer to read the RPMs and on the back of the Tach you can see that the gauge is set to interpret 3 pulses per rpm (this is because V6 engine or 6 cylinders/2=3). The Tach spans 0-4000rpms and at 3 pulses per RPM this would mean I need to detect 0-200Hz. I have found a breakout board that converts 0-200Hz frequency to analog 0-10V, which I plan to step down to 0-5V and send to arduino analog pin. The breakout board is attached below and although the frequency I specified is different from the picture that is just because the company uses the same picture for all their modules.

My questions are: will this frequency module work for my application? Will a voltage spike from the ignition coil fry my boards, and if so how can I protect the Arduino and frequency module?

IMG_1170.JPG

IMG_1171.JPG

IMG_1174.JPG

IMG_1170.JPG

IMG_1171.JPG

IMG_1174.JPG

Don't step down. Use an opto coupler to isolate the sparking stuff from the controller side 5 volt system.

I believe the frequency to analog voltage module, shown in the picture, uses an optocoupler. Do you think this is enough?

When I mentioned stepping down, it was the analog signal out of the frequency converting module I was talking about, as 10V would fry the Arduino.

Can You dig up some data about that module?
I aimed at converting the 12 volt pulses into something readable by an Arduino and then measure and calculate the frequency directly, not converting to analog and then, by analogRead, make it a digital value.

Conditioning that signal into a pulsed waveform that Arduino can use is likely going to give more accurate results than an FtoV translation.

Use a circuit like this to get a nice digital waveform (use 5V for the opto if you're using a 5V Arduino board...)

1 Like

Sure thing. Based on what I've read this module is based on LM331 IC configured in F-V mode. Datasheet see page 8. Honestly I could work with either, that is converting 12V to 5V and sending to arduino or using this board to do it for me.

Awesome post Blackfin. If I understand correctly, I would just need an optocoupler, diodes, and resistors to wire this up?

Also let me ask this, what will happen if the tach signal from the ignition coil spikes to 100V quickly and decays back down?

No problem when using that circuitry. I once made such an interface and used the spikes being more than 50 volt!

feynman137:
I would like to read a GM engine's (chevy 350/5.7L) RPMs

This is a v8 engine so the second quote doesn't make sense since it should be 4 pulses per rev.
Which one is correct?

feynman137:
you can see that the gauge is set to interpret 3 pulses per rpm (this is because V6 engine or 6 cylinders/2=3).

A four stroke engine ignities once every second revolution. You can say 0.5 pulses per rev. Multiply this by 8, for an 8 cylinder motor, by 12 for a 12 cylinder one. 4 pulses per rev for the 8 cylinder one, 6 for the 12 cylunder, and so on.

Thanks for the comments guys, and it looks like there could be a tach config issue. I went out there to verify, and yes this is a chevy 350 V8 engine not a V6. So I am curious as well as to why it is set for 3 pulses per rev and not the 4. As a side note, there are several more engines just like this to say the least, and so if they were configured wrong that would be quite disappointing.

If the setting was wrong, 3 instead of 4, it has been showing 33% to much

tach manual Looks like the dial on the back of the gauge may refer to something different than I first expected. See page 3, but it is related to pulses someway or another.

IMG_1187.PNG

IMG_1187.PNG

Blackfin:
Conditioning that signal into a pulsed waveform that Arduino can use is likely going to give more accurate results than an FtoV translation.

Use a circuit like this to get a nice digital waveform (use 5V for the opto if you're using a 5V Arduino board...)

I had a quick look at the data sheet for the H11L1MS opto coupler. It is an open collector Schmitt trigger device. You’d probably need a pull-up resistor or define the receiving GPIO pin as input pull-up.

This appears to be the relevant sentence from page 3 under "4 cycle engines".

The correct tachometer will have a white label on the side indicating which switch position is for each engine type. This label will include 4, 6, and 8 cylinder engines for positions 1, 2 and 3.

Alright so it appears this tach is set up properly. Although a bit counter-intuitive that the V8, which has 4 pulses off the ignition coil per rev, uses the tach dial setting of 3 on this Faria gauge.

6v6gt:
I had a quick look at the data sheet for the H11L1MS opto coupler. It is an open collector Schmitt trigger device. You’d probably need a pull-up resistor or define the receiving GPIO pin as input pull-up.

Thanks for this comment, I think I'll have to do some reading to understand the reason for this, but I haven't had the chance to wire this thing up. Parts should be here early next week. Will a H11L1M optocoupler work? Because it seems the H11L1MS is harder to acquire.

Digikey shows 80,000 stock of the H11L1S(TA) variant, DK part no. 1080-1201-1-ND

There's nothing super special about the optoiso: 5V capable, logic-level output (totem pole or open-collector).

Can you confirm that the H11L1M will get the job done? I am not as familiar with optocouplers.

feynman137:
Can you confirm that the H11L1M will get the job done? I am not as familiar with optocouplers.

Yes, that optoiso (available at Digikey as PN H11L1MEL-ND, for example) should work fine.

Thanks brother. Found this H11L1M on amazon with a short lead time.