kriswiner / MPU9250

Arduino sketches for MPU9250 9DoF with AHRS sensor fusion
1.03k stars 472 forks source link

Sketch issues and mag issue #1

Closed mjs513 closed 10 years ago

mjs513 commented 10 years ago

I came across your sketch while looking for a solution to not being able to read or see the magnetometer. Saw that you have to read 7 bytesinstead of 6 as on the 9150 and figure I would give your sketch a try before I did anything else. Anyway came across two things: (1) think you need to include the madgwickahrsupdate code or it will not work and (2) which is my problem the sketch returns FF instead of 48 when it does a whoiam on the ako8963. Any thoughts on what the problem could be?

I did go through the possible magazine addresses just in case and when I run a i2cscanner the only thing I see is the 9250 address which reads fine. The only thing incandescent think of is that it is a bad chip or they put a 6050 on the board instead of the 9250.

kriswiner commented 10 years ago

Hi Mike,

The Madgwick filter is in the github folder caller quaternionfilter.ino or something like that. You have to enable bypass mode in the MPU-9250 in order to be able to even see the AK8963 with an I2C sniffer.

// Configure Interrupts and Bypass Enable // Set interrupt pin active high, push-pull, hold interrupt pin level HIGH until interrupt cleared, // clear on read of INT_STATUS, and enable I2C_BYPASS_EN so additional chips // can join the I2C bus and all can be controlled by the Arduino as master writeByte(MPU9250_ADDRESS, INT_PIN_CFG, 0x22);
writeByte(MPU9250_ADDRESS, INT_ENABLE, 0x01); // Enable data ready (bit 0) interrupt

This set in the INT_PIN_CFG register. Once bypass mode is enabled, you should be able to talk to the AK8963.

Kris

