Using Arduino in Physics Teaching: Arduino-based Physics Experiment to Study Temperature Dependence of Electrical Resistance

Nowadays, the rapid developments in science and technology have an impact on education as well as on all gear units. The integration of technology into the education process offers effective opportunities, particularly in the fields of STEM (Science, Technology, Engineering and Mathematics). In this context, Arduino platform has started to be used as a low cost, easy to use microcontroller in physics teaching. In this study, an Arduino-based physics experiment that can be used in physics laboratories was designed. We have used Arduino platform to study temperature dependence of electrical resistance and to define the temperature coefficient for a conductor. Experimental data were collected using the Arduino ohmmeter and a temperature sensor. The resistance-temperature curve obtained is in the expected character and the temperature coefficient is in the expected value. With this experiment, the student can easily observe the temperature change of the conductor's resistance and calculate the temperature coefficient of the resistance. The Arduino-based apparatus is presented as a simple and low cost alternative to physics laboratories.


Introduction
Laboratory activities in the teaching of physics are important as students are involved in the process of learning and exploring with firsthand experience. Laboratory experiences enable students to understand the functioning of the laws of physics, to recognize, understand and reinforce the concepts of physics and to develop scientific skills (Darrah, Humbert, Finstein, Simon & Hopkins, 2014;Sari, Pektaş, Çelik & Kirindi, 2019). Nowadays, technology is developing rapidly and technological products have taken place in physics laboratories, and experimental physics has reached an impressive point. In particular, microprocessors, mobile data collection tools, sensors and analogue instruments have been integrated into a single system, providing significant convenience in data collection, data processing and visualization processes (Chen et al., 2012;Russell, Lucas & McRobbie 2004).
In this context, Arduino Board, based on a microprocessor, has been preferred in physics experiments with its low cost, flexible and easily applicable structure and quick data collection advantages (Atkin, 2016;Pereira, 2016;Tunyagi, Kandrai, Fülop, Kapusi &Simon, 2018).
Electrical resistance and its temperature dependence in conductors are included in physics curricula at secondary, high school and university levels. For example, in Turkey, the electrical resistance and factors affecting the electrical resistance (cross-sectional area, length, type of conductor) are included in the 8th grade secondary (MoNEa, 2018). Temperaturedependent change of conductor resistance takes place in the 10th grade high school curriculum (MoNEb, 2018). Similar topics are included in physics courses in many numerically university programs. In addition, the factors affecting the resistance such as length, type and cross-sectional area of conductor are examined and the experiments related to these effects are carried out widely in schools. Thus, students can easily comprehend and apply these factors. As another effect on the resistance of the conductor, the temperature effect in the physics curricula cannot be studied experimentally enough. Therefore, students have difficulty in understanding the effect of temperature on resistance. The reason that the physics experiments related to the temperature-resistance relationship cannot be done very often may be the complex structure of the test equipment such as heating element, current module, resistance measurement module and not being as cheap as each school can provide.
In this study, a simple and economical Arduino-based physics experiment is presented, which examines the variation of the resistance of a copper wire with temperature. An Arduino board, an Arduino ohmmeter and a temperature sensor were used to measure the temperature-resistance relationship.

