-1

I am using an STM accelerometer with STM controller.

While getting the readings from the accelerometer, it gives a random value. It even shows a false value, when used in a steady position.

Here, somehow, I am facing problem and need some idea and suggestion to solve this issue. If some one has the document and sample code for it, please, let me know and help me.

user3666197
  • 1
  • 6
  • 50
  • 92
SACHIN RAJPUT
  • 11
  • 1
  • 4
  • 2
    This needs at least some sort of minimal viable code before someone can help you to answer your question. And as someone who has no idea about accelerometers it kinda sounds like you'll have to recalibrate it or reset it somehow. –  May 14 '18 at 12:50
  • If readouts come from a digital interface, the signal-path disturbances are out of the game, if not, check you analog-path's grounding and other sources of EMI/RFI noise injected into the signal. Next, some accelerators require more smoothing ( into the model of 2nd-order dynamics ) than other, high precision sensor devices. the poorer the sensor, the more data-sanity needed. – user3666197 May 14 '18 at 12:55
  • hi @tr9sh I am using the accelerometer of ST manufacturer LIS2DE12(model No.). – SACHIN RAJPUT May 30 '18 at 06:08
  • And I am developing C code in Keil IDE, here below is my Code: – SACHIN RAJPUT May 30 '18 at 06:47

1 Answers1

1

There are several potential issues. The accelerometer could need to be calibrated. Often they will not start at zero when at rest straight from the factory (I have used other accelerometers but not the particular one you are using so I can't say if they are pre-calibrated).

When you say "false values" depending on the magnitude this could also be noise. Accelerometers are prone to being noisy, so you ideally you would want to low-pass filter the data you collect to reduce noise. The cutoff frequency you select depends on the particular application and your sampling rate.

L. Putvin
  • 56
  • 5
  • Hi L. Putvin, I am using the ST manufacture Accelerometer(Model LIS2DE12).And using the KEIL IDE to develop the C Code for it. For Accelerometer i have configure the all the register to normal modes. You can check that configuration above comment i have mentioned there. In code i have didn't used any kind of filter. If you can suggest or guide me for the proper output of the accelerometer. Waiting for your warm responses and solutions.... – SACHIN RAJPUT May 30 '18 at 06:56
  • Sorry, I'm not sure what you are asking. – L. Putvin May 31 '18 at 11:09
  • I am asking about that, how to get stable output from the accelerometer. Is there any filter i have to use or function available in the Keil IDE. – SACHIN RAJPUT Jun 02 '18 at 05:03
  • Low pass filtering is helpful to reduce noise, since noise is generally high frequency. – L. Putvin Jun 03 '18 at 19:21