PPM is noisy when i2c is used


(Daniel kirubakaran) #1

Hello again,

I am unable to find the reason for a problem that i am facing.

In my drone project that uses Hifive1 as the flight controller,
*Using Arduino pro Mini i converted 6 pwm channels from the receiver into single PPM signal.
*I decode this PPM signal in my ISR and get separate channel values
[Using interrupts]
*My main loop has many functions
->gyroscope values read
->PID calculation
->Reading battery voltage
->ESC calculation
->And some minor mathematical calculations

*When i place all the controller sticks at the center it must give 1500 (+/-2)
*When i call gyro read values function in the loop the PPM values are noisy , say 1500(+/-20 or even 30)
*If i comment the gyroscope values read function ,the PPM values are as expected.
*Due to this problem,My drone is unstable
*I am using SW i2c library from westerndigital for mpu6050 sensor

Is the solution from that guy is true?
Should i buy sensor like MPU9250 that has SPI interface instead of MPU6050 ?

Kindly clear my doubts about the reason for the issue.

Thank you.