Calibrating ASD2612 9 Axis IMU

andy1989

  • Newbie
  • *
    • Posts: 4
    • View Profile
Hello,

I am trying to run some calibration routines on my ASD2612 9 axis IMU as I understand this needs to be done to get reliable results.  I have got the supplied Arduino code to work and display readings but when I compile/run the linux calibration routines (which are supplied as part of the RTIMULIB2 library, I cannot get them the recognise the IMU. 

The program I am running is RTIMULibCal which generates a .ini file on first  run.   The messages I get on first run are as follows

Settings file not found.  Using defaults and creating settings file.
Failed to open I2C bus 1
Failed to open SPI bus 0, select 0
Failed to open SPI bus 0, select 1
No IMU detected
Using fusion algorithm RTQF
No IMU found

If I then change the IMUType within the Settings file to IMUType=2 (Invensense MPU9150)  it seem to jump into the program but with a message saying 'Failed to open I2C bus 1'.  If I then select one of the option to calibrate I get the follow message repeated over and over :

'Failed to open I2C bus 1
'Failed to open I2C port - Failed to read fifo count'

So basically my question is are there any settings I can maybe use to successfully connect to the IMU?  I don't want to just experiment through fear of doig some damage  :'(   I have attached the RTIMULib.ini file so you can see which settings can be changed. 

Many Thanks,

Andy.
 


lennevia

  • Administrator
  • Sr. Member
  • *****
    • Posts: 87
    • View Profile
Hey there Andy,

I am not sure what setup you have for using the 9-Axis with Linux, but you may want to check the library on GitHub to see if it is supported: https://github.com/RPi-Distro/RTIMULib

If there's any more information you have, I can try my best to help!

Best,

Réna


andy1989

  • Newbie
  • *
    • Posts: 4
    • View Profile
Hello Réna

Many Thanks for your reply.  I downloaded the library in your link and followed the instructions in this link: https://www.raspberrypi.org/forums/viewtopic.php?t=197281  to compile the code.  I found I had to also do this :

sudo apt-get --reinstall install libqt4-opengl-dev 

to get a clean build.   The examples given (RTIMULibDemo & RTIMULibDemoGL) are GUI versions of  RTIMULibCal which I was running before and are an easier way of changing the options.  However, I am still getting the same messages with regard detecting the IMU.   It says it should support the MPU9150 (which I believe the ASD2612 contains) but just does not want to seem to recognise it.    It would appear that the problem is  related to the I2C but do not know enough about this to be sure.  Any help you could provide would be most appreciated.   Please let me know if you need any further info.

Many Thanks,

Andy.


andy1989

  • Newbie
  • *
    • Posts: 4
    • View Profile
Hello Réna,

I think I have solved the problem.  I found this link - https://github.com/jordandcarter/RTIMULib-Arduino which explains that a sketch called RTArduLinkIMU needs to be installed on the Arduino/TinyDuino.  The program that then needs to be built/run is not in the Linux folder but in the RTHost folder  and can be either RTHostIMU or RTHostIMUGL.  These programs ask for a COM port to be selected which, as soon as I selected the correct one, started reading and displaying data from the IMU ;D.  It is also worth noting that the aforementioned sketch should NOT be running in the Arduino Serial monitor at the same time.  It is also worth noting that there is another calibration program called ArduinoMagCal which, rather than storing the calibration data in a .ini file, actually stores it  within EEPROM on the device itself  which may prove to be more useful. 

Hope this info may help others.

Regards,

Andy. 


lennevia

  • Administrator
  • Sr. Member
  • *****
    • Posts: 87
    • View Profile
Hello Andy,

Thanks for sharing your findings!

Hope it helps others.

Thank you!

Laveréna


 

SMF spam blocked by CleanTalk