This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2541/BMA250 accelerometer data width

Other Parts Discussed in Thread: CC2541

Hi

We are using cc2541 keyfob, having a BMA250 accelerometer from BOSCH,

As per data sheet of BMA250, the data coming out of the sensor is 10 bit width,

But BLE stacks only transmits 8 bit data.

 

I have a couple related questions:

  1. Is the 8bit sufficient to determine acceleration. If so how to covert 8-bit value into acceleration.
  2. If above is not possible how do we get the 10bit data using BLE, so we  can convert to  appropriate acceleration value.
  • Moving to the correct forum.

    Regards.

  • Hello Sankar,

    Using 8-bits for acceleration measurement would depend on how accurate your measurement needs to be.  

    Inside the BLE v1.4 folder projects/BLE/profile/accelerometer/accelerometer.c you can see how the measurement is read (accel_ReadAttr).  You will notice that the case statement for the x,y,z coordinates have a *pLen =1 and the pValue is only reading one value of the array.  Above that you will see the case statement for the accelerometer range which is 16 bits, *pLen =2 and pValue is assigned a high and low.

    You would have to modify the ACCEL_X_UUID and the Y and Z to match that of the ACCEL_RANGE_UUID in the source, header file and main application.  Then you would have a 16-bit value which you could convert to a 10-bit value.

    Do the math to see how much of an impact an 8-bit reading vs 10-bit has in your calculations.  Most applications involving a Keyfob can live with 8-bits.

    Thanks,