The Model of Temperature Dependent Electrical Resistivity of Metals
When a potential difference (V) is applied between the ends of a metallic conductor, an electric field is generated in relation to the potential difference. Due to this field, negative charges in the conductor move from low electrical potential to high potential. This movement of charges is called electric current (I). The direction of the electric current is considered to be the direction in which the positive charges move with the effect of the electric field. In real life, electric current in many electrical circuits is caused by the movement of negatively charged electrons. The actual direction of movement of the charged Here, R is the resistance of the conductor. The resistance for a conductor with a uniform cross section (for example, a wire or rod) can be measured by Here, l is the length of conductor, A is the cross-sectional area, and is the resistivity that takes into account the structure of the material in resistance (Serway, Faughn,&Vuille, 2014, pp. 66).
The main reason for the electrical resistance in conductors is that the electrons acting under the influence of the electric field collide with the atoms (ions) forming the crystal lattice. These collisions prevent the movement of electrons and electrons lose some of their kinetic energy during collision. This lost energy is transformed into heat energy in metal. In addition, foreign atoms that disrupt impurity also contribute to the resistance of metals. If the length of a conductor increases, the number of collisions of the electrons increases and thus resistance increases. When the cross-section area of the conductor (A) is larger, it contributes to carry more electron current per unit field and thus the resistance decreases.
When the structure of the conductor changes (the type of atoms forming the conductor), the resistance for different materials becomes different. Another factor affecting resistance in metals is temperature. If the temperature of the metal is increased, the metal atoms vibrate stronger and the transmission electrons make more violent collisions with them, thus the resistance of the metal increases (Meaden, 2013, pp.6). If the temperature range is not too large, the resistivity in metals is a linear function of temperature and it is expressed as Here,  (ohm-meters) is the resistivity at any T temperature (°C), and 0 is the resistivity at the reference temperature T0 (usually 20 °C). α is the temperature coefficient of the  (5) for a conductor with a uniform cross-sectional area (Meaden, 2013, pp.6;Young, Freedman, Sandin, &Ford, 1996, pp. 854). Where R0 is the resistor of the sample at the reference temperature T0, and α is the temperature coefficient (or resistance change per degree). If the reference temperature is chosen as zero degree, the equation 5 will be (6) If this equation is compared to a linear equation, it is seen that this equation becomes as following (9) Thus, the temperature coefficient for a conductor with a uniform cross-section can be experimentally defined from the slope of the resistance-temperature graph.

Experimental Set-up
The experimental set-up for temperature dependent analysis of the resistance of a copper wire and determination of the temperature coefficient consists of 0.3 mm in diameter and 30 m in length varnished copper wire, an Arduino Uno card, a USB cable, DS18B20 waterproof temperature sensor, 320 Ω and 4.7 KΩ resistors, 8 male-male and 2 male-female jumper wires, a spiral stove, beaker and some distilled water ( Figure 1). Firstly, an Arduino ohmmeter is prepared on the breadboard for resistance measurement. The structure and operation of the ohmmeter was given in the next part. The copper wire to be used in the experiment is mounted on the unknown resistance section in the ohmmeter apparatus. 30 m long copper wire is connected using jumper wires. Then the temperature sensor is connected to the Arduino board. The tip of the temperature sensor and the copper wire attached to the breadboard with the jumper wires are placed in a beaker with pure water. The pure water at room temperature in the beaker is heated with a spirit stove. Experimental data is collected until the temperature of the pure water is reached from room temperature to the boiling temperature. When measuring the temperature sensor, the change in resistance is observed with the Arduino ohmmeter. The resistance-temperature graph is then generated for the copper wire. The temperature coefficient is calculated by using the slope of this graph and equation 9.

Construction of the Arduino Ohmmeter
The simplest way to measure resistance is to create a voltage divider with an output voltage that is connected to the unknown resistance. An Arduino ohmmeter is a very simple and convenient resistance meter created with a voltage divider. Figure 3 shows the structure of the Arduino ohmmeter with the circuit diagrams and simple schematic illustrating. In Figure 3, the correlations can be written for closed circuit consisting of resistors in series as (10) If the current value in equation 11 is written in equation 12 and if R2 is left alone, the equation becomes as It is V = 5V in this equation (Figure 3). The potential value of V1 is obtained from the value read from pin A0. The analog input A0 is a 10-bit analog to digital converter (A/D converter, ADC). This means that the input voltages between 2 10 = 1024 and 0-5 Volt will correspond to R2 GND (Ardiuno GND) R1 is the known resistor and 320Ω-resistor is used in this study. R2 is the resistor unknown and to be measured with the Arduino ohmmeter. The Arduino ohmmeter and resistance measuring device are equipped with 320 Ω resistor, two male female jumper wires, 3 male-male jumper wires and copper wire to be measured. One end of the 320Ω resistor is connected (R1 resistor in Figure 3) to the A0 analog pin of the board and the other end to the GND pin with the help of the two male-male jumper wires. One end of the copper wire is connected to the pin on the breadboard to connect the end of the 320 Ω analog resistor to the A0 analog pin. The other end is connected to the + 5V pin of the Arduino card via the breadboard (R2 resistor in Figure 3). In order to avoid damage to the temperature of the test device, first the male-female jumper wire and then the male-male jumper wires are connected to the ends of the copper wire at these connections. Thus, the spirit stove is removed slightly from the set-up in this way. In addition, the jumper wires connected to the ends of the copper wire are covered with heatresistant waterproof material to prevent damage in hot water.

