Skip to content

queezz/ControlUnit

Repository files navigation

Python application Code style: black

Control unit for plasma experiment.

DOCS

0. Why bother?

There are commercially available data loggers and temperature control units, however sometimes it is nice to have all things you need in one place, and with a tailored UI. A common practice in many experimental physics labs is to use a Windows machine and Labview from National Instruments, which work fine and is quite easy to implement for simple set-ups. NI sells all sorts of scientific equipment which is easy to connect to the LabView program.

However, the cheaper and more importantly, open source alternative would be to use a SBC.

1. Introduction

This control unit is based on the Raspberry Pi with AD converter and relays. Main purpose of the unit is to control parameters and log signals.

Experimental parameters:

  • temperature
  • current
  • pressure
  • others

In our project, we have an experimental device where we want to measure several signals, plus to implement a feed-back control.

Control unit box:

Front view Back view
UI UI

1.1 Hardware components:

1.2 Program summary

The analog signals from vacuum gauges, 0 - 10 V, and the K-type thermocouple, 0 - 15 mV, are red by the DAC in the worker thread. The Raspi GPIO are used to control the solid state relay and turn on the halogen lamp. A Variac is used to power the lamp.

UI

Scales Settings
UI UI

2. Usage

2.1 How to run

Make sure that GPIO pins are enabled:

sudo pigpiod

Then start the program.

cd ~/path/to/controlunit
$ pyton3 main.py

2.2 Settings

Settings file is in the project directory, .settings:

datafolder, ~/work/cudata
pathislocal, True
sampling_rate, 0.1

2.3 Channel assignment

Other useful settings, such as ADC channels and GPIO assignments are defined in channels.py.

3. Requirements

- pyqtgraph
- numpy
- scipy
- matplotlib
- pandas
- python3-smbus
- RPi.GPIO

pyqtgraph requires either pyqt5 or pyside. To install pyqt5, use apt-get:

sudo apt-get update
sudo apt-get install qt5-default pyqt5-dev pyqt5-dev-tools

RPi.GPIO:

sudo apt-get update
sudo apt-get install rpi.gpio

python3-smbus:

python3 -m pip install smbus --user

or

sudo apt-get install python3-smbus

About

Signal acquisition and devices control based on Raspberry Pi.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages