Where Is the Accelerometer in an iPhone?

Actually, I’ve done this experiment before (although with an iPod touch). Of course, it’s a fun experiment so it seems worthwhile to repeat the measurement. Of course most smart phones have some type of accelerometer so that you can do all sorts of cool things with it (like see how high you can toss your […]
Camera 10 21 13 7 13 pm
Image: Rhett Allain

Actually, I've done this experiment before (although with an iPod touch). Of course, it's a fun experiment so it seems worthwhile to repeat the measurement.

Of course most smart phones have some type of accelerometer so that you can do all sorts of cool things with it (like see how high you can toss your phone). Oh, and here is some more info on how one of these accelerometers work.

Experimental Setup

The basic idea is to read the acceleration values from the phone. If I can find some way to vary acceleration with position, I can calculate the theoretical location of the accelerometer sensor. The key to this experiment is circular motion. When an object moves in a circle at a constant speed (or with a constant angular speed), it will have an acceleration:

La te xi t 1

Also, if you have an object moving in a circle the direction of this acceleration is towards the center of the circle.

Fall 2013 Sketches.key

If I have the y axis of the iPhone always pointing towards the center of the circle then the y-component of the acceleration will be constant. So here's what I am going to do. I will put my phone on some type of rotating platform at a constant distance from the center of rotation. By recording the acceleration and angular speed, I can determine the distance from the sensor to the center of the circle. Simple, right?

How do you record acceleration on the iPhone? There are several viable options, but I decided to try out a new app - Mobile Science Acceleration.

Mobile Science   Acceleration for i Phone  i pad  and i pod Touch on the i Tunes app Store

It's free and you can record for some time interval and then email a cvs file with the data. Really, it would be awesome if Vernier would let Logger Pro on your computer connect to your iPhone via wifi or bluetooth to use as a remote sensor (hint, hint).

What about rotating the device? At first, I tried put my iPhone on a rotating meter stick that was powered by a little DC motor. I knew that the angular velocity wouldn't be constant so I had a meter stick rotating on the Vernier rotation sensor. It turns out that this method was really sucky and gave terrible data.

My second plan was to use a LEGO Mindstorms NXT to control a motor at different speeds. I think this worked out much better. Here is a picture of the setup.

I Photo

The iPhone will go at the end of the meter stick and I will run the NXT at different speeds. How do I get the angular speed? I have a video camera mounted above the setup so I can get that measurement as well.

Data Analysis

I set the Acceleration app to record the values at a rate of 10 per second. Once I save the data file, it looks something like this (I imported it into Vernier's Logger Pro).

Untitled

This shows the acceleration in units of g's along the y-axis of the iPhone (which runs the long width of the phone). The data is a little bit more noise than I thought it would be, but you can see that the constant part of the data gives an average of 0.1251 g's with a standard deviation of 0.01917 g's.

Now I just need the angular speed. Here is a plot of the angular velocity for half a revolution (from Tracker Video Analysis).

Data Tool

This is a fairly constant angular speed of 1.498 radians/sec with a standard deviation of 0.04776 rad/s.

If I do this for the other angular speeds and for the y-direction and x-direction orientations of the iPhone, I get the following data.

I should have looked at the acceleration data before I finished the experiment. This LEGO NXT motor seems to take some time to get all the way up to the set angular speed. Here is a plot of the y-acceleration from the phone for one of the runs.

Untitled

Ok, now I will really show you the data.

Don't worry about the "d-omega" and "d-a". Those are just the standard deviations in the data. I will talk about that later. Here is a diagram showing the two orientations of the phone. I measured to the side closest to the center of rotation in each case for a reference point.

Fall 2013 Sketches.key

Now for the fun part. Plotting the data. Oh sure, I could just use each angular speed and acceleration to find a value for the distance to the accelerometer but I won't. That's the boring way to do it. I already have a relationship between the acceleration, the angular speed and the radius. From that, I can plot acceleration vs. ω2 and it should be a straight line (since the radius doesn't change). Further, the slope of this line should be r (the distance from the center to the accelerometer).

Here is a plot for the iPhone accelerating in both the y direction and x direction.

Figure 187878788.png 2

The y-direction gives a slope of 0.4816 m and the x-direction slope is 0.4577 meters.

Finding the Accelerometer

Now I just need to do a little drawing. I know the distance from the center to the accelerometer in both orientations. Here is a diagram showing where those two curves cross. Wait. There's a problem. Here is the y-direction with a white line showing the radius of 0.4816.

Fall 2013 Sketches.key

Do you see the problem? Yes. This says that the location of the accelerometer is not inside the iPhone. Darn. That stinks. What did I do wrong?

In the y-orientation, the top of the phone is 0.44 meters from the rotation point. If I look at the individual data points, there are two cases that have an r-value less than 0.44 meters. They are both around 0.42 meters. What if I go with that value? And for the x-direction I can do the same thing. Three speeds give a radius of 0.43 meters.

Using these two values, I drew circles with those radii and overlapped the two images. This is what you get.

Fall 2013 Sketches.key

That shows the accelerometer near the top of the iPhone.

What About the Error?

Maybe I made some mistakes on purpose? Really, I'm not sure what went wrong. The plot looks nice and linear, so I have a few thoughts.

  • Maybe I just suck at collecting data.
  • I used 9.8 m/s2 for g in order to convert the acceleration from g's to m/s2. Maybe that was wrong.
  • What if the phone was tilted a little bit? In this case the acceleration wouldn't just be in the x- or y-directions but it would have a component in the z-direction also. This could be the case if the meter stick I was spinning flexed a bit.
  • Perhaps the NXT motor wasn't spinning at a constant speed. This could mean that my angular speeds from the video analysis didn't match up with the same time interval from the acceleration data.
  • Some of my accelerations were close to 6 g's. Maybe the iPhone doesn't record these high values so accurately.

My plan was to have a second post where I did an error analysis to get the uncertainty in the location of the sensor. However, with this data I don't think I will do that. What I should do is repeat the experiment. Maybe I can use a different acceleration app on the phone.

I guess I will just have to add this to the list of things I need to do.