Tilt angle calculation with MMA7660

Hello, I need to know the tilt angle using MMA7660 , but I noticed that it is not possible to get that information directly from the sensor.

So, anyone can help me to calculate the tilt angle using the outputs of MMA7660

many thanks in advance, regards, reha

Doesn't the data sheet provide that information? Do you have a link to the sensor's data sheet?

Hello, datasheet only explain, how to read the values fron x,y,x axis , gravity etc. but not tilt angle.

link to datasheet is: http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MMA7660FC

also, there is another document from freescale ( http://www.freescale.com/files/sensors/doc/app_note/AN3107.pdf ) to explain how to calculate tilt angle from acceloremeter, but I could not recognise how to implement with MMA7660

thnaks, reha

Page 3 tells all about how to calculate tilt.

Angle = arcsin(Vout - 1650mv)/(800V/g)

The sensor reading you get is a value in the range 0 to 1023, and corresponds to 0 to VRef (which defaults to 5V for V5 boards). So, to determine Vout, you need to know VRef. Have you changed VRef? You also need to know what voltage your board operates at. Do you know that?

Vout = reading/1023 * VRef.

Hello thank you for the reply but that article written for another (analog sensor, MMA7260Q) sensor, not digital one (MMA7660) .. so, I could not figure out how to make this calculation with MMA7660

thanks, reha

It doesn't matter if the sensor is digital or analogue, the trigonometry is identical.

According to the datasheet here:

the device has a sensitivity of only 21.33 counts/g.
This is far too low a sensitivity to be used for anything but gross (> 30 degree) tilt detection.

Awol, math is different , because.. analog calculation based on sensor voltage. But, in 7660 , you dont get Voltage output.. only kind 6 digit value on which Im not so clear about meanning of that value.

Groove, thank you very much for warning ;-(

regards, reha

The maths is even simpler for the digital version - there's no offset calculation to do.