Application Guidelines for LIS3DSH State Machine

Similar documents
MEMS motion sensors. June

Enabling better device interaction with accelerometer

MEMS & Sensors. Andy Hurman. Product Marketing. March

MEMS motion sensors. A complete portfolio of MEMS accelerometers and gyroscopes. October

Motion MEMS Smart multi-axis solutions for enhanced user experience

Embedded Algorithms for Motion Detection and Processing

Note: Examples discussed in this application note pertain to State Program 2.

Application Guidelines for MEMS Compass

Accel 5 click. PID: MIKROE 3149 Weight: 24 g

AN5259. LSM6DSOX: Machine Learning Core. Application note. Introduction

Main components MEMS digital output motion sensor: high-performance ultra-low-power 3-axis "femto" accelerometer

Pedometer 3 Click. PID: MIKROE 3259 Weight: 24 g

KXCJK AN 039. Getting Started with the KXCJK. Introduction

AN-1025 APPLICATION NOTE

Sensing our world PRODUCT OVERVIEW

Wearable is so HOT! Intelligence. Value-added service STM32

LABORATORIO DI ARCHITETTURE E PROGRAMMAZIONE DEI SISTEMI ELETTRONICI INDUSTRIALI. Laboratory Lesson 9: Serial Peripheral Interface (SPI)

Sensing our world PRODUCT OVERVIEW

AN065. AN065 Getting Started with the KXTJ3. Introduction

MEMS & Advanced Analog

Getting started with MotionPM real-time pedometer library in X CUBE-MEMS1 expansion for STM32Cube

AN023. Getting started with the KXTF9. Introduction. Circuit Schematic

LPMS-CU2 Quick Start Guide ver. 1.2

MMA865xFC Sensor Toolbox User s Guide

Sensing our world PRODUCT OVERVIEW

Getting started with MotionPM real-time pedometer library in X-CUBE-MEMS1 expansion for STM32Cube

AN 038. Getting Started with the KXTJ2. Introduction

Sensing our world PRODUCT OVERVIEW

UM2350. Getting started with MotionPW real-time pedometer for wrist library in X-CUBE-MEMS1 expansion for STM32Cube. User manual.

Sensor Toolbox (Part 2): Inertial Sensors

MMA845xQ Sensor Toolbox User s Guide

Freescale s Sensors for Low-Power Applications WISH 2011

HCOMM Reference Manual

UM2194. Getting started with MotionAW activity recognition for wrist library in X-CUBE-MEMS1 expansion for STM32Cube. User manual.

Getting started Guide

LPMS-CU2 Quick Start Guide ver. 1.3

Quick Start Guide STM32 ODE Function Pack for IoT sensor node connection to 6LoWPAN networks through sub-1ghz RF communication (FP-SNS-6LPNODE1)

Quick Start Guide. STM32 ODE Function Pack for connecting 6LoWPAN IoT Nodes to smartphone through a BLE interface (FP-NET-6LPBLE1)

UM2216 User manual. Getting started with MotionFA fitness activity library in X CUBE MEMS1 expansion for STM32Cube. Introduction

AN 025 Getting Started with the KXTI9

Towards the Consumerization of Smart Sensors

XDK HARDWARE OVERVIEW

Getting started with the X-CUBE-MEMS1 motion MEMS and environmental sensor software expansion for STM32Cube

Getting started with the FP-SNS-ALLMEMS1 Bluetooth low energy and sensors software expansion for STM32Cube

ASM330LHH. Automotive 6-axis inertial module: 3D accelerometer and 3D gyroscope. Data brief. Features. Applications. Description

LPMS-UTTL2 Quick Start Guide ver. 1.3

AN055. Replacing KX023, KX123, KX124 with KXG07. Introduction

LIS25BA: low-noise, high-bandwidth 3-axis digital output accelerometer with TDM interface

ez430-chronos Wireless Watch Development Tool: Teardown & Getting Started

Environmental sensors for true user experience

AN2768 Application note LIS331DL 3-axis digital MEMS accelerometer: translates finger taps into actions Introduction

Quick Start Guide. Bluetooth low energy, sensors and NFC tag software for STM32Cube (BLUEMICROSYSTEM3) Version (September 15, 2016)

UM1982 User manual. Multi-Sensor RF 868 MHz platform. Introduction

AUTOMAT. Dream, Make, Play.

Getting started with osxmotiongc gyroscope calibration library for X-CUBE-MEMS1 expansion for STM32Cube

STEVAL-STLKT01V1. SensorTile development kit. Description. Features

Quick Start Guide. STM32 ODE function pack for IoT node with BLE connectivity and environmental and motion sensors (FP-SNS-MOTENV1)

Getting started with MotionAR activity recognition library in X-CUBE-MEMS1 expansion for STM32Cube

Version (Apr 28, 2016)

