ST AN2579 APPLICATION NOTE

AN2579

Application note

LIS302DL 3-axis digital MEMS accelerometer translates finger taps into actions

Introduction

This document is intended to provide application information for the LIS302DL low-voltage 3-axis digital output linear MEMS accelerometer housed in an LGA package.

The LIS302DL is an ultra-compact low-power 3-axis linear accelerometer that includes a sensing element and an IC interface capable taking information from the sensing element and providing the measured acceleration data to external applications via an I2C/SPI serial interface.

The sensing element used to detect acceleration is manufactured using a dedicated process developed by ST to produce inertial sensors and actuators in silicon.

The IC interface is instead manufactured using a CMOS process that allows a high level of integration to design a dedicated circuit which is factory trimmed to better match the sensing element characteristics.

The LIS302DL has a user-selectable full scale of ±2g and ±8g and is capable of measuring accelerations with an output data rate of 100 Hz or 400 Hz. A self-test capability allows the user to check that the system is operating correctly.

The device features two independent, highly programmable interrupt sources that can be configured either to generate an inertial wake-up interrupt signal when a programmable acceleration threshold is exceeded along one of the three axes, to detect a free-fall or to recognize single/double click events.

Two independent pins can be configured to provide interrupt signals to connected devices.

The LIS302DL is available in a plastic SMD package and is designed to operate over a temperature range extending from -40 °C to +85 °C.

The ultra small size and weight of the SMD package make it an ideal choice for handheld portable applications such as cell phones and PDAs, or any other application where reduced package size and weight are required.

January 2008

Rev 1

1/15

www.st.com

Contents

AN2579

 

 

Contents

1

Theory of operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3

 

1.1

Single click . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3

 

1.2

Double click . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

4

2

Register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

2.1 CLICK_CFG (38h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.2 CLICK_SRC (39h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.3 CLICK_THSY_X (3Bh) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.4 CLICK_THSZ (3Ch) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.5 CLICK_TimeLimit (3Dh) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.6 CLICK_Latency (3Eh) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.7 CLICK_Window (3Fh) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.8 CTRL_REG3 [Interrupt CTRL register] (22h) . . . . . . . . . . . . . . . . . . . . . . . 8

3

Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10

 

3.1

Playing with CLICK_TimeLimit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10

 

3.2

Playing with CLICK_Latency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

 

3.3

Playing with CLICK_Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

4

Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

2/15

AN2579

Theory of operation

 

 

1 Theory of operation

The single click and double click recognition functions featured in the LIS302DL help to create a man-machine interface with little software loading. The device can be configured to output an interrupt signal on a dedicated pin when tapped in any direction.

If the sensor is exposed to a single input stimulus, it generates an interrupt request on inertial interrupt pin INT1 and/or INT2. A more advanced feature allows the generation of an interrupt request when a double input stimulus with programmable time between the two events is recognized, enabling a mouse button-like functionality.

This function can be fully programmed by the user in terms of expected amplitude and timing of the stimuli by means of the dedicated set of registers described in Chapter 2: Register description.

The single and double click recognition works independently on the selected output data rate.

1.1Single click

If the device is configured for single click event detection, an interrupt is generated when the input acceleration on the selected channel exceeds the programmed threshold, and returns below it within a time window defined by the TimeLimit register.

If the LIR bit of the CLICK_CFG register is not set, the interrupt is kept high for the duration of the Latency window. If the LIR bit is set, the interrupt is kept high until the CLICK_SRC register is read.

Figure 1. Single click event with non latched interrupt

(a)

(b)

In Figure 1(a) the click has been recognized, while in Figure 1(b) the click has not been recognized because the acceleration goes under the threshold after the TimeLimit has expired.

3/15

Theory of operation

AN2579

 

 

1.2Double click

If the device is configured for double click event detection, an interrupt is generated when, after a first click, a second click is recognized. The recognition of the second click occurs only if the event satisfies the rules defined by the Latency and Windows registers.

In particular, after the first click has been recognized, the second click detection procedure is delayed for an interval defined by the Latency register. This means that after the first click has been recognized, the second click detection procedure will start only if the input acceleration exceeds the threshold after the Latency window but before the Window has expired [Figure 2(a)] or if the acceleration is still above the threshold after the Latency has expired [Figure 3(b)].

Once the second click detection procedure is initiated, the second click will be recognized with the same rule as the first: the acceleration must return below the threshold before the TimeLimit has expired.

Appropriately defining the Latency window is important to avoid unwanted clicks due to spurious bouncing of the input signal.

Figure 2. Single and double click recognition

(a)

(b)

Figure 2 illustrates a single click event (a) and a double click event (b). The device is able to distinguish between (a) and (b) by changing the settings of the CLICK_CFG register from single to double click recognition.

4/15

ST AN2579 APPLICATION NOTE

AN2579

Theory of operation

 

 

Figure 3. Double click recognition

(a)

(b)

In Figure 3(a) the double click event has been correctly recognized, while in Figure 3(b) the interrupt has not been generated because the input acceleration exceeds the threshold after the Window interval has expired.

5/15

Loading...
+ 10 hidden pages