I am getting the wrong values while interfacing MPU6050 Accelerometer with STM32F446RE.
For Example for value of X, Y, Z axis as 0 , 0, 1 i am getting 0, 3.16, 1 for 0 ,1, 0 i am getting 3.16, 3.16, 0 and so on i am continuously getting this 3.16.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-07-17 10:00 AM
For MPU6050 i am using accelerometer range of +/-2g with sensitivity of 16384.
For STM32F446RE board i am using I2C1 to interface with MPU6050 in standard mode with duty cycle as 50%. i am using PB6 as SCL and PB7 as SDA.
Help me in getting my values in range
Labels:
- Labels:
-
I2C
-
STM32F4 Series
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-07-18 5:56 PM
Nobody here knows what you're doing in the code. Presumably you have a bug in there somewhere. "3.16" is outside of the +/- 2g range.
Either post your code or look at existing MPU6050 examples. Here is one of many:
https://controllerstech.com/how-to-interface-mpu6050-gy-521-with-stm32/
If you feel a post has answered your question, please click "Accept as Solution".
