Professional Documents
Culture Documents
Arduino mini-experiments
Advanced lab course for bachelor students in physics
Leon Mans
Vincenzo Sanfratello
1 Blink LEDs 2
1.1 1 LED Experiment . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 2 LED Experiment . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 3 LED Experiment . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2 Temperature measurement 8
4 Acceleration 17
4.1 Elevator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2 Gravitational and magnetic field of the Earth . . . . . . . . . . . . 18
5 Planck’s constant 22
1
Chapter 1
Blink LEDs
2
A ”ON/OF F ” plot is presented in Fig. 1.2 displaying the LED status over a
period of 60 s.
Figure 1.3: 2 LED Setup with an Arduino UNO and Arduino NANO.
3
The following plots shows the status of the LEDs over the measured time of
60 s. Fig. 1.5 shows the status of both LEDs. A ”1” stands for the first LED
blinking and −1 for the second LED. Because of the specific delays chosen for
this experiment both LEDs were never ”ON ” at the same time; instead their
”ON/OF F ” status was shifted by 1 s.
Figure 1.4: Top: Plot of first (blue) LED status over time. Bottom: Plot of
second (red) LED status over time.
4
Figure 1.5: Plot of both LEDs status over time.
5
Given that all three LEDs were set to turn ON and OFF at the same time we
refrain to plot them together. The following plots show the individual LED status
over the measured period of time instead.
Figure 1.7: Plots of each LED status in the 3 LED setup over time.
6
1.4 Conclusion
We conclude that the Arduino mini-controller setups used for controlling the blink-
ing of LEDs in electrical circuits provide the necessary time resolution for precise
measurements.
7
Chapter 2
Temperature measurement
One would expect a temperature decay over time which follows the law:
8
Figure 2.2 shows the measured data and the fitted exponential function. The
fit the initial temperature to be T0 = 78.84 ◦ C, the constant k = 5.857 × 10−4 s−1
and TC = 26.21. Because this experiment was performed at room temperature,
this TC seems reasonable. The fit in Figure 2.2 is not perfect, one reason for this
could be the non-constant temperature of the environment, but the exponential
fit describes the data as expected.
The arduino is well suited for this experiment as it gives an accurate mea-
surement of the temperature and is able to log the temperature over time. A
thermometer that has to be read out manually would give the same results, but
of course it would have been more work to manually record the measurements.
9
Chapter 3
10
Figure 3.2: Speed of sound measurement setup. Obstacle is put in the sound
wave’s path.
0.1 m
A value for the speed of sound vs = Duration
is computed for each data point.
We approximate the uncertainty σt on the duration measurement by using the
standard deviation in lack of direct uncertainties from the experimental setup.
The uncertainty on vs is
r
σ tot,d
2 sσ 2
t
σv = +
t t2
where t: Duration and σt : Standard deviation on duration.
11
The final value of vs is calculated by combining all measurements using
P vi
i σ2
v̄ = P 1i
i σ2
i
s
X 1
σ¯v =
i
σi2
12
For the first measurement of 10 cm (or 5 cm distance to obstacle) we obtain a
value of vs = 331.26 ± 16.38 ms by this method.
3.1.3 Results
The following figures show the data similarly to above for each total distance of
14 cm, 20 and 30 cm. The same procedure as above is used to calculate the speed
values and their uncertainty.
13
Figure 3.6: Cut data of duration on 20cm speed of sound measurement.
14
Figure 3.7: Cut data of duration on 30cm speed of sound measurement.
15
Table 3.1 lists the calculated values for the speed of sound and the statistical
uncertainty for each distance.
Results
Total distance [cm] v̄ [m/s] σv̄ [m/s]
10 331.26 16.38
14 300.55 14.95
20 304.05 14.22
30 334.41 16.59
3.1.4 Conclusion
By combining these measurements once more we obtain a final value of vs =
315.73 ± 7.72 ms . The sound of speed at 20°or dry air is 343.2 ms 1 . Therefore
the measurement misses the literature value by ∼ 8% and does not lie within the
calculated uncertainty. On all measurements the same pattern can be observed.
Most of the data points concentrate at specific values and some data is spread
randomly in between. Without further knowledge of the sensor functionality we
cannot make a definitive statement on the cause of the pattern. Since the wave
emitted spreads into space evenly, one possibility could be that the sensor is pick-
ing up reflected waves at different points of the obstacle. This would explain the
slightly different duration values.
We conclude that the method used does not provide an adequate precision for
sound of speed measurements. Systematic errors also should be investigated, spe-
cially regarding the functionality of the acoustic sensor.
1
https://de.wikipedia.org/wiki/Schallgeschwindigkeit
16
Chapter 4
Acceleration
4.1 Elevator
A LSM9DS1 board is used to measure the acceleration and magnetic field of the
Earth in three dimensions. First of all, the acceleration in an elevator is measured.
F = mg (4.1)
17
Figure 4.2: Measurement of the elevator acceleration when going up- and down-
wards.
Figure 4.2 shows that the acceleration increases by about 1 sm2 when riding
upwards and decreases by about 1 sm2 when riding downwards. As expected, an
object in the elevator on a scale would become heavier when going up due to the
increased normal force acting on it, and lighter for the opposite direction. It would
also be expected that the function a(t) is zero before and after the end of the ride,
as the acceleration returns to normal, so it has to rise and then fall again for the
case of the ride upwards and vice versa, which is represented in the data.
Figure 4.3: The sensor with its coordinate system on the right.
The coordinate system is defined on the table on which the experiment was
performed, the z-axis is orthogonal to the table plane, the x-axis points along the
18
edge of the table to the right and the y-axis points to the front. The measurement
in the xy-plane is started with the y-axis of the sensor pointing in the negative
direction of the table’s y-axis and it is then rotated clockwise. The xz-measurement
is started with the sensor y-axis pointed along the negative x-axis and rotated
clockwise. The last measurement in the yz-plane is started with the sensor’s y-
axis pointed in the z-direction and rotated counterclockwise. The acquired data
is shown in Figure 4.4.
Figure 4.4: Measured data of the gravitational field along the three axes.
19
Figure 4.5: Measured data of the magnetic field along the three axes.
As can be seen from the elevator measurement, the accelerometer can record
a change in acceleration as it would be expected from theory, but for example the
measured value for the acceleration due to gravity g is not that accurate, as it
slightly above 10 sm2 when the real value is 9.81 sm2 . But nonetheless, it is enough
for a qualitative assessment. For the magnetic field, one limitation of the arduino
setup is the rotation that is performed by hand which makes it inaccurate, this
could be fixed with a dedicated setup were the measurement device could be fixed
and rotated along each axis with a fixed angular scale. But in the end, some sort
of accelerometer or Hall probe would have to be used in this experiment, so it
doesn’t make a difference that they are operated with an arduino other than the
fact that it makes data acquisition easier. It can be used in this experiment, but
20
a fixed setup with fixed rotation axes would be better and more accurate.
21
Chapter 5
Planck’s constant
The goal of this experiment is to measure Planck’s constant with LEDs. Such
an LED only emits light after a certain threshold voltage is applied to it so that
the electrons in the n-zone can cross over to the p-zone and fill the holes in that
zone, thereby releasing photons with the energy of the energy difference between
the different regions. That means that a LED which emits photons with a higher
energy requires a higher threshold voltage to turn on. After this voltage is reached,
the electric current is expected to rise linearly. To measure the threshold voltage,
the current in LEDs with different wavelengths depending on the applied voltage is
measured with an arduino. This arduino increases the voltage in steps of 0.00122V
and the resulting current is recorded on a laptop.
22
Figure 5.2: Measured current curves for different LEDs.
The curves in Figure 5.2 show the threshold voltages at which the current
rises for different LEDs and as expected, the LEDs with a higher wavelength have
a lower threshold voltage. The black line on the left shows the infrared LED
and the one on the right the ultraviolet LED. Now these threshold voltages are
determined by fitting the linear parts of the curves with linear regressions. Then
the intersection of these curves with the x-axis represents the different threshold
voltages, which is shown in Figure 5.3
Now these threshold voltages are plotted against the inverse wavelengths, which
can be seen in Figure 5.4.
23
Figure 5.4: Linear regression for the threshold voltages.
hc
Evolt = U e = = Eγ (5.1)
λ
hc 1
U= (5.2)
e λ
Now the slope of the linear function is equal to m = hc e
. The fitted value for
−6 −6
m is (1.3116 × 10 ± 0.0767 × 10 ) V m. It follows that the measured value
for Planck’s constant is h = (7.01 × 10−34 ± 0.41 × 10−34 ) Js. The value of this
constant according to literature is 6.626 × 10−34 Js, this value is in the error range
of the fitted value, they are compatible.
That means that the experimental setup is generally suited to measure the Planck
constant because there is a relationship between the threshold voltage and the
color of the LED. But of course, there is no single point at which the LED is
considered on, so this threshold voltage can only be estimated. Also, not all
the electric energy from the voltage is converted to photons, some of it is also
converted to heat because the LED acts as a resistance like any electrical device.
The fact that higher photon energies require higher threshold voltages because
the electrons have to be brought to a level that is energetically higher is true,
but if there’s already a large energy difference between the conduction band on
the n-side and the valence band on the p-side, the threshold voltage wouldn’t
have to be very high to release high energy photons. Planck’s constant can be
accurately measured with a photo cathode and a counter field to measure the
kinetic energy of the electrons released by the photons, as the entire energy of the
photon is transferred to the photon, there’s a stronger relationship between the
kinetic energy and thus the measured counter voltage than there is between the
color and the threshold voltage of the LED, which makes the measurement more
accurate. Here the traditional method would be more accurate. When talking
about the LED experiment itself, the arduino is useful for recording the measured
data of the current, if it was performed manually, one would have to turn up the
voltage by hand and judge the point at which the current is high enough to record
24
the voltage at that point as the threshold voltage, which would make it harder and
less accurate.
25