Keywords

1 Introduction

If you ask Italian teachers about experimental activity in their classes, the vast majority of them will complain about the lack of laboratory space, the old-fashioned equipment, and the almost non-existent technical support. Of course, there are a few notable exceptions, but too often science, in particular physics, are taught as abstract disciplines. Rote learning and the apparent lack of connection to everyday life are some of the reasons why Italian students are neither proficient in STEMFootnote 1 nor highly motivated to pursue a career in science and research [1]. This is especially true for women [2].

How can laboratory practices in secondary school be improved, given the limited budgets and facilities available? Can we present science in a more appealing way to our students? In the era of smartphones, computers, and information technology, does it make sense to use a stopwatch to measure the oscillation period of a pendulum? Domotics is changing our homes and lifestyles. We drive intelligent cars equipped with all kinds of sensors, but this digital revolution is only very slowly entering our classrooms. Indeed, there are only a few examples of attempts to include programming and sensor development in laboratory practice. This is true not only for high schools, but also at university level. For instance, one initial proposal for a curricular framework for introducing microcontroller programming to the physics lab at Winona State University is reported in [3].

In 2015, we began to devise a series of experiments, based on the Arduino platform, suitable for high school teachers and students. This pilot project involved 4 high schools, 10 teachers, and 150 students (58 female) all in their final year. Students were directly engaged in the experimental activity, which took place after school on a voluntary basis. In a student-centered educational perspective, they were able to build and run the experiments on their own, with the scaffolding provided by teachers and learning assistants. Students worked in small groups of four to five people, in order to foster peer-interaction and teamwork. To fully exploit the potential of a microcontroller, one should know its hardware, its software, and how to connect it to sensors and external circuits and devices. Hence, many skills and competences are requested and trained when operating such a platform: basic knowledge of electronics and circuitry, programming and coding, the ability to use a breadboard and make connections with jumper wires, sensors, and power supplies. Of course, not all students, especially at high school level, have already acquired background knowledge of this kind. So, it may be necessary to provide a brief introduction to scientific programming and to bring forward part of the physics curriculum (voltages, currents, and the basics of circuits). On the other hand, this is a good opportunity to show the interrelationship between different scientific disciplines. Finally, data analysis and a public discussion of the results are important parts of the project, in order to promote critical thinking and meaningful learning. Although there was no formal assessment, students were highly motivated and devoted several hours to carefully preparing their group report and final presentation.

2 What is Arduino?

Arduino is an open-source project started in 2005 at the Interaction Design Institute Ivrea by an international team composed of Massimo Banzi, David Cuartielles, Tom Igoe, Gianluca Martino, and David Mellis. Their aim was to realize an inexpensive, easy-to-use electronic platform, that was able to interact with the environment, receive inputs and provide outputs to actuators and other devices. Arduino’s hardware and software are both open source: construction files and instructions are freely downloadable [4]. In principle, an expert could even build the Arduino board from scratch, with a breadboard and the basic electronic components. However, a solid background in electronics or engineering is not necessary to start tinkering with Arduino. Indeed, the best way to enter the Arduino worldwide community is to buy the starter kit—for less than €100—and then learn from tutorials, examples, and projects already developed and shared by other makers. Arduino is instructed to perform tasks of varying sophistication by a code, called sketch, written in a programming language, the Integrated Development Environment (IDE) software, similar to C and C++ . Most importantly, Arduino’s software IDE is not only open source but also cross-platform, as it runs on Windows, Macintosh OSX, and Linux operating systems.

There is an ever-growing number and variety of Arduino boards and shields, developed to meet the most diverse needs. Nowadays, Arduino boards can be connected to the internet, controlled remotely, and can even send messages via Twitter. Despite the different capabilities and performances, all these boards share the same underlying structure and working principles. Throughout this paper we will concentrate on the most popular board: Arduino Uno, based on the ATmega328P, an 8-bit microcontroller with a clock frequency of 16 MHz, 32 kB of flash memory for program storage, and 2 kB SRAM for program execution (see Fig. 1). The board can be connected to a computer via a USB cable and communicate using a virtual serial port.

