Getting Started

OpenRRI ships in two parts: a prepared Linux/FPGA system image for the Red Pitaya STEMlab 125-14 board, and the openrri Python library for data acquisition and RRI signal processing. This page is a short orientation. The project wiki holds the full step-by-step instructions and is the authoritative reference.

What you need

  • A laser diode that supports mode-hop-free frequency modulation over a range of at least 6 GHz (~50 pm at 1550 nm).
  • A matching laser driver.
  • A photodetector for the wavelength in use.
  • A data acquisition board with at least one ADC and one DAC sharing the same trigger or clock. We use the Red Pitaya STEMlab 125-14 and provide a ready-made system image. See the tested hardware list for known-good components.

1. Flash the Red Pitaya SD card

Download the latest system image from the Releases page and flash it to the SD card supplied with the Red Pitaya (or any card 8 GB or larger). On Windows, Balena Etcher works well; on Linux, gnome-disk-utility does the job.

Read more: Preparing SD Card.

2. Connect the board

Insert the SD card, power the board with 5 V, and connect it to your computer over Ethernet. We recommend a dedicated USB-Ethernet adapter. The board ships configured for the static IP 10.42.0.10; configure your adapter to be on the same subnet. Both the IP and the network configuration can be changed on the board if needed.

Read more: Establishing Connection.

3. Install and use the Python library

Install the library with its DAQ extras into a fresh virtual environment:

git clone https://gitlab.com/openrri/openrri.git
cd openrri
python3 -m venv venv
source venv/bin/activate    # Linux
# venv/Scripts/activate     # Windows
pip install .[daq]

Open a board connection, output a sinusoidal modulation signal on DAC 1 and read back a short ADC trace:

from openrri.daq import DAQFactory, BoardType, InterfaceType

daq_config = {
    "board": {
        "board": BoardType.REDPITAYA,
        "soldered": False,
    },
    "interface": {
        "interface": InterfaceType.WebSocket,
        "ip": "10.42.0.10",
    },
}
board = DAQFactory.from_config(daq_config)

# Modulation output: 20 kHz, 0.2..0.5 V, no phase shift:
board.start_modulation(20_000, 0.2, 0.5, 0, channels=[1])
# 1 ms ADC sample acquisition:
data = board.get_data_raw(0.001, channels=[1])

Read more: OpenRRI Python API overview and the API reference for the latest release.

Where to go next