You are on page 1of 5

Physics Education

PAPER Related content


- Driven damped harmonic oscillator
An Arduino experiment to study free fall at schools resonance with an Arduino
A M B Goncalves, C R Cena and D F
Bozano
To cite this article: A A Moya 2018 Phys. Educ. 53 055020
- Kinematic measurements using an infrared
sensor
F Marinho and L Paulucci

- Reviews
View the article online for updates and enhancements.

This content was downloaded from IP address 142.132.1.147 on 08/08/2018 at 12:58


Paper
Phys. Educ. 53 (2018) 055020 (4pp) iopscience.org/ped

An Arduino experiment to study


free fall at schools
A A Moya
Departamento de Física, Universidad de Jaén, Edificio A-3, Campus Universitario de Las
Lagunillas - 23071 Jaén, Spain

E-mail: aamoya@ujaen.es

Abstract
We have designed a simple Arduino-based experiment to study free fall.
The experimental data associated to the free and vertical fall movement of a
brass saucer are gathered with the help of an ultrasonic distance sensor and
an Arduino board. The position–time curves obtained from different initial
heights are then plotted and the acceleration of gravity is experimentally
determined using Excel.

1. Introduction position–time curves obtained from different ini-


The open source Arduino microcontroller board tial heights are then plotted and the acceleration of
[1] has found application in different fields of sci- gravity is experimentally determined using Excel.
ence and technology, particularly in electronics Unlike the classical techniques, where the time
and robotics, allowing people to build things that taken by a body in free fall from a known height
they had not even imagined. Because of the inex- is measured, this activity allows us to measure
pensive, flexible and easily implementable char- values of position like in a coordinate system at
acter, schools in general and physics instructors approximately regular time intervals. Moreover,
in particular have also realized the advantages of this is possible in a simplest manner for a higher
using Arduino boards as low-cost data acquisition variety of bodies than other alternative methods
systems for lab experiments. Students at schools using photogates [2].
are usually excited by physics labs based on an
Arduino, this engagement being a key task for the
success of learning. 2.  Experimental set-up
Study of movement is the first classic topic in The experimental setup for our investigation of
physics. Concepts such as position, time, veloc- free fall consists of a brass saucer approximately
ity, and acceleration are studied by young people 11 cm diameter with a hook where there is tied a
at schools. Between the different competences cord of about 1 m length, and an ultrasonic posi-
included in the first subjects of physics we can tion sensor, as shown in figure 1. We tie the rope
find the identification of the simplest types of to the hand and take the saucer by the hook. Then,
movement from position–time curves. In tight we raise the hand about 70 cm vertically above the
relation with this competence, we have designed sensor and drop the saucer. Once the cord is tied,
a simple Arduino experiment to easily study free its length must be slightly smaller than this verti-
fall at schools. The experimental data associated cal distance in order to avoid damaging the sen-
to the free and vertical fall movement of a brass sor. Data acquisition was done with the help of an
saucer are gathered with the help of an ultra- HC-SR04 ultrasonic distance sensor, an Arduino
sonic distance sensor and an Arduino board. The Uno microcontroller board, a USB cable, and four

1361-6552/18/055020+4$33.00 1 © 2018 IOP Publishing Ltd


A A Moya

Figure 1.  Picture of the experimental setup.

male-to-female breadboard jumper wires. During breadboard jumper wires. This board supplies
the fall, we gather the decreasing distance from the voltage to the HC-SR04 sensor. The Vcc and
the sensor to the saucer at different times. Gnd pins of the sensor must be connected to the
The HC-SR04 ultrasonic distance sensor [3] 5 V and GND pins of the Arduino board, respec-
uses the principle of echolocation. The sensor tively, while the Trig and Echo pins of the sensor
has four pins: Vcc (power supply), Gnd (ground), must be, respectively, connected to the Arduino
Trig (trigger pulse input), and Echo (echo pulse digital pins 7 and 8, such as shown in figure  2.
output). A trigger signal of 5 V, lasting for at least An Arduino code like that shown in figure  3 is
10 ms, will cause the transmitter of the sensor to needed to collect the experimental data. This code
emit a short ultrasonic signal and the Echo pin to is similar to that used in other related studies [4].
keep at 5 V. After the receiver of the sensor detects The computer compiles this program and sends
the echo signal, or after a maximum wait time of it to the Arduino board through the USB cable.
38 ms, the Echo pin is reset to 0 V. The HC-SR04 The Arduino board will execute the code and will
ultrasonic distance sensor has an operating range repeatedly send back every 10 ms to the computer
of 2 cm to 5 m, with a resolution of 0.3 cm. the two experimental measurements that we need:
The brass saucer falls freely and vertically the internal clock time, t, and the distance from
with constant acceleration due to gravity, pro- the sensor to the brass saucer, x, at that time. The
vided air resistance is negligible. The position of Arduino serial monitor will show a table  with
the saucer with respect to the sensor, x, at time t two columns containing the experimental mea-
is given by: surements, which must be copied from (select
the appropriate data with the mouse, then press
gt2 Ctrl  +  C) and pasted into a spreadsheet such as
(1)
x = x0 −
2 Excel.
where x0 is the initial position and g  =  9.81 m s−2 The Arduino board is measuring the echo time
the acceleration of gravity. with the help of the pulseIn() function, which in this
case measures the total time (in ms) during which
the HC-SR04 sensor keeps the Echo pin at 5 V. The
3.  Arduino programming code result of multiplying this echo time and the speed of
The HC-SR04 sensor is connected to the Arduino sound in air at room temperature (343 m s−1) gives
Uno board with the help of four male-to-female the total distance travelled by the ultrasonic pulse.

