Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Daniel Nichols
D
ata acquisition equipment for physics can be quite ex-
pensive. As an alternative, data can be acquired using
a low-cost Arduino microcontroller.1 The Arduino
has been used in physics labs where the data are acquired us-
ing the Arduino software.2-4 The Arduino software, however,
does not contain a suite of tools for data fitting and analysis.
The data are typically gathered first and then imported manu-
ally into an analysis program. There is a way, however, that
allows data gathered by the Arduino to be imported in real
time into a data analysis package. Illustrated in this article are
add-ins for Excel, MATLAB, and LabVIEW that import data
directly from the Arduino and allow for real-time plotting and
Fig. 3. View of Excel spreadsheet along with PLX-DAQ macro.
analysis.
Fig. 2. Arduino code for reading sensor connected to port A0. Fig. 4. MATLAB code and plot for reading sensor connected to
port A0.
226 THE PHYSICS TEACHER ◆ Vol. 55, April 2017 DOI: 10.1119/1.4978720
10. http://www.instructables.com/id/Sending-data-from-Ardui-
no-to-Excel-and-plotting-it/.
11. http://nutsvolts.texterity.com/nutsvolts/201506/?folio=34&pg
=34#pg34 .
12. https://www.youtube.com/watch?v=Tm3g1bZi7To .
13. https://www.mathworks.com/videos/using-matlab-and-
arduino-to-acquire-analog-signals-100739.html .
14. http://www.mathworks.com/hardware-support/arduino-
matlab.html .
15. http://sine.ni.com/nips/cds/view/p/lang/en/nid/212478 .
16. Marco Schwartz and Oliver Manickum, Programming Arduino
with LabVIEW (Packt Publishing), ISBN: 978-1-84969-822-1.
Fig. 5. Front panel of LabVIEW code to acquire data from 17. M. Jaskuła, M. Łazoryszczak, S. Peryt, “Fast MEMS application
Arduino. prototyping using Arduino/LabView pair measurement,” Auto-
mation Monitoring 61 (12), (Dec. 2015).
Interfacing the Arduino to LabVIEW 18. https://www.google.com/sheets/about/.
19. http://www.instructables.com/id/Visualize-data-from-sensors-
Interfacing the Arduino to LabVIEW can be done using using-Arduino-coolte/.
the LINX by LabVIEW Makerhub.15-17 This is a free interface
software to LabVIEW that easily allows LabVIEW to command Daniel Nichols is EIS faculty member at DeVry University in Chicago.
and acquire data from the Arduino. As with MATLAB, there His hobby is designing and building equipment to measure and control
is no need to program the Arduino with the Arduino software; systems.
dnichols2@devry.edu
the support package takes care of that. Simply run the program
in Fig. 5 and choose the correct com port the Arduino is con-
nected to and the data will be plotted.
Summary
gravitate
Students
The Arduino microcontroller and some inexpensive sensors
towards
can be used as a cheap alternative physics
to expensive with the
data acquisi- TEL-Atomic
tion equipment. The most Computerized cavendish
expensive component used in this Incorporated
Balance
article is the data analysis software. An alternative to these, free
spreadsheets such as Google Sheets18 can perform the analysis. Providing you with tools
to teach advanced Physics
There are also free serial port terminal applications, such as
CoolTerm,19 which would allow data from the Arduino to be
saved into a file. This data can then be imported into the analy- Short oscillation periods of 2-4 minutes
sis program of your choice. Complete experimental results in a single lab period
The software used in this article was arduino-1.6.4, Excel No more optical lever jitters due to revolutionary
2013, MATLAB R2015b, and LabVIEW2013, and run on Win- sensor design
dows 7 Enterprise. To ensure compatibility on your computer, 24 bit resolution computerized cavendish
check the system requirements for these add-ins. balance
References
1. https://www.arduino.cc/.
2. Calin Galeriu, Cheryl Letson, and Geoffrey Esper, “An Arduino
investigation of the RC circuit,” Phys. Teach. 53, 285 (May 2015).
3. Calin Galeriu, Scott Edwards, and Geoffrey Esper, “An Arduino
investigation of simple harmonic motion,” Phys. Teach. 52, 157
(March 2014).
4. Calin Galeriu, “An Arduino-controlled photogate,” Phys. Teach.
51, 156 (March 2013). For product details >> www.telatomic.com
5. https://www.arduino.cc/en/Main/ArduinoBoardUno . 800.622.2866 sales@telatomic.com
6. www.arduino.cc/en/Main/Software .
7. https://www.adafruit.com .
8. https://www.youtube.com/watch?v=xzC4SDd6sJ0 . Tel-Atomic Cavendish AD.indd 1 12/7/2010 10:56:49 PM
9. https://www.parallax.com/downloads/plx-daq .