ExpEYES - A Python powered measurement device for hands-on science education

jithin (~jithinbp)


Description:

Introduction

Learning by doing is an essential part of Science Education. However, the costs associated with setting up a well equipped laboratory is beyond the reach of a majority of our schools and colleges. The ExpEYES project was started with the goal of developing a multi-purpose, computer interfaced measurement tool augmented with inexpensive components such as DC motors, solenoids, and passive electronic parts in order to facilitate the idea of learning-by-doing. ExpEYES hardware with some electronics components connected for characterisation

This talk will document the various Python tools used in the development of this equipment, and demonstrate some simple experiments which are otherwise quite difficult to accomplish in conventional undergraduate labs. It will also demonstrate how some easily available, and affordable sensors for measurement of physical parameters such as humidity, pressure, magnetic fields etc may be augmented with Python based modules to shape the next generation hands-on education tools.

Lab@Home with optional remote Instructor access

In the current scenario where schools and colleges are increasingly migrating to remote learning modes, video conferencing tools and other online evaluation platforms have handled the theoretical aspect of imparting knowlege. However, laboratories which impart essential practical experience have been sidelined since equipment has traditionally been restricted to school/college premises.

This presents an opportunity to deploy affordable scientific equipment such as ExpEYES which can be interfaced with a laptop/PC and bring the lab to students' homes with a diverse set of science and electronics experiments. With some remote access architecture, the instructor can be allowed to remotely view and control authenticated hardware, and a proof of concept has been developed with python-flask and websockets.

Talk outline

  • Introduction - Development of the Hardware, and various prototypes [5 mins]
  • Implementing hardware communication with the Python Library [2 mins ]
  • Development of graphical interfaces with PyQt , data analysis tools with Numpy/Scipy, and plotting with PyQtGraph [ 5 mins]
  • Demonstration of some simple physics and electronics experiments [10 mins]
  • Documentation generation with Python-Sphinx, and embedded help files with PyQtWebEngine [2 mins]
  • Internationalisation using translation tools such as Qt-Linguist , and user contributions for several languages [ 2 mins ]
  • Packaging for various platforms with Deb/Pyinstaller/pypi
  • Remote Access platform with Flask Socketio [5 mins]

Device Overview

The most recent development of ExpEYES data acquisition hardware consists of a 64 MHz microcontroller programmed to accept commands relayed from a Python library executed on a connected computer. These commands leverage its ability to digitize fast digital signals of the order of 10nS, voltages in the mV range, and the ability to communicate over digital protocols such as I2C and SPI to record physical parameters from commonly available sensors. Its capabilities include an oscilloscope, waveform generators, and other measurement tools housed in a compact enclosure with the area of a smartphone, which is powered by USB.

Desktop Utility and Analytical tools with Python

The Python library of ExpEYES is augmented with a Graphical User Interface(GUI) built using the PyQt5 toolkit. The acquired data can be visualized as time series and XY plots with the aid of PyQtGraph and its immensely flexible features. Furthermore, its implementation using numpy arrays enables fast computation on large datasets. The leastsq method from scipy is frequently employed to extract meaningful scientific information such as frequency and phase shifts from raw datapoints by fitting them to standard functions. Advanced Data Logger Characterisating a mechanical buzzer

Example Measurement parameters

Combination of elementary hardware with Python based software enables performing complex experiments such as - Measuring the frequency response of mechanical oscillators, - Extraction of the value of Planck's constant from the electrical characteristics of an LED - Studying the characteristics of electronic components such as MOSFETs - Measurement of the value of acceleration due to gravity and several others spanning the fields of mechanics, optics, electronics, and acoustics.

Documentation

Documentation for the range of supported experiments has been prepared in plain text, and is compiled using Python-Sphinx. This approach allows easy generation of formatted and indexed translations which are then displayed in the GUI along with specific experiments by using the qtwebengine.

Localisation

Another challenge in the Indian context lies in the propogation of school education which still relies on varied regional languages in several parts of the country. This has been addressed by the use of Qt Linguist, and volunteers have contributed translations for the User Interface into languages such as Malayalam, Telugu, Marathi, and Hindi. International languages such as French and Spanish have also been incorporated, and are easily user selectable.

With over 70 different experiments developed by educators, this project presents an opportunity to increase access to hands-on education.

Access and availability

Software is available for Ubuntu 18.04 + (deb file / source code) . It is also on Debian, thanks to maintainer Georges Khaznadar. Software is also available for Windows (Pyinstaller bundle + Innosetup) .

Python packages used

Dependencies: pyserial, pyqt5, pyqt5.qtsvg, python3-qtconsole, numpy, Scipy, pyqtgraph, matplotlib, sphinx PyInstaller, Flask.

Prerequisites:

Interested in learning by doing / citizen science. Educators from high school and upwards.

Video URL:

https://youtu.be/oTsvvQTQTls

Content URLs:

Slides

https://docs.google.com/presentation/d/18AtbwZA9TBij-W7-cwpmu2MJozs0FtSiv0bAMIpriUg/edit?usp=sharing

Source Code Links

This project is open sourced including the firmware and hardware, and resources are provided below: Python Software: github.com/expeyes/expeyes-programs/eyes17/ Hardware resources: http://expeyes.in

Blogs on some experiment User Interfaces

  • https://csparkresearch.in/expeyes17/advanced-logger-piezo-sq1.html
  • https://csparkresearch.in/expeyes17/sensors/lidar.html
  • https://csparkresearch.in/expeyes17/ad9833.html

Speaker Info:

I have a long association with developing scientific tools for data acquisition and science experiments. Ranging from the development of a data acquisition software(PyQt,Python-GPIB,Pyqtgraph) for Point Contact Spectroscopy during my Masters thesis work at IISER Mohali, to the development of a range of standalone instruments which use Python to interact with the real-world.

I am also the primary author of the firmware and python library for ExpEYES-17 (http://expeyes.in/index.html) , a tool for learning science by experimenting and exploring, and have conducted workshops for the same I have conducted workshops and delivered talks on Python with Microcontrollers(KuttyPy) at Scipy 2019, Scipy 2020, makerville.io, and fossunited.

After graduating, I established a company which manufactures ExpEYES17, KuttyPy, and Nuclear radiation detectors and spectrometers. Personal Website: http://jithinbp.in/ Company Website: https://csparkresearch.in/ Blog posts on ExpEYES17: https://csparkresearch.in/expeyes17/blog Python Powered Scientific Instrumentation tool: https://hackaday.com/2015/06/05/hackaday-prize-entry-python-powered-scientific-instrumentation/

I am currently contributing to three packages on Debian/Ubuntu : eyes17, SEELablet, and KuttyPy . Repositories I contribute to: https://github.com/expeyes/expeyes-programs/tree/master/eyes17 https://github.com/expeyes/expeyes-programs/tree/master/ExpEYES17/Firmware/EJV2_15DEC https://github.com/jithinbp/ExpEYES17-Qt https://github.com/csparkresearch/eyes-online https://github.com/csparkresearch/kuttypy-gui -> https://kuttypy.readthedocs.io/en/latest/ https://github.com/csparkresearch/cnspec -> https://csparkresearch.in/cnspec . A nuclear data analysis software. It has been open sourced, and will soon enter Debian.

Section: Python in Science Education
Type: Talks
Target Audience: Intermediate
Last Updated: