November 2010 Sensor Toolbox (Part 2): Inertial Sensors AMF-ENT-T1118 Michael Steffen MCU & Sensor Field Application Engineer Expert Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMAROS, TurboLink
Session Objectives Learn: How an accelerometer works How to interface an accelerometer to a microcontroller The top customer questions and application challenges Gain Hand-On Experience: Calibration: Resolution, accuracy Tilt: Non-linear effects Motion: Current consumption, signal analysis Fall: Data logging, interpreting results Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMAROS, TurboLink 2
Session Outline 1. What is an accelerometer? 2. How to interface the accelerometer to a microcontroller 3. Top Questions & Application Challenges 4. Using the Sensor Toolbox: Hands-On Labs Cal Lab Tilt Lab Motion Lab Fall Lab Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMAROS, TurboLink 3
1. What is an Accelerometer? Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMAROS, TurboLink
How an Accelerometer Works Accelerometers measure the acceleration of a movable mass. The spring compresses proportionally to acceleration. MASS Mass ACCELEROMETER Dynamic Acceleration Fingers inside measure change in capacitance Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMAROS, TurboLink 5
X Axis X,Y, & Z Axis Movement Y Axis Z Axis Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMAROS, TurboLink
2. How to Interface our Accelerometers to a Microcontroller Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMAROS, TurboLink
Analog and Digital Accelerometers Analog Accelerometer Digital Accelerometer Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMAROS, TurboLink 8
Vout = V DD /2 + Sensitivity x Acceleration What is the output of Accelerometers? Vout=f(g) V DD =3.3V Vout (mv) 3000 2500 2000 1500 1000 500 0-2 -1.5-1 -0.5 0 0.5 1 1.5 2 g Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMAROS, TurboLink 9
MMA8450Q Accelerometer Overview High Pass Filter enables Rapid Gesture Detection and Enhanced Tap Detection Input HPF Output Acceleration Point (3rd Derivative of Displacement) Programmable Threshold Embedded 32 data point FIFO reduces processor cycles, reduces system power, and reduces I 2 C bus congestion. 32 Sample s for each X,Y,Z FIFO Data (Xn-1,Yn-1,Zn-1) Acquisition Data (Xn,Yn,Zn) Within 1 Clock Cycle Read FIFO Read Data Mathematical Functions Compare Average Derivative Filter Features 1.71V to 1.89V supply voltage ±2g/±4g/±8g dynamically selectable full-scale Output data rate (ODR) from 400Hz to 1.563Hz 300µg/ Hz noise at normal mode ODR=400Hz 12-bit digital output I²C digital output interface (operates up to 400KHz Fast Mode) Programmable 2 interrupt pins for 8 interrupt sources Embedded 4 channels of motion detection Freefall or motion detection: 2 channels Pulse detection: 1 channel Transient detection : 1 channel Embedded orientation (Portrait/Landscape) detection with hysteresis Embedded automatic ODR change for auto-wake-up and return-tosleep Embedded 32 sample FIFO simplifies position tracking analysis Embedded self test 10,000g high shock survivability Package 3mm x 3mm DFN, 1.00mm max height -40 C to +85 C Operating Temp RoHS compliant GND n/c AVdd 16 15 14 DVdd 1 13 GND Proton n/c 2 16 pin QFN 12 GND 3mm x 3mm x 1mm n/c 3 11 INT1 (TOP VIEW) SCL 4 10 n/c GND 5 6 7 8 SDA SA0 CS 9 INT2 Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMAROS, TurboLink 10
Features MMA9550L Specification Overview +/-2g, 4g, 8g configurable dynamic ranges available Configurable 8-, 10, 12-, 14-bit resolution Configurable sample rate 0.24 to 1953 sample/s 1.71 1.89V for AVdd and DVdd or single supply 2 ua standby current (I 2 C active) 20 ua operating current at 14-bit, 1 samples/s < 150 ua operating current at 14-bit, 64 samples/s Internal low power oscillator Slave I 2 C and SPI Master I 2 C 32-bit CPU core with multiply accumulator block Full enablement suite of tools Software libraries of sensor algorithms Downloadable software upgrades Package 3x3x1mm LGA package -40 C to 85 C operating temp RoHS compliant Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMAROS, TurboLink 11
MMA9550L has both Master and Slave I 2 C Capability VSSA RGPIO8\PDB_B VDDA Applications Processor 2MBPS Slave I2C 1 2 3 4 5 16 15 14 EVE 6 7 8 Master I2C 13 12 11 10 9 400KBPS VDD BKGD/MS/RGPIO9 RESETB SCL0/GPIO0 VSS SDA0/RGPIO1 RGPIO2\SCL1 RGPIO3\SDA1 RGPIO7/AN1 RGPIO6/AN0 RGPIO5/PDB_A TEST RGPIO4/INT Slave data can be interpreted so the MMA9550L can issue wakeup interrupt to main CPU when motion is detected on chip or when slave device (i.e., pressure sensor, magnetometer, touch sensor) flags that activity occurred. SDA0 and SCL0 Slave I 2 C For system processor to control the MMA9550L SDA1 and SCL1 Master I 2 C For the MMA9550L to master other devices in system Gyro Magnetic Pressure Touch Sensor Other Sensor Peripherals Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMAROS, TurboLink 12
3. Top Customer Questions and Application Challenges Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMAROS, TurboLink
What is Offset and Sensitivity of an Accelerometer? It is crucial to auto-zero the offset voltage ** Parameter Min Typ Max Unit Offset 1485 1650 1815 mv Sensitivity 740 800 860 mv MMA7260Q, T A =25degC, V DD =3.3V Tilt Application (0 45 degrees) causes 21 degrees of error! causes 4 degrees of error ** MMA8450 is has very low OFFSET and good accuracy Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMAROS, TurboLink 14
For Digital Accelerometers, Resolution vs. Accuracy? Is your focus resolution only, or also accuracy? On the MMA8450 the 14-bit ADC system using 3 axes (X,Y, and Z) can achieve: Tilt Resolution of +/- Up to 0.02º Resolution at 1.56Hz (Hi Res mode) Tilt Accuracy of +/-2% 0.244mg (2g range: 4096 counts/g) Ex. 45º ± 0.9º Accuracy determined by all sources of error from the accelerometer A/D resolution limitations Zero-g offset error Sensitivity error Noise error Temperature coefficient offset error Temperature coefficient sensitivity error Cross axis sensitivity error Non-Linearity error Total Error: RMS of all errors Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMAROS, TurboLink 15
3. Calibration, Tilt, Motion, and Freefall Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMAROS, TurboLink
Single axis tilt Tilt Only the X-axis is used to determine tilt. The tilt angle is: The graph here below shows that due to the non-linearity of the arcsine function, the tilt angle resolution degrades significantly as you approach 90 degrees. Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMAROS, TurboLink 17
Variation between readings Motion We compare the current reading to the previous reading and determine motion or shock by the variation between the two: The delta between values will be fairly low for motion (1 to 10) and much higher for shock (10 to 254). Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMAROS, TurboLink 18
MOTION TUTORIAL Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMAROS, TurboLink 19
Linear Fall Freefall This is when the board falls straight down with no spin or rotational component. We will be looking for a condition where all three axes come close to 0g. Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMAROS, TurboLink 20
FREEFALL TUTORIAL Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMAROS, TurboLink 21
DATA LOGGING EXAMPLE TEST YOUR KNOWLEDGE A C B D EVENTS - Freefall - Motion - Shock - Rotation Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMAROS, TurboLink 22
1. Please unpack the Boards. 2. Plug in USB into the touch board and to PC 3. Connect numbered Keypad to touch board 4. Launch Sensor Toolbox ICON on the Desktop LET S GET THE LAB STARTED!!! Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMAROS, TurboLink 23
HANDS-ON LABS USING the MMA8450 and Sensor Toolbox CALIBRATION, TILT, MOTION, AND FREEFALL Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMAROS, TurboLink 24
Thank you! Please complete the FTF survey to receive the new Xtrinsic sensor brand t-shirt! Reg. U.S. Pat. & Tm. Off. BeeKit, BeeStack, CoreNet, the Energy Efficient Solutions logo, Flexis, MXC, Platform in a Package, Processor Expert, QorIQ, QUICC Engine, SMAROS, TurboLink 25