Integrating Gyroscope values for dps readings?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Integrating Gyroscope values for dps readings?

786 Views
priyanks
Contributor I

Hi,

I have a functionality question regarding the FXAS21002C gyroscope. I am able to print the values from the sensor in real time. But I want to display the angular displacement and hold that value in that position rather than fall back to zero if movement stops. I am under the impression that integration of the values over a fixed time will fix it. I am a beginner in C and would appreciate some close references or sample codes to implement.

Thanks

0 Kudos
1 Reply

522 Views
reyes
NXP TechSupport
NXP TechSupport

Hi Priyank S,

The reason of why the values from the gyroscope are falling back to zero after you stop the movement is because the gyroscopes actually measure the speed of the angular displacement, not the position. What you can do, just as you mentioned, is make an integration of the values over a fixed time to fix it.

Or other solution would be to add an accelerometer to your system to actually measure the position before and after the angular displacement.

Unfortunately, there is no references or sample codes to implement this specific application, but you can find a bare metal example project for the FXAS2100x gyroscope in the following link: https://community.freescale.com/docs/DOC-100869

I hope this can be helpful to start using the Freescale Gyroscope.


Have a great day,
Jose Reyes

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos