Jump to content
I2Cdevlib Forums

Merlin

Members
  • Content Count

    7
  • Joined

  • Last visited

About Merlin

  • Rank
    Newbie

Recent Profile Visitors

656 profile views
  1. 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.
  2. Hi Michiel Here's another way to access the temp using Jeff's library. This was modified from Jeff's MPU6050_raw.ino example: // Arduino Wire library is required if I2Cdev I2CDEV_ARDUINO_WIRE implementation // is used in I2Cdev.h #include "Wire.h" #include "SPI.h" // I2Cdev and MPU6050 must be installed as libraries, or else the .cpp/.h files // for both classes must be in the include path of your project #include "I2Cdev.h" #include "MPU60X0.h" // class default I2C address is 0x68 // specific I2C addresses may be passed as a parameter here // AD0 low = 0x68 (default for InvenSense evaluation board) // AD0 high = 0x69 MPU60X0 accelgyro; int16_t rawTemp; float temp; #define LED_PIN 13 bool blinkState = false; void setup() { // join I2C bus (I2Cdev library doesn't do this automatically) Wire.begin(); // initialize serial communication // (38400 chosen because it works as well at 8MHz as it does at 16MHz, but // it's really up to you depending on your project) Serial.begin(38400); // verify connection Serial.println("Testing device connections..."); Serial.println(accelgyro.testConnection() ? "MPU6050 connection successful" : "MPU6050 connection failed"); // configure Arduino LED for pinMode(LED_PIN, OUTPUT); } void loop() { /** Get current internal temperature. * @return Temperature reading in 16-bit 2's complement format * @see MPU60X0_RA_TEMP_OUT_H */ //Serial.println("Getting Die Temperature"); rawTemp = accelgyro.getTemperature(); temp=(rawTemp/340.)+36.53; Serial.println(); Serial.print("temp deg C: "); Serial.println(temp); delay(250); // blink LED to indicate activity blinkState = !blinkState; digitalWrite(LED_PIN, blinkState); } Have fun Mike
  3. Thanks for the response. I agree, using DMP would get the temp out of the equation, but I am a gluton for punish, especially since I really don't know the internals on DMP. Eventually I will get around to DMP but for now still learning the process of sensor integration. Implemented the same approach in the FreeIMU code since I am using that as the base. Will have to check if I leave it running for 10 - 15 minutes to check to see if it stabilizes. Thanks for the confirmation and sharing the approach.
  4. UPDATE: Just by way of a update I incorporated a temperature calibration routine into the freeIMU code and was able to drastically minimize the yaw drift. So basically, if you are not using DMP you should incorporate a temperature compensation routine if you have not already done so. PS for those of you that are using Fabio's code I made several other changes and was able to get the yaw drift almost all the way to 0. Merlin.
  5. Gyro-Temp.bmpSorry, have to upload the last gyro pdf for the last post.
  6. Hi Jeff First I want to say thanks for all the libraries not just the MPU-6050, been using them with a several different standalone sensors and combo boards. They all work great. Now for the question. I am using the FreeIMU code written by Fabio and as I was going through several of the comments I came across his todo list which brought me to the your's and his discussion on temperature compensation for the ITG-3200 board. One of the things that I noticed is that when I first start it takes quite a while before I can get stable readings from the MPU-6050 and the cube programs not to go nuts. From what I can see from dumping the 6050 temp the readings don't really stabilize until about 22degC. It also appears that the temp affects the accel readings and the gyro readings (raw) to different degrees depending on the axis (gyro or accel). I have only looked at 19-23degC region and not tried to heat it up yet . I can attach the graphs if you are interested. Was wondering if you had any experience with this and point me in the right direction to correct it in the code, also based on the data is it worth it to put in the correction or just put a test in let it warm up first until a set limit. Thanks for any advice - Mike UPDATE: Reran the experiment using a 1 second delay with similar results which I am uploading as a PDF images along with the Temperature profile. Out of curiosity I also ran just ran the MPU from startup for about 1 hour which I am also attaching which I am also uploading for your reference. Temp Profile.pdf Accel-Temp22-25.pdf Gyro-Temp22-25.pdf Accel-Temp Default.pdf
  7. Hi Newbie Was having a lot of problems getting it to work myself. Problem seems to be the settings. I did finally manage to get it motion detection to work but doesn't really work for constant acceleration. Here is a link to a video I made which has link to the code I used: . Note: the yellow is Ax and the red is when the motion is detected. Check the settings in the code - took me awhile to find what had to be set. Hope the code helps. If you get it working let me know. - Mike
×
×
  • Create New...