Coversion Constant for ACC, MAG, GYRO for V7.00

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Coversion Constant for ACC, MAG, GYRO for V7.00

1,226 Views
a8Chcx
Contributor V

Hi Mike,

 

I read another thread that is regarding to change +/-8g to +/-4g for FXGS8700 and have the following questions:

From data sheet:

+/-8g: 1024/g, then you set to 8192(8*1024) as COUNTSPERG

+/-4g: 2048/g, then should set to 8192(4*2048) as COUNTSPERG or 4096? Why?

 

How constants for MAG and GYRO?

 

Thanks,

 

Christie

Labels (1)
0 Kudos
Reply
9 Replies

893 Views
michaelestanley
NXP Employee
NXP Employee

Christie,

That post was for adjusting the fusion from it's default setting of +/-4g range to +/- 8 g range.  So g/LSB doubles and LSB/g is cut by half.  Both sets of numbers are listed in the Sensitivity block of Table 2 in the 8700 datasheet.

Mag and gyro are unaffected by g-range change.

Mike

0 Kudos
Reply

893 Views
a8Chcx
Contributor V

Hi Mike,

What you are saying is that the sensor is using the same range as before, +/-8g, just conversion ratio? But, I saw there is a change for ACC range initialization, am I right?

For MAG: Is it counts per uT?

For GYRO:  Is it counts per degree/s?

Thanks,

Christie

0 Kudos
Reply

893 Views
michaelestanley
NXP Employee
NXP Employee

No.  In the standard build, we have the sensor set to +/-4 g range.  That was changed to support a wider g range.

The units are part of the #define used right in the code:

#define FXAS21002_COUNTSPERDEGPERSEC 16 // for 2000dps=32000 counts

#define FXOS8700_COUNTSPERG 8192.0
#define FXOS8700_COUNTSPERUT 10

0 Kudos
Reply

893 Views
a8Chcx
Contributor V

Hi Mike,

Based on your spec, could you tell if the following understanding are right?

1) MAG: Sensitivity == 0.1 uT/LSB--->Get COUNTSPERUT=1/0.1=10

2) ACC: Sensitivity for +/-4G== 0.488mg/LSB--->Get COUNTSPERG=1000/0.488=2048

              Sensitivity for +/-8G== 0.976mg/LSB--->Get COUNTSPERG=1000/0.976=1024

3)GYRO: Sensitivity for +/-4G== 62.5mdps/LSB--->Get COUNTSPERDEGPERSEC=1/0.0625=16

Regards,

Christie

0 Kudos
Reply

893 Views
michaelestanley
NXP Employee
NXP Employee

Gyro range is +/- 2000 dps, not +/-4G.

I am assuming 8700 for both Mag and Accel, in which case, yes, your numbers are correct.

0 Kudos
Reply

893 Views
a8Chcx
Contributor V

Hi Mike,

GYRO range is +/-2000dps.

Which one should I use for ACC when it is using FXOS8700:

For +/-4g: I should use 2048 instead of 8192 for fusion? It is working when I am using the default 8192 on demo board?

For +/-8g: I should use 1024 instead of 4096 for fusion?

The fusion required for ACC is based Counts per G?

Thanks,

Christie

0 Kudos
Reply

893 Views
michaelestanley
NXP Employee
NXP Employee

Christie,

All calculations are done internally using floating point numbers in g's, microTeslas and radians/second squared.  The drivers supply the right scale factors to convert bits to real quantities.   Unless you are changing scales or writing your own sensor driver, you should never have to mess with them.  What are you trying to do?

Mike

0 Kudos
Reply

893 Views
a8Chcx
Contributor V

Hi Mike,

I am using the demo board for my testing.

I am wondering if I need to change 8192 to 2048 for my demo board because COUNTSPERG should be 2048 for ACC +/-4g based on SPEC? Or I have to use 8192 for demo board, why?

Thanks,

Christie

0 Kudos
Reply

893 Views
michaelestanley
NXP Employee
NXP Employee

Christie, our demos work out of the box.  You should not have to change anything.

0 Kudos
Reply