Gyroscope

First of all, sorry if it is the wrong section. I'm a developer starting in this crazy world of electronics...

My doubt here is,
is it possible to determine if my smartphone is facing down or up based only on gyroscope? I mean, the screen is on the table or the screen is facing roof.

(update: being more specific, the cheapest one like GY-521 MPU-6050 3-Axis Gyro)

tyvm

I think it is possibly, by checking the value of gravity acceleration if it is possible or negative.

ImNotGoku:
First of all, sorry if it is the wrong section. I’m a developer starting in this crazy world of electronics…

My doubt here is,
is it possible to determine if my smartphone is facing down or up based only on gyroscope? I mean, the screen is on the table or the screen is facing roof.

(update: being more specific, the cheapest one like GY-521 MPU-6050 3-Axis Gyro)

tyvm

Absolutely impossible to tell any orientation solely from a MEMS gyroscope. MEMS gyro’s are rate-gyros
and only output rate-of-rotation signals.

Neither the GY-521 nor the MPU6050 are just gyroscopes however, they are 6DoF accel+gyro, and an
accelerometer can tell orientation when stationary, and the combination of accel+gyro can give full
orientation in real time (apart from yaw drift).

Your smartphone APIs will provide orientation for you of course…

Thanks guys.

The smarthphone thing was just an example, the nearest I found from my Frankenstein project...

MarkT I can't understand how the accel can help me on that. If you don't mind on give me more details... Anyway, maybe for only that will be easier just have a light sensor in some side to check the light.
What do you think? Only now I thought about it.

For now I'm still looking for components already done, after Frankenstein is born I will lose much more time removing unecessary hardware.

panagiotispir, ty your reply also, but I belive I can't rely on that, since idk how it will be made at 1st, I mean, maybe the gyro is negative for a backside of 1 item and positive for a backside of the other one.

When held still, the accelerometer indicates the direction of "down" (the gravity vector).

See this tutorial: How_to_Use_a_Three-Axis_Accelerometer_for_Tilt_Sensing-DFRobot

woa. ty. so basically I need to check for a 180 degree rotation in the wanted axis...

Simple theory. Looks pretty hard to translate it in code :-X

but ok, I have a good path now, thx guys.

Anyone with a better idea feel free to light me up. All I need is to know this 180 degree rotation. Maybe the light sensor I thought later is the easiest way.

But good information is never too much :smiley: