|
Home > Labs
|
Physics Labs
In 2020-21 Academic year, the Physics Department redesigned all of its first-year and some second-year Physics labs in a new take-home format. The students are expected to use a home data acquisition device, iOLab, and perform a series of several at-home experiments. This approach will allow us to continue to offer hands-on, practical experience when conducting in-person labs is not possible due to the ongoing pandemic. It will also remove the time constraints of the in-lab scheduled sessions.
Although expensive (about $168 at the Campus Store), the same iOLab devices will be used in all of the PHYS 1P9x courses, and even in PHYS 2P20 this year. Since the textbook we use is a free online textbook from OpenStax, the total cost of the materials required to take first-year PHYS courses remains reasonable. Students taking lecture-only PHYS 1P2x courses do not conduct lab experiments and do not need to purchase iOLab devices.
A crucial element of success is data acquisition and analysis software. There are several options, and students can select any of them. iOLab website provides their own support software, available for Windows and MacOS platforms. It does an admirable job of data acquisition, and there is a large collection of youtube videos to help you with getting started.
However, when it comes to a more detailed data analysis, the students are expected to export the data and analyze it using other tools, such as a spreadsheet software or a scientific graphics package. To bridge the gap, the Brock Physics team has developed our own software package, iOLab Online, freely available on our website. This is the recommended method of interacting with the iOLab devices and preparing figures for your lab reports. Your course page on Sakai contains a collection of our own instructional videos that describe the iOLab device, the additional PHYS 1P9x accessory kit that is also available at the Campus Store, and the Brock-developed software.
The lab reports are to be submitted online through Sakai, where template documents are available for download.
Sample Labs (students: use up-to-date labs on your course web page)
As we introduced the take-home labs based on the iOLab data acquisition system into our Physics courses during the COVID-19 pandemic, we had to develop a number of labs that closely approximated our in-class labs. As some of the advanced unctionality of our in-lab equipment could not be reproduced with iOLab, there were changes, but we have been reasonably successful in covering the labs that supported our course content.
In our labs, we emphasize individual work, rather than group work. For a majority of our students, the two first-year Physics courses may be the last time they encounter hands-on work with physical apparatus, and we have always felt that it is imperative for each of the students to "get their hands dirty": to actually turn the knobs and switches, to make mistakes, to get a visceral appreciation of what experimental errors are. To that end, we try to emulate the real-world measurement techniques, freely employing computer-assisted data acquisition (rather than rulers and stopwatches), but insisting that data analysis is elevated in sophistication. All first-year students are expected to always perform explicit error analysis, monitoring \( \chi ^2 \) per degree of freedom of their fits to the data, among other things. Our support software is designed to provide such advanced functionality, and we strongly discourage use of spreadsheets which we consider an inappropriate tool for the numerical analysis of scientific data (the majority of our students do not have any background in the use of common spreadsheet software, anyway).
This may explain why we designed our iOLab Online software the way we did: trying to keep the data acquisition as straightworward as possible, but providing slightly more capable data fitting routines than is typical for the first-year labs. The students are instructed to follow the chain of "green buttons": Connect iOLab then Start to get data, Draw a plot, and Fit an analytical expression to the data.
Snapshots of some of our labs are posted here, in case others may find them useful. Feel free to use our ideas and materials, and please let us know if you do use them or if you find a better way of doing something. Many of our labs in 2020-21 academic year were essentially improvised under extreme time constraints; please, bear this in mind. The labs offered currently may well be different, so if you are a student registered in one of our courses, do not use these links - go visit your course web page, where the up-to-date information is posted.
We have also developed a collection of tutorial videos, filmed by our TAs. They will be uploaded to our YouTube channel, and links will be posted here as soon as they are in place.
Y1 labs: Mechanics (PHYS 1P91)
Y1 labs: E&M (PHYS 1P92)
Y2 labs: Mechanics (PHYS 2P20)
In our second-year Mechanics course, we significantly elevate the requirements for data analysis and scientific document preparation. The course is taken mostly by Physics majors, and the first lab is dedicated to an introduction to a powerful data analysis software, extrema . It is a slightly unusual choice (rather than matlab/octave , or python , or ...) determined primarily by the time constraints of our curriculum: we do not have a separate course that we can dedicate to software training, and this is the best package that we know that can be meaningfully introduced in the space of a single three-hour lab session, and yet has all the essential elements of scientific data analysis (plotting, fitting, vector and matrix operations, etc.) as well as basics of programming (loops, conditionals, subroutines) in its Fortran-like macro language. This is simply to alert the reader to the context in which the sample lab experiments below are offered. Note also that the second lab session is dedicated to teaching the students elementary LaTeX (we use overleaf.com ) and from then on, all lab reports are expected to be produced in this manner.
To support the take-home experiments of PHYS 1P91 and PHYS 1P92, we have developed kits of additional parts that the students will need. These are not optional, and they are paid for by the course lab supplies fee that gets automatically charged when you register. They are distributed through the Campus Store, so do not forget to pick one up when you are getting your iOLab devices.
Our iOLab software comes in two flavours, one that is strictly online and one that you can download and install on your own computer. At the moment, Chrome browser is the only supported browser, because it has the WebSerial protocol through which iOLab devices communicate, but this is not a significant restriction as Chrome is freely available and is one of the most popular browsers in use today. We tried to keep the user interfaces as similar as possible, and with a few exceptions that the TAs wil be able to point out, the workflow is very similar for both iOLab Online and PhysTks.
-
The simplest method that requires no installation of anything (once you have the Chrome browser going) is our iOLab Online tool. It is up and running now, although a few minor tweaks may happen, as we continuously improve the software. Its operation will be covered in the first lab help session, and all of our Help Desk TAs are also able to answer questions about it.
Windows 7 and 8.1 users may need to manually install iOLab device drivers; this is not required for Windows 10.
You may need to adjust the read/write permissions on the USB dongle device. All you need to do is add a small text file that specifies the rules of what the USB system should do when it sees the iOLab dongle plugged into one of its ports (by default it is protective of you and does not allow much).
Open a terminal window and copy from here(ctrl-c) and paste into the command line (ctrl-shift-v) the following:
echo "KERNEL==\"ttyACM*\", ATTRS{idProduct}==\"0400\", ATTRS{idVendor}==\"1881\", SYMLINK+=\"ioLab%n\", MODE=\"0666\"" | sudo tee --append /etc/udev/rules.d/50-ttyUSB.rules > /dev/null
This will append a line to that rules file, if it exists, or will create a new one.
These rules are normally re-read automatically when you plug-in a new device, but
just in case you can also sudo udevadm control --reload-rules
and then, when you plug in the dongle, it will be mounted with write privileges for you.
iOLab Online should then work just fine.
Chromium browser installed as an application works just fine, but on some distributions (notably Ubuntu) it is distributed as a "snap package". In that case, a read permission to raw USB devices needs to be added to the snap configuration (it blocks them by default). To fix,
sudo snap connect chromium:raw-usb
and then start Chromium. (https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1890365)
-
Instructors wishing to serve our iOLab Online from their own course web pages (i.e. without our standard Brock Physics framing), can embed the following
<iframe> :
<iframe src="https://www.physics.brocku.ca/Labs/iOLab/iOLab.php" width="980px" height="640px" scrolling="auto" style="border:none;" allow="serial">Your browser does not support iframes.</iframe>
-
The version to be installed on your own computer is called PhysTks (pronounced "fizz-tiks", not "phi-sticks"). It is written in a language called tcl/tk and will run on any platform that has it installed. To ensure identical performance on all platforms (Windows/MacOs/Linux/etc) we based our implementation on undroidwish. Platform-specific installation instructions are below.
-
PhysTks on a Mac
To install PhysTks under MacOS (as tested in July 2020, on High Sierra version of the MacOS) you can download a handy script. Once you open the downloaded file, double click on "installPhysTks" and wait until the little wheel in the top right corner of the screen stops turning, about 3-5 minutes depending on the speed of your internet connection. In the end, an icon for PhysTks should show up on your desktop, and you can unmount and throw away the downloaded installation script.
If you prefer to do it manually, here's what the script does in the background:
-
Install undroidwish, the tcl/tk interpreter
-
-
from http://androwish.org/download/ download the Mac-64 version of undroidwish. Here's a direct link to the current version
-
double-click on it in Downloads, when it opens, drag the undroidwish (green android drone with a blue feather) to the Desktop. Double-click it to test and allow it to run (under System Preferences->Privacy&Security, if the pop-up does not come or you miss it; it may require you to confirm your password), then close the resulting blank window and the widget within it.
-
you can drag the .dmg file into the recycle bin after that
-
Download PhysTks script and its icon
-
This next step is best done from Terminal, as it is easier to describe than multiple drag-and-drops.
-
open the Terminal (Applications->Utilities->Terminal), and type (copy-and-paste from here) the following commands:
curl https://www.physics.brocku.ca/Labs/PhysTks/PhysTks.tcl > PhysTks.tcl
curl https://www.physics.brocku.ca/Labs/PhysTks/PhysTks.png > PhysTks.png
mv Desktop/undroidwish.app ./
pwd
This places all files into your Home directory, leaving the Desktop less cluttered. The last command "Prints Working Directory", which is something like /Users/username/. You will need to know this when creating the launch icon in the next step.
-
to verify that things worked, type in Terminal (copy-paste from here, but replace "username" with your username; note the trailing ampersand):
/Users/username/undroidwish.app/Contents/MacOS/undroidwish /Users/username/PhysTks.tcl -sdlresizable &
and if everything worked as it should, invoke Automator (Applications->Automator), create a new Application of type "Run Shell Script", and copy-paste the Terminal command from above into that script, again inserting your username where needed. Save the Automator file as "PhysTks" on the Desktop. You now have a clickable icon to run PhysTks.tcl. Test by double-clicking it.
-
Modify the icon of the script to the PhysTks icon from the generic Otto (Automator) icon (optional)
-
-
PhysTks on a Windows computer
To install the PhysTks IOLab data acquisition and graphing software under Windows:
-
Download the Installation file:
-
-
download (right-click and save) this self-extracting archive
If a prompt to save the file appears, select a destination folder, otherwise the file
will be saved to the previously set browser location (usually, the Downloads directory).
-
Run this installation file:
-
-
Click on the browser downloads arrow to see the list of currently downloaded files, then
hover the top name, SetupPhysTksForWindows.exe, so that "open file" appears below the name.
(Alternately, you can go to your previously set Downloads folder.)
-
Click on the name; if a "Windows protected your PC" window appears, click "More info", then
click "Run anyway".
-
The installation file will extract four files to the destination that you selected,
PhysTks.tcl, PhysTks.bat, undroidwish.exe and licence.terms.
-
Right-click inside the destination folder to open a menu, then click "New, Folder" to create
a subdirecory called "Data" in which to store your data files and screesnhots.
-
Run PhysTks
-
To start PhysTks, click on PhysTks.bat. The file extension .bat may be hidden; the icon looks like two
geared wheels.
You can right-click and create a link to this file on your Desktop, to make launching it easier, but the file itself has to remain in the same directory as the .tcl script and undroidwish.exe.
-
PhysTks under Linux (including Chromebooks)
Install tcl/tk and libraries
The installation commands below are for the current Ubuntu/Debian distribution, and are given in the form of terminal commands. You can achieve the same through a GUI system-management tool for your distribution. These instructions apply to Linux virtual machines on Chromebooks as well.
sudo apt-get install tcl8.6 tk8.6 blt libtk-img
You may need to give your password, and say Y to the confirmation question. This installs the Tcl/Tk language, and a couple of handy libraries that PhysTks needs to run.
Download and install PhysTks.tcl
These commands download PhysTks.tcl , change the file mode to be "executable", so you can run it, and (optionally) install it into your common area for local programs.
wget https://www.physics.brocku.ca/Labs/PhysTks/Linux/PhysTks.tcl
chmod 755 PhysTks.tcl
sudo install -m 755 PhysTks.tcl /usr/local/bin/PhysTks
Run PhysTks.tcl and/or create a clickable link
If you type ./PhysTks.tcl (or, if you performed the third command above, just PhysTks ) on your command line, the script should launch.
You can create a launcher on your desktop to make it a clickable button. Download and place PhysTks.desktop file on your Desktop, as well as the icon file that it needs, then right-click and edit this PhysTks.desktop launcher file as needed, depending on where you place this icon file on your system.
wget https://www.physics.brocku.ca/Labs/PhysTks/PhysTks.svg
wget https://www.physics.brocku.ca/Labs/PhysTks/PhysTks.desktop
sudo install -m 644 PhysTks.svg /usr/local/share/icons/hicolor/scalable/apps/
mv PhysTks.desktop ~/Desktop/
To make sure your device permissions are set properly, see also a note under Software support above.
An alternate installation: undroidwish, the "batteries-included" tcl/tk interpreter
An alternative is to run the same self-contained Tcl/Tk interpreter that we recommend for Windows and MacOS users. The advantage is that this is a single-file download (all libraries included), the disadvantage is that it will run PhysTks inside a separate X11 windows container, and not under your native window manager, so it will be a window-inside-a-window, and will not scale with your screen size and resolution. For simplicity, it is recommended that you install it in /usr/local/bin , as shown below.
-
Download the appropriate undroidwish from www.androwish.org/download, one of Linux (i386), Linux (x86_64), or Linux/Wayland (x86_64, Debian 9.0), depending on what distribution you are running.
-
Open terminal in the directory where you place it (likely, Downloads) and issue this command:
sudo install -m 755 undroidwish-e5dc71ed9d-linux64 /usr/local/bin/undroidwish
replacing the name with the filename as you downloaded (the current x86_64 version is shown as an example)
-
The rest is the same as above, except you need to make one change in PhysTks.tcl before you run and/or install it it (use any text editor). As downloaded, the second line in the file reads:
exec wish "$0" "$@"
and you want to replace it with:
exec /usr/local/bin/undroidwish "$0" -sdlrootheight 720 -sdlrootwidth 1600 -sdlheight 720 -sdlwidth 1600 -sdlresizable "$@"
Be sure it remains the second line, and is followed by a blank line, as in the file currently. You can change the initial size of the window to match your monitor resolution.
|
|