Pulsed Nuclear Magnetic Resonance

This is a work in progress…

Some interesting links on pulsed nuclear magnetic resonance:

Short description

The system consists of one in-phase/quadrature (I/Q) digital down-converter (DDC) and of one pulse generator.

The tunable frequency range covers from 0 Hz to 60 MHz.

The I/Q data rate is configurable and five settings are available: 25, 50, 250, 500, 2500 kSPS.

Hardware

The basic blocks of the system are shown on the following diagram:

Pulsed NMR

The projects/pulsed_nmr directory contains three Tcl files: block_design.tcl, rx.tcl, tx.tcl. The code in these files instantiates, configures and interconnects all the needed IP cores.

Software

The projects/pulsed_nmr/server directory contains the source code of the TCP server (pulsed-nmr.c) that receives control commands and transmits the I/Q data streams (up to 2 x 32 bit x 2500 kSPS = 152 Mbit/s) to the control program running on a remote PC.

The projects/pulsed_nmr/client directory contains the source code of the control program (pulsed_nmr.py).

Pulsed NMR client

Getting started

sudo apt-get install python3-dev python3-pip python3-numpy python3-pyqt5
sudo pip3 install matplotlib
git clone https://github.com/pavel-demin/red-pitaya-notes
cd red-pitaya-notes/projects/pulsed_nmr/client
python3 pulsed_nmr.py

Building from source

The installation of the development machine is described at this link.

The structure of the source code and of the development chain is described at this link.

Setting up the Vivado environment:

source /opt/Xilinx/Vivado/2016.4/settings64.sh

Cloning the source code repository:

git clone https://github.com/pavel-demin/red-pitaya-notes
cd red-pitaya-notes

Building pulsed_nmr.bit:

make NAME=pulsed_nmr bit

Building pulsed-nmr:

arm-linux-gnueabihf-gcc -static -O3 -march=armv7-a -mcpu=cortex-a9 -mtune=cortex-a9 -mfpu=neon -mfloat-abi=hard projects/pulsed_nmr/server/pulsed-nmr.c -o pulsed-nmr -lm

Building SD card image zip file:

source helpers/pulsed-nmr-ecosystem.sh