Home » Physics » Measuring data with smartphone apps

Measuring data with smartphone apps

Start here

On Physics Central Tamela Maciel writes:

That smartphone you carry around in your pocket all day is a pretty versatile lab assistant. It is packed with internal sensors that measure everything from acceleration to sound volume to magnetic field strength. But I’ll wager most people don’t realize what their phones can actually do. Apps like SensorLog (iOS) or AndroSensor (Android) display and record raw data from the phone’s movement, any background noises, and even the number of satellites in the neighborhood. Watching this data stream across my screen, I’m reminded just how powerful a computer my phone really is. Wrapped into one, the smartphone is an accelerometer, compass, microphone, magnetometer, photon detector, and a gyroscope. Many phones can even measure things like temperature and air pressure.



Physics Toolbox Sensor Suite (Google Android)

Physics Toolbox Sensor Suite (Apple iOS)


Useful for STEM education, academia, and industry, this app uses device sensor inputs to collect, record, and export data in comma separated value (csv) format through a shareable .csv file. Data can be plotted against elapsed time on a graph or displayed digitally. Users can export the data for further analysis in a spreadsheet or plotting tool. See http://www.vieyrasoftware.net for a variety of usage ideas

(1) G-Force Meter – ratio of Fn/Fg (x, y, z and/or total)
(2) Linear Accelerometer – acceleration (x, y, and/or z)
(3) Gyroscope – radial velocity (x, y, and/or z)
(4) Barometer – atmospheric pressure
(5) Roller Coaster – G-Force Meter, Linear Accelerometer, Gyroscope, and Barometer
(6) Hygrometer – relative humidity
(7) Thermometer – temperature
(8) Proximeter – periodic motion and timer (timer and pendulum modes)
(9) Ruler – distance between two points
(10) Magnetometer – magnetic field intensity (x, y, z and/or total)
(11) Compass – magnetic field direction and bubble level
(12) GPS – latitude, longitude, altitude, speed, direction, number of satellites
(13) Inclinometer – azimuth, roll, pitch
(14) Light Meter – light intensity
(15) Sound Meter – sound intensity
(16) Tone Detector – frequency and musical tone
(17) Oscilloscope – wave shape and relative amplitude


PDF Labs to use with smartphone apps


EnglishIntroduction EspañolIntroducción
  1. Introduction to the accelerometer: Measurement of g.
  2. Frequency of Sound – Measure the frequency of sound.
  3. Magnetic field strength measurements.
  4. Time measurements with sound: Coefficient of Restitution.
  5. Introduction to photo gate timing using an external photo-resistor.
  6. Direct measurement of g using the sound of a falling object.
  7. Pendulum measurement of the acceleration of gravity using the accelerometer.
  8. Simple harmonic motion: Spring coefficient and damping.
  9. Inclined plane measurements using photo gates.
  10. Doppler shift – Measure the Doppler shift in the frequency of sound.
  1. Introducción a la acelerómetro: Medición de g.
  2. Frecuencia de sonido – Medir la frecuencia del sonido.
  3. Medidas de fuerza del campo magnético.
  4. Las medidas del tiempo con el sonido: coeficiente de restitución.
  5. Introducción a medidas de temporización con fotopuerta utilizando un foto-resistencia externa.
  6. La medición directa de g utilizando el sonido de un objeto cayendo.
  7. Medición del péndulo de la aceleración de la gravedad utilizando el acelerómetro.
  8. Movimiento armónico simple: Coeficiente de resorte y amortiguación.
  9. Mediciones de movimiento en el plano inclinado utilizando las fotopuertas.
  10. Desplazamiento Doppler – Medir el desplazamiento Doppler en la frecuencia del sonido.


Simple Harmonic Motion, and measuring Period

Smartphone Physics in the Park

Here’s a simple physics experiment you can do at your local park.
By swinging on a swing and collecting a bit of data, you can measure the length of the swing – without ever pulling out a ruler.

1. To get started, download the free SPARKvue app (or another data logger app like SensorLog or AndroSensor). Open it up and have a play.
By clicking on the measurement you want to track and then clicking on ‘Show’, you will see an graph window open with a green play button in the corner.
Click the play button and the phone will start tracking acceleration over time.
To stop recording, click the play button again.
Save your data using the share icon above the graph.

2. Find a swing.

3. Fix your phone to the swing chain with tape – or hold it really still against your chest in portrait orientation with the screen facing your body.
Since I was a bit lazy, I opted for the latter option but this makes the final data a bit messier with all the inevitable extra movement.
You want portrait orientation in order to measure the acceleration along the direction of the swing chains.
This will tell us how the centripetal acceleration from the tension in the chains changes as you swing.

