Home

InvenSense MotionFit 5.1 SDK User Guide - Digi-Key

image

Contents

1. Device drivers for all supported InvenSense devices are implemented in sysfs using the input subsystem CONFIDENTIAL amp PROPRIETARY 12 of 15 Document Number AN MPU 9150IMF 03 InvenSense InvenSense MotionFit 5 1 SDK User Guide Revision 1 0 I Release 1 0 Release Date 09 18 2012 6 6 Calibration and Self test Embedded MotionApps consists of the following key calibration and self test features Calibration e Calibration for gyro bias Fast no motion lt 1 second convergence time Standard no motion 8 second convergence time SW temperature compensation e InvenSense proprietary compass calibration Standard fit Vector Small Motion using gyro Self test e Integrated MotionTracking device based self test for gyroscope in the MPU 6050 and MPU 9150 Refer to 1 for further details e Integrated MotionTracking device based self test for accelerometer in the MPU 6050 and MPU 9150 Refer to 1 for further details e Integrated MotionTracking device based self test for compass in the MPU 9150 Refer to 1 for further details e Self test is integrated into the respective device drivers Please refer to 1 for a brief description of individual calibration functions and recommended settings 6 7 Ultra Low Power Features applicable to the MPU 6050 and MPU 9150 The ultra low power features introduced in this release and listed below support fully autonomous operation completely independent from the ap
2. Now the project opens up and it is ready to compile look for the main c file to see how the example project is being integrated into eMPL ve CCS Edit eMPL wSDK test main c Code Composer Studio Edit View Navigate Project Run Scripts Window Help New Alt Shift N gt Open File Close Ctrl W Close All Ctrl Shift W Ctrl S Save All Ctrl Shift S Move Rename amp Refresh F5 Convert Line Delimiters To gt c Print Ctrl P Switch Workspace b Restart Import Export Properties Alt Enter 1 ustore_manager h eMPL wSDK test 2 msp430_i2c h eMPL wSDK test 3 ml_lite h eMPL wSDK test eMPL_include 4 eMPL states h eMPL wSDK test Exit Figure 6 9 0 Select import to import the project CONFIDENTIAL amp PROPRIETARY 14 of 15 Document Number AN MPU 9150IMF 03 2 InvenSense InvenSense MotionFit 5 1 SDK User Guide Revision 1 0 ra Palace LO Release Date 09 18 2012 f ve Import l Select Imports existing CCS CCE Eclipse projects into workspace a Select an import source type filter text General E C C 4 amp Code Composer Studio E Existing CCS CCE Eclipse Projects ap Legacy CCSv3 3 Projects I Managed Build Macros amp Git amp Install amp Run Debug Team Bac Next gt Finish Cancel Figure 6 9 1 Open the existing project and put it in the project 6 10 Review of the Main
3. application CONFIDENTIAL amp PROPRIETARY 8 of 15 Document Number AN MPU 9150IMF 03 J InvenSense InvenSense MotionFit 5 1 SDK User Guide Revision 1 0 ra Palace LO Release Date 09 18 2012 Run the application by double clicking on the shortcut A 3D teapot will be displayed on another window as shown in Figure 5 2 1 Notice the orientation of the teapot changes in accordance to the Embedded MotionApps Platform sensor fusion output When the application is launched you will notice the pointer and teapot drift continuously This is because the sensors are not calibrated Place the platform on a stable surface and do not move it until you see the drift stop A console window will be launched upon starting the teapot application Close the console window to exit the application Figure 5 2 1 Teapot Application Please note that prior to moving the SDK you will need to wait for the BLUE LED to turn off As soon as you start moving the SDK the BLUE LED will turn on to indicate recognition of a motion event It is recommended to wait for at least one no motion event before you start using the SDK since a no motion event will remove the GYRO drift The RED LED on the board indicates the data transfer to the PC Debug Console App Optional demo to run if needed eMPL client py A debugging console application is provided to aid developers using the MotionFit SDK This application is provided as Python source code It has the fo
4. work APPS trunk gaming apps TeaPot_SIO Release Sel Ax Back QJ wi ES Search Key Folders in Address Q C work APPS trunk gaming apps TeaPot_SIO Release v Go Name Size Type Date Modified File and Folder Tasks 2 Cd BuildLog htm 9KB Chrome HTML Docu 4 13 2011 1 45 PM E Rename this file H main obj 422 KB Object File 4 13 2011 1 45 PM 2 2 miDataLog obj 33KB Object File 4 13 2011 1 45 PM Gy Move this file 2 miMouse obj 41KB Object File 4 13 2011 1 45 PM IN Copy this file mt dep 1KB DEP File 4 13 2011 1 45 PM d Publish Ug file Lu Um Web B i ut lu Lear E 0 2011 3 24 PM Shortcut to TeaPot exe Properties K Colors Compatibility Security General Shortcut Options Font Layout LI Shortcut to TeaPot exe Target type CH E mail this file 2 sio 0bj XK Delete this file Cresto eg Ei Teabot ep E TeaPot exg Ai TeaPot pdb vc80 idb vc80 pdb Other Places M Details Application Shortcut to TeaPot exe Shortcut Date Modified Today April 20 2011 3 24 PM Size 932 bytes Target location Release ningsapps T eaPot SIO Release T eaPot exe 15 Target Start in C work4PPS trunk gamingapps T eaPot_SIO Shortcut key None Run Normal window Tormment Figure 5 2 0 Adding COM port number to the shortcut of the
5. 4 MotionFit SDK 4 1 Supported Hardware MotionFit Board DIP Switch MPU 9150 ON OFF Serial Flash z Ors Soe l A u BMP085 Ms eg N Pressure Sensor Micro USB Deiene eas ias e 3 CNN i ae RK D Gi He i Bluetooth MSP430 Programming Module B Board Y Board Z is out of plane Figure 4 1 0 MPU 9150 MotionFit Board Please refer to the MPU 9150 MotionFit Reference Board User Guide for details on each of these sensors and hardware schematics CONFIDENTIAL amp PROPRIETARY 5 of 15 Document Number AN MPU 9150IMF 03 InvenSense InvenSense MotionFit 5 1 SDK User Guide Revision 1 0 e Release 1 0 Release Date 09 18 2012 4 2 Supported Software Firmware eMPL 5 1 1 The MotionFit board comes with preloaded firmware which outputs quaternion via a Bluetooth link The code is implemented using Code Composer Studio from TI The link below provides the documentation for Code Composer http processors wiki ti com index php Category Code Composer Studio v5 2 The default software settings for eMPL can be changed according to the MotionFit SDK v5 1 API Specification document Please check the main c file in the application release package Feature Settings Quaternion Update Rate Quaternion Resolution 32 Bits Quaternion Range Full 360 Application Test Software 1 Teapot demo using visual studio 1 The Teapot demo software is included in the package which is a PC based appl
6. Computer select Properties then in the advanced tab select Environment Variables In the user variables top section select Path click Edit and add the directory C Python25 to the end of the list 6 Once you have a working Python environment you can run the debug console application from the command line with the command To accept data one has to give the python location of the python cube relative to the release folder as below 7 MotionFit_With_eMPL511_Release zip MotionFit_With_eMPL511_Release core eMPL hal eMPL Client 8 python eMPL client py lt comport gt Where lt comport gt is the COM as described in figure 5 1 1 P Ceuammr window Figure 5 2 2 Cube Demo Application running on console 6 Programming the SDK 6 1 The MotionFit SDK comes pre flashed with software needed to generate calibrated quaternion The remainder of this section is needed only if the user would need to modify the embedded firmware 6 2 Hardware Needed for Programming Using JTAG e MotionFit SDK http www invensense com developers CONFIDENTIAL amp PROPRIETARY 10 of 15 Document Number AN MPU 9150IMF 03 InvenSense InvenSense MotionFit 5 1 SDK User Guide Revision 1 0 BS Release 1 0 Release Date 09 18 2012 DIP Switch MPU 9150 OFF Serial Flash BMP085 Micro USB Pressure Sensor CNN nor wo aa e ei N Sie A l SWS HIMCHON i gt 9 uf H u H pt N ee vd of er rei MSP430 Programming Module
7. Driver for MX25L25635E For information on the serial flash please refer to MX25L25635E LLD v0 3 zip on the Macronix website 6 4 How to use Embedded MotionApps 5 1 Features and Integrate with an Application The MotionFit package comes with an example application that instantiates MotionFit v5 1 API calls to transmit sensor fusion data via serial UART The next sections cover details about the Embedded MotionApps architecture and example application code 6 5 Embedded MotionApps Platform Overview Embedded MotionApps 5 1 has been designed with a new architecture as explained below The new architecture provides customers with a much more modular MotionTracking solution that consumes much less application processor resources improving the overall power consumption There are three basic components in this architecture e Embedded Hardware Abstraction Layer HAL a This is the central point of communication between eMPL device drivers and the applications b HAL provides function calls to initialize enable start stop and control all features in eMPL Please refer to 1 for further details e Embedded MotionProcessing Library eMPL a MPL provides a plug in framework for single function features e g gyro bias calibration 9 axis MotionFusion etc b eMPL provides a well defined flow to register unregister initialization start stop and generate features Please refer to 1 for further details e Kernel driver a
8. OSER DGTUDIO tn 13 6 10 REVIEW OF THE MAIN C FILE TO BUILD A SAMPLE APPLICATION WITH EMBEDDED MOTIONAPPS 5 1 15 CONFIDENTIAL amp PROPRIETARY 2 of 15 Document Number AN MPU 9150IMF 03 InvenSense InvenSense MotionFit 5 1 SDK User Guide Revision 1 0 A Release 1 0 Release Date 09 18 2012 1 Purpose and Scope This document describes the InvenSense MotionFit 5 1 SDK User Guide It is intended as a guide for the user to run the MotionFit SDK with the PC application 2 Revision History 09 18 2012 InvenSense MotionFit 5 1 SDK User Guide CONFIDENTIAL amp PROPRIETARY 3 of 15 Document Number AN MPU 9150IMF 03 InvenSense InvenSense MotionFit 5 1 SDK User Guide Revision 1 0 ef Release 1 0 Release Date 09 18 2012 3 Reference Documents and Software Packages MotionFit SDK v5 1 APIs Specification 2 MPU 9150 MotionFit Reference Board User Guide This document covers the board components hardware schematics and other features 3 MotionFit with eMPL 5 1 release package This is the firmware which is running Embedded MotionApps 5 1 4 Teapot application software package This is the application program running on the PC which can be used to run the MotionFit SDK demonstration CONFIDENTIAL amp PROPRIETARY 4 of 15 Document Number AN MPU 9150IMF 03 2 InvenSense InvenSense MotionFit 5 1 SDK User Guide Revision 1 0 A Release i0 Release Date 09 18 2012
9. c File to Build a Sample Application with Embedded MotionApps 5 1 The file is self explanatory in terms of inline documentation and therefore we will go through the important steps only This example application program is designed to continuously transfer quaternion data at 50Hz update rate The value of the quaternion is transmitted to the UART port and then transferred via Bluetooth module The previous section shows how to use the program with PC applications e msp430_clock_init 12000000L 2 msp430_i2c_enable msp430_int_enable msp430_uart_init is needed to setup the system layer functions This will enable the I2C clocks and UART functionality in the project e tis very important to initialize using inv_init_mpl It should be called first and once e Starting eMPL using inv_start_mpl will enable eMPL Here are the major default values which are initialized There are other defaults sets as well o 50 Hz fifo output rate This is the default and can be changed o Range for accelerometer can be set using gyro_set_accel_fsr o Gyro range can be set using gyro_set_gyro_fsr e Inthis example application the MCU continuously transmits the data and is set in a while loop Based on the application one can change the use case of the application e inv_execute_on_data will process the data it has received and update all the internal states and features that have been turned on This function should be called after at least one
10. d InvenSense Inc Document Number AN MPU 9150IMF 03 InvenSense 1197 Borregas Ave Sunnyvale CA 94089 U S A Revision 1 0 Website www invensense com InvenSense MotionFit 5 1 SDK User Guide Release 1 0 A printed copy of this document is NOT UNDER REVISION CONTROL unless it is dated and stamped in red ink as REVISION CONTROLLED COPY This information furnished by InvenSense is believed to be accurate and reliable However no responsibility is assumed by InvenSense for its use or for any infringements or patents or other rights of third parties that may result from its use Specifications are subject to change without notice Certain intellectual property owned by InvenSense and described in this document is patent protected No license is granted by Implication or otherwise under any patent or patent rights of InvenSense This is an unpublished work protected under the United States copyright laws This work contains proprietary and confidential information of InvenSense Inc Use disclosure or reproduction without the express written authorization of InvenSense Inc is prohibited Trademarks that are registered trademarks are the property of their respective companies This publication supersedes and replaces all information previously supplied InvenSense sensors should not be used or sold for the development storing production and utilization of any conventional or mass destructive weapons or any other weapons or lif
11. e threatening applications as well as to be used in any other life critical applications such as medical transportation aerospace nuclear undersea power disaster and crime prevention equipment Copyright 2011 InvenSense Corporation CONFIDENTIAL amp PROPRIETARY Document Number AN MPU 9150IMF 03 InvenSense InvenSense MotionFit 5 1 SDK User Guide Revision 1 0 I Palace LO Release Date 09 18 2012 Table of Contents t PURFOSEAND SCOPE EE 3 2 REVISION HISTORY E 3 3 REFERENCE DOCUMENTS AND SOFTWARE PACKAGEG cccsscecesseecenseecenseecensescensesenseesenneesens 4 OTN RR KEE 5 4 1 SUPPORTED HARDWARE E 5 4 2 eler Ee 6 5 HARDWARE AND SOFTWARE SETUP 0 cee ececeeeeseceeeeeeneeeeneeeeneeceseeeaseseaseneaseceaseoasssenseseassonsesenseneaes 7 5 1 HARDWARE SETUP tee 7 5 2 SOFTWARE SETUP TO RUN THE DEMO APPUICATION 8 6 PROGRAMMING THE RE 10 6 1 MODIFYING THE FIRMWARE E 10 6 2 HARDWARE NEEDED FOR PROGRAMMING USING TA 10 6 3 SOFTWARE COMPONENTS NEEDED TO PROGRAM THE SDK naannnnnnnnnnnnnsnnnnnnssnnrreosnnrrresenrrresenrrrresnnne 11 6 4 How TO USE EMBEDDED MOTIONAPPS 5 1 FEATURES AND INTEGRATE WITH AN APPUCATION 12 6 5 EMBEDDED MOTIONAPPS PLATFORM OVERVIEW ccccssccecccsseeccseseeeccauseecseseeessagseecesuseeessageeessaeees 12 6 6 CALIBRATION NID WEE 13 6 7 ULTRA LOW POWER FEATURES APPLICABLE TO THE MPU 6050 AND MP OO 13 6 8 COMPILATON EY El 13 6 9 STEPS TO BRING UP THE PROJECT IN CODE COMP
12. ication that rotates the teapot based on the MotionFit SDK The mounting matrix for the device assumes the direction as in the figure 4 1 0 The board connects to the PC based on the Bluetooth link Teapot demo software is provided with source as well Application Test Software 2 debug console app with cube demo using python 2 The cube demo is written in python script and needs python installed on the computer This cube demo lets users do more than just observe the orientation For a complete set of functionality please look at the python eMPL client py script CONFIDENTIAL amp PROPRIETARY 6 of 15 Document Number AN MPU 9150IMF 03 Revision 1 0 Release Date 09 18 2012 InvenSense MotionFit 5 1 SDK User Guide Release 1 0 I InvenSense ST 5 Hardware and Software Setup 5 1 Hardware Setup Charge the unit via USB connector for about 2 hours Turn on the SDK using the DIP switch on the board Check the figure 4 1 0 for the ON and OFF positions of the switch 1 Configure the Bluetooth interface on the PC Go to control Panel All Control Panel ltems Devices and Printers then choose Add a device and choose blue BlueRadios device figure 4 1 0 2 Ifthe computer asks for the password enter 0000 Zeros in numerical The PC will add the required driver to successfully add the device to the PC Go to the Control Panel All Control Panel Items Devices and Printers to properties and check the port numbe
13. l MCU Board X Board Y Board Z is out of plane Figure 6 0 MotionFit SDK hardware e MSP FET430UIF flash tool http Awww ti com tool msp fet430uif IA TEXAS INSTRUMENTS MSP430 Figure 6 1 Flash tool required for programming 6 3 Software Components Needed to Program the SDK Loading Software on MCU CONFIDENTIAL amp PROPRIETARY 11 of 15 Document Number AN MPU 9150IMF 03 d InvenSense InvenSense MotionFit 5 1 SDK User Guide Revision 1 0 I Palace LO Release Date 09 18 2012 Option 1 PC Program to load the software that loads firmware on the MCU Please install the software http www ti com tool flash programmer on your PC For questions on installation or usage of this program please contact TI Option 2 Code Composer Studio The Code Composer Studio from TI can be used for application development on the SDK Information on CCS can be obtained from htip www ti com tool ccstudio or http processors wiki ti com index php Download CCS MotionFit SDK Software To integrate Embedded MotionApps 5 1 you will need to locate the eMPL_ Hex file which is included in the eMPL package Refer to the MotionFit SDK v5 1 API Specification for supported API calls needed to build your application Pressure Sensor Driver for BMA085 For extracting pressure sensor data please locate drivers on the Bosch website http www bosch sensortec com content language1 html 3477 htm Macronix Serial Flash
14. llowing functionality 1 Provides a console for MPL_LOG messages 2 Provides a simple cube demo for visualizing sensor fusion output This cube demo provides identical functionality to the Teapot application from within the debug console Because the debug console is provided as Python source code the user will need to install the following components to have a working Python environment 1 Python 2 5 4 The debug console was tested with Python 2 5 4 on Windows XP and Windows 7 Download the Windows Installer python 2 5 4 msi from http www python org download releases 2 5 4 CONFIDENTIAL amp PROPRIETARY 9 of 15 Document Number AN MPU 9150IMF 03 3 InvenSense InvenSense MotionFit 5 1 SDK User Guide Revision 1 0 Be Release 1 0 Release Date 09 18 2012 2 Pyserial 2 5 The debug console requires pyserial to communicate on the serial port Download the Python 2 x Windows Installer pyserial 2 5 win32 exe from http pypi python org pypi pyserial 3 Pygame 1 9 1 The debug console uses the pygame library to render the cube demo Download the Windows Python 2 5 release pygame 1 9 1release win32 py2 5 exe from http www pygame org download shiml 4 You must install Python before installing the pyserial and pygame libraries After installing python use the command prompt to install pyserial python install pyserial py 5 You will want to add Python to your PATH for convenience In Windows right click on My
15. of inv_build_gyro inv_build_accel or inv_build_compass has been called eMPL_send_quat data this function packages the quaternion and sends it out using the UART module at 115200 baud rate CONFIDENTIAL amp PROPRIETARY 15 of 15
16. plication processor e DMP based pedometer e DMP based gestures Directional Tap Orientation including Flip Screen Orientation e Low Power Quaternion e Low Power 6 Axis Sensor Fusion In general please refer to 1 on the description usage and integration of each of the above features 6 8 Compilation Setup The Embedded MotionApps Platform requires Code Composer Studio v4 0 or later and the default chip selected is MSP430F5528 which is the one on the SDK hardware 6 9 Steps to Bring Up the Project in Code Composer Studio e Download and install the Code Composer Studio from the TI website http www ti com tool ccstudio Please note that TI offers a free version of CCS which has restrictions on code size that makes it unusable with the MotionFit SDK hence you would need the CONFIDENTIAL amp PROPRIETARY 13 of 15 J InvenSense InvenSense MotionFit 5 1 SDK User Guide Document Number AN MPU 9150IMF 03 Revision 1 0 Release Date 09 18 2012 Release 1 0 full featured version TI offers a trial version of the software which can be used for configuring your MotionFit application e Download the release package from the Developers Corner and unzip or 7zip the folder to extract the Embedded MotionApps eMPL 5 1 software e Open the Code Composer go to File gt Imports as in figure below e Open Existing CCS CCE Eclipse Projects e Browse the folder where the eMPL is located and open the project e
17. r of the Bluetooth serial port figure 5 1 1 In this example the port number is 66 but we will call it just COM from now on After successfully pairing power cycle the MotionFit SDK once by flipping the DIP switch OFF and ON as in figure 4 1 0 f xi 2 D Add a device F Add a device 7 GJ BR Select a device to add to this computer Enter the pairing code for the device Windows will continue to look for new devices and display them here This will verify that you are connecting to the correct device __ ArchBack TOSHIBA e STUDIO355 07290774 0000 ay ga UPnP Web Services The code is either displayed on your device or in the information that n Network storage device a Printer came with the device D NDIBRA 7 A InvenSense_BT011 BlueRadios Bluetooth a Bluetooth Wee Desktop computer lt Bluetooth headset B ss Q BlueRadios A InvenSense_BT003 al Bluetooth a Bluetooth lt Bluetooth headset lt Bluetooth headset i MAYAT XP D 3DUI LAB TEST1 swEtoo stuEetoot z l Configuring device What if Windows doesn t find my device What if I can t find the device pairing code Next Cancel Next adp e GES u Add a device This device has been successfully added to this computer Windows is now checking for drivers and will install them if necessary You may need to wait for this to finish before your device is ready to use To verify if thi
18. s device finished installing properly look for it in Devices and Printers BlueRadios Figure 5 1 0 Adding BlueRadios to the PC Steps 1 2 3 CONFIDENTIAL amp PROPRIETARY 7 of 15 Document Number AN MPU 9150IMF 03 2 InvenSense InvenSense MotionFit 5 1 SDK User Guide Revision 1 0 Le Release 1 0 Release Date 09 18 2012 LA BlueRadios Properties Cd gt b Conte Bue amp di Coen Bee breet eE uA Seier Geesen i P This Bluetooth device offers the following services To use a service select the check box Bluetooth Services Serial port SPP COM COMGE Figure 5 1 1 Right click the added device to go to properties and check the port number Step 4 5 2 Software Setup to Run the Demo Application Teapot Application In order to demonstrate the Embedded MotionApps Platform a Teapot application has been provided Download the file named MotionFit Wireless SDK under the software download section in the Developers Corner http www invensense com developers index php r downloads This application was developed using Microsoft Visual Studio and the entire solution is included in the release package You will find the Teapot Application executable in the release folder You have to create a shortcut to the executable right click on the shortcut select properties and add the COM in the target field Com is represented by 15 in the example shown in Figure 5 2 0 f C

Download Pdf Manuals

image

Related Search

Related Contents

Datamax O'Neil OPT78-2738-01    Cables Direct Cat5e UTP 1m  TEFAL RK203E27 Instruction Manual  Samsung XQB30-B85Q 用户手册  HP Blue 2242 SPS  te329-sp (honey)  Modell-Nr. WV-SF448/WV-SF448E - Psn  本製品は水道班を使用して水の電気分解の実験を 行う器具です。 水腫  Applica DF71 Fan User Manual  

Copyright © All rights reserved.
Failed to retrieve file