Accelerometer with Analog and Digital I/O for StackableUSB USB1600

Quick Start Guide. Dual-channel high side driver expansion board based on VPS2535H for STM32 Nucleo (X-NUCLEO-IPS02A1) Version 1.0 (Sept.

LPMS-RS232AL2 Quick Start Guide ver. 1.2


Embedded Motion Driver Tutorial

UM0979 User manual. STEVAL-MKI109V2: emotion motherboard for MEMS adapter boards. Introduction

Gyroscope Module 3-Axis L3G4200D (#27911)

Ultra Low Power Microcontroller - Design Criteria - June 2017

STEVAL-STLKT01V1. SensorTile development kit. Description. Features

Compass Module 3-Axis HMC5883L (#29133)

UM1064 User manual. Software guide for Unico Lite. Introduction

VSEW_mk2-8g. Data Sheet. Dec Bruno Paillard

IoT device in Minutes with ST s BlueNRG

IoT node with BLE connectivity, digital microphone, environmental and motion sensors, motion and audio middleware libraries.

MMA7260QT. 3 Axis Accelerometer Module

AN4749 Application note

AN4833 Application note

Quick Start Guide. SensiBLE (BLUEMICROSYSTEM1) Bluetooth low energy and sensor software for. Version (May 25, 2016)

Ubiquitous IoT Perspectives The Power of Connected Sensors and Actuators

Quick Start Guide. Stepper motor driver expansion board based on L6474 for STM32 Nucleo (X-NUCLEO-IHM01A1) Version 1.2.

Table of Contents 1 Typical Applications General Description Block Diagram Pinout System Connections Typical A

Hello, and welcome to this presentation of the STM32 Real- Time Clock. It covers the main features of this peripheral, which is used to provide a

USB Virtual Reality HID. by Weston Taylor and Chris Budzynski Advisor: Dr. Malinowski

GMA301 ±6g Tri-Axial Digital Accelerometer

Quick Start Guide. High power stepper motor driver expansion board based on powerstep01 for STM32 Nucleo (X-NUCLEO-IHM03A1)

AN049. Getting Started. 1. Introduction

Quick Start Guide. Version 3.0 (June 12, 2017)

± 2g Tri-Axis Accelerometer Specifications

Quick Start Guide. Sound terminal expansion board based on STA350BW for STM32 NUCLEO (X-NUCLEO-CCA01M1) Version 1.1.

Sensor Toolbox for Accelerometer, Pressure and Proximity Sensors. Sensor and Actuator Products

How to configure the BlueNRG-1 and BlueNRG-2 devices in network coprocessor mode. Main components Bluetooth Low Energy wireless system-on-chip

Quick Start Guide. Bipolar stepper motor driver expansion board based on L6208 for STM32 Nucleo (X-NUCLEO-IHM05A1) Version 1.1.

Quick Start Guide. IoT node with BLE connectivity, environmental and motion sensors, and motion middleware libraries (BLUEMICROSYSTEM1)

AN5139. LIS3DHH: three-axis digital output accelerometer. Application note. Introduction

AN5273. LSM6DSOX: Finite State Machine. Application note. Introduction

Frequency Response (min max)

Programmable Dual Axis Digital Accelerometer and Impact Sensor ADIS16204

GAUSS OBC ABACUS 2017

Energy Harvesting Reference Design

Sens it Discovery. Payload Structure. 1

LPMS-B Reference Manual

Transcription:

Application Guidelines for LIS3DSH State Machine June 24 2013 AMS Application Team Application RtM

Agenda 2 Educational part: What is state machine? Applications of state machine State Machine of LIS3DSH Development of State programs: Unico GUI SW, Examples Documentation & Support Tools

What is state machine State Machine (SM) is a set of defined states, with inputs, outputs and transitions between states. The machine is in only one state at a time; the state it is in at any given time is called the current state. It can change from one state to another when a triggering event or condition occurs, this is called a transition. 3

Applications of State Machine State Machine replaces functionalities of current devices Wake up/free fall 6D orientations Tap/Double Tap (similar to click and double-click action with mouse) Thanks to its flexibility many new applications can be addressed Motion controlled user interface Gaming and virtual reality Pedometer Intelligent power saving for handheld devices Impact recognition and logging Vibration monitoring and compensation 4

LIS3DSH 5 3-Axis Digital SPI/I2C Accelerometer 5 selectable Full Scales: ±2, 4, 6, 8, 16g 2 programmable embedded finite-state machines for interrupt generation Very High Resolution (up to 14 bit) and low noise (150µg/sqrt(Hz)) Low power consumption: 11µA in Active mode (3.1Hz) and 2µA in Power down mode Anti-aliasing filter P2Pcompatible with LIS3DH Pricing: 0.93usd for 10K

LIS3DSH 3-axis Accelerometer with State Machine 6 LIS3DSH Features 3- Axis Digital Output (I2C/SPI) Full Scales from ±2g up to ±16g Very low noise (150 µg/ Hz, 14-bit accuracy) 2 independent Smart State machines Key Advantages Low current consumption system due to state machine: gesture detection is managed by LIS3DSH while MCU stays in sleep mode Flexibility to run different gesture detection algorithms RTM Q1 2013 EMEA Marketing Team March 2013

Accelerometers - Portfolio 7 Lower noise / higher performances Higher resolution / Embedded Features LIS332AX/AR 100µg/ Hz ±2g 3 x 3 x 0.9 LIS33DE 6/8-bit ±2 / ±8g 3 x 3 x 0.9 LIS331DL 8-bit ±2 / ±8g 3 x 3 x 0.9 High performance LIS331HH 12-bit ±6 / ±12 / ±24g 3 x 3 x 0.9 High performance LIS331DLH 12-bit ±2 / ±4 / ±8g 3 x 3 x 0.9 High runner Very High performance LIS3DSH 14-bit ±2, 4, 6, 8, 16g 3 x 3 x 0.9 Smaller size High performance LIS344ALH 50µg/ Hz ±2 / ±6g 4 x 4 x 1.5 LIS352AX/AR 100µg/ Hz ±2g 3 x 5 x 0.9 LIS35DE 6/8-bit ±2 / ±8g 3 x 5 x 0.9 LIS331DLM 8-bit ±2 / ±4 / ±8g 3 x 3 x 0.9 LIS302DL 8-bit ±2 / ±8g 3 x 5 x 0.9 High performance LIS3LV02DL 12-bit ±2 / ±6g 4.4 x 7.5 x 0.9 High performance LIS3DH 12-bit ±2, 4, 8, 16g 3 x 3 x 0.9 High runner AECQ-100 AIS328DQ 12-bit ±2 / ±4g / ±8g 4 x 4 x 1.8 Analog interface Digital interface I2C/SPI

LIS3DSH - 3-Axis Digital Accelerometer with Smart State Machine: Detailed Summary APPLICATION Accelerometer with Smart State Machine to run dedicated motion detection patterns Motion controlled user interface Mobile platform power consumption reduction KEY FEATURES Wide supply voltage, 1.7V to 3.6V Independent IOs supply (1.8 V) and supply voltage compatible Ultra low-power consumption down to 11 µa ±2g/±4g/±6g//±8g//±16g selectable full scale Low noise 150 ug/ Hz, 14bit resolution 16-bit data output, embedded FIFO 2 Programmable Embedded State Machine to run selectable motion detection patterns, Free-fall detection, Motion detection, Tap&Double-tap detection etc 2 independent programmable interrupts Ultra high stability over temperature I2C/SPI digital output interface Embedded self-test Package : LGA 3x3x1mm (same as LIS3DH) For latest updates pleas visit our website : www.st.com/ PRODUCT STATUS In production Samples: available Evaluation board: available RTM Q1 2013 EMEA Marketing Team March 2013

State Machine of LIS3DSH 9 Overview Data flow Conditions and Commands Parameters

State Machines of LIS3DSH 10 State-machines are identical with some exceptions: State Program #2 has decimator functionality State Program #2 has DIFF functionality

State Machines Overview LIS3DSH has two independently configurable State Machines (SM) Each SM has up to 16 states SM can run once or can be continuously running (looping) SM1 and SM2 can run independently or synchronized but with same input data SM1 is performed first Input data are 8-bit wide 11

Data Flow 12

Data processing blocks of State Machine LSB cutter - 8-bit input data to State Machine are generated by dividing sensor output data by 256: 8 bit data = 16 bit data / 256. Decimator - reduces the sample rate of the data going to SM 2 where DES is user-programmable register ODR_SM2 = ODR / (DES + 1) DIFF calculation - can be applied on input data of SM 2, there are two options: 1. diff2 - difference between current data (X, Y, Z) and previous data. 2. cs - difference between current data (X, Y, Z) and Constant Shift registers CS_X, CS_Y and CS_Z. 13

Vector Vector (v) is 8-bit number which represents amplitude of acceleration applied on the sensor. It is 8-bit signed number calculated by State Machine by an approximation formula. Acceleration vector amplitude is only available inside the two State Machines, but cannot be read outside. Vector can be filtered by 7 th order anti-symetric FIR filter Xv_filt = (x0- x7) coeff0 + (x1-x6) coeff1+ (x2-x5) coeff2 + (x3-x4) coeff3 Coefficients coeff0 to coeff3 are user-programmable. 14

State Machine Process Each state is configured through the Operation Codes (OPCODE). OPCODES can be divided in two groups: NEXT/RESET Conditions NEXT/RESET conditions control operation flow of the state machine RESET condition is in MSB part and NEXT condition is in LSB part of the OPCODE COMMANDS Commands have special tasks for flow control, output and synchronization Commands and their parameters are executed as one step command. 15

RESET condition is evaluated first, NEXT condition is evaluated only if RESET was not valid Transition to next state happens when NEXT condition is valid Transition to reset point happens when RESET condition is valid If both conditions are not valid, the same conditions are applied to the next sample Examples of conditions TI1 - Timer 1 (16-bit value) valid GNTH1 - Any/triggered axis greater than THRS1 LLTH2 - All axis less than or equal to THRS2 NZERO - Any axis zero crossed NEXT/RESET Conditions 16

COMMANDS COMMANDS have special tasks for flow control, output and synchronization There are three types of COMMANDS, depending on execution timing: Immediately executed: commands executed without waiting for a new sample Executed after trigger: wait for an internal (a new sample) or external trigger (reading of the OUTSx - SMx status register) to proceed Special commands (JMP commands): special conditions comparison for conditional jump commands. Examples of COMMANDS CONT - Continues execution from RESET POINT, also generates interrupt SETS1 sets content of SETT1 register SM1 control register STHR2 sets new value of Threshold 2 register SRADI1 enables DIFF calculation of SM2 17

State Machines Synchronization Sequential synchronization is possible using SSYNC command Each state machine has 16 states that can be combined up to 32 sequential states State machine B can act as sub-function for State machine A (parameters can be totally different than main program) State Program A can toggle execution to State Program B and vice versa Host can change inactive State Program when other State Program is running 18

State Machine Overview 19

4 independent Timers 2 independent Masks (x, y, z, v) State Machine Parameters 3 independent acceleration Thresholds @8bit (Signed, Unsigned) Peak Detection function Detects and stores the highest peak value during peak detection phase Peak detection uses always Greater than condition and measured value is converted to absolute This function allow to follow the axes that reach the absolute maximum value and not only first axis that trigger initial condition 20

Peak Detection Example 21

Development of State programs 22 Unico SW GUI Debugging state programs Examples of State programs

Unico 23 GUI application for Windows which allows to evaluate ST MEMS sensors Features User friedly and fast getting started with MEMS sensors Common interface to all kinds of ST MEMS sensors accelerometers, gyroscopes, magnetic sensors and pressure sensors Compatible with new sensors from ST MEMS data displayed in several views Access to all settings of each sensor Examples of usaging ST sensors Data from sensors can be stored on hard drive for further analysis

State Machine in Unico 24

Unico Debug mode DISABLED 25

Unico Debug mode DISABLED 26

Unico Debug mode ENABLED 27

State Machine Programs 1. Toggle 2. Wake Up 3. Free Fall 4. Double Tap 5. SSYNC Examples 28

Toggle 29

Wake up 30

Free Fall 31

Double Tap 32

SSYNC 33

Documentation & Support Tools 34 Datasheet, Application Note Evaluation Boards PC Graphical User Interface Technical Support

ST MEMS products website Documentation 35 LIS3DSH datasheet Application Note AN3393 LIS3DSH: 3-axis digital output accelerometer

Pedometer Based on State Machine 36 Embedded 15bit step counter No pedometer firmware on Microcontroller Microcontroller can read pedometer in polling Automatic interrupt generation on stop walking sequence Automatic interrupt generation on every step Ultra Low Power consumption Strong anti-false detection Available upon request 36

STEVAL-MKI109V2 Evaluation boards Daughter board available: 37 LIS3DSH STEVAL-MKI134V1 STM32-based MEMS motherboard compatible with ST MEMS adapters Firmware upgrades are possible via DFU Source codes available including low Note: Schematics and Gerber files are available under evaluation boards webpages in internet level drivers for STM32

Unico Evaluation Software 38 Unico is Graphical User Interface (GUI) for PC (Windows based) Designated to be used with STEVAL-MKI109V2 and any MEMS adapter board Connection USB Bluetooth with STEVAL-MKI132V1 SOFTWARE PACKAGE Click to download

Analog, MEMS & Sensors (AMS) Application Support Team is providing technical application support for customers, designing in ST Analog, MEMS & Sensors products, in projects agreed with local EMEA ST sales office / Technical marketing team Application Support Service Card Solving Product and Application problems answering detailed technical questions Application Support Team Focus Providing Design consulting (Schematic, PCB and Software) Technical Trainings Contact email: AMS-support-EMEA@st.com and RF IPD/IPAD RF Baluns

Web site: www.st.com/mems For more information 40 AMS-support-EMEA@st.com Your technical support Petr STUKJUNGER AMS Technical support Engineer EMEA Vladimir JANOUSEK AMS Technical support Manager EMEA Gildas.HENRIET@st.com SENSORS Product Marketing Manager EMEA