Skip to content
Snippets Groups Projects
Commit 84907f1d authored by Günter Quast's avatar Günter Quast
Browse files

more complete docu

parent e2286a67
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ for physics laboratory courses
The RedPitaya is a small, credit-card sized single board computer with a dual-core ARM Cortex-A processor
and a XILINX Zynq 7010 FPGA. The board contains two fast ADCs and two DACs with 14 bit resolution running
at a sampling frequency of 125 MHz. Extension connector provide general purpose IO pins with
at a sampling frequency of 125 MHz. Extension connectors provide general purpose IO pins with
slow analog inputs and outputs and support for serial bus interfaces like I²C, SPI and UART.
The system runs under Ubuntu Linux, which provides network access and supports a wide range of
applications running on the board.
......@@ -22,13 +22,14 @@ well as an oscilloscope application capable of transferring large data reates re
limit of the 1Gb port. The package consists of an FPGA image and a server process running on the
RedPitaya board. A client script controls the server and pulls the data to the client computer.
This package extends the original one by a possibity to record or export waveform data and
provides helper scripts to analyze recordes spectra or to read exported waveform data. An
This package extends the original one by a possibility to record or export waveform data and
provides helper scripts to analyze recorded spectra or to read exported waveform data. An
interface to the buffer manager *mimoCoRB* for buffering and parallel processing of large
date volumes is also provided.
This package is in use for spectrography experiments in physics laboratory courses at the
faculty of physics at Karlsruhe Institute of Technology.
This package is in use for gamma-ray spectrography experiments in physics laboratory courses at
the faculty of physics at Karlsruhe Institute of Technology.
### Files:
......@@ -59,7 +60,8 @@ faculty of physics at Karlsruhe Institute of Technology.
*mcpha.py* is a fork of the sub-directory *projects/mcpha* in a project by
Pavel Demin, [red-pitaya-notes](https://pavel-demin.github.io/red-pitaya-notes),
*redPaq.py* represents an extension of the oscilloscope class enabling fast restart and data export.
*redPaq.py* represents an extension of the oscilloscope class enabling fast restart
and data export.
## Multi-Channel Pulse-Height Analyzer for the RedPitaya FPGA board
......@@ -108,7 +110,7 @@ of the *matplotlib*window to mark regions to zoom in for a detailed inspection o
## Oscilloscope and data recorder
The script *redPdaaq.py* relies on the same server and FPGA image as the pulse-height analyzer,
The script *redPdaq.py* relies on the same server and FPGA image as the pulse-height analyzer,
providing the same functionality as *mcpha.py*. In addition, however, there is a button
"*Start DAQ*" in the oscilloscope tab to run the oscilloscope in data acquisition mode,
i.e. continuously. A subset of the data is shown in the oscilloscope display, together with
......@@ -126,7 +128,7 @@ An examples of call-back functions callable from within redPdaq is provided with
*redP_mimocorb.py* is script called as sub-process within the *mimiCoRB* frame-work
for more advanced data analysis tasks requiring multiple processes running in parallel.
A *mimoCoRB* setup-file is also provided and can be started by *./run_daq setup.yaml*;
modules and configuration files for a pulse-height analysis of tecorded signals are
modules and configuration files for a pulse-height analysis of recorded signals are
contained in the subdirectories *modules/* and *config/*, respectively.
......@@ -135,8 +137,8 @@ contained in the subdirectories *modules/* and *config/*, respectively.
The sub-directory *RP-image* contains files to be transferred to a SD card for the RedPitaya board.
Proceed as follows:
- copy the contents of the directory *RP-image* to an empty SD card formatted as VFAT32.
- connect the RedPitaya to the network via the LAN port
- copy the contents of the directory *RP-image* to an empty SD card formatted as VFAT32;
- connect the RedPitaya to the network via the LAN port;
- insert the SD card in the RedPitaya and connect the power.
The RepPitaya directly starts the *mcpha* server application, requests an IP address via DHCP
......@@ -144,9 +146,9 @@ and waits for the client program to connect via network.
On the client computer, download the client software:
- clone the *mcpha* repository via `git clone https://gitlab.kit.edu/guenter.quast/redpitaya-mcpha`
- change directory to the installation directory and start the graphical interface of the client
software via `python3 mcpha.py` on the command line.
- clone the *redpitaya-mcpha* repository via `git clone https://gitlab.kit.edu/guenter.quast/redpitaya-mcpha`;
- change directory to the installation directory and start the graphical interface of the desired Python
client script on the command line.
The application programs *mcpha.py* or *redPdaq.py* take care of initializing the processes on the
RedPitaya board through the server process, initiate data transfers from the RedPitaya board to
......@@ -174,21 +176,24 @@ and the server process on the RedPitaya board.
Then, on the client side:
- start the client program via `python3 mcpha.py`
- start the client program from within a terminal via `python3 mcpha.py` or `python3 redPdaq.py`;
- in the graphical interface, enter the network address of the RedPitaya in the
field next to the orange button and click *connect*;
watch out for connection errors in the *Messages* tab!
The message "*IO started*" is displayed if everything is ok, and the address turns green.
The message "*IO started*" is displayed if everything is ok, and the address turns green;
- click the *oscilloscope* tab, check the trigger level and then start the oscilloscope
to see whether signals are arriving at one or both of the RedPitaya inputs.
Adjust the *decimation factor* in the top-right corner of the main display to ensure
to see whether signals are arriving at one or both of the RedPitaya inputs;
adjust the *decimation factor* in the top-right corner of the main display to ensure
that the sampling rate is high enough for about 50 samples over the pulse duration.
- if no signal source is available, you may click the *generator* tab, set the desired
signal parameters and start the generator; connect *out1* of the RedPitaya to the
input *in1* with a (short) cable and then check for the presence of signals in
the *oscilloscpe* tab.
signal parameters and start the generator; connect *out1* of the RedPitaya to one of
rhe inputs with a (short) cable and then check for the presence of signals in
the *oscilloscpe* tab;
- now click the tab *spectrum histogram 1*; adjust the amplitude threshold and time
of exposure, then click the *Start* button and watch the spectrum building up.
of exposure, then click the *Start* button and watch the spectrum building up;
- if running `redPdaq.py`, threre is a buttton "StartDQQ"; click it to cintinuously transfer
waveform data to the client computer. If a filename was specified, data is recorded to disk
in *.npy* format; note that any active spectrum rab is put in paused mode if DAQ is active.
- when finished, use the *Save* button to save the spectrum to a file with a
meaningful name.
......@@ -215,6 +220,8 @@ Note that presently mcpha.py exports data in human-readable format using
> *read_osc.py* demonstrates how to read and plot waveform data exported from the
oscilloscope tab of mcpha.py.
> *read_npy.py* illustrates how to read waveform recorded by `redPdaq.py`.
## Examples
The directory *examples/* contains some spectra recorded with *mchph.py* and the Python
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment