Smartphone sensors and video analysis: two allies in the Physics laboratory battle field

Recently, two technologies: video analysis and mobile device sensors have considerable impacted Physics teaching. However, in general, these techniques are usually used separately. Here, we focus on a less-explored feature: the possibility of using supplementary video analysis and smartphone (or other mobile devices) sensors. First, we review some experiments reported in the literature using both tools. Next, we present an experiment specially suited to compare both resources and discuss in detail some typical results. We found that, as a rule, video analysis provides distances or angular variables, while sensors gives velocity or acceleration (either linear or angular). The numerical derivation of higher derivatives, i.e. acceleration, usually implies noisier results while the opposite process (the numerical integration of a temporal evolution) gives rise to the accumulation of error. In a classroom situation, the comparison between these two techniques offers an opportunity to discuss not only concepts related to the specific experiment but also with the experimental and numerical aspects including their pros and cons.


Video analysis and smartphone sensors in the laboratory
In the last years, two technologies stormed into the classrooms and Physics laboratories. One is the use of video analysis, i.e., the -manual or automatic-tracking of objects, frame by frame, in digital videos, either obtained by the students themselves or from an open library or repository [1]. The other one is more recent and based on modern mobile devices. Indeed, numerous smartphone-based physics experiments have been proposed in the literature [2]. These experiments take advantage of the built-in smartphone sensors as the accelerometer, gyroscope (angular velocity sensor), magnetometer, proximeter, luxometer (ambient light), pressure (barometer), microphone among others. As a general rule, in the Physics-teaching literature an endless number of experiments is proposed based on one or the other technology but seldom using simultaneously both of them. As we consider that this is a window of opportunity not been fully exploited, here we discuss some experiments involving both video analysis and smartphone sensors and analyse future perspectives.
Smartphone usage has strongly expanded over recent years. Remarkably their use goes significantly beyond the original purpose of talking on the phone. Indeed, it is everyday more frequent to use smartphones as clocks, cameras, agendas, music players or GPS. More remarkable is the habit, especially among young people, of bringing their smartphones every time and everywhere. From a physicist's point of view, it is impressive that smartphones usually incorporate several sensors, including accelerometer, angular velocity sensor, magnetometer, proximity or pressure sensor. Although these sensors are not supplied with educational intentions in mind, they can be employed in a wide range of physical experiments, especially in high school or undergraduate laboratories [2][3][4][5]. Moreover, experiments with smartphones can be easily performed in non-traditional places as playgrounds, gyms, travel facilities, among many others. All the possibilities that smartphone exhibit, foster students interest in exploring, measuring and meeting the physical world around them.
Video analysis is an useful tool in Physics laboratories at many levels. There are several software packages available but one of them, Tracker [1], free and open, has become a standard tool in the framework of Physics teaching. In all the cases, the underlying idea is the possibility of analysing digital records of experiments, frame-by-frame, to obtain physical magnitudes. The most common example is the obtention of linear or angular coordinates, however, as shown in several papers this procedure can be extended to center-of-mass or normal coordinates in oscillatory problems and also as a modelling tool [6,7]. In this approach, Tracker numerically solves the differential equation of motion, proposed by the user, using appropriate numerical algorithms.
In the next Section we will briefly review, some experiment that make use of both technologies. After that, in Section III an experiment discussing specific issues, pros and cons, is presented. Finally, in Section IV we present the final remarks.

