Skip to main content

Check Your Understanding 12.4.5 Check Your Understanding

1.

Your board lies flat and motionless on the table, component side up. Roughly what should the three converted readings be, in milli-g?
  • Approximately 0 on x, 0 on y, and +1000 on z.
  • Correct. Each axis measures how much of gravity’s 1 g lies along it, and with the board flat, all of it lands on z, whose upward direction reads positive.
  • Approximately 0 on all three axes, because the board is not moving.
  • Gravity is an acceleration, and each axis measures how much of it lies along that axis. Flat on the table, component side up, z reads approximately +1000 mg.
  • Approximately +1000 on every axis.
  • Each axis measures only the part of gravity that lies along that axis. Flat on the table, gravity lies along z alone, so x and y read near zero.
  • Approximately āˆ’1000 on z.
  • The sign is worth getting right: āˆ’1000 mg on z is what the board reads flipped over, with z pointing down. Component side up, z points up and reads approximately +1000 mg.

2.

According to Table 34, what does writing 1 to the LPen bit of CTRL_REG1_A select?
  • Low-power mode.
  • Correct. LPen is the low-power enable: 0 is normal mode and 1 is low-power mode, and Table 14 shows what that choice does to the data width.
  • A lower output data rate.
  • The data rate has its own field, the four ODR bits. LPen selects the power mode, which sets the data width, not the rate.
  • High-resolution mode.
  • The HR bit that selects high-resolution mode is in CTRL_REG4_A, not here. LPen = 1 selects low-power mode, the 8-bit row of Table 14.
  • It powers the sensor down.
  • Power-down is an ODR setting: ODR[3:0] = 0000 in Table 35. LPen = 1 keeps the sensor running, in low-power (8-bit) mode.

3.

According to Table 42, which FS[1:0] pattern in CTRL_REG4_A selects the ±2 g full-scale range?
  • 00
  • Correct. 00 is ±2 g, and it is also the register’s default. The other patterns select the wider ranges, at the cost of coarser steps.
  • 01
  • 01 selects ±4 g. The table’s order runs ±2, ±4, ±8, ±16 g as the pattern counts up; ±2 g is 00.
  • 10
  • 10 selects ±8 g. The ±2 g range we want is pattern 00, the smallest range and the finest steps.
  • 11
  • 11 selects ±16 g, the widest range and the coarsest steps. The ±2 g range is 00.

4.

According to Table 14, with LPen = 0 and HR = 0 the accelerometer is in which operating mode?
  • Normal mode, with 10-bit data output.
  • Correct. That is the middle row of Table 14, and it is the mode we’ll run this week: 10 valid bits, 4 mg per digit at ±2 g.
  • Low-power mode, with 8-bit data output.
  • Low-power mode is the LPen = 1, HR = 0 row. With both bits 0 the sensor is in normal mode, 10 bits.
  • High-resolution mode, with 12-bit data output.
  • High-resolution mode needs HR = 1. With both bits 0 the sensor is in normal mode, 10 bits.
  • The combination is not allowed.
  • The disallowed combination is LPen = 1 with HR = 1, the table’s last row. Both bits 0 is normal mode.

5.

According to Table 3 of the LSM303AGR datasheet, what is the typical zero-g offset of an accelerometer axis?
  • ±40 mg
  • Correct. That is the typical value; the table’s Min and Max columns allow ±80 mg. It is why a flat board reads close to, but rarely exactly, +1000 mg on z.
  • ±80 mg
  • ±80 mg is the table’s Min and Max bound, the worst case. The typical column says ±40 mg.
  • ±4 mg
  • 4 mg is the sensitivity per digit in normal mode at ±2 g, a different row of the same table. The typical zero-g offset is ±40 mg.
  • 0 mg; a stationary axis reads exactly its share of gravity.
  • A real sensor carries a small constant offset; the datasheet says ±40 mg is typical. That is why the reading is ā€œapproximatelyā€ +1000 mg, not exactly.

6.

According to Table 26 of the LSM303AGR datasheet, at what address is OUT_X_L_A, the low byte of the x-axis reading?
  • 0x28
  • Correct. The six output registers run from 0x28 to 0x2D, and the auto-increment read starts there.
  • 0x20
  • 0x20 is CTRL_REG1_A, the first control register. The output registers start at 0x28.
  • 0x0F
  • 0x0F is WHO_AM_I_A. The output registers start at 0x28.
  • 0x32
  • 0x32 is the sensor’s 8-bit I2C address, not a register address inside it. The output registers start at 0x28.