How Does The iPhone Know Which Way Is Up?

If you have ever turned your iPhone from side to side, watching the screen change its position, and wondered why, this is your day. The amazing little display of smarts, in knowing which way is up is accomplished with a sizable bit of engineering. Inside the iPhone ( and other smartphones ) is a thing called an "accelerometer" and it has nothing to do with car pedals.iPhone Gyro

The accelerometer has lots of dandy work inside. One would think you could hear a ball-bearing rolling around inside the iPhone, but that is not the case. It uses springs. They are super tiny springs that are made out of silicone. Silicone has a known resistance for its length and these silicone springs are making tiny electrical connections when a person moves or bumps the iPhone. The contact points and springs inside the accelerometer are around the size of a pencil point. It is expected they will get even smaller with the rise of nanotechnology.

The accelerometer costs Apple a grand total of 65 cents. The process of making the device so tiny is done using chemical engineering. Apparently they use potassium hydroxide poured on silicone in crystal form. The potassium hydroxide automatically makes a pyramid shaped hole in the silicon. Using some acrobatics and more of the chemicals, the right shape turns out for the accelerometer. Thankfully, the process can be automated or Apple and any other smartphone manufacturer would not have this neat feature to play with.

The electronic feedback from the accelerometer to the iOS operating system can be be used for lots of things. Plenty of gamers are playing racing games where a car responds to the position of the iPhone or ipad. One such is "Drift Mania Championship" where the user must use an accelerometer ( move the iPhone ) or the car will never get around the racing track. The iPhone can also use the accelerometer with a payment app to make payments. "Bump" is the unimaginative name of a company that makes an app that uses the accelerometer to know when the smartphone is "bumped" against another phone. Thanks to those springs we talked about earlier, and some fancy math, the two phones know what the bump means. It means money, and there are plenty of people "bumping" their iPhones together to buy and sell. All of it is possible because of that 65 cent accelerometer. As soon as someone else finds out the algorithm of other moving events, you can be sure the iPhone will be digitizing those as well.




Kindly provide the network and city

I can tell you that there is an accelerometer in my iPad. I have a racing app (for real racing, not some dumb game). This app, TrackAddict, can record the g forces in all three directions as I drive my car. The three directions are: X for forward and backwards (positive numbers for forward and negative numbers for backwards), Y for left and right (negative and positive numbers), and Z for up and down (positive and negative numbers again). To detect these forces (and provide me with the g force numbers acting in all three directions), there must be an accelerometer in my device.

Since gravity is acceleration, the force of the earth's gravity being 9.8 meters (32.15 feet)/second squared (also written as 9.8 m/s^2), you can use an accelerometer to detect which way is up: Gravity will be pulling down (towards the earth's core), putting pressure on the spring (or some other substance, see below) in the accelerometer in that direction (towards the ground). Again, thanks to my TrackAddict app, because this app gives the g forces in all three directions, I know there must be at least three springs in the accelerometer in my device: one for left and right, one for forward and backwards, and one for up and down.

As far as the tipping point (when the smart device decides to rotate the image on the screen) I suspect it is when the force on the accelerometer is very close to or beyond 9.8 m/s^2. This will have been calibrated when they designed the accelerometer, i.e., at 9.8 m/s^2 the spring will have compressed X amount, and the electrical resistance will have correspondingly decreased X amount.

