I am hoping to use an Arduino to measure flywheel rpm and roadwheel rpm on a vehicle project.
The flywheel sensor gives 60 pulses per revolution, in the rev range 0 to 6000rpm. - so a minimum pulse duration of 166uS.
The roadwheel is limited to 0 to 32 revolutions per second over normal road speeds.
I was thinking of setting up separate counters on two of the input pins and integrating the input pulses over a given number of milliseconds - say 10mS.
I need a tight loop of interrupt driven code that monitors the two tacho inputs giving numerical outputs (probably in Hz) that can be further processed.
You can't get two reading at the same time but you can get two sequential readings. If the rate the data changes is slow compared to the time it takes to do a reading then this may be ok for your application.
Rather than pulsein, can you wire it to give you a signal every revolution? Connect the signals to the arduino's interrupt pins and use simple interrupt routines to count the pulses.
The flywheel sensor gives 60 pulses per revolution
You’re probably going to need some external conditioning circuitry to clean up the sensor inputs. Something you could do to simplify your code is to just add a counter chip (like a 4017) to divide down the pulse train. It would significantly reduce the number of interrupts you have to process, give you a little free “averaging” of the pulse period, and even reduce the apparent jitter (because you have more ticks per pulse).