i currently have a project where i consisting of a Turnigy RC receiver, Arduino Mega and Naza Flight controller.
The Mega will act as a "relay" where it reads the PWM signal from the Turnigy RC receiver, and output it to the Naza flight controller.
when i use the pulseIn function to read the pulse duration, the value it shows is fluctuating. e.g. for the same control stick position, values can range from 1040-1056. this fluctuation caused my motors to have fluctuations too, where i could hear it some fluctuations in the motor spinning speed.
i have tried to connect the RC receiver direct to Naza and the motors spin fine.
is there any way to solve the fluctuation issue, yet not causing additional time delay (time taken from change in control stick position to change in motor spinning speed)?
I think the timing resolution of pulseIn() is ±4µs (please correct me if I'm wrong). The fluctuation you're getting is ±8µs. As you approach the lower limit of pulseIn(), the error due to timing resolution becomes more significant.
As a solution, you may need to average multiple readings. I think there's ample room to play here, because no matter how many coffees I have, I cant get my own response time better than 100000µs (0.1 sec).