cancel
Showing results for
Did you mean:

# H3LIS100DL static sensor detecting variable acceleration.

Associate

resources:

I am using the H3LIS100DL accelerometer with the default h3lis100dl_read_data_polling.c example, and can read it's output, but the acceleration varies while the sensor is static:

When placing the H3LIS100DL static on a flat surface I get the following output:

``````Acceleration [mg]:0.00 0.00  3120.00
Acceleration [mg]:0.00 0.00  2340.00
Acceleration [mg]:-780.00    0.00  3120.00
Acceleration [mg]:0.00 0.00  3120.00
Acceleration [mg]:0.00 0.00  3120.00
Acceleration [mg]:0.00 0.00  2340.00
Acceleration [mg]:0.00 0.00  3120.00
Acceleration [mg]:0.00 0.00  2340.00
Acceleration [mg]:0.00 0.00  3120.00
Acceleration [mg]:0.00 0.00  2340.00
Acceleration [mg]:0.00 0.00  2340.00
Acceleration [mg]:0.00 0.00  3120.00``````

When I rotate the sensor 180 degrees (upside-down) I get the following readings:

``````Acceleration [mg]:0.00 0.00  780.00
Acceleration [mg]:0.00 0.00  780.00
Acceleration [mg]:0.00 0.00  780.00
Acceleration [mg]:0.00 0.00  780.00
Acceleration [mg]:0.00 0.00  780.00
Acceleration [mg]:0.00 0.00  780.00
Acceleration [mg]:0.00 0.00  780.00
Acceleration [mg]:0.00 0.00  780.00``````

Why is my static sensor outputting various values on the z axis?

when my sensor isn't moving.

The output values are calculated as followed:

• Values in the 8bit OUT_ registers are expressed as two’s complement (so -128 ... 127)
• This value is multiplied with the sensitivity of 780 mg/digit.
• This outputs the +-100G range:
• reg = 01111111 (127 decimal)
• 127 * 780 = 99.060mg (99g)

I'm expecting a static sensor will output constant acceleration values.

But this isn't the case. Can anyone explain why?

The wake_up example works correctly, the free_fall example does not:

Running the free_fall example results in continous printing of "free fall" (even when sensor is static laying on my desk.

Running the wake_up example results in only triggering a wake_up when I hit the sensor, the correct wake_up axis is triggered.

0 REPLIES 0