Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have always wondered how the orientation/autorotation hardware works inside an iPhone/iPad/iPod Touch.

Originally I thought it was the accelerometer but I don't think it is as an accelerometer can only measure movement and the iPhone knows it's current orientation without any movement.

I have assumed until now that there is a little tilt switch inside the phone as well as the accelerometer and that this is used, but really I have no idea and Google isn't helping much! ;)

Anyone know how it works?

share|improve this question
add comment

4 Answers 4

up vote 2 down vote accepted

In the older iOS devices it's the accelerometer - it is detecting the constant acceleration due to gravity.

Normal motion produces only short bursts of acceleration, not long enough to trigger rotation.

If you put your iOS device in a fast car and accelerated it for several seconds you could probably get it to autorotate the wrong way.

share|improve this answer
    
You'd have to accelerate more than 1G, pretty impossible in most cars. –  Agos Feb 9 '11 at 16:20
    
Fair enough; better use a F1 car then :) –  Nick Moore Feb 9 '11 at 16:39
add comment

It´s called a gyroscope. Have a look at this article on iFixit, it explains it (within an iPhone 4) quite well.

share|improve this answer
    
+1: I was looking for that and you beat me to the punch. I always found that article fascinating. –  Philip Regan Feb 9 '11 at 11:32
    
That is a fascinating article, but this is not how the autorotation works as the gyroscope was new in the iPhone 4 and autorotation has been supported since the first gen iPhone. –  Dave Verwer Feb 11 '11 at 11:01
    
Oops, sorry, you´re right, Dave. –  Asmus Feb 11 '11 at 11:38
add comment

From what I know, the iPhone (and iPod Touch) didn't have a gyroscope until the latest model. Are you guys sure it's not the accelerometer that did this, and now it is the gyroscope in the most recent models?

share|improve this answer
add comment

I talked to a person about this topic (who was skilled in electronics as well as in software development), he answered, there is a special IC (integrated circuit) integrated on the circuit boards of some modern mobile phones that determines which edge of the phone is currently downwards which is used in autorotation of screen using software (the driver of the IC). When the screen is kept horizontally, no change in the screen orientation occurs because none of the edges of the phone is found downwards.

share|improve this answer
1  
Could you explain what this answer provides that other answers here have not covered or expand your answer to provide more information than the others? –  M K Jun 23 at 7:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.