There is a way to test this out, to prove that it is an accelerometer which is used to detect which way is up. (Unfortunately, I can’t do it myself because I’m in a wheelchair, but maybe you could try it for me.) The trick is to induce acceleration in another direction other than down. You could do this by holding your smart device in outstretched arms, and then start spinning around and around. Start by having the device be flat, level with the ground, and with the image “up”, such that you can read it. Then outstretch your arms, while still holding the device level, flat with the ground and the image on screen pointing towards you, such that you can read what’s on the screen. Now start spinning around and around. The faster you spin the better. Now the accelerometer will feel force acting in a direction away from you, and if your spinning fast enough such that the force away from you is near or beyond 9.8 m/s^2 the image should turn around, pointing away from you, and appear to you upside down. (Note, however, that the earth's gravitational pull will still be acting upon your device. That’s is why if you ever attached an object to a rope and started spinning it around, the object will slowly rise from the ground. In fact it will never be level with your hands, again because the earth’s gravitational pull will always be acting on the object. However, again if you are spinning it around very fast, it will be so close to level that you will not notice it.)

The farther you can hold out your device the better; in fact if you could somehow attach your device to a long rope it would really be better. The problem would then be that you can not see what your device is doing. You could solve this problem by going to a chilfren's playground and getting on a carousel. Sit on it as far away from the center as possible. Then have someone spin the carousel as fast as possible. Then hold your device flat and level with the ground, and with the image on screen pointing towards you such that you can read it. Now, again if the force acting on the accelerometer (pointing away from you), is near or beyond 9.8 m/s^2, the image should turn around and appear such that it is pointing away from the center of the carousel, and appear to you to be upside down.

Now, what I was trying to find out when I went to this site is exactly how these accelerometers are made. How do they work. I’m not so sure, at least the way I read his post, that he is 100% correct. If springs are used and your measuring the length of the spring and its electrical resistance, the length of the spring, the path the electricity takes, is not shorter when the spring is squeezed. Pulled end to end the spring is still X long.

I wonder if smart devices do not use the piezoelectric effect, the ability of certain materials (usually crystals, especially quartz) to generate an electric charge in response to applied mechanical stress. They use these on scales to weigh trucks. As the truck sits on the scale it is inducing machanical stress on the piezoelectric material underneath the truck's wheels, which in turn causes the piezoelectric substance to generate an electric charge. The scale measures this charge to compute the weight on the scale.

However, the mere force of gravity will already be inducing mechanical stress on the substance causing it to produce an electric charge. Truck scales discount the electric charge produced just from gravity, but smart devices could use the very small electric charge given off by the piezoelectric substance. Again, there must be at least three of these devices in a smart device, orientated in the three directions I mentioned above.

Using the electric charge from these 3 pieces of piezoelectric material, and the charge from all three, it can either point the screen in the direction corresponding of the piezoelectric material that is producing the greatest electric charge. Alternatively, the tilting point could be when the piezoelectric material puts out an electric charge (X) equal or higher than what earth’s gravity causes the piezoelectric material to produce. Once one of the piezoelectric sensor detects an electric charge of X or greater, it rotates the screen in that direction.

(By the way, on the moon gravity is 1.62 meters (5.32 feet)/second squared, one sixth the gravity of the earth. On the surface of the sun it is an incredible 274 meters (899 feet)/second squared), 28 times the gravity on earth!)

Hmmm. Some very basic errors. Aristotle "knew" heavy objects fall faster than light objects. We "detect" gravity by the acceleration of objects. A rotating object is accelerating -- slowly rotating objects just have lower rates of acceleration. I suspect the accelerometer works with software to detect the "force" of gravity and at the "tipping" point the software cause the image to rotate.

Duh.. It's a "Magical" device! Obviously it works because of the Unicorn-horn powder mixed with the fairy-dust!

I disagree. Not because I know how it works, but because I can observe how it DOESN'T work. And after all, observation is the foundational basis of the "Scientific Method", is it not? Besides, it still failed to explain exactly how it worked. But here goes.

You say it is based upon acceleration. Acceleration is the change in velocity. Problem here with the iPhone is, you can rotate the iPhone ever so slowly and ever so steadily (no change in velocity) and nothing happens until it reaches a certain "tipping" point and, Bingo, it changes. In fact, you can also turn it quickly (acceleration) but not past that certain point and nothing happens. So something is going on besides the detection of acceleration. It is more like a level, which depends upon gravity and not acceleration. In fact, there is a level app to do just that. And all iPhones have a compass app built in, so it could easily be using the compass function. It is not depending only on movement and it is not detecting acceleration or change in velocity. It seems to be detecting position in relation to gravity just like a level, or possibly a compass.

So, once more. Does anyone out there REALLY know how this works?


Add new comment