September 2018 2 Phys. Educ. 53 (2018) 055020


An Arduino experiment to study free fall at schools

Figure 2.  Sketch of the circuit with the Arduino.

//FREE FALL
const int trigPin=7;
const int echoPin=8;
void setup() {
Serial.begin(9600); // Initialise Serial Monitor
}
void loop() {
unsigned int echo_time;
float distanced, distancex;
unsigned long time;
pinMode(trigPin,OUTPUT); // Send a pulse
digitalWrite(trigPin,LOW);
delayMicroseconds(10);
digitalWrite(trigPin,HIGH);
delayMicroseconds(10);
digitalWrite(trigPin,LOW);
delayMicroseconds(10);
pinMode(echoPin,INPUT); // Listen to the pulse
echo_time=pulseIn(echoPin,HIGH); // Echo time to get distance d
distanced=echo_time/2.0*0.0343; // Calculate distance d
distancex=sqrt(pow(distanced,2)-pow(1.3,2)); // Calculate distance x
time=micros(); // Time instant t to print
Serial.print(time/1000000.0,2); // Print time t
Serial.print("\t");
Serial.println(distancex,2); // Print distance x
delay(1000); // Wait for 10 ms
}

Figure 3.  The Arduino code.

September 2018 3 Phys. Educ. 53 (2018) 055020


A A Moya
close to unity, which indicates that the quadratic
x0 (m) g (m s–2) R2 model exceptionally describes the experimental
0.712 9.9 0.9993 data. The experimental values for the acceleration
0.601 10.2 0.9985 of gravity can be considered as excellent results
0.7 0.521 10.0 0.9999 despite the simplicity of the experiments.

0.5 5. Conclusion
Position (m)

We have designed a simple Arduino-based exper-


0.3 iment to study the free fall of a body. By using
an Arduino Uno board and an HC-SR04 ultra-
sonic distance sensor, this very important physics
0.1
experiment can be done in an inexpensive way,
with an excellent match between the position–
0.1 0.2 0.3 0.4
time experimental data and the theoretical model.
Time (s)
This STEM activity helps students to improve
both their experimental and theoretical skills
related to movement in physics.
Figure 4.  Experimental study of free fall.

When the HCSR04 sensor is placed under the brass Acknowledgments


saucer, this total distance is the sum of two identical Research reported here was supported by the
sides of length d each in an isosceles triangle. The teaching innovation project PID9_201617, from
height in this triangle is the distance to the saucer, the University of Jaén, Spain.
which is the position x that we need. The distance of
2.6 cm between the transmitter and the receiver of
ORCID iDs
the HC-SR04 sensor allows us to calculate the dis-
tance x by using the Pythagorean’s theorem, such A A Moya https://orcid.org/0000-0002- 6224-
as inferred form the sketch shown in figure 2. 4946
Received 2 June 2018, in final form 25 June 2018
4.  Data analysis Accepted for publication 20 July 2018
https://doi.org/10.1088/1361-6552/aad4c6
We have selected three experiments with different
initial positions, the corresponding position–time References
experimental data being shown by means of hol- [ 1] 2018 Arduino website (http://arduino.cc)
low circles in figure 4. It must be observed that we [2] Galeriu C 2013 An Arduino-controlled photogate
need to correct the origin of times by subtracting Phys. Teach. 51 156–8
from each time data the value of the time corre­ [3] 2014 HC-SR04 Datasheet website
(www.electroschematics.com/8902/
sponding to the first experimental data. In these hc-sr04-datasheet/)
plots, students clearly can observe the parabolic [4] Galeriu C, Edwards S and Esper G 2014 An
evolution of the position with time, and they eas- Arduino investigation of simple harmonic
ily can to do other curves such as space, x0  −  x, motion Phys. Teach. 52 157–9
versus time, t. Now, the data are fitted to a func-
tion of the type of equation (1) by means of the
Antonio A. Moya received the Physics
linear regression algorithm incorporated into
degree and the Ph.D. degree from the
Excel, which allows us to quickly identify x0 University of Granada, Granada,
and g. The obtained data, including the correla- Spain, in 1991 and 1996, respectively.
tion coefficients, R2, as well as the corre­sponding Since 1991, he has worked as a Physics
teacher at the University of Jaén, Jaén,
curves according to equation  (1), which have Spain. He has developed several
been plotted by means of solid lines, are also teaching innovation projects related to
shown in figure 4. The correlation coefficients are topics in introductory physics courses.

September 2018 4 Phys. Educ. 53 (2018) 055020

You might also like