Search the Community
Showing results for tags 'MPU-9250'.
Hi! I've got the MPU-9250 working but there seems to be some problem with the accelerometer. When the board is moving and then at rest, the values of the accelerometer don't go back to the "resting values" (ideally it would be (x, y, z) = (0,0,0)). To make this clear I attached the image "accelerometer.png". For this image: between 1.5s to 3.2s I move the board, then leave it at rest for about 2 seconds and then I move it again for 1.7s and then I leave it at rest again. After each time, the values at rest of the axes X Y Z are different. It is like the registers stop updating when the board doesn't move any more even if the values didn't come back to the origin. Maybe, there is some threshold. The gyroscope doesn't have that problem. At rest, the values come back nicely to the "rest values". The module is initialized with the following command: I2CSend(MPU9250_ADDRESS, 2, PWR_MGMT_1, 0x00); // Clear sleep mode Delay; I2CSend(MPU9250_ADDRESS, 2, PWR_MGMT_1, 0x01); // Clock Source Delay; I2CSend(MPU9250_ADDRESS, 2, CONFIG, 0x06); // Gyroscope Filter BW = 5Hz, delay = 33,48ms, Fs = 1kHz Delay; I2CSend(MPU9250_ADDRESS, 2, PWR_MGMT_2, 0x00); // Enable Accelerometer and gyroscope Delay; I2CSend(MPU9250_ADDRESS, 2, GYRO_CONFIG, 0x00); // +-250dps Delay; I2CSend(MPU9250_ADDRESS, 2, ACCEL_CONFIG, 0x00);// +-2G Delay; I2CSend(MPU9250_ADDRESS, 2, ACCEL_CONFIG_2, 0x05); // Accelerometer Filter BW = 10Hz, delay = 35,70ms, Fs = 1kHz Delay; I2CSend(MPU9250_ADDRESS, 2, INT_PIN_CFG, 0x02); // Bypass for the magnetometer enable Delay; I2CSend(MPU9250_ADDRESS, 2, I2C_MST_CTRL, 0x00); // I2C speed at 358 kHz Delay; I2CSend(MAG_ADDRESS, 2, MAG_CNTL_1, 0x00);// Power down magnetometer Delay; I2CSend(MAG_ADDRESS, 2, MAG_CNTL_1, 0x16); // sampling rate 100Hz and word is 16-bit Delay; I2CSend() writes values in the specified register. I thought first that it could be tied to the Wake on Motion thing. But even if I set it to 0x00, it doesn't change anything. Basically, I would like to have the values read continuously without any sleep or standby mode. Does anyone has an idea of what could be wrong? Thank you for your time!
Hi all, Need some help. I have successfully used the AK8975 library with the MPU-9150 which according to the data sheet uses the ak8963 magnetometer. However, when using the same library with a MPU-9250 which has a AK8975 I keep getting a connection failure when using the test sketch. I have gone through all the possible addresses 0x0C through 0x0F with the same results. For reference I am using a CJMCU-117 breakout board that I got over ebay. I have tried also disabling mastermode and enabling bypass but still does not work. Also, getting the accel and gryo data seem to be working fine. Anyone have any suggestions or experience with this issue? Thanks Mike ==================================================== Update 5/11/2014 Ok - came to the conclusion that it is a bad chip and nothing I am doing. After going through the register maps (8963 and 9250), the motion driver software I set up the self test option which the board failed - i checked it against the 9150 which passed. Also, ran a i2cscanner on the 9150 and the 9250. The scanner picked up the magnetometer on the 9150 but not the 9250.