Implementing Sensor Fusion Library for ST-LSM9DS1

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Implementing Sensor Fusion Library for ST-LSM9DS1

5,824 Views
Mason_S
Contributor I

Hi all,
It's Mason and It's been a while that I'm working with IMUs and Sensor fusion libraries.
Recently I tried to implement FS sensor fusion for Arduino Nano 33 ble which has embedded LSM9DS1 IMU sensor.
I downloaded the version 7 of the library from the link below:

https://github.com/BjarneBitscrambler/OrientationSensorFusion-ESP

I reviewed all of the library files and example but I didn't get how to edit the code for my own board.
Adding a sensor with driver file is a little bit confusing.
It's I will be grateful for any help.
I will also tag some of tech experts too, hoping for faster respond.
@TomasVaverka @JozefKozon  @reyes

Kind Regards,
Mason

 

0 Kudos
2 Replies

5,767 Views
Mason_S
Contributor I

Hi @TomasVaverka ,
Thanks for responding.

That's unfortunate.
Isn't there any example for library?
Figuring out the library process is really confusing even with user guide.

I have been trying to implement the sensor data but unfortunately I'm not getting valid output, I will attach the output.

I don't know the reason but as can see in picture, the numbers are soooo float

Regards,

Mason

0 Kudos

5,795 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Mason,

As far as I know there is no porting guide available for the sensor fusion library. However, you might find useful a user guide that provides high level architecture as part of section #4 (see snapshot below). Also it provides details of various sub-systems and functions along with data structures.

Capture.JPG

You can also refer to available sensor fusion library documents (API reference manual etc.) by downloading supported sensor kits SDK from https://mcuxpresso.nxp.com. Providing below a snapshot of SDK documentation for the FRDM-K64F-AGM01 kit where you can find sensor fusion library documentation:

Capture 2.JPG

Capture 3.JPG

Best regards,

Tomas

 

0 Kudos
%3CLINGO-SUB%20id%3D%22lingo-sub-1312789%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EImplementing%20Sensor%20Fusion%20Library%20for%20ST-LSM9DS1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1312789%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20all%2C%3CBR%20%2F%3EIt's%20Mason%20and%20It's%20been%20a%20while%20that%20I'm%20working%20with%20IMUs%20and%20Sensor%20fusion%20libraries.%3CBR%20%2F%3ERecently%20I%20tried%20to%20implement%20FS%20sensor%20fusion%20for%20Arduino%20Nano%2033%20ble%20which%20has%20embedded%20LSM9DS1%20IMU%20sensor.%3CBR%20%2F%3EI%20downloaded%20the%20version%207%20of%20the%20library%20from%20the%20link%20below%3A%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FBjarneBitscrambler%2FOrientationSensorFusion-ESP%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2FBjarneBitscrambler%2FOrientationSensorFusion-ESP%3C%2FA%3E%3C%2FP%3E%3CP%3EI%20reviewed%20all%20of%20the%20library%20files%20and%20example%20but%20I%20didn't%20get%20how%20to%20edit%20the%20code%20for%20my%20own%20board.%3CBR%20%2F%3EAdding%20a%20sensor%20with%20driver%20file%20is%20a%20little%20bit%20confusing.%3CBR%20%2F%3EIt's%20I%20will%20be%20grateful%20for%20any%20help.%3CBR%20%2F%3EI%20will%20also%20tag%20some%20of%20tech%20experts%20too%2C%20hoping%20for%20faster%20respond.%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F12216%22%20target%3D%22_blank%22%3E%40TomasVaverka%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F70703%22%20target%3D%22_blank%22%3E%40JozefKozon%3C%2FA%3E%26nbsp%3B%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F35448%22%20target%3D%22_blank%22%3E%40reyes%3C%2FA%3E%3C%2FP%3E%3CP%3EKind%20Regards%2C%3CBR%20%2F%3EMason%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1312789%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EAccelerometers%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EGyroscope%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMagnetic%20Sensors%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESensorFusion%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1316200%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Implementing%20Sensor%20Fusion%20Library%20for%20ST-LSM9DS1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1316200%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F12216%22%20target%3D%22_blank%22%3E%40TomasVaverka%3C%2FA%3E%26nbsp%3B%2C%3CBR%20%2F%3EThanks%20for%20responding.%3C%2FP%3E%3CP%3EThat's%20unfortunate.%3CBR%20%2F%3EIsn't%20there%20any%20example%20for%20library%3F%3CBR%20%2F%3EFiguring%20out%20the%20library%20process%20is%20really%20confusing%20even%20with%20user%20guide.%3C%2FP%3E%3CP%3EI%20have%20been%20trying%20to%20implement%20the%20sensor%20data%20but%20unfortunately%20I'm%20not%20getting%20valid%20output%2C%20I%20will%20attach%20the%20output.%3C%2FP%3E%3CP%3EI%20don't%20know%20the%20reason%20but%20as%20can%20see%20in%20picture%2C%20the%20numbers%20are%20soooo%20float%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%3CBR%20%2F%3E%3CBR%20%2F%3ERegards%2C%3C%2FP%3E%3CP%3EMason%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1313128%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Implementing%20Sensor%20Fusion%20Library%20for%20ST-LSM9DS1%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1313128%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20Mason%2C%3C%2FP%3E%0A%3CP%3EAs%20far%20as%20I%20know%20there%20is%20no%20porting%20guide%20available%20for%20the%20sensor%20fusion%20library.%20However%2C%20you%20might%20find%20useful%20a%20%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdocs%2Fen%2Fuser-guide%2FNSFK_Prod_UG.pdf%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Euser%20guide%3C%2FA%3E%20that%20provides%20high%20level%20architecture%20as%20part%20of%20section%20%234%20(see%20snapshot%20below).%20Also%20it%20provides%20details%20of%20various%20sub-systems%20and%20functions%20along%20with%20data%20structures.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Capture.JPG%22%20style%3D%22width%3A%20800px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Capture.JPG%22%20style%3D%22width%3A%20800px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F150818i5E6EFF2FF5221AEF%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Capture.JPG%22%20alt%3D%22Capture.JPG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EYou%20can%20also%20refer%20to%20available%20sensor%20fusion%20library%20documents%20(API%20reference%20manual%20etc.)%20by%20downloading%20supported%20sensor%20kits%20SDK%20from%20%3CA%20href%3D%22https%3A%2F%2Fmcuxpresso.nxp.com%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fmcuxpresso.nxp.com%3C%2FA%3E.%20Providing%20below%20a%20snapshot%20of%20SDK%20documentation%20for%20the%20FRDM-K64F-AGM01%20kit%20where%20you%20can%20find%20sensor%20fusion%20library%20documentation%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Capture%202.JPG%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Capture%202.JPG%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F150819iC6FBEB6ECF886C95%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Capture%202.JPG%22%20alt%3D%22Capture%202.JPG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Capture%203.JPG%22%20style%3D%22width%3A%20607px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Capture%203.JPG%22%20style%3D%22width%3A%20607px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F150820i83E2F2167A736175%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Capture%203.JPG%22%20alt%3D%22Capture%203.JPG%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3ETomas%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E