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 sensitivity units of gyro, accelerator and magnetometer

Hi,

Can someone give me the units of gyroscope, accelerator and magnetometer? (those comes with the sensortag)

Something like:

Gyro sensitivity, 175 mdps/digit

acc sensitivity, 1mg/digit

mag sensitivity, 0.45 digit/mGauss

Thank you!

  • Hi, did you mean the resolution? It depends on the range you select. For example if you choose 8-bit resolution and 2G range, the resolution would be 256/4 = 64 counts/g. For the detailed calculation method, you can refer to the wiki page of SensorTag. There are code demonstrating how to calculate sensor value from raw data.

    Chunmeng

  • Thanks for the help Zhang!

    How can I change the full-scale-range of the sensors?

    For example the gyroscope, the datasheet mentioned:

    Angular rate sensors (gyros) with applications-programmable full-scale-range of ±250°/sec,
    ±500°/sec, ±1000°/sec, or ±2000°/sec.

    I think by default, full-scale-range is +-250, can I change it to +-500?

    Thanks again!

  • Hi, unfortunately the range selection for the gyroscope is not implemented in the default hardware driver file hal_gyro.c. However, I think you can achieve it by modifying the driver file. You can refer to the register map of the IMU3000 here http://www.invensense.com/mems/gyro/documents/RM-IMU-3000A.pdf. The range selection function is actually achieved by setting FS_SEL bits in Register 22 – DLPF, Full Scale (Addr 0x16) with different values. For how to set values through I2C, you can take a look at the accelerometer driver file hal_acc.c and it is achieved by HalSensorWriteReg() function (remember to call halGyroSelect() function as you must select the sensor on I2C bus first before you can write values). Those are all my suggestions for how to change the gyroscope range. However, I have never tried this before and cannot guarantee a success. Just a reasonable guess and hope it could help:)

    Best Regards

    Chunmeng

  • Hi, thank you for the help last time.

    I got some new questions:

    1. TI has provided us a way to convert sensor raw value into real value.

    For example, for Accelerator

    Integer x = c.getIntValue(FORMAT_SINT8, 0);
    Integer y = c.getIntValue(FORMAT_SINT8, 1);
    Integer z = c.getIntValue(FORMAT_SINT8, 2) * -1;

    double scaledX = x / 64.0;
    double scaledY = y / 64.0;
    double scaledZ = z / 64.0;

    But if I follow those, it gives me data that indicate SensorTag is experiencing 0.25 g in the z-axis when putting still. Why is it not 1 g (since it is same as gravity)?

    2. Previous I have used Gyroscope called L3GD20 from STM, and magnetometer LSM303DHLC.
    When I lay the sensortag down on the table with front face up, it give me
    Gyro: X: 4.5, Y:-2.4, Z: -1.2
    Mag: X: 23.5 Y: 4.2 Z: 49.0

    While using others sensors in the same position:
    Gyro: X: -1.25 Y: -0.52 Z: -0.25
    Mag: X: -172 Y: 88.7 Z:-149

    despite that I may scale the value wrongly, why are the signs of the numbers also different?
  • For accelerometer values, as long as you select the right range and do the right calculation, the output should be 1g. If you are using 8-bit mode +-8g range, the real value = raw data/ (2^8/(16)). As you use 64, which implies that you are using +-4G range. You can check your accelerometer setting, whether it is set correctly.

    For gyroscope, you must first check the datasheet for both sensors to see if their coordination settings are same. As gyroscope measures the angular velocity, the reading obtained when the sensor keeps rest is not reliable as there are some errors there. You can verify you gyroscope readings by move the two sensors together and observe the output changes.

    I am not familiar with magnetometer, sorry for that. 

    Chunmeng