`Application Note
`
`AN3107
`Rev 0, 05/2005
`
`Measuring Tilt with Low-g Accelerometers
`
`by: Michelle Clifford and Leticia Gomez
`Sensor Products, Tempe, AZ
`
`INTRODUCTION
`This application note describes how accelerometers are
`used to measure the tilt of an object. Accelerometers can be
`used for measuring both dynamic and static measurements of
`acceleration. Tilt is a static measurement where gravity is the
`acceleration being measured. Therefore, to achieve the
`highest degree resolution of a tilt measurement, a low-g, high-
`sensitivity accelerometer is required. The Freescale
`MMA6200Q and MMA7260Q series accelerometers are good
`solutions for XY and XYZ tilt sensing. These devices provide
`a sensitivity of 800 mV/g in 3.3 V applications. The
`MMA2260D and MMA1260D are also good solutions for 5 V
`applications providing a sensitivity of 1200mV/g for X and Z,
`respectively. All of these accelerometers will experience
`acceleration in the range of +1g to -1g as the device is tilted
`from -90 degrees to +90 degrees.
`1g = 9.8 m/s
`
`+1 g
`
`MODULE
`A simple tilt application can be implemented using an 8 or
`10-bit microcontroller that has 1 or 2 ADC channels to input
`the analog output voltage of the accelerometers and general
`purpose I/O pins for displaying the degrees either on a PC
`through a communication protocol or on an LCD. See Figure 1
`for a typical block diagram. Some applications may not require
`a display at all. These applications may only require an I/O
`channel to send a signal for turning on or off a device at a
`determined angle range.
`
`LCD
`
`Accelerometer
`
`Microcontroller
`with
`ADC
`
`Interface
`Circuit
`RS232,
`USB
`
`Figure 1. Typical Tilt Application Block Diagram
`
`MOUNTING CONSIDERATIONS
`Device selection depends on the angle of reference and
`MMA7260Q. To obtain the most resolution per degree of
`how the device will be mounted in the end application. This will
`change, the IC should be mounted with the sensitive axis
`allow you to achieve the highest degree resolution for a given
`parallel to the plane of movement where the most sensitivity is
`solution due to the nonlinearity of the technology. First, you
`desired. For example, if the degree range that an application
`need to know what the sensing axis is for the accelerometer.
`will be measuring is only 0(cid:176) to 45(cid:176) and the PCB will be
`See Figure 2 to see where the sensing axes are for the
`mounted perpendicular to gravity, then an X-Axis device
`
`' Freescale Semiconductor, Inc., 2005. All rights reserved.
`
`Lenovo EX-1019, Page 001
`IPR2021-00822 (Lenovo Inc. v. LiTL LLC.)
`
`
`
`would be the best solution. If the degree range was 0(cid:176) to 45(cid:176)
`and the PCB will be mounted perpendicular to gravity, then a
`Z-Axis device would be the best solution. This is understood
`more when thinking about the output response signal of the
`device and the nonlinearity.
`
`Sensing Axis
`for Z-Axis
`
`Z
`
`X-Axis
`X-Axis
`Accelerometer
`Accelerometer
`
`PCB
`PCB
`
`Z-Axis
`Z-Axis
`Accelerometer
`Accelerometer
`
`PC
`PCB
`
`Sensing Axis
`for X-Axis
`X
`
`Sensing
`Sensing
`Axis
`Axis
`
`Sensing Axis
`for Y-Axis
`Y
`
`MMA7260Q
`Series
`Accelerometer
`Figure 2. Sensing Axis for the
`MMA7260Q Accelerometer With X, Y,
`and Z-Axis for Sensing Acceleration
`
`Sensing
`Sensing
`Axis
`Axis
`
`1 g
`1g
`
`Gravity
`Gravity
`
`1 g
`1g
`
`Gravity
`Gravity
`
`Figure 3. Gravity Component of a
`Tilted X-Axis Accelerometer
`
`Figure 4. Gravity Component of a
`Tilted Z-Axis Accelerometer
`
`NONLINEARITY
`As seen in Figure 5, the typical output of capacitive, micro-
`As the device is tilted from 0(cid:176), the sensitivity decreases. You
`machined accelerometers is more like a sine function. The
`see this in the graph as the slope of output voltage decreases
`figure shows the analog output voltage from the accelerometer
`for an increasing tilt towards 90(cid:176). Because of this nonlinearity,
`for degrees of tilt from -90(cid:176) to +90(cid:176). The change in degrees of
`the degree resolution of the application must be determined at
`tilt directly corresponds to a change in the acceleration due to a
`0(cid:176) and 90(cid:176) to ensure the lowest resolution is still within the
`changing component of gravity acted on the accelerometer.
`required application resolution. This will be explained more in
`The slope of the curve is actually the sensitivity of the device.
`the following section.
`
`3.3
`
`3
`
`2.7
`
`2.4
`
`2.1
`
`1.8
`
`1.5
`
`1.2
`
`0.9
`
`0.6
`
`0.3
`
`0
`
`X-axis
`Y-axis
`Z-axis
`
`80
`
`90
`
`100
`
`Sensors
`Freescale Semiconductor
`
`-60
`
`-50
`
`-40
`
`-30
`
`-20
`
`10
`0
`-10
`Angle(degree)
`Figure 5. Typical Nonlinear Output of X, Y, and Z-Axis Accelerometers
`
`20
`
`30
`
`40
`
`50
`
`60
`
`70
`
`Output(V)
`
`-100
`
`-90
`
`-80
`
`-70
`
`AN3107
`
`Lenovo EX-1019, Page 002
`IPR2021-00822 (Lenovo Inc. v. LiTL LLC.)
`
`
`
`CALCULATING DEGREE OF TILT
`
`In order to determine the angle of tilt, θ, the A/D values from
`the accelerometer are sampled by the ADC channel on the
`microcontroller. The acceleration is compared to the zero g
`offset to determine if it is a positive or negative acceleration,
`e.g., if value is greater than the offset then the acceleration is
`seeing a positive acceleration, so the offset is subtracted from
`the value and the resulting value is then used with a lookup
`table to determine the corresponding degree of tilt (See
`Table1 for a typical 8-bit lookup table), or the value is passed
`to a tilt algorithm. If the acceleration is negative, then the value
`is subtracted from the offset to determine the amount of
`negative acceleration and then passed to the lookup table or
`algorithm. One solution can measure 0(cid:176) to 90(cid:176) of tilt with a
`single axis accelerometer, or another solution can measure
`360(cid:176) of tilt with two axis configuration (XY, X and Z), or a single
`axis configuration (e.g. X or Z), where values in two directions
`are converted to degrees and compared to determine the
`quadrant that they are in. A tilt solution can be solved by either
`implementing an arccosine function, an arcsine function, or a
`look-up table depending on the power of the microcontroller
`and the accuracy required by the application. For simplicity,
`we will use the equation: θ = arcsin(x). The arcsin(y) can
`determine the range from 0(cid:176) to 180(cid:176), but it cannot discriminate
`the angles in range from 0(cid:176) to 360(cid:176), e.g. arcsin(45”) =
`arcsin(135”). However, the sign of x and y can be used to
`determine which quadrant the angle is in. By this means, we
`can calculate the angle β in one quadrant (0-90”) using
`arcsin(y) and then determine θ in the determined quadrant.
`
`+90deg
`
`0-90
`degree
`Quadrant
`
`180 deg
`
`0 deg
`
`-90deg
`
`Figure 6. The Quadrants of a 360 Degree Rotation
`
`1g
`
`Θ
`
`[1]
`
`VOUT
`
`=
`
`VOFFSET
`
`+
`
`⎛
`⎝
`
`V∆
`--------
`g∆
`
`1.0g
`
`×
`
`⎞
`θsin×
`⎠
`
`= Accelerometer Output in Volts
`where: VOUT
`= Accelerometer 0g Offset
`VOFF
`∆V/∆g = Sensitivity
`1g
`= Earth(cid:146)s Gravity
`= Angle of Tilt
`θ
`Solving for the angle:
`
`⎛
`⎜
`⎜
`⎝
`
`[2]
`
`=
`
`arc
`
`sin
`
`θ
`
`⎞
`VOUT VOFFSET(cid:150)
`
`⎟
`-----------------------------------------
`⎟
`V∆
`--------
`⎠
`g∆
`This equation can be used with the MMA6260Q as an
`example:
`
`=
`
`
`
`1650mV 800mV+
`
`θsin×
`
`VOUT
`Where the angle can be solved by
`1650mV
`(cid:150)
`VOUT
`⎛
`⎞
`-----------------------------------------
`⎝
`⎠
`800mV g⁄
`From this equation, you can see that at 0(cid:176) the
`accelerometer output voltage would be 1650mV and at 90(cid:176)
`the accelerometer output would be 2450mV.
`
`=
`
`arc
`
`sin
`
`θ
`
`INTERFACING TO ADC
`
`An 8-Bit ADC
`An 8-bit ADC cuts 3.3V supply into 255 steps of 12.9mV for
`each step. Therefore, by taking one ADC reading of the
`MMA6260Q at 0g (0(cid:176)of tilt for an x-axis device) and 1g (90(cid:176) of
`tilt for an x-axis device), would result in the following:
`0(cid:176): 1650mV + 12.9mV = 1662.9mV,
`which is 0.92(cid:176) resolution
`
`90(cid:176): 2450mV+ 12.9mV = 2462.9mV,
`which is 6.51(cid:176) resolution
`Due to the nonlinearity discussed earlier, you will see that
`the accelerometer is most sensitive when the sensing axis is
`closer to 0(cid:176), and less sensitive when closer to 90(cid:176). Therefore,
`the system provides a 0.92 degree resolution at the highest
`sensitivity point (0 degrees), and a 6.51 degree resolution at
`the lowest sensitivity point (90(cid:176)).
`
`A 10-Bit ADC
`A 10-bit ADC cuts 3.3V supply into 1023 steps of 3.2mV for
`each step. Therefore, by taking one ADC reading of the
`MMA6260Q again at 0g (0(cid:176) of tilt for an x-axis device), would
`now result in the following:
`0(cid:176): 1650mV + 3.2mV = 1653.2mV
`
`Figure 7. An Example of Tilt in the First Quadrant
`
`90(cid:176) 2450mV + 3.2mV = 2453.2mV
`
`AN3107
`
`Sensors
`Freescale Semiconductor
`
`Lenovo EX-1019, Page 003
`IPR2021-00822 (Lenovo Inc. v. LiTL LLC.)
`
`
`
`This results in a 0.229 degree resolution at the highest
`sensitivity point (0(cid:176)) and a 3.26 degree resolution at the lowest
`sensitivity point (90(cid:176)).
`
`A 12-Bit ADC
`A 12-bit ADC cuts 3.3V supply into 4095 steps of 0.8mV for
`each step. Therefore, by taking one ADC reading of the
`MMA6260Q again at 0g (0(cid:176) of tilt for an x-axis device), would
`now result in the following:
`0(cid:176):
`1650mV + 0.8mV = 1650.8mV
`
`90(cid:176): 2450mV + 0.8mV = 2450.8mV
`This results in a 0.057 degree resolution at the highest
`sensitivity point (0(cid:176)) and 1.63 degree resolution at the lowest
`sensitivity point (90(cid:176)). However, for 0.8mV changes, the noise
`factor becomes the factor to consider during design. How
`much noise the system has will depend on how much
`resolution you can get with a higher bit count.
`
`TILT APPLICATIONS
`There are many applications where tilt measurements are
`required or will enhance its functionality. In the cell phone
`market and handheld electronics market, tilt applications can
`be used for controlling menu options, e-compass
`compensation, image rotation, or function selection in
`response to different tilt measurements. In the medical
`markets, tilt is used for making blood pressure monitors more
`accurate. They can also be used for feedback for tilting
`hospital beds or chairs. A tilt controller can also be used for an
`easier way to control this type of equipment. Accelerometers
`for tilt measurements can also be designed into a multitude of
`products, such as game controllers, virtual reality input
`devices, HDD portable products, computer mouse, cameras,
`projectors, washing machines, and personal navigation
`systems.
`
`AN3107
`
`4
`
`Sensors
`Freescale Semiconductor
`
`Lenovo EX-1019, Page 004
`IPR2021-00822 (Lenovo Inc. v. LiTL LLC.)
`
`
`
`Table 1. 8-Bit Lookup Table for Determining Degree of Tilt
`Calculated
`ADC
`Calculated
`Voltage
`Bits
`Voltage
`-0.80
`129
`0.01
`-0.79
`130
`0.03
`-0.77
`131
`0.04
`-0.76
`132
`0.05
`-0.75
`133
`0.06
`-0.73
`134
`0.08
`-0.72
`135
`0.09
`-0.71
`136
`0.10
`-0.70
`137
`0.12
`-0.68
`138
`0.13
`-0.67
`139
`0.14
`-0.66
`140
`0.15
`-0.64
`141
`0.17
`-0.63
`142
`0.18
`-0.62
`143
`0.19
`-0.61
`144
`0.21
`-0.59
`145
`0.22
`-0.58
`146
`0.23
`-0.57
`147
`0.24
`-0.55
`148
`0.26
`-0.54
`149
`0.27
`-0.53
`150
`0.28
`-0.52
`151
`0.30
`-0.50
`152
`0.31
`-0.49
`153
`0.32
`-0.48
`154
`0.34
`-0.46
`155
`0.35
`-0.45
`156
`0.36
`-0.44
`157
`0.37
`-0.43
`158
`0.39
`-0.41
`159
`0.40
`-0.40
`160
`0.41
`-0.39
`161
`0.43
`-0.37
`162
`0.44
`-0.36
`163
`0.45
`-0.35
`164
`0.46
`-0.34
`165
`0.48
`-0.32
`166
`0.49
`-0.31
`167
`0.50
`-0.30
`168
`0.52
`-0.28
`169
`0.53
`-0.27
`170
`0.54
`-0.26
`171
`0.55
`-0.24
`172
`0.57
`-0.23
`173
`0.58
`-0.22
`174
`0.59
`-0.21
`175
`0.61
`-0.19
`176
`0.62
`-0.18
`177
`0.63
`-0.17
`178
`0.64
`-0.15
`179
`0.66
`-0.14
`180
`0.67
`-0.13
`181
`0.68
`-0.12
`182
`0.70
`-0.10
`183
`0.71
`-0.09
`184
`0.72
`-0.08
`185
`0.73
`-0.06
`186
`0.75
`-0.05
`187
`0.76
`-0.04
`188
`0.77
`-0.03
`189
`0.79
`-0.01
`190
`0.80
`0.00
`
`g
`0.02
`0.03
`0.05
`0.06
`0.08
`0.10
`0.11
`0.13
`0.15
`0.16
`0.18
`0.19
`0.21
`0.23
`0.24
`0.26
`0.27
`0.29
`0.31
`0.32
`0.34
`0.35
`0.37
`0.39
`0.40
`0.42
`0.44
`0.45
`0.47
`0.48
`0.50
`0.52
`0.53
`0.55
`0.56
`0.58
`0.60
`0.61
`0.63
`0.64
`0.66
`0.68
`0.69
`0.71
`0.73
`0.74
`0.76
`0.77
`0.79
`0.81
`0.82
`0.84
`0.85
`0.87
`0.89
`0.90
`0.92
`0.93
`0.95
`0.97
`0.98
`1.00
`
`arcsine
`0.92
`1.85
`2.77
`3.70
`4.62
`5.55
`6.48
`7.41
`8.34
`9.27
`10.21
`11.15
`12.09
`13.04
`13.99
`14.94
`15.90
`16.86
`17.83
`18.80
`19.78
`20.76
`21.75
`22.75
`23.76
`24.77
`25.79
`26.82
`27.86
`28.91
`29.97
`31.04
`32.12
`33.22
`34.33
`35.46
`36.60
`37.76
`38.93
`40.13
`41.35
`42.59
`43.86
`45.15
`46.48
`47.83
`49.23
`50.66
`52.14
`53.67
`55.26
`56.92
`58.65
`60.47
`62.40
`64.47
`66.70
`69.16
`71.93
`75.19
`79.39
`87.47
`
`arccos
`89.08
`88.15
`87.23
`86.30
`85.38
`84.45
`83.52
`82.59
`81.66
`80.73
`79.79
`78.85
`77.91
`76.96
`76.01
`75.06
`74.10
`73.14
`72.17
`71.20
`70.22
`69.24
`68.25
`67.25
`66.24
`65.23
`64.21
`63.18
`62.14
`61.09
`60.03
`58.96
`57.88
`56.78
`55.67
`54.54
`53.40
`52.24
`51.07
`49.87
`48.65
`47.41
`46.14
`44.85
`43.52
`42.17
`40.77
`39.34
`37.86
`36.33
`34.74
`33.08
`31.35
`29.53
`27.60
`25.53
`23.30
`20.84
`18.07
`14.81
`10.61
`2.53
`
`g
`-1.00
`-0.98
`-0.97
`-0.95
`-0.93
`-0.92
`-0.90
`-0.89
`-0.87
`-0.85
`-0.84
`-0.82
`-0.81
`-0.79
`-0.77
`-0.76
`-0.74
`-0.73
`-0.71
`-0.69
`-0.68
`-0.66
`-0.64
`-0.63
`-0.61
`-0.60
`-0.58
`-0.56
`-0.55
`-0.53
`-0.52
`-0.50
`-0.48
`-0.47
`-0.45
`-0.44
`-0.42
`-0.40
`-0.39
`-0.37
`-0.35
`-0.34
`-0.32
`-0.31
`-0.29
`-0.27
`-0.26
`-0.24
`-0.23
`-0.21
`-0.19
`-0.18
`-0.16
`-0.15
`-0.13
`-0.11
`-0.10
`-0.08
`-0.06
`-0.05
`-0.03
`-0.02
`0.00
`
`arcsine
`-87.47
`-79.39
`-75.19
`-71.93
`-69.16
`-66.70
`-64.47
`-62.40
`-60.47
`-58.65
`-56.92
`-55.26
`-53.67
`-52.14
`-50.66
`-49.23
`-47.83
`-46.48
`-45.15
`-43.86
`-42.59
`-41.35
`-40.13
`-38.93
`-37.76
`-36.60
`-35.46
`-34.33
`-33.22
`-32.12
`-31.04
`-29.97
`-28.91
`-27.86
`-26.82
`-25.79
`-24.77
`-23.76
`-22.75
`-21.75
`-20.76
`-19.78
`-18.80
`-17.83
`-16.86
`-15.90
`-14.94
`-13.99
`-13.04
`-12.09
`-11.15
`-10.21
`-9.27
`-8.34
`-7.41
`-6.48
`-5.55
`-4.62
`-3.70
`-2.77
`-1.85
`-0.92
`0.00
`
`arccos
`177.47
`169.39
`165.19
`161.93
`159.16
`156.70
`154.47
`152.40
`150.47
`148.65
`146.92
`145.26
`143.67
`142.14
`140.66
`139.23
`137.83
`136.48
`135.15
`133.86
`132.59
`131.35
`130.13
`128.93
`127.76
`126.60
`125.46
`124.33
`123.22
`122.12
`121.04
`119.97
`118.91
`117.86
`116.82
`115.79
`114.77
`113.76
`112.75
`111.75
`110.76
`109.78
`108.80
`107.83
`106.86
`105.90
`104.94
`103.99
`103.04
`102.09
`101.15
`100.21
`99.27
`98.34
`97.41
`96.48
`95.55
`94.62
`93.70
`92.77
`91.85
`90.92
`90.00
`
`ADC
`Bits
`66
`67
`68
`69
`70
`71
`72
`73
`74
`75
`76
`77
`78
`79
`80
`81
`82
`83
`84
`85
`86
`87
`88
`89
`90
`91
`92
`93
`94
`95
`96
`97
`98
`99
`100
`101
`102
`103
`104
`105
`106
`107
`108
`109
`110
`111
`112
`113
`114
`115
`116
`117
`118
`119
`120
`121
`122
`123
`124
`125
`126
`127
`128
`
`Sensors
`Freescale Semiconductor
`
`AN3107
`
`Lenovo EX-1019, Page 005
`IPR2021-00822 (Lenovo Inc. v. LiTL LLC.)
`
`
`
`NOTES
`
`AN3107
`
`Sensors
`Freescale Semiconductor
`
`Lenovo EX-1019, Page 006
`IPR2021-00822 (Lenovo Inc. v. LiTL LLC.)
`
`
`
`NOTES
`
`Sensors
`Freescale Semiconductor
`
`AN3107
`
`Lenovo EX-1019, Page 007
`IPR2021-00822 (Lenovo Inc. v. LiTL LLC.)
`
`
`
`How to Reach Us:
`Home Page:
`www.freescale.com
`E-mail:
`support@freescale.com
`USA/Europe or Locations Not Listed:
`Freescale Semiconductor
`Technical Information Center, CH370
`1300 N. Alma School Road
`Chandler, Arizona 85224
`+1-800-521-6274 or +1-480-768-2130
`support@freescale.com
`Europe, Middle East, and Africa:
`Freescale Halbleiter Deutschland GmbH
`Technical Information Center
`Schatzbogen 7
`81829 Muenchen, Germany
`+44 1296 380 456 (English)
`+46 8 52200080 (English)
`+49 89 92103 559 (German)
`+33 1 69 35 48 48 (French)
`support@freescale.com
`Japan:
`Freescale Semiconductor Japan Ltd.
`Headquarters
`ARCO Tower 15F
`1-8-1, Shimo-Meguro, Meguro-ku,
`Tokyo 153-0064
`Japan
`0120 191014 or +81 3 5437 9125
`support.japan@freescale.com
`Asia/Pacific:
`Freescale Semiconductor Hong Kong Ltd.
`Technical Information Center
`2 Dai King Street
`Tai Po Industrial Estate
`Tai Po, N.T., Hong Kong
`+800 2666 8080
`support.asia@freescale.com
`For Literature Requests Only:
`Freescale Semiconductor Literature Distribution Center
`P.O. Box 5405
`Denver, Colorado 80217
`1-800-441-2447 or 303-675-2140
`Fax: 303-675-2150
`LDCForFreescaleSemiconductor@hibbertgroup.com
`
`AN3107
`Rev. 0
`05/2005
`
`Information in this document is provided solely to enable system and software
`implementers to use Freescale Semiconductor products. There are no express or
`implied copyright licenses granted hereunder to design or fabricate any integrated
`circuits or integrated circuits based on the information in this document.
`
`Freescale Semiconductor reserves the right to make changes without further notice to
`any products herein. Freescale Semiconductor makes no warranty, representation or
`guarantee regarding the suitability of its products for any particular purpose, nor does
`Freescale Semiconductor assume any liability arising out of the application or use of any
`product or circuit, and specifically disclaims any and all liability, including without
`limitation consequential or incidental damages. (cid:147)Typical(cid:148) parameters that may be
`provided in Freescale Semiconductor data sheets and/or specifications can and do vary
`in different applications and actual performance may vary over time. All operating
`parameters, including (cid:147)Typicals(cid:148), must be validated for each customer application by
`customer(cid:146)s technical experts. Freescale Semiconductor does not convey any license
`under its patent rights nor the rights of others. Freescale Semiconductor products are
`not designed, intended, or authorized for use as components in systems intended for
`surgical implant into the body, or other applications intended to support or sustain life,
`or for any other application in which the failure of the Freescale Semiconductor product
`could create a situation where personal injury or death may occur. Should Buyer
`purchase or use Freescale Semiconductor products for any such unintended or
`unauthorized application, Buyer shall indemnify and hold Freescale Semiconductor and
`its officers, employees, subsidiaries, affiliates, and distributors harmless against all
`claims, costs, damages, and expenses, and reasonable attorney fees arising out of,
`directly or indirectly, any claim of personal injury or death associated with such
`unintended or unauthorized use, even if such claim alleges that Freescale
`Semiconductor was negligent regarding the design or manufacture of the part.
`
`Freescale(cid:153) and the Freescale logo are trademarks of Freescale Semiconductor, Inc.
`All other product or service names are the property of their respective owners.
`' Freescale Semiconductor, Inc. 2005. All rights reserved.
`
`Lenovo EX-1019, Page 008
`IPR2021-00822 (Lenovo Inc. v. LiTL LLC.)
`
`