Problem with getting acceleration

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hello,

   

 

   

I`m working with a CY8Ckit-003.

   

How to interpretate the value gotten by the accelerometer? I`m using the ADC to convert the signal, but i need the value 

   

in m/s for example. is there any way to get this value?

0 Likes
4 Replies
Roy_Liu
Moderator
Moderator
Moderator
5 comments on KBA First comment on KBA 10 questions asked

You only can get delta m/s, since the value gotten by the accelerometer is nothing but a voltage singnal interpretated as acceleration-induced motion with a full-scale  range of /-2g (19.6 m/s/s). Datasheet of the accelerometer that the kit used:

   
   

http://www.kionix.com/Product-Specs/KXSC7-1050%20Specifications%20Rev%206.pdf

   
   

Regards,

   
   

Roy

Roy Liu
0 Likes
Anonymous
Not applicable

The datasheet of the actual chip used, could be found here, http://www.kionix.com/Product-Specs/KXSC7-2050%20Specifications%20Rev%204.pdf. The accelerometer gives out voltage proportional to the acceleration. Since it is a 3 axis accelerometer there are 3 voltages corresponding to each of these axes. The zero-g offset voltage is 1.65 volts when the chips is powered with 3.3 volts supply, which implies that the X and Y axes will measure 1.65 volts when the accelerometer is held howrizontal in the XY plane. The sensitivity of this accelerometer 660 mV/g, which effectively implies that when the accelerometer sees one g of acceleration the output voltage would be (1.65V 0.66V) or (1.65V - 0.66V). This voltage needs to be digitisded using the Delsig ADC on PSoC3. For a 12 bit configuration, single ended mode with VSSA-VDDA being the range, the smallest voltage that can be measure is 0.8 mV(1 count). If you measure a count of 2163 from ADC, then the measured voltage is (2163*8 mV =1.73 V).  Effectively the accelaration seen corresponds to the 0.08 Volt (1.73V -1.65V). The actual acceleration in g is now given by (80/660)g = 0.1212 g, which is equivalent to 1.187 m/s2. I hope this helps.

0 Likes
Anonymous
Not applicable

Ok, i`m reading the ADC value in a uint16 variable. But the problem is that the function UART_PutChar have a uint8 parameter. This is my code:

   

   

 

   

uint16 accel;

   

uint8 *pointer;

   

accel = ADC_GetResult16();

   

pointer = &accel;

   

UART_PutArray(pointer,2);

   

 

   

But i think this isn`t working. Is that correct?  

   

   

How can i send this value by uart component? Could you give me an example please?

0 Likes
Anonymous
Not applicable
    It would be helpful to debug the issue if you could throw some light on the following:   
   
        
  1. Is your UART working with PutChar function? 
  2.     
  3. How are you seeing the UART output? Which kit are you using ?
  4.     
  5. Have you made sure that Global interrupt is enabled in your code
  6.     
  7. Have you used the API UART_Start() in the code before sending the data. 
  8.    
0 Likes