Pages: [1]   Go Down
Author Topic: tach input  (Read 418 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Perth, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 21
DuinoStamp :)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 107
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: July 19, 2008, 07:32:47 pm by dnear1 » Logged

Perth, Australia
Offline Offline
Newbie
*
Karma: 0
Posts: 21
DuinoStamp :)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: