Friday, November 21, 2014

TI SensorTag Coordination

In this post, I'll be talking about the SensorTag CC2541 triaxial (3 axes) KXTI9 coordinates and

and how to convert from body frame coordinates to global frame coordinates or which is also called 

earth frame or reference frame. 


When you are starting with Sensortag Acceleromater for phone application developement or
for developing a specific product or to feed your curiousity, You have to do the following
1. Scan through the SensorTag user guide (buhh!)
2. SensorTag Accelerometer GaTT commands or also can be found here and don't use
Gatt commands that are given here  (they are totally wrong ..It got me through hell to recognize 

that....I will get into the details later).

3. look into KXTI9 datasheet 

I'll get into the Gatt commands later on. At the moment coordination is on demand.

Yes, so, well... Lets strip the Tag down





On the left is Sensor tag without casing and ofcourse on the right is with casing @@

Looking closer

KXTI9  chip as given in the datasheet ( and as how it looks in reality :D)





Look at pin 1 (the dot), for reference

And closer 
KXTI9  Coordinates as shown in data sheet. Z+ is pointing towards you 






Now, based on the first photo I posted, This is how the coordinates are (Z+ is pointing at you)



Mounting your SensorTag

I prefer testing the acceleration data when SensorTag is mounted in the following position 





Because the acceleration data will be closer to 0 , if not 0......Except the Z axes will be giving  1g as an output because it is aligned with the global frame.

Why X axis and Y axis ..Closer to 0


As you can see from the casing of Sensortag, it is not sharply straight , it has a slope on it (to contain the coin battery). Therefore, I prefer the position on the left, where the circuit within is more aligned with the table. Yet, I have to admit, I did some tests on other SensorTags, and some gave different values then 0 . So, it might not apply for all SensorTags. I guess the reason is the chip's manufacturing process error or how it is glued on the circuit causing misalignement with the global frame.




Global frame : Also called Earth frame or Inertial frame or reference frame. It has the following coordinate (0,0,1) where 1 is the gravity (9.8 m/s/s). It is also a high assumption in most cases; because it isn't exactly 1 all around the globe; as Earth has a Spheroid shape
(it is almost a sphere, but not quite).

Accelerometer KXTI9 outputs acceleration of the body frame plus global frame in digital hexadecimal format.

Body frame : It is the cooordinate I discuses earlier, coordinate of the chip on the circuit. 


This step is necessary if you want to obtain a clean Accelerometer data without the gravity component. So, you have to align it well with the global frame and get 0 output at the X, Y axes and 1 in the Z axes. If it isn't aligned , the 1g will cross on the X and Y axes and will interfere with their readings.









comment