Go Down

Topic: tach input (Read 598 times) previous topic - next topic

rf_adapter

Anyone have an idea on what would be the best method to receive a tach signal from a car?

Ive tried wiring it to the arduino through a transistor and reading the pulse length with pulseIn() but the arduino seems to be missing pulses randomly.

Would I be better off with frequency to voltage converter?

Delta

frequency to voltage converter is probably the best option....well its the option I will be taking for both VSS and Tach readings, and I can't think of a better way to do it without taking up a lot of cpu cycles just trying to measure pulse frequency.

dnear1

#2
Jul 20, 2008, 02:29 am Last Edit: Jul 20, 2008, 02:32 am by dnear1 Reason: 1
I would have thought it better to use the tach signal as an interrupt.. and every time the interrupt is serviced, check 'millis' and see the time difference.. Divide that result by the number of milliseconds in 1 minute.  Average the value over about 10 pulses or so to get a somewhat stable signal and you should have what you are looking for.

Then you need to divide that number by the number of pulses per revolution... IE: for most 4cyl it is 2 pulse per rev.

You will want very efficient code... if you load down too much process time your RPM result will be inaccurate.

Delta

Quote
I would have thought it better to use the tach signal as an interrupt.. and every time the interrupt is serviced, check 'millis' and see the time difference.. Divide that result by the number of milliseconds in 1 minute.  Average the value over about 10 pulses or so to get a somewhat stable signal and you should have what you are looking for.

Then you need to divide that number by the number of pulses per revolution... IE: for most 4cyl it is 2 pulse per rev.

You will want very efficient code... if you load down too much process time your RPM result will be inaccurate.


Exactly the reason I'd rather use freq to voltage conversion. If your using the arduino to do anything reasonably usefull with the tach signal, then you will want all the cycles you can get, better to use something accurate (the F2V converter) and just read its value when you need it.

Go Up