Jump to content
I2Cdevlib Forums

anistor

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by anistor

  1. Having the mag data in the fifo helps frame it with the rest of the data so when it is later retrieved from fifo to perform the 6+3 fusion we get data that was measured at (nearly) the same time instant, or certainly closer together than in the case the mag is read after the 6 axis is fetched from the fifo. But the difference might be so minute it might not be worth the hassle. After hacking the MPU6050_9Axis_MotionApps41.h, as I said before, I was able to successfuly get HMC5883L data in the fifo while on DMP mode. But, the 16bit values seem unrealistically high. Maybe it's a byte order problem? Need to investigate further.... They are neither constant nor random. They seem to react correctly with the orientation of the sensor so I'm definitelly close to something. Or maybe I'll just stop here and give up on DMP altogether. It was already a very frustrating experience. And I just realised that my Arduino sketch already uses more than half of the 32kb available flash space of my arduino pro mini. I still need to add mag fusion, gps and barometer and drive a 4 line text lcd, so I'm afraid I'll be out of space very soon. Probably the best thing to do is to just return to the point I was a few weeks ago and get raw data from the mpu+mag+baro+gps (about 9kb), implement the AHRS (Madgwick algorithm ia about 13kb) and I'm still left with about 9kb of extra space that I can use for driving the lcd and maybe even add a bluetooth module.
  2. Hi luisrodenas, My current experience with the DMP is limited to the MPU6050_6Axis_MotionApps20.h sample which works for me nicely, without a mag. Next, I would like to try MPU6050_9Axis_MotionApps41.h, but I do not have an AK8975C compass, so I would need to tweak the code to correctly init the HMC5883L instead of the AK8975C. In my view, after the compass init is done it should not longer matter what compass is used (well, except for range/calibration details - TBD later). What just happens is that 6 bytes of mag data magically arrive from the slave and are placed in the EXT_SENS_DATA registers. I assume the DMP would pick them up from there. Unfotunatelly there is no documentation about how the DMP gets the mag data, so I'll need to try it out. I think you already did a nice job setting up the HMC5883L compass on top of the 6 axis sample (http://www.i2cdevlib.com/forums/topic/111-arduino-example-sketch-to-read-magnetometer-while-dmp-is-on/) - many thanks for it! But, according to line 117 of https://github.com/jrowberg/i2cdevlib/blob/master/Arduino/MPU6050/MPU6050_9Axis_MotionApps41.h#L117 , the DMP can provide magnetometer data also. Maybe it just spews it out in the fifo ... maybe it also fuses it. Not sure what it actually does, the info on the net (including invensense site) is very unclear... But I would be happy to get it out anyway. So, what do you think regarding the chances of achieving with MPU6050+HMC5883L the same results as with a MPU6050+AK8975C (or MPU9150) from the MPU6050_9Axis_MotionApps41.h code? When you say you could not achieve this, have you actually tried the route described here or something else? Thanks!
  3. Hi all, I managed to connect the compass as slave and then read its data from EXT_SENS_DATA registers. I even managed to configured the mpu to place the EXT_SENS_DATA in the fifo, so now I can get all the raw sensors, including compass into the fifo - but the DMP was not enabled up to this point. The next challange is to activate DMP and place the DMP quaternion output in the fifo and also put the compass data in the fifo. Anyone knows how can I achieve this? I found an older post regarding reading compass value from EXT_SENS_DATA while DMP is on - I've tried that and it does indeed work. But I need more than that. I would like to place the compass output in the fifo together with the dmp output. But it seems to me that when DMP is enabled it will take over the fifo config and whatever other sensor raw values were previosuly configured to go into the fifo will not be honoured. Also, in which order would the data be placed in fifo with respect to the dmp data? Thanks!
×
×
  • Create New...