I would like to make a teensy read four VR sensors using 2 MAX9926 interface chips. I am planning on reading ABS wheel speed sensors, and I need to log the frequency of the pulses to a 32 bit integer with 65535 representing an 8388.5ms period. The maximum frequency I plan on measuring is around 1.7khz. This is to be an input into an ECU for comparing wheel speeds for traction control.
How I got to these numbers...
44 pulses per revolution, 875 revolutions per mile, ~160mph maximum speed = 6160000 pulses per hour /60 /60 = ~1.7khz
At 1MPH * 875 rev/mile = 38500 pulses/hour /60 = 641.66 pulses/minute /60 = 10.69 pulses/sec or 10690 ms. The firmware of the ECU is expecting a 32 bit number and the coding is set so that 65535 = 8388.5ms, so I should be able to read both ends of my range rather well.
Does my math seem reasonable?
It seems like a teensy should be able to do this pretty easily, but I honestly have no idea where to start. Can anyone point me in the right direction on how to best approach this?
Thanks!
How I got to these numbers...
44 pulses per revolution, 875 revolutions per mile, ~160mph maximum speed = 6160000 pulses per hour /60 /60 = ~1.7khz
At 1MPH * 875 rev/mile = 38500 pulses/hour /60 = 641.66 pulses/minute /60 = 10.69 pulses/sec or 10690 ms. The firmware of the ECU is expecting a 32 bit number and the coding is set so that 65535 = 8388.5ms, so I should be able to read both ends of my range rather well.
Does my math seem reasonable?
It seems like a teensy should be able to do this pretty easily, but I honestly have no idea where to start. Can anyone point me in the right direction on how to best approach this?
Thanks!