bilal Posted June 7, 2015 Report Share Posted June 7, 2015 I have mpu6050 interfaced to 8051 micro-controller. I am using this to balance my quadcopter. I googled very much but I did not find how to get value of gyro or accel, every where i found is that it was interfaced to Audrino. When I try to get the WHO_AM_I address values I get them successfully, but when I try to get the gyro values from register 0x43h it shows constantly varying values and are completely random, that is they are not rounding around any value. My question is that is there any initialization required to start getting correct value from gyro? Do I need to write some registers first so that then I could get the gyro values correctly? Johnnydofs 1 Quote Link to comment Share on other sites More sharing options...
MattE Posted June 26, 2015 Report Share Posted June 26, 2015 I think you may need to activate some of the more advanced functionality of the MPU or the DMP. Off the top of my head, here's what I'd recommend trying: First, try enabling the low-pass filter. I'm not 100% sure this is the trick, but LPFs are used to reduce noise, so it sounds plausible. PS: I've heard that this function MUST be called last, due to a bug in the API, but Im not sure. If that doesn't help, try retrieving the data from the DMP FIFO, after it's been processed by the DMP. This is not the most straightforward process, but it can be done, and once it's working, you'll get useable data without burning up your microcontroller's CPU. Another note, there are lots of undocumented bugs and typos scattered across all the revisions of Invensense's drivers. I've had the best luck with 6.12, but that's not saying much, and luck is a key word. Good luck! -Matt Quote Link to comment Share on other sites More sharing options...
MattE Posted June 26, 2015 Report Share Posted June 26, 2015 Oh! I just thought of one more possibility: Make sure you're interpreting those values as SIGNED numbers. If you treat them as unsigned, you'll see values of 4,294,967,295 "jump" to 0... the last bit is reserved for positive/negative, so the 2 values are actually -1 and 0. Quote Link to comment Share on other sites More sharing options...
naffej Posted July 2, 2015 Report Share Posted July 2, 2015 Hi the same error here. Any results? Thx Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.