LIS3DH Accelerometer Sensor: Possible to detect both accel and direction?

I have the lis3dh accelerometer sensor from Adafruit hooked up and sending data through I2C to an Arduino Uno.

I’m looking for change in motion along the Y axis. Specifically I want to know forward motion. The problem is is that there is no distinguishment for forward or backward. I would expect that one direction along the Y plane would produce a positive number. And motion 180deg opposite would produce a negative number. I’m getting acceleration data in, but the data is positive regardless of direction.

Thus I’m so far unable to determine whether acceleration is happening forward or backward.

I’ve searched the web and surprisingly there doesn’t seem to be much information on this.

Does anyone know of a way to distinguish which direction acceleration is going with this chip? Or, if not, is there a chip out there that does?

Thanks in advance:)

Do you recall in school the definition of negative acceleration? It is "slowing down", nothing to do with direction.


Paul_KD7HB. Yes. That is true about acceleration: its irregardless of direction. So I think the title of my question might be misleading, which I'll change (if possible).

Nonetheless, the question remains: How can I both detect acceleration AND direction? Any one have ideas of sensors (or combination of sensors) that can do this? And of code to pull this off.

The accelerometer reports the magnitude and direction of the acceleration.

It does not report the direction of motion, and that cannot be determined from the acceleration alone.

Without seeing your code it is difficult to determine the cause of your positive only values. The Adafruit demo produces both positive and negative acceleration raw count values for each axis.

Are you doing any mathematical manipulation with the raw accelerometer counts?