I'm trying to implement an arduino to control a LED RPM histogram and trigger a shifter relay for automatic upshifting. The engine control unit (ECU) is able to output the RPM data in two forms: PWM or tachometer output. The PWM is configurable to different frequencies (~6Hz-980Hz range, I have it currently set at 189.5Hz) and adjusts the duty cycle based on the RPM. The tachometer output gives a Hz/RPM signal.
So far I haven't had any luck with using the PWM output and using the pulseIn() function to interpret the duty cycles. I haven't gotten around to using filters to smooth out the signal into an analog function.
Any suggestions on how to approach the challenge? Both the arduino and ECU are on the same battery, thus referencing the same ground.