-----Original Message----- From: Mike S [mailto:notifications@github.com] Sent: June 4, 2014 10:12 PM To: kriswiner/MPU-9250 Subject: [MPU-9250] Sketch issues and mag issue (#1)

I came across your sketch while looking for a solution to not being able to read or see the magnetometer. Saw that you have to read 7 bytesinstead of 6 as on the 9150 and figure I would give your sketch a try before I did anything else. Anyway came across two things: (1) think you need to include the madgwickahrsupdate code or it will not work and (2) which is my problem the sketch returns FF instead of 48 when it does a whoiam on the ako8963. Any thoughts on what the problem could be?

I did go through the possible magazine addresses just in case and when I run a i2cscanner the only thing I see is the 9250 address which reads fine. The only thing incandescent think of is that it is a bad chip or they put a 6050 on the board instead of the 9250.

Reply to this email directly or view it on GitHub https://github.com/kriswiner/MPU-9250/issues/1 . https://github.com/notifications/beacon/6698410__eyJzY29wZSI6Ik5ld3NpZXM6Qm VhY29uIiwiZXhwaXJlcyI6MTcxNzU2NDM0MCwiZGF0YSI6eyJpZCI6MzM5MDA4OTV9fQ==--f03c 43538e2139f57a424e096fed9f217e12f9f4.gif

mjs513 commented 10 years ago

Hi Kris

Thanks for uploading the filter. I am running a different version of the same filter, think Madgwick updated the filter on his X-IO website. Does the same thing but different coding. I just mentioned the missing file since someone else may want to give it try.

Anyway I checked the sketch and it looks like you are doing that in the initMPU92050 function so it should work but it doesn't, so I am at a loss. Wanted to try a totally different version to see it was my coding. By the way I saw the mag address when I ran the scanner on the 9150 and 6050 boards that I have where you have to do the same thing with enabling the bypass to get to the mag. I have another board coming just in case. The board I am using is a CJMCU-117 that I picked up on ebay that has a MS5611 barometer on it as well. Mirrors closely the FreeIMU board that I am using with the 6050.

I will give it another try and see what happens.

Thanks again Mike

kriswiner commented 10 years ago

Mike,

Thanks for pointing out my error in not including the filter file. The files used to be merged into a single file; I broke it up to make it less unwieldy and probably forgot to upload the filter file. I literally copied Madgwick's program and made a few tweaks for Arduino C++ and, maybe changed some of the naming conventions.

I think it is the cheap board that is your problem. I bought two CJMCU-116 MPU-9250 breakout boards from goodluckbuy.com. I have had good luck buying (pun intended!) MPU-9150 breakouts from them. One of the CJMCU-116 boards worked fine except for some erratic motion sensing behavior which might be related to some uninitialized register. But I could read the AK8963 WHO_AM_I register and get sensible data from the magnetometer. The other I could not locate with a bus pirate and, even though I got 0xFF when I ran the sketch you tried, the magnetometer reported data but it was all over the map and basically useless. I wrote to the seller site with some Serial output to try to get a refund or replacement but so far I haven't got past the simple acknowledgement that I might have a problem. I would recommend you buy the breakout board offered for sale by invensense.com on their site. It is made by embeddedmasters.com and is quite the piece of engineering; you need a magnifying glass to see the tiny SMD resistors and capacitors on the board, which works flawlessly. It is a bit pricey at $32, but worth it after my experience with the cheaper Chinese knockoffs.

Kris

-----Original Message----- From: Mike S [mailto:notifications@github.com] Sent: June 5, 2014 1:47 PM To: kriswiner/MPU-9250 Cc: Kris Winer Subject: Re: [MPU-9250] Sketch issues and mag issue (#1)

Hi Kris

Thanks for uploading the filter. I am running a different version of the same filter, think Madgwick updated the filter on his X-IO website. Does the same thing but different coding. I just mentioned the missing file since someone else may want to give it try.

Anyway I checked the sketch and it looks like you are doing that in the initMPU92050 function so it should work but it doesn't, so I am at a loss. Wanted to try a totally different version to see it was my coding. By the way I saw the mag address when I ran the scanner on the 9150 and 6050 boards that I have where you have to do the same thing with enabling the bypass to get to the mag. I have another board coming just in case. The board I am using is a CJMCU-117 that I picked up on ebay that has a MS5611 barometer on it as well. Mirrors closely the FreeIMU board that I am using with the 6050.

I will give it another try and see what happens.

Thanks again Mike

Reply to this email directly or view it on GitHub https://github.com/kriswiner/MPU-9250/issues/1#issuecomment-45272459 . https://github.com/notifications/beacon/6698410__eyJzY29wZSI6Ik5ld3NpZXM6Qm VhY29uIiwiZXhwaXJlcyI6MTcxNzYyMDQyOCwiZGF0YSI6eyJpZCI6MzM5MDA4OTV9fQ==--3447 4e467f12a18c726b764285639aa4ee95eeb7.gif

mjs513 commented 10 years ago

Kris

Thanks for the info on your board experience that is pretty much what I am seeing with the 9250 board I have with your sketch as well as the mods I have been making to the FreeIMU library that Fabio Versano started. At least the seller offered me a refund on the board. Will definitely check out the invensense breakout board as you recommended. PS. Have you ever thought about just creating a AKM8963 library? Based on what I have been working on you can use the 6050 library to access the accel and gyro for both the 9150 and the 9250.

Thanks again for restoring my sanity.

Mike

From: Kris Winer [mailto:notifications@github.com] Sent: Thursday, June 05, 2014 9:51 PM To: kriswiner/MPU-9250 Cc: Mike S Subject: Re: [MPU-9250] Sketch issues and mag issue (#1)

Mike,

Thanks for pointing out my error in not including the filter file. The files used to be merged into a single file; I broke it up to make it less unwieldy and probably forgot to upload the filter file. I literally copied Madgwick's program and made a few tweaks for Arduino C++ and, maybe changed some of the naming conventions.

I think it is the cheap board that is your problem. I bought two CJMCU-116 MPU-9250 breakout boards from goodluckbuy.com. I have had good luck buying (pun intended!) MPU-9150 breakouts from them. One of the CJMCU-116 boards worked fine except for some erratic motion sensing behavior which might be related to some uninitialized register. But I could read the AK8963 WHO_AM_I register and get sensible data from the magnetometer. The other I could not locate with a bus pirate and, even though I got 0xFF when I ran the sketch you tried, the magnetometer reported data but it was all over the map and basically useless. I wrote to the seller site with some Serial output to try to get a refund or replacement but so far I haven't got past the simple acknowledgement that I might have a problem. I would recommend you buy the breakout board offered for sale by invensense.com on their site. It is made by embeddedmasters.com and is quite the piece of engineering; you need a magnifying glass to see the tiny SMD resistors and capacitors on the board, which works flawlessly. It is a bit pricey at $32, but worth it after my experience with the cheaper Chinese knockoffs.

Kris

-----Original Message----- From: Mike S [mailto:notifications@github.com] Sent: June 5, 2014 1:47 PM To: kriswiner/MPU-9250 Cc: Kris Winer Subject: Re: [MPU-9250] Sketch issues and mag issue (#1)

Hi Kris

Thanks for uploading the filter. I am running a different version of the same filter, think Madgwick updated the filter on his X-IO website. Does the same thing but different coding. I just mentioned the missing file since someone else may want to give it try.

Anyway I checked the sketch and it looks like you are doing that in the initMPU92050 function so it should work but it doesn't, so I am at a loss. Wanted to try a totally different version to see it was my coding. By the way I saw the mag address when I ran the scanner on the 9150 and 6050 boards that I have where you have to do the same thing with enabling the bypass to get to the mag. I have another board coming just in case. The board I am using is a CJMCU-117 that I picked up on ebay that has a MS5611 barometer on it as well. Mirrors closely the FreeIMU board that I am using with the 6050.

I will give it another try and see what happens.

Thanks again Mike

Reply to this email directly or view it on GitHub https://github.com/kriswiner/MPU-9250/issues/1#issuecomment-45272459 . <https://github.com/notifications/beacon/6698410__eyJzY29wZSI6Ik5ld3NpZXM6Qm https://github.com/notifications/beacon/6698410__eyJzY29wZSI6Ik5ld3NpZXM6Qm%0bVhY29uIiwiZXhwaXJlcyI6MTcxNzYyMDQyOCwiZGF0YSI6eyJpZCI6MzM5MDA4OTV9fQ==--3447%0b4e467f12a18c726b764285639aa4ee95eeb7.gif VhY29uIiwiZXhwaXJlcyI6MTcxNzYyMDQyOCwiZGF0YSI6eyJpZCI6MzM5MDA4OTV9fQ==--3447 4e467f12a18c726b764285639aa4ee95eeb7.gif>

— Reply to this email directly or view it on GitHub https://github.com/kriswiner/MPU-9250/issues/1#issuecomment-45295428 . https://github.com/notifications/beacon/5366213__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxNzYzODY0NiwiZGF0YSI6eyJpZCI6MzM5MDA4OTV9fQ==--5c3e74c84b0a31f34e6ef568a1e1139f47e5f76b.gif

kriswiner commented 10 years ago

Hi Mike,

Creating an AK8963 library would take about ten minutes. If you would really find it useful, I'll try to get around to it this weekend. Do you have an AK8963 breakout board?

mjs513 commented 10 years ago

Hey Chris

Not yet. I just ordered the MPU-9250 breakout board from Innvensense, so I will probably have next week. Going to check out to see if sparkfun has one for the 8963 but still won't get until next week so there is no rush on the library, but yes it would be helpful. I am a novice at c++ so any help would be appreciated.

Right now in the FreeIMU library i modified the code to retain the 6050 library for accel/gyro and then in the getRawValues and getValues functions of the FreeIMU library i just added the call to the appropriate magnetometer. Fabio did a great job on the library and I just did not want to let go it after he passed last year. If you are interested here is the link to the mods i made and continue to make: https://github.com/mjs513/FreeIMU-Updates.git.

Thanks Mike

On Fri, Jun 6, 2014 at 12:49 AM, Kris Winer notifications@github.com wrote:

Hi Mike,

Creating an AK8963 library would take about ten minutes. If you would really find it useful, I'll try to get around to it this weekend. Do you have an AK8963 breakout board?

— Reply to this email directly or view it on GitHub https://github.com/kriswiner/MPU-9250/issues/1#issuecomment-45302677.

kriswiner commented 10 years ago

I spent a fair amount of time at Fabio's site when I was researching AHRS implementations. Too bad he's gone. If you find an AK8963 breakout please let me know, I would like to get one myself.

mjs513 commented 10 years ago

Been looking for one for a couple of hours and there doesn't seem to one to be had. Found a source for the chips but no breakout board for the 8963. Most boards I see reference the 9250 or the 6500. So if you come across one let me know too.

On Fri, Jun 6, 2014 at 1:40 PM, Kris Winer notifications@github.com wrote:

I spent a fair amount of time at Fabio's site when I was researching AHRS implementations. Too bad he's gone. If you find an AK8963 breakout please let me know, I would like to get one myself.

— Reply to this email directly or view it on GitHub https://github.com/kriswiner/MPU-9250/issues/1#issuecomment-45364093.

mjs513 commented 10 years ago

Hi Kris

Thought I would give you a little update. I received the Invensense breakout board, hooked it up and away it. Worked perfectly. For the heck of it I also managed to get the motion driver (inv_mpu) working and wrote a quick sketch just as a test (and curiosity) and worked just like yours. I did start modifying Jeff Rowbergs AK8975 library but think I am going to give up – doing something wrong. So I think I will take you up on the offer to convert your stuff into a library, you have no idea how useful it would be. PS. If you want the motion driver sketch or what I started on the 8963 library let me know and I will post it so you can get access to it.

Thanks for your help

Mike

From: Kris Winer [mailto:notifications@github.com] Sent: Friday, June 06, 2014 1:41 PM To: kriswiner/MPU-9250 Cc: Mike S Subject: Re: [MPU-9250] Sketch issues and mag issue (#1)

I spent a fair amount of time at Fabio's site when I was researching AHRS implementations. Too bad he's gone. If you find an AK8963 breakout please let me know, I would like to get one myself.

— Reply to this email directly or view it on GitHub https://github.com/kriswiner/MPU-9250/issues/1#issuecomment-45364093 . https://github.com/notifications/beacon/5366213__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxNzY5NTYzOCwiZGF0YSI6eyJpZCI6MzM5MDA4OTV9fQ==--eee222ee864897af8ef5f374f06a5d972b123adc.gif

kriswiner commented 10 years ago

Mike,

I'm glad you got the device working for you.

I'm not sure exactly what you would like to do different from what is there. Do you plan to separately operate the AK8963 device embedded with the MPU-6500 in the MPU-9250 package, or do you want code to run a stand-alone AK8963 device? The elements of an AK8963-only sketch are contained in the MPU-9250 sketch that you used; I could easily break out the AK8963 parts into an AK8963-only sketch. The only problem I see is that using it with the AK8963 within the MPU-9250 still requires that the MPU-6500 be turned on and placed into bypass mode. In order to use the FIFO for data gathering, which is really the righter way to go, the MPU-6500 must also be "on".

If I had a little better idea of what you were trying to accomplish, I would be able to help you better.

Kris

-----Original Message----- From: Mike S [mailto:notifications@github.com] Sent: June 14, 2014 6:09 AM To: kriswiner/MPU-9250 Cc: Kris Winer Subject: Re: [MPU-9250] Sketch issues and mag issue (#1)

Hi Kris

Thought I would give you a little update. I received the Invensense breakout board, hooked it up and away it. Worked perfectly. For the heck of it I also managed to get the motion driver (inv_mpu) working and wrote a quick sketch just as a test (and curiosity) and worked just like yours. I did start modifying Jeff Rowbergs AK8975 library but think I am going to give up - doing something wrong. So I think I will take you up on the offer to convert your stuff into a library, you have no idea how useful it would be. PS. If you want the motion driver sketch or what I started on the 8963 library let me know and I will post it so you can get access to it.

Thanks for your help

Mike

From: Kris Winer [mailto:notifications@github.com] Sent: Friday, June 06, 2014 1:41 PM To: kriswiner/MPU-9250 Cc: Mike S Subject: Re: [MPU-9250] Sketch issues and mag issue (#1)

I spent a fair amount of time at Fabio's site when I was researching AHRS implementations. Too bad he's gone. If you find an AK8963 breakout please let me know, I would like to get one myself.

Reply to this email directly or view it on GitHub https://github.com/kriswiner/MPU-9250/issues/1#issuecomment-46087506 . https://github.com/notifications/beacon/6698410__eyJzY29wZSI6Ik5ld3NpZXM6Qm VhY29uIiwiZXhwaXJlcyI6MTcxODM3MDUzOCwiZGF0YSI6eyJpZCI6MzM5MDA4OTV9fQ==--2fc5 429c56dbfad64b139bff7c0686351d04fd10.gif

mjs513 commented 10 years ago

Hi Kris,

Since I am using Fabio FreeIMU code I have been modifying as necessary his MPU60X0 library to get access to the accel and gryo data. Since you have to enable the I2Cbypass whether using an external magnetometer or the internal ones on the 9150 or the 9250 separate libraries can be used to read the mag data when calling getMotion9. While the 9250 is based on the 6500, if you are doing dmp you don’t get into too much trouble except with temperature which is easily fixed in the FreeIMU code. As for the calibration I use Fabio’s calibration GUI. So essentially I am using one library with three separate magnetometer libraries (HMC5883L, AK8975 and the AK8963). Yes I did manage to get the AK8963 library created and working including a self-test. It’s based on the AK8975 library from Jeff Rowberg and your sketch. Unfortunately since I have not updated the 60X0 library to use Jeff’s updated version I set up the AK8963 library up to use the old version – shouldn’t be too difficult to change or make stand alone.

If you would like a copy I could send it to you.

You are right in that using the FIFO is the better way to go but haven’t done that yet or even played around with.

Thanks for all your help, learned a lot from your sketch.

Mike

From: Kris Winer [mailto:notifications@github.com] Sent: Saturday, June 14, 2014 4:55 PM To: kriswiner/MPU-9250 Cc: Mike S Subject: Re: [MPU-9250] Sketch issues and mag issue (#1)

Mike,

I'm glad you got the device working for you.

I'm not sure exactly what you would like to do different from what is there. Do you plan to separately operate the AK8963 device embedded with the MPU-6500 in the MPU-9250 package, or do you want code to run a stand-alone AK8963 device? The elements of an AK8963-only sketch are contained in the MPU-9250 sketch that you used; I could easily break out the AK8963 parts into an AK8963-only sketch. The only problem I see is that using it with the AK8963 within the MPU-9250 still requires that the MPU-6500 be turned on and placed into bypass mode. In order to use the FIFO for data gathering, which is really the righter way to go, the MPU-6500 must also be "on".

If I had a little better idea of what you were trying to accomplish, I would be able to help you better.

Kris

-----Original Message----- From: Mike S [mailto:notifications@github.com] Sent: June 14, 2014 6:09 AM To: kriswiner/MPU-9250 Cc: Kris Winer Subject: Re: [MPU-9250] Sketch issues and mag issue (#1)

Hi Kris

Thought I would give you a little update. I received the Invensense breakout board, hooked it up and away it. Worked perfectly. For the heck of it I also managed to get the motion driver (inv_mpu) working and wrote a quick sketch just as a test (and curiosity) and worked just like yours. I did start modifying Jeff Rowbergs AK8975 library but think I am going to give up - doing something wrong. So I think I will take you up on the offer to convert your stuff into a library, you have no idea how useful it would be. PS. If you want the motion driver sketch or what I started on the 8963 library let me know and I will post it so you can get access to it.

Thanks for your help

Mike

From: Kris Winer [mailto:notifications@github.com] Sent: Friday, June 06, 2014 1:41 PM To: kriswiner/MPU-9250 Cc: Mike S Subject: Re: [MPU-9250] Sketch issues and mag issue (#1)

I spent a fair amount of time at Fabio's site when I was researching AHRS implementations. Too bad he's gone. If you find an AK8963 breakout please let me know, I would like to get one myself.

Reply to this email directly or view it on GitHub https://github.com/kriswiner/MPU-9250/issues/1#issuecomment-46087506 . <https://github.com/notifications/beacon/6698410__eyJzY29wZSI6Ik5ld3NpZXM6Qm https://github.com/notifications/beacon/6698410__eyJzY29wZSI6Ik5ld3NpZXM6Qm%0bVhY29uIiwiZXhwaXJlcyI6MTcxODM3MDUzOCwiZGF0YSI6eyJpZCI6MzM5MDA4OTV9fQ==--2fc5%0b429c56dbfad64b139bff7c0686351d04fd10.gif VhY29uIiwiZXhwaXJlcyI6MTcxODM3MDUzOCwiZGF0YSI6eyJpZCI6MzM5MDA4OTV9fQ==--2fc5 429c56dbfad64b139bff7c0686351d04fd10.gif>

— Reply to this email directly or view it on GitHub https://github.com/kriswiner/MPU-9250/issues/1#issuecomment-46099377 . https://github.com/notifications/beacon/5366213__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxODM5ODQ5OCwiZGF0YSI6eyJpZCI6MzM5MDA4OTV9fQ==--9eb74f2715e539347a8a41f008d0bd48c219d617.gif

kriswiner commented 10 years ago

Mike,

Thanks for the detailed explanation of what you are doing. It sounds like you have gotten things sorted out. A stand alone library for the AK devices isn't particularly useful until we can find (or make) breakout boards for these devices. The DMP on the MPU-9x50 devices doesn't include magnetometer data, so one would have to get the 6-axis quaternion from the DMP and then fuse it with the magnetometer via software in the microcontroller. This is the reason I don't bother with the DMP; if I have to do sensor fusion with the magnetometer anyway, I might as well just do all 9 axes together.

The AK8963 is a little different from the AK8975. Make sure you read the STATUS2 register just after the data registers when reading AK8963 data in the continuous mode. You can read about this in the data sheet, but the AK8963 uses the STATUS2 register read as an indicator of when the data read operation is concluded, so it is a necessary part of AK8963 device operation.

I noticed on the I2CDev github site where Jeff Rowberg's sketches are kept that there were several errors in their MPU-9250 sketch. It and the MPU-9150 sketches are really just MPU-6050 sketches with a few lines for the magnetometer read. But most of the magnetometer stuff is (or was, I haven't looked in a while) wrong. For example, they were not taking into account the little Endian nature of the magnetometer data, and they were initiating the bypass mode every time the AK8975 mag data was being read. I reported these problems as issues on their github site; don't know whether they got around to fixing them yet.

I was at the Invensense Developers Conference last week, and they made a good case for using the FIFO to read the data primarily because it's the only way to ensure an accurate time base for the sensor fusion calculations. The point is that if you just read from the registers, the accel/gyro/mag data will not necessarily all be time-aligned; tied to the same time mark. With the FIFO they can be. I don't currently use the FIFO but I plan to modify my sketches to do so.

I'm glad my sketches were of use to you. Please keep me informed of what you are doing and let me know if I can be of any help.

Kris -----Original Message----- From: Mike S [mailto:notifications@github.com] Sent: June 15, 2014 7:40 AM To: kriswiner/MPU-9250 Cc: Kris Winer Subject: Re: [MPU-9250] Sketch issues and mag issue (#1)

Hi Kris,

Since I am using Fabio FreeIMU code I have been modifying as necessary his MPU60X0 library to get access to the accel and gryo data. Since you have to enable the I2Cbypass whether using an external magnetometer or the internal ones on the 9150 or the 9250 separate libraries can be used to read the mag data when calling getMotion9. While the 9250 is based on the 6500, if you are doing dmp you don't get into too much trouble except with temperature which is easily fixed in the FreeIMU code. As for the calibration I use Fabio's calibration GUI. So essentially I am using one library with three separate magnetometer libraries (HMC5883L, AK8975 and the AK8963). Yes I did manage to get the AK8963 library created and working including a self-test. It's based on the AK8975 library from Jeff Rowberg and your sketch. Unfortunately since I have not updated the 60X0 library to use Jeff's updated version I set up the AK8963 library up to use the old version - shouldn't be too difficult to change or make stand alone.

If you would like a copy I could send it to you.

You are right in that using the FIFO is the better way to go but haven't done that yet or even played around with.

Thanks for all your help, learned a lot from your sketch.

Mike

From: Kris Winer [mailto:notifications@github.com] Sent: Saturday, June 14, 2014 4:55 PM To: kriswiner/MPU-9250 Cc: Mike S Subject: Re: [MPU-9250] Sketch issues and mag issue (#1)

Mike,

I'm glad you got the device working for you.

I'm not sure exactly what you would like to do different from what is there.

Do you plan to separately operate the AK8963 device embedded with the MPU-6500 in the MPU-9250 package, or do you want code to run a stand-alone AK8963 device? The elements of an AK8963-only sketch are contained in the MPU-9250 sketch that you used; I could easily break out the AK8963 parts into an AK8963-only sketch. The only problem I see is that using it with the

AK8963 within the MPU-9250 still requires that the MPU-6500 be turned on and

placed into bypass mode. In order to use the FIFO for data gathering, which is really the righter way to go, the MPU-6500 must also be "on".

If I had a little better idea of what you were trying to accomplish, I would

be able to help you better.

Kris

-----Original Message----- From: Mike S [mailto:notifications@github.com] Sent: June 14, 2014 6:09 AM To: kriswiner/MPU-9250 Cc: Kris Winer Subject: Re: [MPU-9250] Sketch issues and mag issue (#1)

Hi Kris

Thought I would give you a little update. I received the Invensense breakout

board, hooked it up and away it. Worked perfectly. For the heck of it I also

managed to get the motion driver (inv_mpu) working and wrote a quick sketch just as a test (and curiosity) and worked just like yours. I did start modifying Jeff Rowbergs AK8975 library but think I am going to give up - doing something wrong. So I think I will take you up on the offer to convert

your stuff into a library, you have no idea how useful it would be. PS. If you want the motion driver sketch or what I started on the 8963 library let me know and I will post it so you can get access to it.

Thanks for your help

Mike

From: Kris Winer [mailto:notifications@github.com] Sent: Friday, June 06, 2014 1:41 PM To: kriswiner/MPU-9250 Cc: Mike S Subject: Re: [MPU-9250] Sketch issues and mag issue (#1)

I spent a fair amount of time at Fabio's site when I was researching AHRS implementations. Too bad he's gone. If you find an AK8963 breakout please let me know, I would like to get one myself.

22ee864897af8ef5f374f06a5d972b123adc.gif>

429c56dbfad64b139bff7c0686351d04fd10.gif>

Reply to this email directly or view it on GitHub https://github.com/kriswiner/MPU-9250/issues/1#issuecomment-46117460 . https://github.com/notifications/beacon/6698410__eyJzY29wZSI6Ik5ld3NpZXM6Qm VhY29uIiwiZXhwaXJlcyI6MTcxODQ2MjQyOSwiZGF0YSI6eyJpZCI6MzM5MDA4OTV9fQ==--ce94 ff89f6419992e8f61266ecb2cd17571041a4.gif

mjs513 commented 10 years ago

Hi Kris,

Thanks for getting back to and sharing the info from conference.

The issues you brought up with magnetometer are tight to the point. Took me about a week to sort out the two errors with the 8975 example. Fixed in the version I am using. From what I have seen as I was modifying it for the 8963 found a few other things that I don't think will work - self test for one.

Thanks to your 9250 sketch and you pointing me to the Invensense breakout board I was able to create a library to use with freeimu library.

Anyway, your other point about the 9x50 libraries being basically a slightly modified version of the 6050 is why I just decided to the core 6050 and add on the mag code as a library. It was a lot easier.

Thanks for your all your help and your insights. I will keep you posted.

Mike