still no luck, engine rpm

its a 2006 engine and the coils have 12v inputs and a negative cable back to ecu (2 cables per coil,thin ones)

coil.jpg

wvmarle:
Many ways - pretty easy - if you do a quick search on Google you'll have several examples. Depending on the speed you can get away with polling, if too fast you probably need to use an interrupt to not miss pulses.

engine goes up to 14.000 rpm.
how do i do polling& interrups in this case?

is the circuit shown above good for it?

thanks

14000 rpm is 233 pulses per second or one every 4 milliseconds. Polling will do fine, depending on the workload of the rest of the device.

No idea about the circuit.

Here you can find examples on how to do it.

Danny1000:
engine goes up to 14.000 rpm.
how do i do polling& interrups in this case?

is the circuit shown above good for it?

thanks

14,000 RPM = 233 pulse per second
standard Arduino runs at 16 MHz - 16 million cycles per second.
the chip may use 1,2 even 4 or 5 clock cycles to do process some instructions.
the speed of the chip is more than fast enough to resolve RPM if you have one pulse per revolution.
the Arduino 328 chip is relatively slow as compared to what is available.
but much more than fast enough for 99.99% of what we ask of it.

wvmarle:
14000 rpm is 233 pulses per second or one every 4 milliseconds. Polling will do fine, depending on the workload of the rest of the device.

No idea about the circuit.

Here you can find examples on how to do it.

so just with the "fan rpm code" should work?

if that can read the squqare wave the board is suposed to give, will give it a try :slight_smile:

Yup - most likely so - just about any rpm measurement is based on pulses per time.

Do check the code: some may count only the falling edges, others the rising ones or even both. Some encoders will give a pulse per tick (so two edges), others just half a pulse (every "tick" is either a rising or a falling edge). So you may end up being a factor of 2 off either way.