loading page

Studying Physics, getting to know Python: RC circuit, simple experiments, coding and data analysis with Raspberry Pi
  • +1
  • Andrea Mandanici,
  • Salvatore Alessandro Sara',
  • Giacomo Fiumara,
  • Giuseppe Mandaglio
Andrea Mandanici
University of Messina
Author Profile
Salvatore Alessandro Sara'
University of Messina
Author Profile
Giacomo Fiumara
University of Messina
Author Profile
Giuseppe Mandaglio
University of Messina
Author Profile

Abstract

Raspberry Pi (RPi) is a well known single-board computer natively equipped with a Linux-based operating system, Raspbian, and a powerful programming language, Python. In this work, we propose an integrated project on physics and computer science exploiting RPi and Python: a set of lab activities, coding, and discussion related to the study of charging and discharging phases of a capacitor in an RC circuit. In our simple experiments, entirely computer-controlled, the RPi and Python scripts are used to: (i) apply a known constant voltage to the circuit at a desired time; (ii) measure the voltage on selected circuit elements as a function of time; (iii) evaluate and analyze experimental data. This approach is based on inexpensive hardware and open source software. It allows a hands-on experience with electric circuits and with dedicated examples of Python coding. The codes involve Python modules such as Numpy, Scipy, and Matplotlib that prove to be easy to use and efficient for our goals, supporting the choice of Python language for further study or research tasks.  

Peer review timeline

14 May 2020Submitted to Computing in Science and Engineering
22 May 2020Editor invited a reviewer
27 May 2020Review Report #1 received
02 Nov 2020Published in Computing in Science and Engineering