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.
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 |
---|---|
- Raspberry Pi 3 Model B
- ADC (Analog to Digital Convertor), 16 bit 32 channel: I2C アナログ入力ボード AIO-32/0RA-IRC
- solid-state relay: Celduc SO842074
- halogen lamp as a heating element: Panasonic JCD100V300WCG
- 7'' touch screen as indicator and input device: EVICIV B07PY5XND3
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.
Scales | Settings |
---|---|
Make sure that GPIO
pins are enabled:
sudo pigpiod
Then start the program.
cd ~/path/to/controlunit
$ pyton3 main.py
Settings file is in the project directory, .settings
:
datafolder, ~/work/cudata
pathislocal, True
sampling_rate, 0.1
Other useful settings, such as ADC channels and GPIO assignments are defined in channels.py
.
- 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