Python DSP | AD9172 DAC | AD9213 ADC | libiio

OOK Optical Link TX/RX GUI

Desktop transmitter and receiver applications that generate, stream, capture, and decode On-Off Keying signals on real Analog Devices high-speed data converters, with every intermediate DSP stage plotted live.

Python NumPy / SciPy Tkinter Matplotlib OptiCommPy libiio AD9172 AD9213

Demo

Live modulation and demodulation over the hardware link.

The recording shows the TX GUI streaming a Manchester-coded, framed OOK waveform to the AD9172 DAC while the RX GUI captures from the AD9213 ADC, recovers timing, and decodes frames with passing CRC checks.

Overview

A complete communication link, from frame bytes to recovered frame bytes.

The project connects a Python DSP workflow to AD9172 DAC and AD9213 ADC hardware through the Industrial I/O (IIO) interface. Separate transmitter and receiver GUIs expose the key link parameters, which makes the tool useful for lab testing, algorithm demonstrations, and link debugging.

TX

Waveform generation

Turns text, demo frames, or a prebuilt OCT binary frame into binary or Manchester OOK samples and streams a cyclic IQ buffer to the AD9172.

RX

Signal recovery

Captures raw AD9213 samples, strips the RF carrier with envelope detection, runs Gardner timing recovery, and reconstructs frames.

VIS

Live diagnostics

Plots raw RF, envelope, recovered clock, bits, and a live eye diagram, and exports CSV vectors for each processing block.

Signal Processing Chain

The TX and RX paths, stage by stage.

TX data
  -> framing or raw OCT-frame input
  -> binary/Manchester line coding
  -> OOK symbol mapping
  -> upsampling and pulse shaping
  -> interleaved I/Q samples
  -> AD9172 DAC

AD9213 ADC
  -> raw sample decoding
  -> Hilbert-envelope detection
  -> normalization and resampling to 2 SPS
  -> Gardner clock recovery
  -> threshold decision
  -> binary/Manchester decoding
  -> preamble synchronization
  -> recovered frame bytes

Features

Hardware control and DSP in one workflow.

Line coding and pulse shaping

Binary and IEEE Manchester coding with rectangular, NRZ, raised-cosine, and root-raised-cosine pulses.

DAC configuration

Cyclic IQ transmission with iio_writedev, plus DAC DDS and NCO setup through IIO attributes.

ADC capture

AD9213 sample capture with iio_readdev, feeding the receive DSP chain directly.

Timing recovery

OptiCommPy Gardner clock recovery at two samples per symbol with automatic timing-phase selection.

Frame synchronization

Demo frames with preamble, sync word, sequence number, and CRC16, synchronized and validated on receive.

Vector export

CSV export of the signal at each processing block for offline analysis and debugging.

Raw OCT-Frame Transport

Externally generated frames pass through bit-for-bit.

The TX can load a prebuilt OCT physical frame from a binary file and OOK-modulate it without rebuilding its header, FEC, payload, or CRC. The RX uses Gardner recovery and OCT-preamble synchronization to recover a fixed number of bytes and writes the complete frame back to a binary file.

1184 B

Frame size

9472 bits per uncoded OCT frame.

5.76 Mb/s

Data rate

368.64 MSPS TX sample rate at 64 samples per bit.

2.5 GSPS

ADC rate

8,388,608-sample RX capture recommended for cyclic alignment.

Outcome

End-to-end ownership of a hardware communication link.

The project covers frame handling, waveform generation, hardware control, ADC acquisition, DSP recovery, visual diagnostics, and byte-level validation of received data.

Discuss a Project