Setup Red Pitaya for NMR pulsed transmission

Related: Red Pitaya GNURadio image setup


Setup Red Pitaya NMR image

  1. format a micro SD card to FAT32 (find the SD card device name from df – be sure you don’t overwrite your hard drive!). Let’s suppose you found your SD card at /dev/mmcblk0, then:
    umount /dev/mmcblk0
    mkdosfs -F 32 -n NMR /dev/mmcblk0
    
  2. unzip Pavel Demins SD Card image to this SD card
    mount /dev/mmcblk0 /mnt/NMR
    unzip ecosystem-*-pulsed-nmr.zip -d /mnt/NMR
    umount /mnt/NMR
    
  3. boot the Red Pitaya with this SD card.
  4. Connect to Red Pitaya via Ethernet using SSH (login/password root/root) using Avahi

    or via serial port

Setup laptop

  1. get NMR code
    cd ~
    git clone https://github.com/pavel-demin/red-pitaya-notes
    
  2. Run the NMR control program
    cd red-pitaya-notes/projects/pulsed_nmr/client
    python3 pulsed_nmr.py
    
  3. You should see some perturbation (even if essentially zero amplitude) in the NMR trace plot.
    • If “start” button doesn’t change to “stop” when clicked, that can indicate that the Red Pitaya NMR dæmon is not running. Be sure you copied over the correct image to the SD card when you did the unzip step.

pulsed-nmr consumes about 8% CPU when generating a waveform and 5% CPU when idle.

Recompile server code

This is precompiled and running as a service in Pavel’s image. TODO: Does it take rewriting the image since the SD card filesystem is read-only?

apt install gcc-arm-linux-gnueabihf

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

Leave a Comment