4. Start swinging and recording the Y-axis acceleration, without moving your legs or twisting your body. Collect data for about 20 seconds.

5. Stop recording and have a look at your lovely sinusoidal graph.
You could try to do the next step directly from this graph.
I wanted a bigger plot, so I saved the raw data and copied it into Excel.

Here are the first 20 seconds of my swing.
Plotting the centripetal (Y-axis) acceleration against time.
You can immediately see the sine wave pattern of the swing,
and the fact that the height of the peaks is decreasing over time.
This is because all pendulums have a bit of friction and gradually come to a halt.
Keep in mind that this plot shows the change in acceleration, not velocity or position.

Acceleration of a swing, as measured along the chain of a swing. Data collected with SPARKvue and graphed in Excel. Credit: author, Tamela Maciel

6. Measure the period of the swing from the graph.

Direction of total velocity and acceleration for a simple pendulum.
Credit: Ruryk via Wikimedia Commons

To make sense of the peaks and troughs:
think about the point mid-swing when your speed is highest.
This is when you’re closest to the ground, zooming through the swing’s resting point.
It is at this point that the force or tension along the swing chain is highest, corresponding to a maximum peak on the graph.

The minimum peaks correspond to when you are at the highest point in the swing,
and you briefly come to a stop before zooming back down the other way.
Check out The Physics Classroom site for some handy diagrams of pendulum acceleration parallel and perpendicular to the string.

Once we know what the peaks represent,
we can see that the time between two peaks is half a cycle (period).
Therefore the time between every other peak is one period.

For slightly more accuracy, I counted out the time between 5 periods (shown on the graph)
and then divided by five to get an average period of 2.65 seconds per swing.

simple pendulum has a period that depends only on its length, l,
and the constant acceleration due to gravity, g:

I measured T = 2.65 s and know that g = 9.8 m/s/s,
so I can solve for l, the length of the swing.
I get l = 1.74 meters or 5.7 feet.

This is a reasonable value, based on my local swing set, but of course I could always double check with a ruler.

Now a few caveats: my swing and my body are not a simple pendulum, which assumes a point mass on the end of a weightless string.
I have legs and arms that stick out away from my center of mass, and the chains of the swing definitely do have mass.
So this simple period equation is not quite correct for the swing (instead I should think about the physics of the physical pendulum).
But as a first approximation, the period equation gives a pretty reasonable answer.


By the way , here are comments on the above graph:

Claim: “Your graph is wrong. You write at the peaks, where the acceleration is highest, that the velocity is highest and the mid-swing-point. That is wrong. There is also a turning point with lowest velocity. The highest velocity and the mid-swing-point is where the acceleration is 0.”

Response #1

Remember, the phone is only recording the y-component of the total acceleration. At the end points the where the acceleration, a, is at maximum, but is at right angles to the chains so the y-component is zero.
This coincides with the velocity reaching zero as well.
At the mid-point where the velocity reaches maximum, the x-component of the acceleration is zero and the y-component reaches its maximum.
There is no point where the total acceleration reaches zero, only the x-component.

Response #2

My phone was measuring only the y-component of the acceleration, which from the way I held it, was only along the direction of the chains.
The maximum acceleration or force along the chains happens at the mid-point of the swing.
The minimum acceleration along the chains happens at the turning point.
So the graph is correct for the y-component acceleration.
But it would be interesting to repeat the experiment measuring the acceleration in the x-component, where the graph would look somewhat different.

Other experiments to explore

Morelessons from Vieyra software


Smartphones in science teaching


Mobile sensor apps for learning physics: A Google Plus community


Article: Turn Your Smartphone into a Science Laboratory


Using smartphone apps to take physics day to the next level


Placing the smartphone onto a record, playing on a turntable
To study angular motion

Smartphone app contest

Many more ideas https://mobilescience.wikispaces.com/Ideas

Physics Toolbox Apps by Vieyra Software  http://www.vieyrasoftware.net/browse-lessons

Belmont University Summer Science Camp
Physics with Phones, Dr. Scott Hawley  http://hedges.belmont.edu/~shawley/PhonePhysics.pdf


Familiarizing Students with the Basics of a Smartphone’s Internal Sensors
Colleen Lanz Countryman, Phys. Teach. 52, 557 (2014)
Full text of article, in PDF format







%d bloggers like this: