Engine RMP counter (idea)

Hello I would like to calculate the RPM's on engine.
Since it is difficult to screw an encoder on the alternator, I thought of measuring the ac voltage (of generator) through a 10k voltage divider and measuring the peak voltage phase time , or using the pulseIn command.
Or using interrupt Rising or Falling.

Is that a good approach ? Should I use another approach, ie measuring the phase time from an optoisolator ?

Thank you

Some type of optically or magnetically isolated sensor would be a better idea. I'd expect you'd get a lot of noise on the alternator outputs that would mess with your Arduino using just a voltage divider.

See also http://forum.arduino.cc/index.php/topic,21365.0.html

Greetings,

I would advise using an inductive coupler wired to a CMOS open collector buffer, wiring this to pin 5 of the Arduino with a very stiff 1000 ohms hung between the +5 rail and the open collector. The buffer will hopefully trigger when you see a high voltage pulse come down from the ignition coil.

Regards,

Flint3

If your car has electronic ignition, there is already a crack case sensor that times the ignition. You can piggyback the signal for your own use.

If you look around on the internet, you can find a wiring diagram for your make and model of car.

// Per.

thebadtall:
Hello I would like to calculate the RPM's on engine.
Since it is difficult to screw an encoder on the alternator, I thought of measuring the ac voltage (of generator) through a 10k voltage divider and measuring the peak voltage phase time , or using the pulseIn command.
Or using interrupt Rising or Falling.

Is that a good approach ? Should I use another approach, ie measuring the phase time from an optoisolator ?

Thank you

When sensing any analog waveform like this you either need to read it with the ADC and
do digital signal processing, or you'll need a conditioning circuit to convert it to a clean
logic signal.

Slowing varying voltage is no good to connect to a logic input, it might see 1 transition or
1000 transistions - logic input voltage slew-rate is expected to be in the 100's to 1000's of
V/us range for reliable operation.

The normal way to handle a messy analog waveform is first level convert/clip to the
logic supply range, filter out as much noise as possible, then put the signal through
a schmitt-trigger circuit (a logic gate with lots of hysteresis - these will reliably register
on a slowly-changing input voltage because of the internal positive feedback).
For instance the 74HC14 is commonly used, it has 6 schmitt-trigger inverters.

You might consider another approach...

How about painting a white strip or patch on the engine flywheel pully, or some other pully driven by the engine. You could then use a LED emitter/detector pair to see the reflected light coming off the pully as the white patch rotates through LED emitter/detector field of view. If your "white patch" is right on the engine flywheel pully, then you have a direct match of 1 engine revolution per pulse on the LED detector. If you locate your white patch on a different pully somehwere else, then you simply have a ratio of the engine pully to the "detector" pully to deal with which is pretty simple.

You could even go so far as to put your "white patch" on your wide, flat serpentine belt (if you have one). You'll just have to figure out the how many revolutions of the engine equate to a revolution of the serpentine belt,

This is a rather low-tech method, but it could be simply implemented and it does work! I did something similar 30 years ago when I was in college. Our project was a digital (all in discrete 7400 logic chips and timers -- no microcontroller) bicycle speedometer/odometer when we counted pulses coming from a reflector in the spokes of the bicycle wheel using an infrared LED emitter/detector pair.

Oh the memories...

Good luck, and it sounds like a fun project.

--dsmavis