Experiments involving video analysis and sensors
In the scientific literature a few articles, using both video analysis and smartphone sensor, have been recently published. In one of the pioneering references [3], Castro-Palacio et al proposed the use of the acceleration sensor of a smartphone for the study of the uniform and uniformly accelerated circular motions and corroborated their results with the measures obtained by video recordings of the experiments and a physical models.
Another worth mentioning reference by three of us [4] is focused on the physical (also known as compound) pendulum. This system was studied by means of the acceleration and rotation (gyroscope) sensors. The pendulum can rotate, giving full turns in one direction, or oscillate about the equilibrium position (performing either small or large oscillations). Radial and tangential acceleration and the angular velocity obtained with smartphone sensors allow to analyse the dynamics and, remarkable, taking profit of the simultaneous use of the acceleration and gyroscope sensors, trajectories in the phase space are directly obtained. The coherence of the measures obtained with the different sensors is corroborated with video analysis. This approach was extended in Ref. [6] to include the obtention of the (real) acceleration instead of an apparent acceleration as it is obtained directly by the acceleration sensor. This, in fact, is a consequence of the equivalence principle which sates that a sensor fixed in a non-inertial reference frame cannot discern between a gravitational field and an accelerated system. In this case, we shown how to process acceleration values read by these sensors to substrate the gravitational component.
Besides classical mechanics, other proposed experiments involve electromagnetism of modern Physics. Recently, Pirbhai [8] measured the e/m ratio using smartphones to measure the magnetic field strengths and phone cameras and video analysis to determine the charge-to-mass ratio of the electron with considerable accuracy. Simo [9] also proposed an experiment involving electromagnetism and, in this case, Faraday-Lenz law. Dropping a piece of magnet through a methacrylate tube that crosses a coil, the measured electromagnetic field is related to the position of the magnet depending on time.
Another example is Ref. [10], where the dynamics of a traditional toy, the yoyo, is investigated theoretically and experimentally using smartphone' sensors. In particular, using the gyroscope the angular velocity is measured. The experimental results are complemented thanks to a digital video analysis. The concordance between theoretical and experimental results is discussed.
It is also worth mentioning, the experiment about the shape of a liquid surface in a rotating frame depending on the angular velocity [11]. This experiment consists on a fluid in a rectangular container with a small width placed on a rotating table. A smartphone fixed to the rotating frame simultaneously records the fluid surface with the camera and also, thanks to the smartphone sensor, the angular velocity. The video analysis is used to obtain the surface's shape: concavity of the parabola and height of the vertex. Finally, let us mention a curious experiment about the discharge of a RC circuit [12]. It is shown there how to analyse using video analysis the discharge of the capacitor and correlate data with the information provided by sensors.

Experimental results about the physical pendulum
One typical example of physical system of paramount importance in high-school or undergraduate level is the physical compound pendulum (also known as physical pendulum) which consists of a rigid body that can freely rotate around a horizontal axis through a fixed center of suspension. This experiment is appropriate to be analysed using both video analysis and smartphone sensors.
We consider a physical pendulum composed of a bicycle wheel with its axis fixed in a horizontal position around which the wheel rotates in a vertical plane, and a smartphone affixed to the outer edge of the tire, as shown in Figure 1. An Android operated smartphone (LG G2 D805) furnished with a 3axis LGE accelerometer sensor (STMicroelectronics, 0.001 m/s2 precision) and a 3-axis LGE gyroscope (STMicroelectronics, 0.001 rad/s precision) was used. Technical information regarding the exact location of the sensors within the smartphone was obtained from the manufacturer and verified by physical methods [5]. The Androsensor application was used to record sensor readings [13]. Experimental setup consisting on a bike wheel with the hub fixed on a horizontal axis and a smartphone fixed on the periphery of the tire.
The relevant physical variables, angle, angular velocity and angular acceleration, were obtained experimentally using video analysis and the smartphone orientation sensor. In addition, the angle is calculated using the information provided by the accelerometer and the gyroscope as reported in [5]. A tracker screen-shot is displayed in Figure 2. As mentioned before, given length and time scales, the software analyses frame-by-frame and calculate, first of all, the angle. Next, using numerical schemes the angular velocity and, last, the angular acceleration.
The temporal evolution of the angle is depicted in Figs. 3 and 4. We distinguish two regions, in the first one ( Figure 3) the pendulum passes through the uppermost position (the non-stable equilibrium point). Both the calculated coordinated and the video analysis agree very well, however, the orientation sensor is not able to provide correct values.   Angular variable as a function of time. Colour code as in Figure 3. When the smartphone performs oscillations with amplitude below 90º does not pass through the uppermost position the three values agree very well. Figure 5 shows the temporal evolution of the angular acceleration. As it can be appreciated the values obtained with video analysis (derivating the angle twice) are considerble noiser than those obtained by the gyroscope (derivating the angular velocity).

Final remarks
In this article we have shown that smartphone sensors and video analysis are complementary tools in the Physics-teaching. Both of them present their advantages and disadvantages and they can be employed in supplementary way. As shown in several examples, available in the literature, these tools can be used, in specific experimental setups, to corroborate the coherence of different measures. In other experimental situations these tools can be used to obtain different physical quantities. In these cases, it is necessary to proceed with caution. Usually, physical quantities obtained with numerical schemes, as velocity or acceleration, obtained from video analysis are considerably noisier than typical sensors. In addition, measures obtained with the linear acceleration were found to be inaccurate, in particular when the smartphone moves in proximity to the point of stable equilibrium.
Both video analysis and smartphone sensors are valuable tools useful to elucidate a wide range of physical phenomena. An adequate understanding of the underlying operation principles is of fundamental importance, a fact which gains in significance as the use of smartphones and video cameras becomes more widespread with the expected decrease in cost. All the possibilities that these new technologies exhibit, foster students interest in exploring, measuring and discovering the physical world around them.