Hello
I’ve been using the MAG3110 as a compass in a product of mine for some time now but am looking at incorporating tilt compensation and so I’ve decided to evaluate the FXOS8700CQ to exploit its accelerometer data for this purpose.
I went ahead and purchased the FRDM-KL26Z board which includes a FXOS8700CQ after being linked to Sensor Fusion Toolbox software and a ZIP of some software samples I assumed would make evaluation quick and painless, however it appears that none of the provided source code samples nor the toolbox software actually utilize the on-board device at all (other than as an accelerometer) but instead require some costly expansion card with the exact same part to do so!
Is there anything at all already written for this board to make use of the on-board FXOS8700CQ as a tilt compensated compass that can perhaps link with the toolbox for quick and easy visualization?
m
Solved! Go to Solution.
I found the problem. One more step to the above is to comment-out other unused devices in build.h:
//#define USE_MPL3115
#define USE_FXOS8700
//#define USE_FXAS21000
//#define USE_FXAS21002
//#define USE_MMA8652
//#define USE_MAG3110
Now the LED flashes green and the toolbox software is working :smileyhappy:
Mikael,
Good question. This is an easy adjustment to make when using the Sensor Fusion Toolbox. The kit uses Processor Expert generated Logical Device Drivers to represent the hardware components. The user manual for the KL26Z shows that the FXOS8700CQ is connected to the I2C0 port at PTE25:24 and has address 0x1D.
That should be all it takes to compile the 6-axis eCompass. The generated application will still be usable with both Windows and Android versions of the Sensor Fusion Toolbox. Just don't select any of the algorithms that you did not include in the build.
Regards,
Mike
Mike,
Thanks for the quick response!
I've done exactly the above using the FRDM-KL26Z code imported from the Kinetis Sensor Fusion Lib and all seems to have gone well (it compiles and appears to be running), however I'm still unable to connect via the Windows application.
If I click Auto Detect I get the error "Cannot open a port to the sensor board." despite selecting correct port and "Tilt Compensated Compass".
I don't see any activity when scoping SDA and SCL but I figure the GUI front end must be linked before anything wakes up?
The only other thing I've had to change was the MQXLITE version from 1.1.1 to 1.1.0 under the PE Component Inspector but this never brought up any warnings or errors. Codewarrior crashes when updating so I can't do much about this just now.
I assume it is OK to ignore the warning about SCL frequency being >100kHz (setting is 375kHz, below the 400kHz stated in datasheet)?
Regards
Mikael
I found the problem. One more step to the above is to comment-out other unused devices in build.h:
//#define USE_MPL3115
#define USE_FXOS8700
//#define USE_FXAS21000
//#define USE_FXAS21002
//#define USE_MMA8652
//#define USE_MAG3110
Now the LED flashes green and the toolbox software is working :smileyhappy:
FANTASTIC! And thanks for posting the additional step I omitted.