- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I use a MMA8451Q to monitor a device that does not have to bend over x degrees to the vertical axis. Before I used a tilt switch CM1320-0 from Assemtech and wish to obtain the same result.
To do this , I thought used to detect portrait/landscape integrated. But I realize doing my tests that this mode is not the same if you turn around the Z axis or if the Z axis is tilted up or down.
Operation when turning around Z is perfect for my application, ideally I would have the same mode of operation on the other axis . But when I switch to the front ( Z down) , I have no hysteresis and backward (Z up) I hysteresis is too important! I tried to cheat the offset of the Z axis, but this is not enough.
I wonder if there is another solution that regularly read the MMA8451Q and make the angle calculation from the XYZ readings ? If there is no alternative , is there a sample source code?
Thank you
Best regards,
Gaétan
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I finally meets self!
I chose to integrate the method provided in this datasheet: http://www.analog.com/static/imported-files/application_notes/AN-1057.pdf
On a PIC18 clocked at 8MHz, the computation time is 1.5ms, which is still reasonable.
Too bad, I have not found a solution to use the MMA8451Q with a interrupt, which would have saved me energy.
Rgards,
Gaétan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I finally meets self!
I chose to integrate the method provided in this datasheet: http://www.analog.com/static/imported-files/application_notes/AN-1057.pdf
On a PIC18 clocked at 8MHz, the computation time is 1.5ms, which is still reasonable.
Too bad, I have not found a solution to use the MMA8451Q with a interrupt, which would have saved me energy.
Rgards,
Gaétan
