Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: ICM-20948 Motion Sensor Library for Teensy (the newer+better MPU-9250)

  1. #1
    Junior Member
    Join Date
    Dec 2018
    Posts
    17

    ICM-20948 Motion Sensor Library for Teensy (the newer+better MPU-9250)

    I've written an Arduino library for the ICM-20948 motion sensor which uses the internal DMP (digital motion processor). I've tested it using a Teensy 4.1 and it seems to work well.

    Library can be found here:
    https://github.com/ZaneL/Teensy-ICM-20948

    Nodejs app which takes the quaternion output and rotates a 3D object in real time:
    https://github.com/ZaneL/quaternion_sensor_3d_nodejs

    Video demo: https://streamable.com/ivmgfz

    Click image for larger version. 

Name:	1.png 
Views:	19 
Size:	10.9 KB 
ID:	20226Click image for larger version. 

Name:	2.png 
Views:	32 
Size:	245.7 KB 
ID:	20227

  2. #2
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    6,095
    @Zane470 - very nice indeed. I have been using the Sparkfun library for the ICM-20948. Yours seems a bit more interesting

  3. #3
    Senior Member
    Join Date
    Oct 2015
    Location
    Roma (IT, EU)
    Posts
    339
    Hello, is there a calibration routine to be performed?

    I tried to work on a project for an underground orientation instrument, but stumbled upon unreliable devices (mag + gyro + compass), even after extensive calibrations.
    I would happily try again with your promising library, but I can't find how calibration works here..?

  4. #4
    Junior Member
    Join Date
    Dec 2018
    Posts
    17
    Quote Originally Posted by XFer View Post
    Hello, is there a calibration routine to be performed?

    I tried to work on a project for an underground orientation instrument, but stumbled upon unreliable devices (mag + gyro + compass), even after extensive calibrations.
    I would happily try again with your promising library, but I can't find how calibration works here..?
    The datasheet claims that when using the DMP it does some sort of a continuous automatic calibration. After this weekend I'll look through the datasheet and code a bit more to see if that is actually running properly. I'll also look into adding a manual calibration routine.

  5. #5
    Junior Member
    Join Date
    Oct 2020
    Posts
    1
    I know this library has been made a while ago, but I would like to see the I2C portion of the code completed. What would it take to make this library work with I2C. From what I see, a new version of "idd_io_hal_read_reg" and "idd_io_hal_write_reg" would be needed. Is there anything else in the code that would need to change(apart from modifications to the object itself to accept I2C arguments)?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •