Skip to main content

Data Acquisition in Jupyter notebook on Raspberry Pi

Reason this release was yanked:

pkg structure pollutes python namespace

Project description

JupyterPiDAQ

This software allows live collection and plotting of analog data in a Jupyter notebook. The package was initially developed to provide an inexpensive laboratory system for teaching based on the Raspberry Pi. However, as the development has progressed the data acquisition board drivers have been separated out of the user interface, so that the software has potential to work on other computers running Jupyter with A-to-D board specific connector code. Presently the compatible A-to-Ds are for Raspberry Pis: Adafruit compliant ADS1115 boards (example, also available from other vendors); and the π-Plates DAQC2 plate. A demo mode will run on any computer with a Jupyter notebook install and Python 3.6+.

Sensors: Like many commercial educational packages the software knows about the properties of some sensors, so can collect data directly in the units appropriate for the sensor, in addition to the raw voltage signal returned by the sensor. Not all sensors are compatible with all boards. We attempt to keep this list of known sensors up-to-date, but the code may provide additional sensors not listed here:

  • ADS1115 compatible (board can provide 3.3 V of power/reference to sensors):
    • voltage reading (V, mV) from any sensor that puts out a voltage in the range +/-3.3 V.
    • built-in thermistor (V, mV, K, C, F).
    • Vernier SS temperature probe (V, mV, K, C, F).
  • DAQC2 compatible (board can provide 5.0 V of power/reference to sensors):
    • voltage reading (V, mV) from any sensor that puts out a voltage in the range +/- 12 V.
    • Vernier SS temperature probe (V, mV, K, C, F).
    • Compatible with standard Vernier probes. Calibrations being added.

Author: Jonathan Gutow gutow@uwosh.edu

License: GPL V3+

Installation

Installation is meant to be done into a virtual environment from the PyPi repository. There are two modes "Production" for end users and "Development" for those who want to improve the package.

Production

Development

Basic requirements: Python 3.6+, associated pip and a Jupyter notebook. See: python.org and Jupyter.org.

  1. If not installed, install pipenv:$ pip3 install --user pipenv. You may need to add ~/.local/bin to your PATH to make pipenv available in your command shell. More discussion: The Hitchhiker's Guide to Python.
  2. Navigate to the directory where this package will be or has been downloaded to. Use pipenvto install an "editable" package inside the directory as described below:
    1. Start a shell in the environment $ pipenv shell.
    2. Install using pip.
      1. If you downloaded the git repository named "JupyterPiDAQ" and have used that directory to build your virtual environment: $ pip install -e ../JupyterPiDAQ/.
      2. If you are downloading from PyPi (not yet available) $ pip install -e JupyterPiDAQ
      3. Either should install all the additional packages this package depends upon. On a Raspberry Pi this will take a long time. It probably will not run without at least 1 GB of swap. See: Build Jupyter on a Pi.
    3. Still within the environment shell test this by starting jupyter $ jupyter notebook. Jupyter should launch in your browser.
      1. Open a new notebook using the default (Python 3) kernel.
      2. In the first cell import all from DAQinstance.py: from DAQinstance import *. When run this cell should load the DAQmenu at the end of the Jupyter notebook menu/icon bar. If you do not have an appropriate A-to-D board installed you will get a message and the software will default to demo mode, substituting a random number generator for the A-to-D. Because of the demo mode it is possible to run this on any computer, not just a Pi.
  3. If you wish, you can make this environment available to an alternate Jupyter install as a special kernel when you are the user.
    1. Make sure you are running in your virtual environment $ pipenv shell in the directory for virtual environment will do that.
    2. Issue the command to add this as a kernel to your personal space: $ python -m ipykernel install --user --name=<name-you-want-for-kernel>.
    3. More information is available in the Jupyter/Ipython documentation. A simple tutorial from Nikolai Jankiev (Parametric Thoughts) can be found here.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

JupyterPiDAQ-0.5.0rc0.tar.gz (22.8 kB view hashes)

Uploaded Source

Built Distribution

JupyterPiDAQ-0.5.0rc0-py3-none-any.whl (37.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page