Fig. 1
figure 1

Front view of Arduino Uno board. Analog pins are numbered from A0 to A5 (bottom right), whereas digital pins go from 0 to 13 (top row). The symbol “ ~ ” denotes pins that can deliver an analog voltage by means of the pulse width modulation (PWM) technique

3 Arduino in the Physics Lab

One of the simplest experiments that can be performed using Arduino is measuring the RC circuit time constant [5]. A typical experimental setup would include a power supplier connected to an RC circuit, consisting of a resistor in series with a capacitor. During the charge or discharge process, the voltage across the capacitor is usually monitored with an oscilloscope. Arduino is able to perform the role of a square-wave generator, a data acquisition system, and a real-time signal visualization tool. The advantage is twofold: expensive instruments, like the stabilized power supplier and the oscilloscope, are no longer necessary and virtually every student can build their own setup, using a breadboard, jumper wires, and the basic electronic components, write down the sketch with the instructions for the Arduino board, and visualize the data on the serial monitor. Data are then copied to a spreadsheet for further analysis, plotting, and fitting. The results found by the high school students are shown in Fig. 2. The calculated values of the RC time constant are in line with the expected theoretical value, thus proving the validity of our approach based on Arduino.

Fig. 2
figure 2

Charge (left) and discharge (right) process of an RC circuit: R = 3850 Ω and C = 1 mF. The theoretical time constant is τ = RC = 3.85 s. The experimental values are, respectively, τ = (3.87 ± 0.08) s and τ = (3.83 ± 0.08) s. Experimental data (blue dots) are fitted with an exponential curve (red solid line)

4 A First Approach to Robotics

When interfaced to an ultrasonic sensor (like HC-SR04), Arduino can be used to investigate kinematics [6]. Examples of possible experiments are observation of a free-falling body or an oscillating spring. The ultrasonic module consists of two piezoelectric devices acting, respectively, as transmitter and receiver. It has four pins: two of them (GND and VDC) are used to power it and must be connected to the corresponding GND and 5 V pins on the Arduino board. The other two pins are called trigger and echo. When a square wave of 10-μs width is sent to the trigger, the transmitter emits a train of ultrasound waves. At the same time the echo port is raised to HIGH. As soon as the reflected wave is detected by the receiver, the echo pin returns to LOW. The elapsed time Δt between the two events is measured by Arduino, using the built-in pulseIn function. The distance d from the obstacle is then easily calculated using the formula d = c Δt/2, where c is the speed of sound.

The same sensor and an Arduino motor shield are the essential elements for controlling a small rover that can avoid obstacles along its path (Fig. 3). Input from the ultrasonic module is processed by Arduino and turned into output for the motor shield, which regulates the wheel direction and speed.

Fig. 3
figure 3

Basic components of a rover (left) and the final result after assembly (right)

5 Conclusions

This project started in the 2015/16 academic year, with a first bulk of experiments built around the Arduino platform. Typical examples are in mechanics (a free-falling body or the harmonic oscillator), in thermodynamics (the heat-work equivalence), and in electronics (observing the charge and discharge of a RC circuit, the characteristic curve of an LED, …). The fruitful interaction between teachers with different backgrounds was central to devising new solutions and exploring novel applications. Indeed, a microcontroller like Arduino can be interfaced to a variety of sensors (ultrasonic ranger, temperature probe, …), thus fostering creativity and a sense of discovery. Hence, Arduino can be regarded as a kind of micro-laboratory, that is able not only to collect data, but also to control other devices and actuators. Arduino naturally lends itself, therefore, to introducing students to programming, automation, and robotics. As soon as students are able to write, compile, and load their first sketch, they can immediately see their code at work. It might only be a blinking LED or a fancy prototype of a rover, nevertheless, students will always feel a great sense of wonder and ownership.