Home

AN038 Getting Started with the KXTJ2

image

Contents

1. AN 038 Kionix Getting Started with the KXTJ2 Introduction This application note will help developers quickly implement proof of concept designs using the KXTJ2 tri axis accelerometer Please refer to the KXTJ2 data sheet for additional implementation guidelines While Kionix strives to ensure that our accelerometers will meet design expectations by default it has ever so closed the gap by allowing users to autonomously analyze sensor outputs KXTJ2 is an extension of the KXTJ9 product to a 2 x 2 mm 12 pin The KXTJ2 is significantly lower in current than our previous offerings The KXTJ2 provides an I2C bus interface and small 2x2 footprint with 12 pads compatible with Bosch 222 250 series products The KXTJ2 also provides a low power motion wake up feature which is demonstrated in this application note Circuit Schematic This section shows recommended wiring for the KXTJ2 based on proven operation of the part Specific applications may require modifications from these recommendations Please refer to the KXTJ2 Data Sheet for all pin descriptions V DDIO O V o DD 3 Pads nct vebke 8 Figure 1 KXTJ2 Application Schematic 36 Thornwood Dr Ithaca NY 14850 Kionix 2012 tel 607 257 1080 fax 607 257 1146 Rev 1 0 www kionix com info kionix com March 2012 Page 1 of 12 AN 038 Quick Start Implementation Here we present two basic ways to initialize the part and explore the Wake Up motion det
2. REG2 to define the direction of detected motion for all positive and negative directions x positive x x negative x y positive y y negative y z positive z z negative z directions Address Value 99 Binary INT CTRL REG2 0 1 0001 1111 Ox7F 0111 1111 d Kionix 2012 EDO Rev 1 0 Kionix March 2012 Page 7 of 12 Kionix AN 038 Write 0x05 to Interrupt Wake Up Timer WAKEUP TIMER to set the time motion must be present before a wake up interrupt is set to 0 1 second The following formula is used WAKEUP TIMER counts Desired Delay Time sec x OWUF Hz WAKEUP_TIMER counts 0 1 x 50 5 counts Since the desired delay time is 0 1 second and the OWUF was previously set to 50 Hz then the Wake Up Timer is 5 counts 0000 0101 Address disc pn Binary WAKEUP TIMER 0x29 0010 1001 0000 0101 Write 0x18 to Interrupt Wake Up Threshold WAKEUP THRESHOLD to set the level to 0 5g The following formula is used WAKEUP THREHOLD counts Desired Threshold x 16 counts g WAKEUP THREHOLD counts 0 5 x 16 8 counts Note that this threshold is differential with respect to the previous reading Register Name Address Binary WAKEUP_THRESHOLD 0110 1010 0x08 0000 1000 Write 0x30 to Interrupt Control Register INT_CTRL_REG1 to output the physical interrupt of the previously def
3. CTRL REG 0001 1011 0000 0000 Write 0x60 to Control Register 1 CTRL_REG1 to keep the accelerometer in stand by mode to set the performance mode of the KXTJ2 to high current 12 bit resolution since we are setting the G range to 2g Note 14 bit resolution is only available when the G range is 8g Also enable the availability of new data as an interrupt Register Name Address Binary 0001 1011 0110 0000 CTRL_REG1 Write 0x38 to Interrupt Control Register INT_CTRL_REG1 to enable physical interrupt pin 5 to set the polarity of the physical interrupt to active high and to transmit interrupt pulses with a period of 0 03 ms to 0 05 ms in pin 5 Address 90 TITIO Binary INT REG1 Ox1E 0001 1110 0011 1000 Write 0x02 to Data Control Register DATA to set the Output Data Rate ODR of the accelerometer to 50 Hz Note This is the default value Output Data Rates gt 400Hz will force device into Full Power mode PC1 1 RES 1 Address DATA CTRL REG 0010 0001 0x02 0000 0010 Write OxEO to Control Register 1 CTRL_REG1 to set the accelerometer into operating mode PC1 1 Address Binary CTRL REG 0001 1011 OXEO 1110 0000 2012 Rev 1 0 March 2012 Page 6 of 12 AN 038 Ac
4. 00 0010 Write OxCO to Control Register 1 CTRL REG to set the accelerometer into operating mode PC1 1 Address CTRL REG 0001 1011 OxCO 1100 0000 d Kionix 2012 er Rev 1 0 2012 Page 2 of 12 038 eee eee Acceleration data can now be read from the XOUT L XOUT H YOUT L YOUT H ZOUT and ZOUT registers in 2 s complement format as shown in the next tables depending on the performance mode resolution selected before For example to read a 12 bit value XOUTD11 to XOUTDO then XOUTD11 to XOUTDA bit positions are located in XOUT H register and the remaining 4 bits XOUTD3 to XOUTDO are located in the upper nibble of the XOUT L The previous statement also applies to the Y and Z axis XOUT L X axis accelerometer AS least byte XOUTD5 XOUTD4 XOUTD3 E EM XOUTDO KAKI wje fe e e e ee I2C Address OxO6h XO UT_H DON T CARE X axis accelerometer most significant byte XOUTD13 XOUTD12 XOUTD11 XOUTD10 XOUTD9 XOUTD8 XOUTD7 XOUTD6 XOUTD11 XOUTD10 XOUTD9 XOUTD8 XOUTD XOUTDE XOUTD5 XOUTD4 XOUTD7 XOUTD6 XOUTD5 XOUTD4 XOUTD1 XOUTDO iw poe pe 12 Address OxO7h d 2012 ae Rev 1 0 Kionix March 2012 Page 3 of 12 038 YOUT L Y axis accelero
5. a brief description of the applications and utilities supported by the development kit SensorScope This application allows the user to monitor data coming from the attached sensor This data can be saved to a file or viewed in real time With only two verification steps the application will display a series of graphs representing acceleration with respect to time for each axis This data can be used to measure the noise of the accelerometer by using the following steps Place the evaluation board on a flat surface in the desired orientation To change the application settings select Settings from the Edit menu On this menu the following settings can be changed Sampling Rate The rate at which the software queries the accelerometer for axis data Realtime Interval The amount of data the software will buffer and display in real time Select the capture button The application will begin to capture data immediately Captured data is written to a file and will not be viewable until after the capture has finished The status bar is used to notify the user of a capture in progress The application will continue to collect data until the user clicks the Stop button or the resulting capture file has exceeded the file size limits 1Gigabyte We recommend collecting the data for at least 120 seconds Captured data will be saved as a list of comma separated values csv Each entry in the list is comprised of a time followed b
6. at developers should keep in mind when working with the KXTJ2 2 Clock The 2 Clock can support Fast Mode up to 400 KHz and High Speed mode up to 3 4 MHz Power Up to Communication After the part is powered up it takes 10ms before it is ready for 1 C communication Enable to Valid Outputs After the part is enabled PC1 bit in Control Register 1 is asserted it takes from 2 1 ms to 80 ms depending on the ODR before the acceleration outputs are valid See KXTJ2 Product Specification for details Software Reset Power On Reset Delay After a Software or Power On Reset the part takes 10ms before it is ready for 2 communication Troubleshooting All Interrupt Issues Make sure the KXTJ2 is configured to issue interrupt signals in the way that your GPIO is programmed to handle them An oscilloscope on the physical interrupt pin can be a valuable tool to confirm physical interrupt operation d 2012 E Rev 1 0 2012 Page 10 of 12 038 Accelerometer USB Development Kit Kionix offers an Accelerometer USB Development Kit that can be used to quickly begin the development of applications and firmware that incorporate Kionix accelerometers including the KXTJ2 The Development Kit provides a common interface to Kionix evaluation boards For additional information regarding the development kit please refer to Kionix Application Firmware Development Kit user manual Here is
7. celeration data can now be read from the XOUT L XOUT H YOUT L YOUT H ZOUT and ZOUT registers in 25 complement format as shown in the tables shown previously depending on the performance mode resolution selected before For example to read a 12 bit value XOUTD11 to XOUTDO then XOUTD11 to XOUTD4 bit positions are located in XOUT H register and the remaining 4 bits XOUTD3 to XOUTDO are located in the upper nibble of the XOUT L The previous statement also applies to the Y and Z axis 3 Wake Up Function via latched physical hardware interrupt Write 0x00 to Control Register 1 CTRL_REG1 for the purpose to initialize accelerometer in stand by mode PC1 0 Register Name Address Binary CTRL_REG1 0001 1011 0000 0000 Write 0x42 to Control Register 1 CTRL_REG1 to keep the accelerometer in stand by mode to set the performance mode of the KXTJ2 to high current 12 bit resolution since we are setting the G range to 2g Note 14 bit resolution is only available when the G range is 8g Also enable the Wake Up motion detect function Address Binary CTRL REG 0001 1011 0100 0010 Write 0x06 to Control Register 2 CTRL_REG2 to set the Output Data Rate of the Wake Up function motion detection OWUF to 50 Hz Address ii d Binary CTRL REG2 0001 1101 0000 0110 Write Ox7F to Interrupt Control Register 2 INT
8. ect functionality These can vary based on desired operation but generally the initial operations a developer wants to do are 1 Asynchronous read back acceleration data 2 Synchronous hardware interrupt read back acceleration data 3 Wake Up function via latched physical hardware interrupt There are other ways that the interrupt sources can be read via status registers software interrupt in the device that can be used to check if the interrupt event has occurred and these are not explored here 1 Asynchronous Read Back Acceleration Data Setting G Range and Write 0x00 to Control Register 1 CTRL REG to initialize accelerometer in stand by mode PC1 0 Register Name Addresa i Binary CTRL REG 0001 1011 0000 0000 Write 0x40 to Control Register 1 CTRL_REG1 to keep the accelerometer in stand by mode to set the performance mode of the KXTJ2 to high current 12 bit resolution since we are setting the G range to 2g Note 14 bit resolution is only available when the G range is 8g Register Name Addresa CTRL REG 0001 1011 0100 0000 Write 0x02 to Data Control Register DATA CTRL REG to set the Output Data Rate ODR of the accelerometer to 50 Hz Note This is the default value Output Data Rates gt 400Hz will force device into Full Power mode PC1 1 RES 1 Address Binary DATA CTRL REG 0010 0001 0x02 00
9. ined Wake Up detect function This value will create an active high and latched interrupt Register Name Address Binary INT_CTRL_REG1 0001 1110 0x30 0011 0000 Kionix 2012 Rev 1 0 March 2012 Page 8 of 12 Kionix AN 038 Write OxC2 to Control Register 1 REG1 to set the accelerometer in operating mode with the previously defined settings Address uc nO Binary CTRL REG 0001 1011 1100 0010 Move the KXTJ2 and monitor the physical interrupt INT pin 5 of the accelerometer if the acceleration input profile satisfies the criteria previously established for the 0 5g motion detect threshold level in both positive and negative directions of the X Y Z axis for more than 0 1 second then there should be positive latched interrupt present Read Interrupt Release INT REL register to unlatch clear the output interrupt created by the motion detection function Address Hog INT REL Ox1A 0001 1100 Monitor the physical interrupt INT pin 5 of the accelerometer the positive latched interrupt should not be present Repeat the last two steps of moving the accelerometer and clearing the interrupt as needed to test this motion detect functionality based on the previous settings 2012 Rev 1 0 March 2012 Page 9 of 12 038 Timing Requirements There are several timing requirements th
10. meter output least significant byte YOUTD3 YOUTD2 YOUTD1 YOUTDO LINIEN EE NEAN I2C Address OxO8h YO UT H DON T CARE Y axis accelerometer most significant byte expreso m voUTD13 vourpa2 youtp11 vourp10 vourpo vourps voutp7 vourpe voUTD11 youtp10 vourpe youtps vourp vourpe vourps YouTD4 vouTD7 vourDe youtps youtp4 youtp3 2 vourD1 vourbo mIepejelejepe pepe I2C Address OxO9h Kionix 2012 d E Rev 1 0 Kionix March 2012 Page 4 of 12 038 ZOUT L Z axis accelerometer output least significant byte ZOUTD5 ZOUTD4 ZOUTD3 ZOUTD2 ZOUTD1 ZOUTDO ZOUTD3 ZOUTD2 ZOUTD1 ZOUTDO pep om mom pow I2C Address OxOAh ZO UT H DON T CARE Z axis accelerometer most significant byte ZOUTD13 ZOUTD12 zourD11 zourD10 zoutpg zoutps ZOUTD7 ZOUTD6 ZOUTD11 ZOUTD10 zoUTD9 ZOUTD8 ZOUTD7 ZOUTD6 ZOUTDS ZOUTD4 ZOUTD7 zourbe zoutps zouTD4 zOUTD3 ZOUTD2 ZOUTD1 ZOUTDO LIEBE RENE NEN I2C Address OxOBh Kionix 2012 d E Rev 1 0 Kionix March 2012 Page 5 of 12 2 Kionix AN 038 Synchronous Hardware Interrupt Read Back Acceleration Data Setting G Range and ODR Write 0x00 to Control Register 1 REG 1 for the purpose to initialize accelerometer in stand by mode PC1 0 Address Beg Binary
11. ration causes displacement of a silicon structure resulting in a change in capacitance A signal conditioning CMOS technology ASIC detects and transforms changes in capacitance into an analog output voltage which is proportional to acceleration These outputs can then be sent to a micro controller for integration into various applications For product summaries specifications and schematics please refer to the Kionix MEMS accelerometer product sheets at http www kionix com sensors accelerometer products php d Kionix 2012 s Rev 1 0 Kionix March 2012 Page 12 of 12
12. y the raw count for each axis x y and z respectively Select Save or Save As from the File menu to save the file Open the saved file using Excel Calculate the average of the samples This gives the noise of the accelerometer in raw counts SensorCalc This application allows the user to test and calculate the zero g offset and sensitivity parameters of the accelerometer Once the accelerometer is properly placed relative to the Earth s gravity simple mouse clicks initiate a series of test sequences that result in the display of raw count data SensorMap This application allows the user to read and write to specific registers of the accelerometer The registers and their values are all displayed simultaneously on one color coded grid d Kionix 2012 s Rev 1 0 Kionix March 2012 Page 11 of 12 038 The Kionix Advantage Kionix technology provides for X Y and Z axis sensing while providing the ability to autonomously analyze sensor data on a single silicon chip One accelerometer can be used to enable a variety of simultaneous features including but not limited to Hard Disk Drive protection Vibration analysis Tilt screen navigation Sports modeling Theft man down accident alarm Image stability screen orientation amp scrolling Game playing Automatic sleep mode Theory of Operation Kionix MEMS linear tri axis accelerometers function on the principle of differential capacitance Accele

Download Pdf Manuals

image

Related Search

Related Contents

ブリッジマスター SF-77A-Ⅲ  View installation guide  TELEVISOR ULTRA SLIM  dimensions - FG Nordic  全ページ(PDF:10.7MB)  Analysis of Fast Pressure Transients using RELAP5 and TRACE  LA SIESTA AVENTURA  "取扱説明書"  Philips Genie Stick energy saving bulb 8711500801197  for your safety read this now failure to read this pamphlet and follow  

Copyright © All rights reserved.
Failed to retrieve file