PDA

View Full Version : 2-axis tilt sensor



Ramius
- 26th May 2012, 17:44
Hi All!
Anyone know of a simple 2-axis tilt sensor that will show the angle? Thanks, Ed

LinkMTech
- 27th May 2012, 00:48
These are fun to play with and includes an extra axis but really small to work with: MMA8453Q

Or skip the build and buy this guy: Digital level (http://www.micromark.com/miniature-digital-level,9409.html)

ardhuru
- 27th May 2012, 13:31
This might be an impractical suggestion in this context, but here's my 2 cents worth..

I've been getting increasingly impressed with the hardware that goes into even the cheapest of Android phones (of your interest here, the accelerometers, orientation, gyroscope, even gps?) and the relative ease with which you can pull out that data and transmit it via bluetooth. Its getting to a point where the cheap lesser known brand phones (in my country costing less than 100 US), could be considered as black boxes for the basis of a number of dedicated applications, I think.

Thanks again to Dave (M) and Dave (H) for pointing me towards B4A, BTW!

6493

Check out the 5th line. Orientation values for all 3 axes.

Ramius
- 27th May 2012, 14:16
Thanks Guys!
Both are great ideas! The intended purpose will be to display pitch and roll for my submarine using a on-screen display. Best, ed

ScaleRobotics
- 27th May 2012, 14:38
Here is a tilt solution for the MMA7260 3 axis accelerometer. It uses an Olimex PIC-LCD-3310 development board.

Tilt project code: http://www.picbasic.co.uk/forum/content.php?r=210-Angle-determine-tilt-from-3-axis-g-sensor

Hardware used: http://www.olimex.com/dev/pic-lcd3310.html

Ramius
- 27th May 2012, 17:26
Interesting! What is your opinion / knowledge of the tilt sensors that output a square wave with a duration based upon angle?

Heckler
- 27th May 2012, 20:35
Hey Ardhuru,

How did you display that sensor information on your android?? Is that an app?

Or just a built in information page? I have the Motorola Droid2 and have never seen that info.

thanks
dwight

Jerson
- 28th May 2012, 04:43
How did you display that sensor information on your android?? Is that an app?


There are apps that show you this info. Couple of them are called AndroSensor and Android System Information

ardhuru
- 28th May 2012, 06:49
Yes, Jerson is right, of course, but this one came as a sample app created with B4A.

http://www.basic4ppc.com/forum/basic4android-getting-started-tutorials/6647-orientation-accelerometer.html#post38780

The above screen-grab was an actual run on my LG Optimus.

I could send you the compiled .apk if you are interested. Alternatively, you could download the source code on the above page and the trial version of B4A and compile it yourself.

Anand

Ramius
- 31st May 2012, 12:34
Hi Guys!
I was wondering if anyone has written code for the Memsic 2125 sensor? I looked at some code for Stamps and ended up with more questions than answers. Thanks, Ed