Manipulating MPU6050 gyroscope readings in microcontroller vs on pc

Hi all,

Is it better (for better calculation results) to manipulate MPU6050 gyroscope readings on the microcontroller itself (removing bias, integration to get angle etc), or is it better to send the gyro data from the microcontroller to a pc via bluetooth, and manipulate the data on the pc? Or is there no difference? Is the second option reliable?

Thanks in advance,

MrImskiy

You should end up with the same result, regardless of which computer does the calculations.

1 Like

Thanks for the reply @jremington! So, if, for example, I am making some tilt movements with my sensor, integrating these gyro readings on my pc to get an angle will give me the exact same result as on a microcontroller? With no significant data loss?

It will give you the exact same result, unless you make a mistake in data transmission.

1 Like

Ok, thanks!

Yes, but with a note about controller. If true double precision is needed it is not available for all controllers but very likely in a pc. Integration, summing up many points, could need it. Your comment?

The raw sensor data are integers. For subtracting offsets and converting units of measurement, double precision calculations are neither needed nor desired, so any computer should give identical single precision results.

I agree with You to that. Likely offset doesn't need it. My concern was integration. As the knowledge in digital methods is rather rusty by now, 45 - 50 years old and not using it, the warnings can't be pointed out. Different algorithms had their prons and cons...

Anything I've done with sensors like this would not allow much time for the communication to a real computer for crunching.

What is your control loop frequency? How long does it take to transmit and then receive the massaged data? Assuming the PC takes almost zero time, how does that compare to the time the little computer needs to do it locally?

Can your controlled system deal with dropouts, times when the sended data just doesn't come back?

If the link is broken, will it re-establish itself in a timely fashion?

a7

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.