Arduino program
The end of the temperature sensor connected to the Arduino board and the copper wire is placed inside the beaker with some water. Thus, the experimental setup is ready.
Arduino code is written to the Arduino interface to collect the data as shown in Figure 5.

Findings
The experimental set-up in Figure 4 was established, and the spirit stove was burned to collect experimental data. The copper wire was heated from room temperature to the boiling temperature of the water in the beaker (97.31 °C) and the data are collected in this range. The resistance-temperature graph of this data is given in Figure 6. The data are fitted on a function of the type of equation 7 through the linear regression algorithm in the Excel Office application. The data obtained, including the correlation coefficients, R 2 and the correlation curves drawn by solid line according to equation 7, are shown in Figure 6. The fact that the correlation coefficients are close to 1 indicates that the first order linear model exceptionally explains experimental data. In this graph, students can easily see that the resistance changes linearly with temperature. The slope of the graph was calculated as 0.0319. For the reference resistance value (R0) of the copper wire, the resistance was measured with the Arduino ohmmeter at 20 °C using the experimental setup and it was measured as R0 = 7.69 Ω. The coefficient of resistance temperature was calculated as, by using this value and the slope of the graph in equation 9. Thus, the temperature coefficient for the copper wire was determined experimentally. This value is consistent with the values given in the literature for copper (Giancoli, 2009, pp. 658).

707
The resistance-temperature relationship for copper wire was theoretically investigated, too. R0 reference resistance was calculated using equation 3 in the theoretical evaluation.
Here, the resistivity value for copper was taken at 20 °C, 0 = 1.724x10 -8 ohm.m (Poker & Klabunde, 1982). The length of the copper wire used in the experiment is 1 = 30 m and r = 0.015 mm. The cross-sectional area of the wire was calculated from A = πr 2 . The temperature coefficient for copper was α = 3.93x10 -3 (1/°C) (Eargle, 2012). For theoretical calculations, T temperature values were taken as the same values from experimental values. Then in equation 5, resistance-temperature data were obtained by using these values. The graph drawn by these data is given in Figure 6. It can be seen in Figure 6 that the experimental and theoretically obtained resistance-temperature change graphs have the same characteristic.
This result proves the reliability of the experiment performed with the Arduino board.

Discussion and Conclusions
The Arduino platform has been widely used recently in physics education to perform a They can code to calculate and display the result. Thus, the Arduino-based physics experiment can be done in a cheap and practical way with the system described above. We used an Arduino ohmmeter to measure the resistance change in the experiment. In the Arduino ohmmeter, resistance is measured by building a voltage divider with an output voltage that depends on the unknown resistance. This method is quite simple and useful.
Therefore, Arduino ohmmeter can be valuable tool in physics labs and it can be used for different physics experiments .
Experimental systems examining the relationship between resistance and temperature have a very complex structure (Yolkin, 2002). However, the Arduino microprocessor can be programmed with a very simple programming language (URL-1).
Students can collect and process experimental data quickly and easily with sensors connected to the microprocessor. Thus, they can focus most of their time and attention on interpreting data rather than collecting data and graphing (Russell, Lucas & McRobbie 2004;Sarı, 2019). Additionally, this activity can provide students the opportunity to work interdisciplinary with enabling them to use the disciplines of mathematics, engineering and technology to study electrical resistance in physics. Students can be asked to develop algorithms for solving problems by creating problem situations and coding according to this algorithm. Then, they can collect the data quickly and convert them into graphs in the computer environment by establishing the experimental setup. Therefore, we expect that this experiment effects students' algorithmic thinking skills, data collection skills, and problem solving skills etc. along with the gains in physics (Hsu & Wang, 2018;Jaipal-Jamani & Angeli, 2018). However, these effects should be tested in future studies.