Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > PSoC® 3 > Problem with getting acceleration

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



Problem with getting acceleration
Moderator:
RKRM

Post Reply
Follow this topic



Problem with getting acceleration

ernaniwr posted on 16 Jun 2011 5:47 PM PST
Member
2 Forum Posts

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?




Re: Problem with getting acceleration

yliu posted on 16 Jun 2011 08:26 PM PST
Cypress Employee
29 Forum Posts

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



Re: Problem with getting acceleration

U2 posted on 17 Jun 2011 10:09 PM PST
Cypress Employee
589 Forum Posts

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.



Re: Problem with getting acceleration

ernaniwr posted on 20 Jun 2011 04:59 PM PST
Member
2 Forum Posts

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?

 

 



Re: Problem with getting acceleration

U2 posted on 21 Jun 2011 09:28 AM PST
Cypress Employee
589 Forum Posts
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. How are you seeing the UART output? Which kit are you using ?
  3. Have you made sure that Global interrupt is enabled in your code
  4. Have you used the API UART_Start() in the code before sending the data. 





ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Spec No: None; Sunset Owner: KXP; Secondary Owner: VWA; Sunset Date: 01/01/20