cancel
Showing results for 
Search instead for 
Did you mean: 

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.

GAgar.1
Associate

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

1 REPLY 1
TDK
Guru

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".